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/20200811141859.27399-3-huobean@gmail.com Reviewed-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Can Guo <cang@codeaurora.org> Signed-off-by: Bean Huo <beanhuo@micron.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
b10178ee7f
commit
d87a1f6d02
@ -6437,14 +6437,8 @@ static int ufshcd_abort(struct scsi_cmnd *cmd)
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!(reg & (1 << tag))) {
|
||||
dev_err(hba->dev,
|
||||
"%s: cmd was completed, but without a notifying intr, tag = %d",
|
||||
__func__, tag);
|
||||
}
|
||||
|
||||
/* Print Transfer Request of aborted task */
|
||||
dev_err(hba->dev, "%s: Device abort task at tag %d\n", __func__, tag);
|
||||
dev_info(hba->dev, "%s: Device abort task at tag %d\n", __func__, tag);
|
||||
|
||||
/*
|
||||
* Print detailed info about aborted request.
|
||||
@ -6465,6 +6459,13 @@ static int ufshcd_abort(struct scsi_cmnd *cmd)
|
||||
}
|
||||
hba->req_abort_count++;
|
||||
|
||||
if (!(reg & (1 << tag))) {
|
||||
dev_err(hba->dev,
|
||||
"%s: cmd was completed, but without a notifying intr, tag = %d",
|
||||
__func__, tag);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Skip task abort in case previous aborts failed and report failure */
|
||||
if (lrbp->req_abort_skip) {
|
||||
err = -EIO;
|
||||
|
Loading…
Reference in New Issue
Block a user