Lines Matching refs:sg

105 static void init_sgl_element(struct scu_sgl_element *e, struct scatterlist *sg)  in init_sgl_element()  argument
107 e->length = sg_dma_len(sg); in init_sgl_element()
108 e->address_upper = upper_32_bits(sg_dma_address(sg)); in init_sgl_element()
109 e->address_lower = lower_32_bits(sg_dma_address(sg)); in init_sgl_element()
117 struct scatterlist *sg = NULL; in sci_request_build_sgl() local
124 sg = task->scatter; in sci_request_build_sgl()
126 while (sg) { in sci_request_build_sgl()
128 init_sgl_element(&scu_sg->A, sg); in sci_request_build_sgl()
129 sg = sg_next(sg); in sci_request_build_sgl()
130 if (sg) { in sci_request_build_sgl()
131 init_sgl_element(&scu_sg->B, sg); in sci_request_build_sgl()
132 sg = sg_next(sg); in sci_request_build_sgl()
1415 struct scatterlist *sg; in sci_stp_request_pio_data_in_copy_data_buffer() local
1424 sg = task->scatter; in sci_stp_request_pio_data_in_copy_data_buffer()
1427 struct page *page = sg_page(sg); in sci_stp_request_pio_data_in_copy_data_buffer()
1429 copy_len = min_t(int, total_len, sg_dma_len(sg)); in sci_stp_request_pio_data_in_copy_data_buffer()
1431 memcpy(kaddr + sg->offset, src_addr, copy_len); in sci_stp_request_pio_data_in_copy_data_buffer()
1435 sg = sg_next(sg); in sci_stp_request_pio_data_in_copy_data_buffer()
1773 struct scatterlist *sg = &task->smp_task.smp_resp; in sci_io_request_frame_handler() local
1780 kaddr = kmap_atomic(sg_page(sg)); in sci_io_request_frame_handler()
1781 rsp = kaddr + sg->offset; in sci_io_request_frame_handler()
1791 word_cnt = (sg->length/4)-1; in sci_io_request_frame_handler()
2920 struct scatterlist *sg = &task->smp_task.smp_req; in isci_request_io_request_complete() local
2924 dma_unmap_sg(&ihost->pdev->dev, sg, 1, DMA_TO_DEVICE); in isci_request_io_request_complete()
2927 kaddr = kmap_atomic(sg_page(sg)); in isci_request_io_request_complete()
2928 smp_req = kaddr + sg->offset; in isci_request_io_request_complete()
2929 sci_swab32_cpy(smp_req, smp_req, sg->length / sizeof(u32)); in isci_request_io_request_complete()
3185 struct scatterlist *sg = &task->smp_task.smp_req; in sci_io_request_construct_smp() local
3194 kaddr = kmap_atomic(sg_page(sg)); in sci_io_request_construct_smp()
3195 smp_req = kaddr + sg->offset; in sci_io_request_construct_smp()
3218 sci_swab32_cpy(smp_req, smp_req, sg->length / sizeof(u32)); in sci_io_request_construct_smp()
3222 if (!dma_map_sg(dev, sg, 1, DMA_TO_DEVICE)) in sci_io_request_construct_smp()
3292 task_context->command_iu_upper = upper_32_bits(sg_dma_address(sg)); in sci_io_request_construct_smp()
3293 task_context->command_iu_lower = lower_32_bits(sg_dma_address(sg) + sizeof(u32)); in sci_io_request_construct_smp()