Lines Matching refs:sg_from
36 static size_t msb_sg_copy(struct scatterlist *sg_from, in msb_sg_copy() argument
42 if (offset >= sg_from->length) { in msb_sg_copy()
43 if (sg_is_last(sg_from)) in msb_sg_copy()
46 offset -= sg_from->length; in msb_sg_copy()
47 sg_from = sg_next(sg_from); in msb_sg_copy()
51 copied = min(len, sg_from->length - offset); in msb_sg_copy()
52 sg_set_page(sg_to, sg_page(sg_from), in msb_sg_copy()
53 copied, sg_from->offset + offset); in msb_sg_copy()
58 if (sg_is_last(sg_from) || !len) in msb_sg_copy()
63 sg_from = sg_next(sg_from); in msb_sg_copy()
66 while (len > sg_from->length && to_nents--) { in msb_sg_copy()
67 len -= sg_from->length; in msb_sg_copy()
68 copied += sg_from->length; in msb_sg_copy()
70 sg_set_page(sg_to, sg_page(sg_from), in msb_sg_copy()
71 sg_from->length, sg_from->offset); in msb_sg_copy()
73 if (sg_is_last(sg_from) || !len) in msb_sg_copy()
76 sg_from = sg_next(sg_from); in msb_sg_copy()
81 sg_set_page(sg_to, sg_page(sg_from), len, sg_from->offset); in msb_sg_copy()