lkml.org 
[lkml]   [2019]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 101/239] scsi: pm80xx: Corrected dma_unmap_sg() parameter
    Date
    From: Deepak Ukey <deepak.ukey@microchip.com>

    [ Upstream commit 76cb25b058034d37244be6aca97a2ad52a5fbcad ]

    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>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    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 ce584c31d36e5..d1fcd21f7f7dd 100644
    --- a/drivers/scsi/pm8001/pm8001_sas.c
    +++ b/drivers/scsi/pm8001/pm8001_sas.c
    @@ -466,7 +466,7 @@ err_out:
    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);
    --
    2.20.1


    \
     
     \ /
      Last update: 2019-11-19 06:49    [W:4.140 / U:0.568 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site