Lines Matching refs:miter
127 struct sg_mapping_iter miter; in usb_stor_access_xfer_buf() local
135 sg_miter_start(&miter, sg, nents, dir == FROM_XFER_BUF ? in usb_stor_access_xfer_buf()
138 if (!sg_miter_skip(&miter, *offset)) in usb_stor_access_xfer_buf()
141 while (sg_miter_next(&miter) && cnt < buflen) { in usb_stor_access_xfer_buf()
142 unsigned int len = min_t(unsigned int, miter.length, in usb_stor_access_xfer_buf()
146 memcpy(buffer + cnt, miter.addr, len); in usb_stor_access_xfer_buf()
148 memcpy(miter.addr, buffer + cnt, len); in usb_stor_access_xfer_buf()
150 if (*offset + len < miter.piter.sg->length) { in usb_stor_access_xfer_buf()
152 *sgptr = miter.piter.sg; in usb_stor_access_xfer_buf()
155 *sgptr = sg_next(miter.piter.sg); in usb_stor_access_xfer_buf()
159 sg_miter_stop(&miter); in usb_stor_access_xfer_buf()