Skip to content

Commit 3a988d0

Browse files
Thomas-fouriermartinkpetersen
authored andcommitted
scsi: elx: efct: 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: 692e5d7 ("scsi: elx: efct: LIO backend interface routines") 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 25236d4 commit 3a988d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/elx/efct/efct_lio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ efct_lio_sg_unmap(struct efct_io *io)
382382
return;
383383

384384
dma_unmap_sg(&io->efct->pci->dev, cmd->t_data_sg,
385-
ocp->seg_map_cnt, cmd->data_direction);
385+
cmd->t_data_nents, cmd->data_direction);
386386
ocp->seg_map_cnt = 0;
387387
}
388388

0 commit comments

Comments
 (0)