summaryrefslogtreecommitdiff
path: root/drivers/scsi/ufs/ufs_quirks.h
diff options
context:
space:
mode:
authorBean Huo <beanhuo@micron.com>2021-08-04 20:21:27 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2021-08-05 23:21:08 -0400
commit63522bf3aced0a782b59f0314dbad5cdc8b14c59 (patch)
treeb0623d9474dc9676a1b20f30c8e73fe118e2e3bc /drivers/scsi/ufs/ufs_quirks.h
parentf0101af435c4640e78c0fa0dbacb443c0f31cfb7 (diff)
downloadlwn-63522bf3aced0a782b59f0314dbad5cdc8b14c59.tar.gz
lwn-63522bf3aced0a782b59f0314dbad5cdc8b14c59.zip
scsi: ufs: core: Add L2P entry swap quirk for Micron UFS
For Micron UFS devices the L2P entry need to be byteswapped before sending an HPB READ command to the UFS device. Add the quirk UFS_DEVICE_QUIRK_SWAP_L2P_ENTRY_FOR_HPB_READ to address this. Link: https://lore.kernel.org/r/20210804182128.458356-2-huobean@gmail.com Reviewed-by: Avri Altman <avri.altman@wdc.com> Signed-off-by: Bean Huo <beanhuo@micron.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs/ufs_quirks.h')
-rw-r--r--drivers/scsi/ufs/ufs_quirks.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/ufs/ufs_quirks.h b/drivers/scsi/ufs/ufs_quirks.h
index 07f559ac5883..35ec9ea79869 100644
--- a/drivers/scsi/ufs/ufs_quirks.h
+++ b/drivers/scsi/ufs/ufs_quirks.h
@@ -116,4 +116,10 @@ struct ufs_dev_fix {
*/
#define UFS_DEVICE_QUIRK_DELAY_AFTER_LPM (1 << 11)
+/*
+ * Some UFS devices require L2P entry should be swapped before being sent to the
+ * UFS device for HPB READ command.
+ */
+#define UFS_DEVICE_QUIRK_SWAP_L2P_ENTRY_FOR_HPB_READ (1 << 12)
+
#endif /* UFS_QUIRKS_H_ */