scsi: ufs: ufshpb: Add handing of device reset regions in HPB device mode
authorBean Huo <beanhuo@micron.com>
Thu, 5 May 2022 13:47:06 +0000 (15:47 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 11 May 2022 02:01:52 +0000 (22:01 -0400)
commit32d6eab31ac3bc7fecdec86541fa1458a2eb18a9
treea4a23457ed721b350c3707f169470eb8d861ad8f
parentd4300c552bf8a64e7577ce17c973e51fc89dba7c
scsi: ufs: ufshpb: Add handing of device reset regions in HPB device mode

In UFS HPB Spec JESD220-3A,

"5.8. Active and inactive information upon power cycle
...
When the device is powered off by the host, the device may restore L2P map
data upon power up or build from the host's HPB READ command. In case
device powered up and lost HPB information, device can signal to the host
through HPB Sense data, by setting HPB Operation as '2' which will inform
the host that device reset HPB information."

Therefore, for HPB device control mode, if the UFS device is reset via the
RST_N pin, the active region information in the device will be reset. If
the host side receives this notification from the device side, it is
recommended to inactivate all active regions in the host's HPB cache.

Link: https://lore.kernel.org/r/20220505134707.35929-6-huobean@gmail.com
Reviewed-by: Keoseong Park <keosung.park@samsung.com>
Reviewed-by: Daejun Park <daejun7.park@samsung.com>
Signed-off-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshpb.c