All of lore.kernel.org
 help / color / mirror / Atom feed
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>,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	Wei Li <liwei213@huawei.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH V3 1/3] scsi: ufs: Fix error handler clear ua deadlock
Date: Thu, 16 Sep 2021 20:01:53 +0300	[thread overview]
Message-ID: <e62aa9b2-5ccd-4edf-a224-312975f86164@intel.com> (raw)
In-Reply-To: <c33f0d4f-d7d4-3a8b-1999-d6bc2d9a5c07@acm.org>

On 16/09/21 1:41 am, Bart Van Assche wrote:
> On 9/15/21 8:35 AM, Adrian Hunter wrote:
>> Thanks for the idea.  Unfortunately it does not work for pass-through
>> requests, refer scsi_noretry_cmd().  sdev_ufs_device and sdev_rpmb are
>> used with pass-through requests.
> 
> How about allocating and submitting the REQUEST SENSE command from the context
> of a workqueue, or in other words, switching back to scsi_execute()? Although
> that approach doesn't guarantee that the unit attention condition is cleared
> before the first SCSI command is received from outside the UFS driver, I don't
> see any other solution since my understanding is that the deadlock between
> blk_mq_freeze_queue() and blk_get_request() from inside ufshcd_err_handler()
> can also happen without "ufs: Synchronize SCSI and UFS error handling".

The issue can also be fixed by sending REQUEST SENSE directly avoiding the
SCSI queues.  Please see V4.

> 
> The only code I know of that relies on the UFS driver clearing unit attentions
> is this code:
> https://android.googlesource.com/platform/system/core/+/master/trusty/storage/proxy/rpmb.c
> The code that submits a REQUEST SENSE was added in the UFS driver as the result
> of a request from the team that maintains the Trusty code. Earlier today I have
> been promised that unit attention handling support will be added in Trusty but I
> do not when this will be realized.
> 
> Bart.
> 
> 


  reply	other threads:[~2021-09-16 17:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-05  9:51 [PATCH V3 0/3] scsi: ufs: Let devices remain runtime suspended during system suspend Adrian Hunter
2021-09-05  9:51 ` [PATCH V3 1/3] scsi: ufs: Fix error handler clear ua deadlock Adrian Hunter
2021-09-07 14:42   ` Bart Van Assche
2021-09-07 15:43     ` Adrian Hunter
2021-09-07 16:56       ` Bart Van Assche
2021-09-07 22:36         ` Bart Van Assche
2021-09-11 16:47           ` Adrian Hunter
2021-09-13  3:17             ` Bart Van Assche
2021-09-13  8:53               ` Adrian Hunter
2021-09-13 16:33                 ` Bart Van Assche
2021-09-13 17:13                   ` Adrian Hunter
2021-09-13 20:11                     ` Bart Van Assche
2021-09-14  4:55                       ` Adrian Hunter
2021-09-14 22:28                         ` Bart Van Assche
2021-09-15 15:35                           ` Adrian Hunter
2021-09-15 22:41                             ` Bart Van Assche
2021-09-16 17:01                               ` Adrian Hunter [this message]
2021-09-05  9:51 ` [PATCH V3 2/3] scsi: ufs: Fix runtime PM dependencies getting broken Adrian Hunter
2021-09-05  9:51 ` [PATCH V3 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=e62aa9b2-5ccd-4edf-a224-312975f86164@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=jejb@linux.ibm.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 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.