Re: [PATCH 2/2] scsi: ufs: Stop clearing unit attentions

From: Bart Van Assche
Date: Fri Oct 01 2021 - 13:40:29 EST


On 10/1/21 10:21 AM, Douglas Gilbert wrote:
On 2021-10-01 12:59 p.m., Bart Van Assche wrote:
On 9/30/21 11:52 PM, Adrian Hunter wrote:
Finally, there is another thing to change.  The reason
ufshcd_suspend_prepare() does a runtime resume of sdev_rpmb is because the
UAC clear would wait for an async runtime resume, which will never happen
during system suspend because the PM workqueue gets frozen.  So with the
removal of UAC clear, ufshcd_suspend_prepare() and ufshcd_resume_complete()
should be updated also, to leave rpmb alone.

Somewhat related ...

Since there was some confusion among the members of T10 of what precisely
the RPM bit meant, in SPC-6 revision (draft), a new "HOT PLUGGABLE" two
bit field was introduced into the standard INQUIRY response:

                Table 151 — HOT PLUGGABLE field

Code   Description
00b    No information is provided regarding whether SCSI target device is hot
       pluggable.
01b    The SCSI target device is designed to be removed from a SCSI domain as
       a single object (i.e., concurrent removal of the SCSI target ports,
       logical units, and all other objects contained in that SCSI target
       device (see SAM-6)) while that SCSI domain continues to operate for
       all other SCSI target devices, if any, in that SCSI domain.
10b    The SCSI target device is not designed to be removed from a SCSI
       domain while that SCSI domain continues to operate.
11b    Reserved

That field is bits 5 and 4 of byte 1 of the response.

Perhaps we should be adding provision for this new field.

Hi Doug,

It is not clear to me how hot-plugging is related to UFS devices? I am not aware
of any support for hot-plugging in the UFS driver. RPMB = Replay Protected Memory
Block. The definition of RPMB according to Wikipedia is "a means for a system to
store data to the specific memory area in an authenticated and replay protected
manner, and can only be read and written via successfully authenticated read and
write accesses". It is not clear to me how hot-plugging and RPMB are related? What
am I missing?

Thanks,

Bart.