scsi: ufs: Remove dead code
authorBart Van Assche <bvanassche@acm.org>
Fri, 3 Dec 2021 23:19:38 +0000 (15:19 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Feb 2022 11:03:15 +0000 (12:03 +0100)
commit d77ea8226b3be23b0b45aa42851243b62a27bda1 upstream.

Commit 7252a3603015 ("scsi: ufs: Avoid busy-waiting by eliminating tag
conflicts") guarantees that 'tag' is not in use by any SCSI command.
Remove the check that returns early if a conflict occurs.

Link: https://lore.kernel.org/r/20211203231950.193369-6-bvanassche@acm.org
Tested-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Acked-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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/ufs/ufshcd.c

index f489954e4632163a5e9e15bb283dfd0fbd91d7c3..92e4f0dbb7917b2bb822fc6cfa7eea3f81cb15d4 100644 (file)
@@ -6658,11 +6658,6 @@ static int ufshcd_issue_devman_upiu_cmd(struct ufs_hba *hba,
        tag = req->tag;
        WARN_ONCE(tag < 0, "Invalid tag %d\n", tag);
 
-       if (unlikely(test_bit(tag, &hba->outstanding_reqs))) {
-               err = -EBUSY;
-               goto out;
-       }
-
        lrbp = &hba->lrb[tag];
        WARN_ON(lrbp->cmd);
        lrbp->cmd = NULL;
@@ -6730,8 +6725,8 @@ static int ufshcd_issue_devman_upiu_cmd(struct ufs_hba *hba,
        ufshcd_add_query_upiu_trace(hba, err ? UFS_QUERY_ERR : UFS_QUERY_COMP,
                                    (struct utp_upiu_req *)lrbp->ucd_rsp_ptr);
 
-out:
        blk_put_request(req);
+
 out_unlock:
        up_read(&hba->clk_scaling_lock);
        return err;