public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Asutosh Das <asutoshd@codeaurora.org>
To: Avri Altman <Avri.Altman@wdc.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	"cang@codeaurora.org" <cang@codeaurora.org>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	Bart Van Assche <bvanassche@acm.org>,
	"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [RFC PATCH v2 0/2] Fix deadlock in ufs
Date: Mon, 8 Feb 2021 08:24:22 -0800	[thread overview]
Message-ID: <20210208162422.GL37557@stor-presley.qualcomm.com> (raw)
In-Reply-To: <DM6PR04MB65759417507BA054F8CAE86AFCB19@DM6PR04MB6575.namprd04.prod.outlook.com>

On Sat, Feb 06 2021 at 11:24 -0800, Avri Altman wrote:
>> >Regardless of your above proposal, as for the issues you were witnessing with
>> rpmb,
>> >That started this RFC in the first place, and the whole clearing uac series for
>> that matter:
>> > "In order to conduct FFU or RPMB operations, UFS needs to clear UNIT
>> ATTENTION condition...."
>> >
>> >Functionally, This was already done for the device wlun, and only added the
>> rpmb wlun.
>> >
>> >Now you are trying to solve stuff because the rpmb is not provisioned.
>> >a) There should be no relation between response to request-sense command,
>> > and if the key is programmed or not. And
>> >b) rpmb is accessed from user-space.  If it is not provisioned, it should
>> processed the error (-7)
>> >    and realize that by itself.  And also, It only makes sense that if needed,
>> >    the access sequence will include  the request-sense command.
>> >
>> >Therefore, IMHO, just reverting Randall commit (1918651f2d7e) and fixing
>> the user-space code
>> >Should suffice.
>> >
>> >Thanks,
>> >Avri
>> >
>> Hi Avri
>>
>> Thanks.
>>
>> I don't think reverting 1918651f2d7e would fix this.
>>
>> [   12.182750] ufshcd-qcom 1d84000.ufshc: ufshcd_suspend: Setting power
>> mode
>> [   12.190467] ufshcd-qcom 1d84000.ufshc: wlun_dev_clr_ua: 0 <-- uac wasn't
>> sent
>> [   12.196735] ufshcd-qcom 1d84000.ufshc: Sending ssu
>> [   12.202412] scsi 0:0:0:49488: Queue rpm status b4 ssu: 2 <- sdev_ufs_device
>> queue is suspended
>> [   12.208613] ufshcd-qcom 1d84000.ufshc: Wait for resume - <-- deadlock!
>>
>> The issue is sending any command to any lun which is registered for blk
>> runtime-pm in ufs host's suspend path would deadlock; since, it'd try to resume
>> the ufs host in the same suspend calling sequence.
>Did you managed to bisect the commit that caused the regression?
No - I didn't bisect.

>Is it in the series that Bart referred to?
>
Yes - the debug points to that.

>Thanks,
>Avri

      reply	other threads:[~2021-02-08 16:25 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27  4:00 [RFC PATCH v1 0/2] Fix deadlock in ufs Asutosh Das
2021-01-27  4:00 ` [RFC PATCH v1 1/2] block: bsg: resume scsi device before accessing Asutosh Das
2021-01-27  7:09   ` Avri Altman
2021-01-27  7:59     ` Can Guo
2021-01-27  8:53       ` Can Guo
2021-02-07  2:23   ` Bart Van Assche
2021-01-27  4:00 ` [RFC PATCH v1 2/2] scsi: ufs: Fix deadlock while suspending ufs host Asutosh Das
2021-01-27 15:22 ` [RFC PATCH v1 0/2] Fix deadlock in ufs Bjorn Andersson
2021-01-27 16:16   ` Asutosh Das
2021-01-27 19:36     ` Bjorn Andersson
2021-01-28  2:47       ` Can Guo
2021-01-28  3:26 ` [RFC PATCH v2 " Asutosh Das
2021-01-28  3:26 ` [RFC PATCH v2 1/2] block: bsg: resume platform device before accessing Asutosh Das
2021-01-28  3:26   ` [RFC PATCH v2 2/2] scsi: ufs: Fix deadlock while suspending ufs host Asutosh Das
2021-01-28 12:21     ` Avri Altman
2021-01-28 16:39       ` Asutosh Das
2021-01-28  9:33 ` [RFC PATCH v2 0/2] Fix deadlock in ufs Avri Altman
2021-01-28 17:19   ` Asutosh Das
2021-02-01 20:11 ` Asutosh Das (asd)
2021-02-01 20:27   ` Bart Van Assche
2021-02-01 21:48   ` Alan Stern
2021-02-02 20:52     ` Asutosh Das
2021-02-02 22:05       ` Alan Stern
2021-02-04  0:13         ` Asutosh Das
2021-02-04 19:48           ` Alan Stern
2021-02-04 21:14             ` Asutosh Das
2021-02-05  7:56               ` Avri Altman
2021-02-05 16:11                 ` Asutosh Das
2021-02-06  2:37                   ` Asutosh Das
2021-02-06 19:24                   ` Avri Altman
2021-02-08 16:24                     ` Asutosh Das [this message]

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=20210208162422.GL37557@stor-presley.qualcomm.com \
    --to=asutoshd@codeaurora.org \
    --cc=Avri.Altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=cang@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=stern@rowland.harvard.edu \
    /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