isci: Fix dma_unmap_sg() nents value
Subsystems (2)
PATCH 1/1 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 ddcc7e347a89 ("isci: fix dma_unmap_sg usage")
Signed-off-by Thomas Fourier <[email protected]>
--- drivers/scsi/isci/request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/isci/request.c +1 -1
@@ -2904,7 +2904,7 @@ static void isci_request_io_request_complete(struct isci_host *ihost, task->total_xfer_len, task->data_dir); else /* unmap the sgl dma addresses */ dma_unmap_sg(&ihost->pdev->dev, task->scatter, - request->num_sg_entries, task->data_dir); + task->num_scatter, task->data_dir);break ;case SAS_PROTOCOL_SMP : {struct scatterlist *sg = &task->smp_task.smp_req;
Signature · 1 line
2.43.0
Martin K. Petersen
AppliedThomas,
Quoted 2 lines
The
dma_unmap_sg()functions should be called with the same nents as thedma_map_sg(), not the value the map function returned.
Applied to 6.17/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen
Martin K. Petersen
AppliedQuoted 4 lines · Thomas Fourier
The
dma_unmap_sg()functions should be called with the same nents as thedma_map_sg(), not the value the map function returned.
Applied to 6.17/scsi-queue, thanks!
[1/1] isci: Fix dma_unmap_sg() nents value
https://git.kernel.org/mkp/scsi/c/063bec4444d5
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering