ufs: core: fix mcq mode dev commad timeout
Subsystems (3)
PATCH 1/1 ufs: core: fix mcq mode dev commad timeout
From: Peter Wang <[email protected]>
When dev command timeout in mcq mode, clear success should return retry, because return 0, caller consider success and have error log. "Invalid offset 0x0 in descriptor IDN 0x9, length 0x0"
Signed-off-by Peter Wang <[email protected]>
--- drivers/ufs/core/ufshcd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/ufs/core/ufshcd.c +3 -1
@@ -3217,7 +3217,9 @@ static int ufshcd_wait_for_dev_cmd(struct ufs_hba *hba,/* MCQ mode */ if (is_mcq_enabled (hba)) { - err =ufshcd_clear_cmd (hba, lrbp->task_tag); +/* successfully cleared the command, retry if needed */ +if (ufshcd_clear_cmd (hba, lrbp->task_tag) ==0 ) + err = -EAGAIN ; hba->dev_cmd.complete =NULL ;return err; }
Signature · 1 line
2.18.0
Quoted 3 lines · On 3/28/24 4:12 AM, [email protected] wrote:
When dev command timeout in mcq mode, clear success should return retry, because return 0, caller consider success and have error log. "Invalid offset
0x0in descriptor IDN0x9, length0x0"
Reviewed-by Bart Van Assche <[email protected]>
Martin K. Petersen
AppliedQuoted 5 lines · On Thu, 28 Mar 2024 19:12:44 +0800, [email protected] wrote:
When dev command timeout in mcq mode, clear success should return retry, because return 0, caller consider success and have error log. "Invalid offset
0x0in descriptor IDN0x9, length0x0"
Applied to 6.9/scsi-fixes, thanks!
[1/1] ufs: core: fix mcq mode dev commad timeout
https://git.kernel.org/mkp/scsi/c/2a26a11e9c25
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering