Home
last modified time | relevance | path

Searched refs:miter (Results 1 – 11 of 11) sorted by relevance

/drivers/misc/cb710/
Dsgbuf2.c14 static bool sg_dwiter_next(struct sg_mapping_iter *miter) in sg_dwiter_next() argument
16 if (sg_miter_next(miter)) { in sg_dwiter_next()
17 miter->consumed = 0; in sg_dwiter_next()
23 static bool sg_dwiter_is_at_end(struct sg_mapping_iter *miter) in sg_dwiter_is_at_end() argument
25 return miter->length == miter->consumed && !sg_dwiter_next(miter); in sg_dwiter_is_at_end()
28 static uint32_t sg_dwiter_read_buffer(struct sg_mapping_iter *miter) in sg_dwiter_read_buffer() argument
35 len = min(miter->length - miter->consumed, left); in sg_dwiter_read_buffer()
36 memcpy(addr, miter->addr + miter->consumed, len); in sg_dwiter_read_buffer()
37 miter->consumed += len; in sg_dwiter_read_buffer()
42 } while (sg_dwiter_next(miter)); in sg_dwiter_read_buffer()
[all …]
/drivers/usb/storage/
Dprotocol.c143 struct sg_mapping_iter miter; in usb_stor_access_xfer_buf() local
151 sg_miter_start(&miter, sg, nents, dir == FROM_XFER_BUF ? in usb_stor_access_xfer_buf()
154 if (!sg_miter_skip(&miter, *offset)) in usb_stor_access_xfer_buf()
157 while (sg_miter_next(&miter) && cnt < buflen) { in usb_stor_access_xfer_buf()
158 unsigned int len = min_t(unsigned int, miter.length, in usb_stor_access_xfer_buf()
162 memcpy(buffer + cnt, miter.addr, len); in usb_stor_access_xfer_buf()
164 memcpy(miter.addr, buffer + cnt, len); in usb_stor_access_xfer_buf()
166 if (*offset + len < miter.piter.sg->length) { in usb_stor_access_xfer_buf()
168 *sgptr = miter.piter.sg; in usb_stor_access_xfer_buf()
171 *sgptr = sg_next(miter.piter.sg); in usb_stor_access_xfer_buf()
[all …]
/drivers/mmc/host/
Djz4740_mmc.c145 struct sg_mapping_iter miter; member
468 struct sg_mapping_iter *miter = &host->miter; in jz4740_mmc_write_data() local
474 while (sg_miter_next(miter)) { in jz4740_mmc_write_data()
475 buf = miter->addr; in jz4740_mmc_write_data()
476 i = miter->length / 4; in jz4740_mmc_write_data()
506 data->bytes_xfered += miter->length; in jz4740_mmc_write_data()
508 sg_miter_stop(miter); in jz4740_mmc_write_data()
513 miter->consumed = (void *)buf - miter->addr; in jz4740_mmc_write_data()
514 data->bytes_xfered += miter->consumed; in jz4740_mmc_write_data()
515 sg_miter_stop(miter); in jz4740_mmc_write_data()
[all …]
Dcb710-mmc.c246 struct sg_mapping_iter *miter, size_t dw_count) in cb710_mmc_receive_pio() argument
255 cb710_sg_dwiter_write_from_io(miter, in cb710_mmc_receive_pio()
268 struct sg_mapping_iter miter; in cb710_mmc_receive() local
277 sg_miter_start(&miter, data->sg, data->sg_len, SG_MITER_TO_SG); in cb710_mmc_receive()
288 err = cb710_mmc_receive_pio(slot, &miter, 4); in cb710_mmc_receive()
301 err = cb710_mmc_receive_pio(slot, &miter, len); in cb710_mmc_receive()
306 sg_miter_stop(&miter); in cb710_mmc_receive()
312 struct sg_mapping_iter miter; in cb710_mmc_send() local
321 sg_miter_start(&miter, data->sg, data->sg_len, SG_MITER_FROM_SG); in cb710_mmc_send()
336 cb710_sg_dwiter_read_to_io(&miter, in cb710_mmc_send()
[all …]
/drivers/memstick/host/
Dr592.c419 struct sg_mapping_iter miter; in r592_transfer_fifo_pio() local
435 sg_miter_start(&miter, &dev->req->sg, 1, SG_MITER_ATOMIC | in r592_transfer_fifo_pio()
439 while (sg_miter_next(&miter)) in r592_transfer_fifo_pio()
441 r592_write_fifo_pio(dev, miter.addr, miter.length); in r592_transfer_fifo_pio()
443 r592_read_fifo_pio(dev, miter.addr, miter.length); in r592_transfer_fifo_pio()
450 sg_miter_stop(&miter); in r592_transfer_fifo_pio()
/drivers/iommu/
Ddma-iommu.c380 struct sg_mapping_iter miter; in iommu_dma_alloc() local
385 sg_miter_start(&miter, sgt.sgl, sgt.orig_nents, SG_MITER_FROM_SG); in iommu_dma_alloc()
386 while (sg_miter_next(&miter)) in iommu_dma_alloc()
387 flush_page(dev, miter.addr, page_to_phys(miter.page)); in iommu_dma_alloc()
388 sg_miter_stop(&miter); in iommu_dma_alloc()
/drivers/memstick/core/
Dms_block.c102 struct sg_mapping_iter miter; in msb_sg_compare_to_buffer() local
104 sg_miter_start(&miter, sg, sg_nents(sg), in msb_sg_compare_to_buffer()
107 while (sg_miter_next(&miter) && len > 0) { in msb_sg_compare_to_buffer()
108 if (offset >= miter.length) { in msb_sg_compare_to_buffer()
109 offset -= miter.length; in msb_sg_compare_to_buffer()
113 cmplen = min(miter.length - offset, len); in msb_sg_compare_to_buffer()
114 retval = memcmp(miter.addr + offset, buffer, cmplen) ? -1 : 0; in msb_sg_compare_to_buffer()
126 sg_miter_stop(&miter); in msb_sg_compare_to_buffer()
866 struct sg_mapping_iter miter; in msb_read_page() local
872 sg_miter_start(&miter, sg, sg_nents(sg), in msb_read_page()
[all …]
/drivers/usb/gadget/udc/
Ddummy_hcd.c219 struct sg_mapping_iter miter; member
1316 struct sg_mapping_iter *miter = &urbp->miter; in dummy_perform_transfer() local
1341 sg_miter_start(miter, urb->sg, urb->num_sgs, flags); in dummy_perform_transfer()
1344 next_sg = sg_miter_next(miter); in dummy_perform_transfer()
1350 ubuf = miter->addr; in dummy_perform_transfer()
1351 this_sg = min_t(u32, len, miter->length); in dummy_perform_transfer()
1352 miter->consumed = this_sg; in dummy_perform_transfer()
1363 next_sg = sg_miter_next(miter); in dummy_perform_transfer()
1372 sg_miter_stop(miter); in dummy_perform_transfer()
/drivers/scsi/
Dscsi_debug.c2467 struct sg_mapping_iter miter; in dif_copy_prot() local
2472 sg_miter_start(&miter, scsi_prot_sglist(SCpnt), in dif_copy_prot()
2476 while (sg_miter_next(&miter) && resid > 0) { in dif_copy_prot()
2477 size_t len = min(miter.length, resid); in dif_copy_prot()
2484 paddr = miter.addr; in dif_copy_prot()
2501 sg_miter_stop(&miter); in dif_copy_prot()
3409 struct sg_mapping_iter miter; in resp_xdwriteread() local
3422 sg_miter_start(&miter, sdb->table.sgl, sdb->table.nents, in resp_xdwriteread()
3425 while (sg_miter_next(&miter)) { in resp_xdwriteread()
3426 kaddr = miter.addr; in resp_xdwriteread()
[all …]
/drivers/ata/
Dlibata-scsi.c3602 struct sg_mapping_iter miter; in ata_scsi_report_zones_complete() local
3606 sg_miter_start(&miter, scsi_sglist(scmd), scsi_sg_count(scmd), in ata_scsi_report_zones_complete()
3610 while (sg_miter_next(&miter)) { in ata_scsi_report_zones_complete()
3620 hdr = miter.addr; in ata_scsi_report_zones_complete()
3632 while (offset < miter.length) { in ata_scsi_report_zones_complete()
3638 rec = miter.addr + offset; in ata_scsi_report_zones_complete()
3651 WARN_ON(offset + 64 > miter.length); in ata_scsi_report_zones_complete()
3656 sg_miter_stop(&miter); in ata_scsi_report_zones_complete()
/drivers/scsi/lpfc/
Dlpfc_bsg.c223 struct sg_mapping_iter miter; in lpfc_bsg_copy_data() local
235 sg_miter_start(&miter, bsg_buffers->sg_list, bsg_buffers->sg_cnt, in lpfc_bsg_copy_data()
238 sg_valid = sg_miter_next(&miter); in lpfc_bsg_copy_data()
246 sg_address = miter.addr + sg_offset; in lpfc_bsg_copy_data()
247 transfer_bytes = miter.length - sg_offset; in lpfc_bsg_copy_data()
249 sg_address = miter.addr; in lpfc_bsg_copy_data()
250 transfer_bytes = miter.length; in lpfc_bsg_copy_data()
264 if (sg_offset >= miter.length) { in lpfc_bsg_copy_data()
266 sg_valid = sg_miter_next(&miter); in lpfc_bsg_copy_data()
270 sg_miter_stop(&miter); in lpfc_bsg_copy_data()