Message ID | 20180905054645.19224-3-Viswas.G@microsemi.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | pm0xx : Updates for driver version 0.1.39. | expand |
On Wed, Sep 5, 2018 at 7:47 AM Viswas G <Viswas.G@microsemi.com> wrote: > > From: Deepak Ukey <deepak.ukey@microchip.com> > > 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> > --- > drivers/scsi/pm8001/pm8001_sas.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c > index 96b173f..719233c 100644 > --- a/drivers/scsi/pm8001/pm8001_sas.c > +++ b/drivers/scsi/pm8001/pm8001_sas.c > @@ -476,7 +476,7 @@ static int pm8001_task_exec(struct sas_task *task, > dev_printk(KERN_ERR, pm8001_ha->dev, "pm8001 exec failed[%d]!\n", rc); > if (!sas_protocol_ata(t->task_proto)) > if (n_elem) > - dma_unmap_sg(pm8001_ha->dev, t->scatter, n_elem, > + dma_unmap_sg(pm8001_ha->dev, t->scatter, t->num_scatter, > t->data_dir); > out_done: > spin_unlock_irqrestore(&pm8001_ha->lock, flags); > -- > 1.8.3.1 > Acked-by: Jack Wang <jinpu.wang@proftibricks.com> Thanks,
diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c index 96b173f..719233c 100644 --- a/drivers/scsi/pm8001/pm8001_sas.c +++ b/drivers/scsi/pm8001/pm8001_sas.c @@ -476,7 +476,7 @@ static int pm8001_task_exec(struct sas_task *task, dev_printk(KERN_ERR, pm8001_ha->dev, "pm8001 exec failed[%d]!\n", rc); if (!sas_protocol_ata(t->task_proto)) if (n_elem) - dma_unmap_sg(pm8001_ha->dev, t->scatter, n_elem, + dma_unmap_sg(pm8001_ha->dev, t->scatter, t->num_scatter, t->data_dir); out_done: spin_unlock_irqrestore(&pm8001_ha->lock, flags);