Lines Matching refs:current_sg_offset
186 int sg_idx = 0, current_sg_offset = 0; in datafab_read_data() local
266 if (len - transferred >= sg[sg_idx].length - current_sg_offset) { in datafab_read_data()
267 …data: adding %d bytes to %d byte sg buffer\n", sg[sg_idx].length - current_sg_offset, sg[sg_idx].… in datafab_read_data()
268 memcpy(sg[sg_idx].address + current_sg_offset, in datafab_read_data()
270 sg[sg_idx].length - current_sg_offset); in datafab_read_data()
271 transferred += sg[sg_idx].length - current_sg_offset; in datafab_read_data()
272 current_sg_offset = 0; in datafab_read_data()
277 memcpy(sg[sg_idx].address + current_sg_offset, in datafab_read_data()
280 current_sg_offset += len - transferred; in datafab_read_data()
311 int sg_idx = 0, current_sg_offset = 0; in datafab_write_data() local
356 if (len - transferred >= sg[sg_idx].length - current_sg_offset) { in datafab_write_data()
357 …a: getting %d bytes from %d byte sg buffer\n", sg[sg_idx].length - current_sg_offset, sg[sg_idx].… in datafab_write_data()
359 sg[sg_idx].address + current_sg_offset, in datafab_write_data()
360 sg[sg_idx].length - current_sg_offset); in datafab_write_data()
361 transferred += sg[sg_idx].length - current_sg_offset; in datafab_write_data()
362 current_sg_offset = 0; in datafab_write_data()
368 sg[sg_idx].address + current_sg_offset, in datafab_write_data()
370 current_sg_offset += len - transferred; in datafab_write_data()