From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Avri Altman <Avri.Altman@wdc.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"kernel-team@android.com" <kernel-team@android.com>,
"cang@codeaurora.org" <cang@codeaurora.org>,
"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
"bvanassche@acm.org" <bvanassche@acm.org>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"stanley.chu@mediatek.com" <stanley.chu@mediatek.com>
Subject: Re: [PATCH] scsi: ufs: fix livelock of ufshcd_clear_ua_wluns
Date: Mon, 21 Dec 2020 11:35:46 -0800 [thread overview]
Message-ID: <X+D5EhJ8QzNoeHQw@google.com> (raw)
In-Reply-To: <DM6PR04MB657558D8353199D53586F654FCC00@DM6PR04MB6575.namprd04.prod.outlook.com>
On 12/21, Avri Altman wrote:
> >
> >
> > On 12/21, Avri Altman wrote:
> > > > > > When gate_work/ungate_work gets an error during hibern8_enter or
> > > > exit,
> > > > > > ufshcd_err_handler()
> > > > > > ufshcd_scsi_block_requests()
> > > > > > ufshcd_reset_and_restore()
> > > > > > ufshcd_clear_ua_wluns() -> stuck
> > > > > > ufshcd_scsi_unblock_requests()
> > > > > >
> > > > > > In order to avoid it, ufshcd_clear_ua_wluns() can be called per
> > recovery
> > > > > > flows
> > > > > > such as suspend/resume, link_recovery, and error_handler.
> > > > > Not sure that suspend/resume are UAC events?
> > > >
> > > > Could you elaborate a bit? The goal is to clear UAC after UFS reset
> > happens.
> > > So why calling it on every suspend and resume?
> >
> > 1. If UAC was cleared, there's no impact.
> But the command is still sent.
No, ufshcd_clear_ua_wluns() will return by hba->wlun_dev_clr_ua.
>
> > 2. ufshcd_link_recovery() can reset UFS directly by ufs_mtk_resume().
> > 3. ufshcd_suspend can call ufshcd_host_reset_and_restore() as well.
> Seems excessive IMO.
> Why not selectively send when indeed required, e.g. on reset?
I think hba->wlun_dev_clr_ua is the indicator whether there was a reset or not.
next prev parent reply other threads:[~2020-12-21 19:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-18 3:31 [PATCH] scsi: ufs: fix livelock of ufshcd_clear_ua_wluns Jaegeuk Kim
2020-12-20 22:02 ` Avri Altman
2020-12-21 15:23 ` Jaegeuk Kim
2020-12-21 17:00 ` Avri Altman
2020-12-21 17:19 ` Jaegeuk Kim
2020-12-21 18:05 ` Avri Altman
2020-12-21 19:35 ` Jaegeuk Kim [this message]
2020-12-21 20:13 ` Avri Altman
2020-12-21 4:25 ` Can Guo
2020-12-21 15:14 ` Jaegeuk Kim
2020-12-21 15:26 ` [PATCH v2] " Jaegeuk Kim
2021-01-06 3:45 ` Martin K. Petersen
2021-01-06 4:28 ` Jaegeuk Kim
-- strict thread matches above, loose matches on Subject: below --
2021-01-06 4:27 [PATCH] " Jaegeuk Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=X+D5EhJ8QzNoeHQw@google.com \
--to=jaegeuk@kernel.org \
--cc=Avri.Altman@wdc.com \
--cc=alim.akhtar@samsung.com \
--cc=bvanassche@acm.org \
--cc=cang@codeaurora.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stanley.chu@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.