mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
FROMLIST: ufs: core: requeue aborted request
After the SQ cleanup fix, the CQ will receive a response with
the corresponding tag marked as OCS: ABORTED. To align with
the behavior of Legacy SDB mode, the handling of OCS: ABORTED
has been changed to match that of OCS_INVALID_COMMAND_STATUS
(SDB), with both returning a SCSI result of DID_REQUEUE.
Furthermore, the workaround implemented before the SQ cleanup
fix can be removed.
Bug: 373785306
Fixes: ab248643d3 ("scsi: ufs: core: Add error handling for MCQ mode")
Change-Id: Id1d51f2921a519aa5d2a83b7fc70e17a45fb26b9
Signed-off-by: Peter Wang <peter.wang@mediatek.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/all/20241001091917.6917-3-peter.wang@mediatek.com/
This commit is contained in:
committed by
Sandeep Dhavale
parent
51903b71f0
commit
1790581f0a
@@ -5415,10 +5415,12 @@ ufshcd_transfer_rsp_status(struct ufs_hba *hba, struct ufshcd_lrb *lrbp,
|
||||
}
|
||||
break;
|
||||
case OCS_ABORTED:
|
||||
result |= DID_ABORT << 16;
|
||||
break;
|
||||
case OCS_INVALID_COMMAND_STATUS:
|
||||
result |= DID_REQUEUE << 16;
|
||||
dev_warn(hba->dev,
|
||||
"OCS %s from controller for tag %d\n",
|
||||
(ocs == OCS_ABORTED? "aborted" : "invalid"),
|
||||
lrbp->task_tag);
|
||||
break;
|
||||
case OCS_INVALID_CMD_TABLE_ATTR:
|
||||
case OCS_INVALID_PRDT_ATTR:
|
||||
@@ -6491,9 +6493,6 @@ static bool ufshcd_abort_all(struct ufs_hba *hba)
|
||||
|
||||
if (is_mcq_enabled(hba)) {
|
||||
struct ufshcd_lrb *lrbp;
|
||||
int tag;
|
||||
struct ufs_hw_queue *hwq;
|
||||
unsigned long flags;
|
||||
|
||||
for (tag = 0; tag < hba->nutrs; tag++) {
|
||||
lrbp = &hba->lrb[tag];
|
||||
@@ -6507,13 +6506,6 @@ static bool ufshcd_abort_all(struct ufs_hba *hba)
|
||||
needs_reset = true;
|
||||
goto out;
|
||||
}
|
||||
hwq = ufshcd_mcq_req_to_hwq(hba, scsi_cmd_to_rq(lrbp->cmd));
|
||||
if (!hwq)
|
||||
return 0;
|
||||
spin_lock_irqsave(&hwq->cq_lock, flags);
|
||||
if (ufshcd_cmd_inflight(lrbp->cmd))
|
||||
ufshcd_release_scsi_cmd(hba, lrbp);
|
||||
spin_unlock_irqrestore(&hwq->cq_lock, flags);
|
||||
}
|
||||
} else {
|
||||
/* Clear pending transfer requests */
|
||||
|
||||
Reference in New Issue
Block a user