scsi: ufs: core: Unbreak the reset handler
authorBart Van Assche <bvanassche@acm.org>
Thu, 16 Sep 2021 17:54:04 +0000 (10:54 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 22 Sep 2021 03:56:19 +0000 (23:56 -0400)
A command tag is passed as the second argument of the
__ufshcd_transfer_req_compl() call in ufshcd_eh_device_reset_handler()
instead of a bitmask. Fix this by passing a bitmask as argument instead of
a command tag.

Link: https://lore.kernel.org/r/20210916175408.2260084-1-bvanassche@acm.org
Fixes: a45f937110fa ("scsi: ufs: Optimize host lock on transfer requests send/compl paths")
Cc: Can Guo <cang@codeaurora.org>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshcd.c

index a3df5804b2c770bca9ca9dea75f888fef7513a78..029c9631ec2bf00ae252c5ae42e134bf3e53fe12 100644 (file)
@@ -6865,7 +6865,7 @@ static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd)
                        err = ufshcd_clear_cmd(hba, pos);
                        if (err)
                                break;
-                       __ufshcd_transfer_req_compl(hba, pos, /*retry_requests=*/true);
+                       __ufshcd_transfer_req_compl(hba, 1U << pos, false);
                }
        }