[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2e35d23b-babb-a617-d93e-ce9b522dafb3@intel.com>
Date: Wed, 20 Oct 2021 18:33:11 +0300
From: Adrian Hunter <adrian.hunter@...el.com>
To: Kiwoong Kim <kwmad.kim@...sung.com>, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org, alim.akhtar@...sung.com,
avri.altman@....com, jejb@...ux.ibm.com,
martin.petersen@...cle.com, beanhuo@...ron.com,
cang@...eaurora.org, sc.suh@...sung.com, hy50.seo@...sung.com,
sh425.lee@...sung.com, bhoon95.kim@...sung.com,
vkumar.1997@...sung.com
Subject: Re: [PATCH RESEND v2] scsi: ufs: clear doorbell for hibern8 errors
when using ah8
On 19/10/2021 07:57, Kiwoong Kim wrote:
> Changes from v1:
> * Change the time to requeue pended commands
>
> When an scsi command is dispatched right after host complete
> all the pended requests and ufs driver tries to ring a doorbell,
> host might be still during entering into hibern8.
> If the hibern8 error occurrs during that period, the doorbell
> might not be zero and clearing it should have done.
> But, current ufshcd_err_handler goes directly to reset
> w/o clearing the doorbell when the driver's link state is broken.
So you mean HCE 1->0 does not clear the doorbell register?
> This patch is to requeue pended commands after host reset.
So you mean HCE 0->1 does clear the doorbell register?
>
> Here's an actual symptom that I've faced. At the time, tag #17
> is still pended even after host reset. And then the block timer
> is expired.
>
> exynos-ufs 11100000.ufs: ufshcd_check_errors: Auto Hibern8
> Enter failed - status: 0x00000040, upmcrs: 0x00000001
> ..
> host_regs: 00000050: b8671000 00000008 00020000 00000000
> ..
> exynos-ufs 11100000.ufs: ufshcd_abort: Device abort task at tag 17
>
> Signed-off-by: Kiwoong Kim <kwmad.kim@...sung.com>
> ---
> drivers/scsi/ufs/ufshcd.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 9faf02c..e5d4ef7 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -7136,8 +7136,10 @@ static int ufshcd_host_reset_and_restore(struct ufs_hba *hba)
> err = ufshcd_hba_enable(hba);
>
> /* Establish the link again and restore the device */
> - if (!err)
> + if (!err) {
> + ufshcd_retry_aborted_requests(hba);
> err = ufshcd_probe_hba(hba, false);
> + }
>
> if (err)
> dev_err(hba->dev, "%s: Host init failed %d\n", __func__, err);
>
Powered by blists - more mailing lists