Skip to content

Commit d87a1f6

Browse files
beanhuomartinkpetersen
authored andcommitted
scsi: ufs: No need to send Abort Task if the task in DB was cleared
If the bit corresponding to a task in the Doorbell register has been cleared, no need to poll the status of the task on the device side and to send an Abort Task TM. Instead, let it directly goto cleanup. In addition, to keep original debug output, move the goto below the debug print. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Stanley Chu <[email protected]> Reviewed-by: Can Guo <[email protected]> Signed-off-by: Bean Huo <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent b10178e commit d87a1f6

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

drivers/scsi/ufs/ufshcd.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6437,14 +6437,8 @@ static int ufshcd_abort(struct scsi_cmnd *cmd)
64376437
goto out;
64386438
}
64396439

6440-
if (!(reg & (1 << tag))) {
6441-
dev_err(hba->dev,
6442-
"%s: cmd was completed, but without a notifying intr, tag = %d",
6443-
__func__, tag);
6444-
}
6445-
64466440
/* Print Transfer Request of aborted task */
6447-
dev_err(hba->dev, "%s: Device abort task at tag %d\n", __func__, tag);
6441+
dev_info(hba->dev, "%s: Device abort task at tag %d\n", __func__, tag);
64486442

64496443
/*
64506444
* Print detailed info about aborted request.
@@ -6465,6 +6459,13 @@ static int ufshcd_abort(struct scsi_cmnd *cmd)
64656459
}
64666460
hba->req_abort_count++;
64676461

6462+
if (!(reg & (1 << tag))) {
6463+
dev_err(hba->dev,
6464+
"%s: cmd was completed, but without a notifying intr, tag = %d",
6465+
__func__, tag);
6466+
goto cleanup;
6467+
}
6468+
64686469
/* Skip task abort in case previous aborts failed and report failure */
64696470
if (lrbp->req_abort_skip) {
64706471
err = -EIO;

0 commit comments

Comments
 (0)