/linux-2.4.37.9/arch/sparc64/kernel/ |
D | iommu_common.c | 15 static int verify_lengths(struct scatterlist *sg, int nents, int npages) in verify_lengths() argument 22 sg_len += sg[i].length; in verify_lengths() 25 for (i = 0; i < nents && sg[i].dma_length; i++) in verify_lengths() 26 dma_len += sg[i].dma_length; in verify_lengths() 35 for (i = 0; i < nents && sg[i].dma_length; i++) { in verify_lengths() 38 start = sg[i].dma_address; in verify_lengths() 41 end = sg[i].dma_address + sg[i].dma_length; in verify_lengths() 60 struct scatterlist *sg = *__sg; in verify_one_map() local 68 sglen = sg->length; in verify_one_map() 69 sgaddr = (unsigned long) (sg->address ? in verify_one_map() [all …]
|
D | sbus.c | 417 static inline void fill_sg(iopte_t *iopte, struct scatterlist *sg, int nused, int nelems, unsigned … in fill_sg() argument 419 struct scatterlist *dma_sg = sg; in fill_sg() 420 struct scatterlist *sg_end = sg + nelems; in fill_sg() 442 tmp = (unsigned long) SG_ENT_PHYS_ADDRESS(sg); in fill_sg() 443 len = sg->length; in fill_sg() 455 sg++; in fill_sg() 468 sg++; in fill_sg() 474 while (sg < sg_end && in fill_sg() 476 (pteval == SG_ENT_PHYS_ADDRESS(sg)) && in fill_sg() 478 (SG_ENT_PHYS_ADDRESS(sg) + sg->length - 1UL)) >> IO_PAGE_SHIFT) == 0UL) { in fill_sg() [all …]
|
/linux-2.4.37.9/include/asm-mips/ |
D | pci.h | 183 static inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, in pci_map_sg() argument 191 for (i = 0; i < nents; i++, sg++) { in pci_map_sg() 192 if (sg->address && sg->page) in pci_map_sg() 194 else if (!sg->address && !sg->page) in pci_map_sg() 197 if (sg->address) { in pci_map_sg() 198 dma_cache_wback_inv((unsigned long)sg->address, in pci_map_sg() 199 sg->length); in pci_map_sg() 200 sg->dma_address = bus_to_baddr(hwdev->bus, __pa(sg->address)); in pci_map_sg() 202 sg->dma_address = page_to_bus(sg->page) + in pci_map_sg() 203 sg->offset; in pci_map_sg() [all …]
|
/linux-2.4.37.9/include/asm-mips64/ |
D | pci.h | 183 static inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, in pci_map_sg() argument 191 for (i = 0; i < nents; i++, sg++) { in pci_map_sg() 192 if (sg->address && sg->page) in pci_map_sg() 194 else if (!sg->address && !sg->page) in pci_map_sg() 197 if (sg->address) { in pci_map_sg() 198 dma_cache_wback_inv((unsigned long)sg->address, in pci_map_sg() 199 sg->length); in pci_map_sg() 200 sg->dma_address = bus_to_baddr(hwdev->bus, __pa(sg->address)); in pci_map_sg() 202 sg->dma_address = page_to_bus(sg->page) + in pci_map_sg() 203 sg->offset; in pci_map_sg() [all …]
|
/linux-2.4.37.9/include/asm-sh64/ |
D | pci.h | 158 static inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, in pci_map_sg() argument 164 if (sg[i].address) { in pci_map_sg() 165 dma_cache_wback_inv((unsigned long)sg[i].address, in pci_map_sg() 166 sg[i].length); in pci_map_sg() 167 sg[i].dma_address = virt_to_bus(sg[i].address); in pci_map_sg() 169 sg[i].dma_address = page_to_bus(sg[i].page) + in pci_map_sg() 170 sg[i].offset; in pci_map_sg() 171 dma_cache_wback_inv((unsigned long) bus_to_virt(sg[i].dma_address), sg[i].length); in pci_map_sg() 184 static inline void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, in pci_unmap_sg() argument 193 if (!sg[i].address) in pci_unmap_sg() [all …]
|
/linux-2.4.37.9/Documentation/ |
D | scsi-generic.txt | 1 Notes on Linux SCSI Generic (sg) driver 6 The SCSI Generic driver (sg) is one of the four "high level" SCSI device 10 Thus sg is used for scanners, CD writers and reading audio CDs digitally 18 Major versions of the sg driver 20 There are three major versions of sg found in the linux kernel (lk): 21 - sg version 1 (original) from 1992 to early 1999 (lk 2.2.5) . 23 - sg version 2 from lk 2.2.6 in the 2.2 series. It is based on 25 - sg version 3 found in the lk 2.4 series (and the lk 2.5 series). 31 The most recent documentation of the sg driver is kept at the Linux 34 This describes the sg version 3 driver found in the lk 2.4 series. [all …]
|
/linux-2.4.37.9/include/asm-ppc/ |
D | pci.h | 155 static inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, in pci_map_sg() argument 167 if (sg[i].address && sg[i].page) in pci_map_sg() 169 else if (!sg[i].address && !sg[i].page) in pci_map_sg() 172 if (sg[i].address) { in pci_map_sg() 173 consistent_sync(sg[i].address, sg[i].length, direction); in pci_map_sg() 174 sg[i].dma_address = virt_to_bus(sg[i].address); in pci_map_sg() 176 consistent_sync_page(sg[i].page, sg[i].offset, in pci_map_sg() 177 sg[i].length, direction); in pci_map_sg() 178 sg[i].dma_address = page_to_bus(sg[i].page) + sg[i].offset; in pci_map_sg() 180 sg[i].dma_length = sg[i].length; in pci_map_sg() [all …]
|
/linux-2.4.37.9/arch/ia64/sn/io/machvec/ |
D | pci_dma.c | 41 void sn_pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction); 261 sn_pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction) in sn_pci_map_sg() argument 270 struct scatterlist *saved_sg = sg; in sn_pci_map_sg() 286 for (i = 0; i < nents; i++, sg++) { in sn_pci_map_sg() 287 phys_addr = __pa(sg->address ? sg->address : in sn_pci_map_sg() 288 page_address(sg->page) + sg->offset); in sn_pci_map_sg() 295 sg->dma_address = pciio_dmatrans_addr(vhdl, NULL, phys_addr, in sn_pci_map_sg() 296 sg->length, PCIIO_DMA_DATA | PCIIO_DMA_A64); in sn_pci_map_sg() 297 sg->dma_length = sg->length; in sn_pci_map_sg() 305 sg->dma_address = pciio_dmatrans_addr(vhdl, NULL, phys_addr, in sn_pci_map_sg() [all …]
|
/linux-2.4.37.9/arch/ia64/lib/ |
D | swiotlb.c | 33 #define SG_ENT_VIRT_ADDRESS(sg) ((sg)->address ? (sg)->address \ argument 34 : page_address((sg)->page) + (sg)->offset) 418 swiotlb_map_sg (struct pci_dev *hwdev, struct scatterlist *sg, int nelems, int direction) in swiotlb_map_sg() argument 425 for (i = 0; i < nelems; i++, sg++) { in swiotlb_map_sg() 426 void * virt_address = SG_ENT_VIRT_ADDRESS(sg); in swiotlb_map_sg() 429 sg->dma_length = sg->length; in swiotlb_map_sg() 431 sg->dma_address = virt_to_phys(map_single(hwdev, in swiotlb_map_sg() 433 sg->length, in swiotlb_map_sg() 436 sg->dma_address = phys_address; in swiotlb_map_sg() 446 swiotlb_unmap_sg (struct pci_dev *hwdev, struct scatterlist *sg, int nelems, int direction) in swiotlb_unmap_sg() argument [all …]
|
/linux-2.4.37.9/include/asm-parisc/ |
D | scatterlist.h | 25 #define sg_virt_addr(sg) (((sg)->address) ? ((sg)->address) : \ argument 26 (page_address((sg)->page) + (sg)->offset)) 28 #define sg_dma_address(sg) ((sg)->iova) argument 29 #define sg_dma_len(sg) ((sg)->iova_length) argument
|
/linux-2.4.37.9/include/asm-i386/ |
D | pci.h | 148 static inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, in pci_map_sg() argument 160 if (sg[i].address && sg[i].page) in pci_map_sg() 162 else if (!sg[i].address && !sg[i].page) in pci_map_sg() 165 if (sg[i].address) in pci_map_sg() 166 sg[i].dma_address = virt_to_bus(sg[i].address); in pci_map_sg() 168 sg[i].dma_address = page_to_bus(sg[i].page) + sg[i].offset; in pci_map_sg() 179 static inline void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, in pci_unmap_sg() argument 212 struct scatterlist *sg, in pci_dma_sync_sg() argument 273 #define sg_dma_address(sg) ((sg)->dma_address) argument 274 #define sg_dma_len(sg) ((sg)->length) argument
|
/linux-2.4.37.9/include/asm-arm/ |
D | pci.h | 157 pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction) in pci_map_sg() argument 162 return sa1111_map_sg(sg, nents, direction); in pci_map_sg() 164 for (i = 0; i < nents; i++, sg++) { in pci_map_sg() 165 char *vaddr = sg->address; in pci_map_sg() 168 vaddr = ((char *)page_address(sg->page)) + sg->offset; in pci_map_sg() 170 consistent_sync(vaddr, sg->length, direction); in pci_map_sg() 171 sg->dma_address = virt_to_bus(vaddr); in pci_map_sg() 182 pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction) in pci_unmap_sg() argument 185 sa1111_unmap_sg(sg, nents, direction); in pci_unmap_sg() 219 pci_dma_sync_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nelems, int direction) in pci_dma_sync_sg() argument [all …]
|
/linux-2.4.37.9/arch/alpha/kernel/ |
D | pci_iommu.c | 465 sg_classify(struct scatterlist *sg, struct scatterlist *end, int virt_ok) in sg_classify() argument 471 leader = sg; in sg_classify() 476 for (++sg; sg < end; ++sg) { in sg_classify() 478 addr = SG_ENT_PHYS_ADDRESS(sg); in sg_classify() 479 len = sg->length; in sg_classify() 482 sg->dma_address = -1; in sg_classify() 485 sg->dma_address = -2; in sg_classify() 491 leader = sg; in sg_classify() 513 struct scatterlist *sg; in sg_fill() local 570 sg = leader; in sg_fill() [all …]
|
/linux-2.4.37.9/drivers/usb/storage/ |
D | debug.c | 159 struct scatterlist* sg = (struct scatterlist*)cmd->request_buffer; in usb_stor_print_Scsi_Cmnd() local 192 US_DEBUGP("Length of scatterlist %d is %d.\n",i,sg[i].length); in usb_stor_print_Scsi_Cmnd() 195 sg[i].address[0], in usb_stor_print_Scsi_Cmnd() 196 sg[i].address[1], in usb_stor_print_Scsi_Cmnd() 197 sg[i].address[2], in usb_stor_print_Scsi_Cmnd() 198 sg[i].address[3], in usb_stor_print_Scsi_Cmnd() 199 sg[i].address[4], in usb_stor_print_Scsi_Cmnd() 200 sg[i].address[5], in usb_stor_print_Scsi_Cmnd() 201 sg[i].address[6], in usb_stor_print_Scsi_Cmnd() 202 sg[i].address[7], in usb_stor_print_Scsi_Cmnd() [all …]
|
D | scsiglue.c | 495 struct scatterlist *sg = 0; in usb_stor_scsiSense10to6() local 567 sg = (struct scatterlist *) the10->request_buffer; in usb_stor_scsiSense10to6() 571 sgLength = sg[i].length; in usb_stor_scsiSense10to6() 599 si >= sg[sb].length || in usb_stor_scsiSense10to6() 601 di >= sg[db].length ) in usb_stor_scsiSense10to6() 609 sg[db].address[di] = sg[sb].address[si]; in usb_stor_scsiSense10to6() 612 if ( sg[db].length-1 == di ) in usb_stor_scsiSense10to6() 623 if ( sg[sb].length-1 == si ) in usb_stor_scsiSense10to6() 640 di >= sg[db].length ) in usb_stor_scsiSense10to6() 647 sg[db].address[di] = 0; in usb_stor_scsiSense10to6() [all …]
|
/linux-2.4.37.9/include/asm-sh/ |
D | pci.h | 156 static inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, in pci_map_sg() argument 163 dma_cache_wback_inv(sg[i].address, sg[i].length); in pci_map_sg() 175 static inline void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, in pci_unmap_sg() argument 210 struct scatterlist *sg, in pci_dma_sync_sg() argument 220 dma_cache_wback_inv(sg[i].address, sg[i].length); in pci_dma_sync_sg() 249 #define sg_dma_address(sg) (virt_to_bus((sg)->address)) argument 250 #define sg_dma_len(sg) ((sg)->length) argument
|
/linux-2.4.37.9/drivers/scsi/aacraid/ |
D | commctrl.c | 462 struct sgmap64* psg = (struct sgmap64*)&srbcmd->sg; in aac_send_raw_srb() 466 …actual_fibsize = sizeof (struct aac_srb) + (((srbcmd->sg.count & 0xff) - 1) * sizeof (struct sgent… in aac_send_raw_srb() 482 p = kmalloc(psg->sg[i].count,GFP_KERNEL|__GFP_DMA); in aac_send_raw_srb() 485 psg->sg[i].count,i,psg->count); in aac_send_raw_srb() 489 sg_user[i] = (ulong)psg->sg[i].addr; in aac_send_raw_srb() 494 if(copy_from_user(p,psg->sg[i].addr,psg->sg[i].count)){ in aac_send_raw_srb() 500 addr = pci_map_single(dev->pdev, p, psg->sg[i].count, scsi_to_pci_dma_dir(data_dir)); in aac_send_raw_srb() 503 psg->sg[i].addr[1] = (u32)(le_addr>>32); in aac_send_raw_srb() 504 psg->sg[i].addr[0] = (u32)(le_addr & 0xffffffff); in aac_send_raw_srb() 505 psg->sg[i].count = cpu_to_le32(psg->sg[i].count); in aac_send_raw_srb() [all …]
|
/linux-2.4.37.9/crypto/ |
D | tcrypt.c | 84 struct scatterlist sg[8]; in test_hash() local 113 sg[0].page = virt_to_page (p); in test_hash() 114 sg[0].offset = offset_in_page (p); in test_hash() 115 sg[0].length = hash_tv[i].psize; in test_hash() 122 crypto_digest_update (tfm, sg, 1); in test_hash() 150 sg[k].page = virt_to_page (p); in test_hash() 151 sg[k].offset = offset_in_page (p); in test_hash() 152 sg[k].length = hash_tv[i].tap[k]; in test_hash() 155 crypto_digest_digest (tfm, sg, hash_tv[i].np, result); in test_hash() 176 struct scatterlist sg[8]; in test_hmac() local [all …]
|
D | scatterwalk.c | 49 void scatterwalk_start(struct scatter_walk *walk, struct scatterlist *sg) in scatterwalk_start() argument 53 walk->sg = sg; in scatterwalk_start() 55 walk->page = sg->page; in scatterwalk_start() 56 walk->len_this_segment = sg->length; in scatterwalk_start() 58 rest_of_page = PAGE_CACHE_SIZE - (sg->offset & (PAGE_CACHE_SIZE - 1)); in scatterwalk_start() 59 walk->len_this_page = min(sg->length, rest_of_page); in scatterwalk_start() 60 walk->offset = sg->offset; in scatterwalk_start() 88 scatterwalk_start(walk, sg_next(walk->sg)); in scatterwalk_pagedone()
|
D | digest.c | 27 struct scatterlist *sg, unsigned int nsg) in update() argument 33 struct page *pg = sg[i].page; in update() 34 unsigned int offset = sg[i].offset; in update() 35 unsigned int l = sg[i].length; in update() 70 struct scatterlist *sg, unsigned int nsg, u8 *out) in digest() argument 77 char *p = crypto_kmap(sg[i].page, 0) + sg[i].offset; in digest() 79 p, sg[i].length); in digest()
|
/linux-2.4.37.9/drivers/ide/pci/ |
D | sgiioc4.c | 558 struct scatterlist *sg; in sgiioc4_build_dma_table() local 568 sg = hwif->sg_table; in sgiioc4_build_dma_table() 569 while (i && sg_dma_len(sg)) { in sgiioc4_build_dma_table() 572 cur_addr = sg_dma_address(sg); in sgiioc4_build_dma_table() 573 cur_len = sg_dma_len(sg); in sgiioc4_build_dma_table() 602 sg++; in sgiioc4_build_dma_table() 691 struct scatterlist *sg = hwif->sg_table; in sgiioc4_ide_build_sglist() local 711 sg[nents - 1].length += bh->b_size; in sgiioc4_ide_build_sglist() 719 memset(&sg[nents], 0, sizeof (*sg)); in sgiioc4_ide_build_sglist() 722 sg[nents].page = bh->b_page; in sgiioc4_ide_build_sglist() [all …]
|
/linux-2.4.37.9/arch/sparc/mm/ |
D | iommu.c | 168 static void iommu_get_scsi_sgl_noflush(struct scatterlist *sg, int sz, struct sbus_bus *sbus) in iommu_get_scsi_sgl_noflush() argument 172 sg[sz].dvma_address = (__u32) (sg[sz].address); in iommu_get_scsi_sgl_noflush() 173 sg[sz].dvma_length = (__u32) (sg[sz].length); in iommu_get_scsi_sgl_noflush() 177 static void iommu_get_scsi_sgl_gflush(struct scatterlist *sg, int sz, struct sbus_bus *sbus) in iommu_get_scsi_sgl_gflush() argument 182 sg[sz].dvma_address = (__u32) (sg[sz].address); in iommu_get_scsi_sgl_gflush() 183 sg[sz].dvma_length = (__u32) (sg[sz].length); in iommu_get_scsi_sgl_gflush() 187 static void iommu_get_scsi_sgl_pflush(struct scatterlist *sg, int sz, struct sbus_bus *sbus) in iommu_get_scsi_sgl_pflush() argument 193 page = ((unsigned long) sg[sz].address) & PAGE_MASK; in iommu_get_scsi_sgl_pflush() 196 while(page < (unsigned long)(sg[sz].address + sg[sz].length)) { in iommu_get_scsi_sgl_pflush() 200 sg[sz].dvma_address = (__u32) (sg[sz].address); in iommu_get_scsi_sgl_pflush() [all …]
|
/linux-2.4.37.9/arch/ppc64/kernel/ |
D | pci_dma.c | 107 static unsigned fill_scatterlist_sg(struct scatterlist *sg, int nents, 111 static unsigned long num_tces_sg( struct scatterlist *sg, 115 struct scatterlist *sg, 1151 static unsigned long num_tces_sg( struct scatterlist *sg, int nents ) in num_tces_sg() argument 1164 address = sg->address ? sg->address : in num_tces_sg() 1165 (page_address(sg->page) + sg->offset); in num_tces_sg() 1167 endPage = ((unsigned long)address + sg->length - 1) >> PAGE_SHIFT; in num_tces_sg() 1179 sg++; in num_tces_sg() 1187 static unsigned fill_scatterlist_sg( struct scatterlist *sg, int nents, in fill_scatterlist_sg() argument 1196 dma_sg = sg; in fill_scatterlist_sg() [all …]
|
/linux-2.4.37.9/arch/arm/kernel/ |
D | dma-rpc.c | 55 static void iomd_get_next_sg(struct scatterlist *sg, dma_t *dma) in iomd_get_next_sg() argument 59 if (dma->sg) { in iomd_get_next_sg() 60 sg->dma_address = dma->sg->dma_address; in iomd_get_next_sg() 61 offset = sg->dma_address & ~PAGE_MASK; in iomd_get_next_sg() 63 end = offset + dma->sg->length; in iomd_get_next_sg() 71 sg->length = end - TRANSFER_SIZE; in iomd_get_next_sg() 73 dma->sg->length -= end - offset; in iomd_get_next_sg() 74 dma->sg->dma_address += end - offset; in iomd_get_next_sg() 76 if (dma->sg->length == 0) { in iomd_get_next_sg() 78 dma->sg++; in iomd_get_next_sg() [all …]
|
/linux-2.4.37.9/drivers/ide/ |
D | ide-dma.c | 254 struct scatterlist *sg = hwif->sg_table; in ide_build_sglist() local 274 sg[nents - 1].length += bh->b_size; in ide_build_sglist() 282 memset(&sg[nents], 0, sizeof(*sg)); in ide_build_sglist() 285 sg[nents].page = bh->b_page; in ide_build_sglist() 286 sg[nents].offset = bh_offset(bh); in ide_build_sglist() 292 sg[nents].address = bh->b_data; in ide_build_sglist() 296 sg[nents].length = bh->b_size; in ide_build_sglist() 304 return pci_map_sg(hwif->pci_dev, sg, nents, ddir); in ide_build_sglist() 320 struct scatterlist *sg = hwif->sg_table; in ide_raw_build_sglist() local 332 memset(&sg[nents], 0, sizeof(*sg)); in ide_raw_build_sglist() [all …]
|