Skip to content

Commit 063bec4

Browse files
Thomas-fouriermartinkpetersen
authored andcommitted
scsi: isci: Fix dma_unmap_sg() nents value
The dma_unmap_sg() functions should be called with the same nents as the dma_map_sg(), not the value the map function returned. Fixes: ddcc7e3 ("isci: fix dma_unmap_sg usage") Signed-off-by: Thomas Fourier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 0141618 commit 063bec4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/isci/request.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2904,7 +2904,7 @@ static void isci_request_io_request_complete(struct isci_host *ihost,
29042904
task->total_xfer_len, task->data_dir);
29052905
else /* unmap the sgl dma addresses */
29062906
dma_unmap_sg(&ihost->pdev->dev, task->scatter,
2907-
request->num_sg_entries, task->data_dir);
2907+
task->num_scatter, task->data_dir);
29082908
break;
29092909
case SAS_PROTOCOL_SMP: {
29102910
struct scatterlist *sg = &task->smp_task.smp_req;

0 commit comments

Comments
 (0)