Lines Matching refs:sg_idx
271 int sg_idx = 0, current_sg_offset = 0; in jumpshot_read_data() local
341 while (sg_idx < use_sg && transferred < len) { in jumpshot_read_data()
342 if (len - transferred >= sg[sg_idx].length - current_sg_offset) { in jumpshot_read_data()
343 …ad_data: adding %d bytes to %d byte sg buffer\n", sg[sg_idx].length - current_sg_offset, sg[sg_id… in jumpshot_read_data()
344 memcpy(sg[sg_idx].address + current_sg_offset, in jumpshot_read_data()
346 sg[sg_idx].length - current_sg_offset); in jumpshot_read_data()
347 transferred += sg[sg_idx].length - current_sg_offset; in jumpshot_read_data()
350 ++sg_idx; in jumpshot_read_data()
352 …umpshot_read_data: adding %d bytes to %d byte sg buffer\n", len - transferred, sg[sg_idx].length); in jumpshot_read_data()
353 memcpy(sg[sg_idx].address + current_sg_offset, in jumpshot_read_data()
386 int sg_idx = 0, current_sg_offset = 0; in jumpshot_write_data() local
423 if (len - transferred >= sg[sg_idx].length - current_sg_offset) { in jumpshot_write_data()
424 …data: getting %d bytes from %d byte sg buffer\n", sg[sg_idx].length - current_sg_offset, sg[sg_id… in jumpshot_write_data()
426 sg[sg_idx].address + current_sg_offset, in jumpshot_write_data()
427 sg[sg_idx].length - current_sg_offset); in jumpshot_write_data()
428 transferred += sg[sg_idx].length - current_sg_offset; in jumpshot_write_data()
431 ++sg_idx; in jumpshot_write_data()
433 …hot_write_data: getting %d bytes from %d byte sg buffer\n", len - transferred, sg[sg_idx].length); in jumpshot_write_data()
435 sg[sg_idx].address + current_sg_offset, in jumpshot_write_data()