diff options
Diffstat (limited to 'drivers/scsi/isci/request.c')
-rw-r--r-- | drivers/scsi/isci/request.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c index f4fbca7b1fa3..395084955150 100644 --- a/drivers/scsi/isci/request.c +++ b/drivers/scsi/isci/request.c | |||
@@ -2930,7 +2930,22 @@ static void isci_request_io_request_complete(struct isci_host *isci_host, | |||
2930 | break; | 2930 | break; |
2931 | } | 2931 | } |
2932 | 2932 | ||
2933 | isci_request_unmap_sgl(request, isci_host->pdev); | 2933 | switch (task->task_proto) { |
2934 | case SAS_PROTOCOL_SSP: | ||
2935 | if (task->data_dir == DMA_NONE) | ||
2936 | break; | ||
2937 | if (task->num_scatter == 0) | ||
2938 | /* 0 indicates a single dma address */ | ||
2939 | dma_unmap_single(&isci_host->pdev->dev, | ||
2940 | request->zero_scatter_daddr, | ||
2941 | task->total_xfer_len, task->data_dir); | ||
2942 | else /* unmap the sgl dma addresses */ | ||
2943 | dma_unmap_sg(&isci_host->pdev->dev, task->scatter, | ||
2944 | request->num_sg_entries, task->data_dir); | ||
2945 | break; | ||
2946 | default: | ||
2947 | break; | ||
2948 | } | ||
2934 | 2949 | ||
2935 | /* Put the completed request on the correct list */ | 2950 | /* Put the completed request on the correct list */ |
2936 | isci_task_save_for_upper_layer_completion(isci_host, request, response, | 2951 | isci_task_save_for_upper_layer_completion(isci_host, request, response, |