Skip to content

Commit 76cb25b

Browse files
Deepak Ukeymartinkpetersen
authored andcommitted
scsi: pm80xx: Corrected dma_unmap_sg() parameter
For the function dma_unmap_sg(), the <nents> parameter should be number of elements in the scatter list prior to the mapping, not after the mapping. Signed-off-by: Deepak Ukey <deepak.ukey@microchip.com> Signed-off-by: Viswas G <Viswas.G@microchip.com> Acked-by: Jack Wang <jinpu.wang@profitbricks.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent cd13575 commit 76cb25b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/scsi/pm8001/pm8001_sas.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ static int pm8001_task_exec(struct sas_task *task,
488488
dev_printk(KERN_ERR, pm8001_ha->dev, "pm8001 exec failed[%d]!\n", rc);
489489
if (!sas_protocol_ata(t->task_proto))
490490
if (n_elem)
491-
dma_unmap_sg(pm8001_ha->dev, t->scatter, n_elem,
491+
dma_unmap_sg(pm8001_ha->dev, t->scatter, t->num_scatter,
492492
t->data_dir);
493493
out_done:
494494
spin_unlock_irqrestore(&pm8001_ha->lock, flags);

0 commit comments

Comments
 (0)