From: Adrian Hunter <adrian.hunter@intel.com>
To: Bart Van Assche <bvanassche@acm.org>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: "James E . J . Bottomley" <jejb@linux.ibm.com>,
Bean Huo <huobean@gmail.com>, Avri Altman <avri.altman@wdc.com>,
Alim Akhtar <alim.akhtar@samsung.com>,
Can Guo <cang@codeaurora.org>,
Asutosh Das <asutoshd@codeaurora.org>,
Kiwoong Kim <kwmad.kim@samsung.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
Wei Li <liwei213@huawei.com>,
linux-scsi@vger.kernel.org, Jaegeuk Kim <jaegeuk@kernel.org>
Subject: Re: [PATCH V6 1/3] scsi: ufs: Fix error handler clear ua deadlock
Date: Fri, 1 Oct 2021 11:15:48 +0300 [thread overview]
Message-ID: <de4ebba5-7030-3cfb-280b-1389cea65696@intel.com> (raw)
In-Reply-To: <9e8ecb60-dc1b-2fd7-3ae4-bfa720f98769@acm.org>
On 01/10/2021 01:10, Bart Van Assche wrote:
> On 9/30/21 5:42 AM, Adrian Hunter wrote:
>> There is no guarantee to be able to enter the queue if requests are
>> blocked. That is because freezing the queue will block entry to the
>> queue, but freezing also waits for outstanding requests which can make
>> no progress while the queue is blocked.
>>
>> That situation can happen when the error handler issues requests to
>> clear unit attention condition. Requests are blocked if the ufshcd_state is
>> UFSHCD_STATE_EH_SCHEDULED_FATAL, which can happen as a result of
>> prior error handler activity. Requests cannot make progress when
>> ufshcd_state is UFSHCD_STATE_EH_SCHEDULED_FATAL, and only the error
>> handler can change that, so if the error handler is waiting to enter
>> the queue and blk_mq_freeze_queue() is waiting for outstanding requests,
>> they will deadlock.
>>
>> Fix by issuing REQUEST_SENSE directly avoiding the SCSI queues, in
>> a similar fashion as other device commands.
>
> Hi Adrian,
>
> Although I appreciate all the work that you have done on this patch, there
> is at least one application (the Android Trusty software) that needs the
> RPMB unit attention information to work correctly. Hence my request to drop
> this patch and to integrate the following patch series in the upstream kernel:
> https://lore.kernel.org/linux-scsi/aacbec00-34e8-f082-51a5-15391bf99710@acm.org/T/#t
That's fine. It is always good to have options.
I made a couple of minor comments on the patch series.
next prev parent reply other threads:[~2021-10-01 8:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-30 12:42 [PATCH V6 0/3] scsi: ufs: Let devices remain runtime suspended during system suspend Adrian Hunter
2021-09-30 12:42 ` [PATCH V6 1/3] scsi: ufs: Fix error handler clear ua deadlock Adrian Hunter
2021-09-30 22:10 ` Bart Van Assche
2021-10-01 8:15 ` Adrian Hunter [this message]
2021-09-30 12:42 ` [PATCH V6 2/3] scsi: ufs: Fix runtime PM dependencies getting broken Adrian Hunter
2021-09-30 12:42 ` [PATCH V6 3/3] scsi: ufs: Let devices remain runtime suspended during system suspend Adrian Hunter
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=de4ebba5-7030-3cfb-280b-1389cea65696@intel.com \
--to=adrian.hunter@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=asutoshd@codeaurora.org \
--cc=avri.altman@wdc.com \
--cc=bvanassche@acm.org \
--cc=cang@codeaurora.org \
--cc=huobean@gmail.com \
--cc=jaegeuk@kernel.org \
--cc=jejb@linux.ibm.com \
--cc=kwmad.kim@samsung.com \
--cc=linux-scsi@vger.kernel.org \
--cc=liwei213@huawei.com \
--cc=manivannan.sadhasivam@linaro.org \
--cc=martin.petersen@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).