* [PATCH] isci: Fix dma_unmap_sg() nents value
@ 2025-06-27 14:24 Thomas Fourier
2025-07-14 17:46 ` Martin K. Petersen
2025-07-22 3:47 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Fourier @ 2025-06-27 14:24 UTC (permalink / raw)
Cc: Thomas Fourier, James E.J. Bottomley, Martin K. Petersen,
Dan Williams, linux-scsi, linux-kernel
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 <fourier.thomas@gmail.com>
---
drivers/scsi/isci/request.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c
index 355a0bc0828e..bb89a2e33eb4 100644
--- a/drivers/scsi/isci/request.c
+++ b/drivers/scsi/isci/request.c
@@ -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;
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] isci: Fix dma_unmap_sg() nents value
2025-06-27 14:24 [PATCH] isci: Fix dma_unmap_sg() nents value Thomas Fourier
@ 2025-07-14 17:46 ` Martin K. Petersen
2025-07-22 3:47 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2025-07-14 17:46 UTC (permalink / raw)
To: Thomas Fourier
Cc: James E.J. Bottomley, Martin K. Petersen, Dan Williams,
linux-scsi, linux-kernel
Thomas,
> The dma_unmap_sg() functions should be called with the same nents as
> the dma_map_sg(), not the value the map function returned.
Applied to 6.17/scsi-staging, thanks!
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] isci: Fix dma_unmap_sg() nents value
2025-06-27 14:24 [PATCH] isci: Fix dma_unmap_sg() nents value Thomas Fourier
2025-07-14 17:46 ` Martin K. Petersen
@ 2025-07-22 3:47 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2025-07-22 3:47 UTC (permalink / raw)
To: Thomas Fourier
Cc: Martin K . Petersen, James E.J. Bottomley, Dan Williams,
linux-scsi, linux-kernel
On Fri, 27 Jun 2025 16:24:47 +0200, Thomas Fourier wrote:
> The dma_unmap_sg() functions should be called with the same nents as the
> dma_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
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-22 3:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-27 14:24 [PATCH] isci: Fix dma_unmap_sg() nents value Thomas Fourier
2025-07-14 17:46 ` Martin K. Petersen
2025-07-22 3:47 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).