Lines Matching refs:sg
278 struct scatterlist *sg; in tcmu_queue_cmd_ring() local
363 for_each_sg(se_cmd->t_data_sg, sg, se_cmd->t_data_nents, i) { in tcmu_queue_cmd_ring()
364 size_t copy_bytes = min((size_t)sg->length, in tcmu_queue_cmd_ring()
366 void *from = kmap_atomic(sg_page(sg)) + sg->offset; in tcmu_queue_cmd_ring()
384 if (sg->length != copy_bytes) { in tcmu_queue_cmd_ring()
386 copy_bytes = sg->length - copy_bytes; in tcmu_queue_cmd_ring()
484 struct scatterlist *sg; in tcmu_handle_completion() local
488 for_each_sg(se_cmd->t_data_sg, sg, se_cmd->t_data_nents, i) { in tcmu_handle_completion()
493 copy_bytes = min((size_t)sg->length, in tcmu_handle_completion()
496 to = kmap_atomic(sg_page(sg)) + sg->offset; in tcmu_handle_completion()
497 WARN_ON(sg->length + sg->offset > PAGE_SIZE); in tcmu_handle_completion()
505 if (sg->length != copy_bytes) { in tcmu_handle_completion()
509 copy_bytes = sg->length - copy_bytes; in tcmu_handle_completion()