lkml.org 
[lkml]   [2020]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.9 029/391] ata: sata_nv: Fix retrieving of active qcs
    Date
    From: Sascha Hauer <s.hauer@pengutronix.de>

    [ Upstream commit 8e4c309f9f33b76c09daa02b796ef87918eee494 ]

    ata_qc_complete_multiple() has to be called with the tags physically
    active, that is the hw tag is at bit 0. ap->qc_active has the same tag
    at bit ATA_TAG_INTERNAL instead, so call ata_qc_get_active() to fix that
    up. This is done in the vein of 8385d756e114 ("libata: Fix retrieving of
    active qcs").

    Fixes: 28361c403683 ("libata: add extra internal command")
    Tested-by: Pali Rohár <pali@kernel.org>
    Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/ata/sata_nv.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
    index eb9dc14e5147a..20190f66ced98 100644
    --- a/drivers/ata/sata_nv.c
    +++ b/drivers/ata/sata_nv.c
    @@ -2100,7 +2100,7 @@ static int nv_swncq_sdbfis(struct ata_port *ap)
    pp->dhfis_bits &= ~done_mask;
    pp->dmafis_bits &= ~done_mask;
    pp->sdbfis_bits |= done_mask;
    - ata_qc_complete_multiple(ap, ap->qc_active ^ done_mask);
    + ata_qc_complete_multiple(ap, ata_qc_get_active(ap) ^ done_mask);

    if (!ap->qc_active) {
    DPRINTK("over\n");
    --
    2.27.0


    \
     
     \ /
      Last update: 2020-11-03 23:12    [W:2.080 / U:0.464 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site