linux/drivers/scsi/ufs
Avri Altman 57488e25ef scsi: ufs: ufshpb: Properly handle max-single-cmd
[ Upstream commit 9ec5128a8b ]

The spec recommends that for transfer length larger than the max-single-cmd
attribute (bMAX_DATA_SIZE_FOR_HPB_SINGLE_CMD) it is possible to couple
pre-requests with the HPB-READ command.  Being a recommendation, using
pre-requests can be perceived merely as a means of optimization.  A common
practice was to send pre-requests for chunks within some interval, and
leave the READ10 untouched if larger.

Now that the pre-request flows have been removed, all the commands are
single commands.  Properly handle this attribute and do not send HPB-READ
for transfer lengths larger than max-single-cmd.

[mkp: resolve conflict]

Fixes: 09d9e4d041 ("scsi: ufs: ufshpb: Remove HPB2.0 flows")
Link: https://lore.kernel.org/r/20211031123654.17719-1-avri.altman@wdc.com
Reviewed-by: Daejun Park <daejun7.park@samsung.com>
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-18 19:17:07 +01:00
..
Kconfig scsi: ufs: Add fault injection support 2021-08-03 07:27:42 -04:00
Makefile scsi: ufs: Add fault injection support 2021-08-03 07:27:42 -04:00
cdns-pltfrm.c scsi: ufs: Reduce power management code duplication 2021-08-02 21:43:57 -04:00
tc-dwc-g210-pci.c scsi: ufs: Reduce power management code duplication 2021-08-02 21:43:57 -04:00
tc-dwc-g210-pltfrm.c scsi: ufs: Reduce power management code duplication 2021-08-02 21:43:57 -04:00
tc-dwc-g210.c
tc-dwc-g210.h
ti-j721e-ufs.c scsi: ufs: ti-j721e-ufs: Fix error return in ti_j721e_ufs_probe() 2020-08-17 21:48:45 -04:00
ufs-debugfs.c scsi: ufs: core: Enable power management for wlun 2021-05-10 22:28:20 -04:00
ufs-debugfs.h scsi: ufs: core: Enable power management for wlun 2021-05-10 22:28:20 -04:00
ufs-exynos.c scsi: ufs: ufs-exynos: Correct timeout value setting registers 2021-10-20 23:25:51 -04:00
ufs-exynos.h scsi: ufs: ufs-exynos: Fix static checker warning 2021-08-24 23:10:14 -04:00
ufs-fault-injection.c scsi: ufs: Add fault injection support 2021-08-03 07:27:42 -04:00
ufs-fault-injection.h scsi: ufs: Add fault injection support 2021-08-03 07:27:42 -04:00
ufs-hisi.c scsi: ufs: Reduce power management code duplication 2021-08-02 21:43:57 -04:00
ufs-hisi.h scsi: ufs: ufs-hisi: Use device parameter initialization function 2020-11-17 01:03:18 -05:00
ufs-mediatek-trace.h scsi: ufs-mediatek: Use correct path to fix compile error 2020-12-09 12:00:26 -05:00
ufs-mediatek.c scsi: ufs: Reduce power management code duplication 2021-08-02 21:43:57 -04:00
ufs-mediatek.h scsi: ufs-mediatek: Keep VCC always-on for specific devices 2020-12-09 11:34:20 -05:00
ufs-qcom-ice.c scsi: ufs-qcom: Add Inline Crypto Engine support 2020-07-24 22:09:54 -04:00
ufs-qcom.c scsi: ufs: Reduce power management code duplication 2021-08-02 21:43:57 -04:00
ufs-qcom.h scsi: ufs: ufs-qcom: Use device parameter initialization function 2020-11-17 01:03:18 -05:00
ufs-sysfs.c scsi: ufs: core: Add lu_enable sysfs node 2021-08-05 23:21:13 -04:00
ufs-sysfs.h
ufs.h scsi: ufs: ufshpb: Add HPB 2.0 support 2021-08-01 16:05:07 -04:00
ufs_bsg.c scsi: ufs: core: Enable power management for wlun 2021-05-10 22:28:20 -04:00
ufs_bsg.h
ufs_quirks.h scsi: ufs: core: Add L2P entry swap quirk for Micron UFS 2021-08-05 23:21:08 -04:00
ufshcd-crypto.c SCSI misc on 20210219 2021-02-22 10:24:58 -08:00
ufshcd-crypto.h scsi: ufs: use devm_blk_ksm_init() 2021-02-01 12:01:56 +01:00
ufshcd-dwc.c scsi: ufs-dwc: Use phy_initialization helper 2020-12-07 18:00:06 -05:00
ufshcd-dwc.h
ufshcd-pci.c scsi: ufs: ufs-pci: Force a full restore after suspend-to-disk 2021-10-18 23:19:44 -04:00
ufshcd-pltfrm.c scsi: ufs: ufshcd-pltfrm: Fix memory leak due to probe defer 2021-11-18 19:16:54 +01:00
ufshcd-pltfrm.h scsi: ufs: Reduce power management code duplication 2021-08-02 21:43:57 -04:00
ufshcd.c scsi: ufs: core: Stop clearing UNIT ATTENTIONS 2021-11-18 19:16:50 +01:00
ufshcd.h scsi: ufs: core: Stop clearing UNIT ATTENTIONS 2021-11-18 19:16:50 +01:00
ufshci-dwc.h
ufshci.h scsi: ufs: Revert "Utilize Transfer Request List Completion Notification Register" 2021-08-02 21:43:58 -04:00
ufshpb.c scsi: ufs: ufshpb: Properly handle max-single-cmd 2021-11-18 19:17:07 +01:00
ufshpb.h scsi: ufs: ufshpb: Properly handle max-single-cmd 2021-11-18 19:17:07 +01:00
unipro.h scsi: ufs: Add enums for UniPro version higher than 1.6 2020-11-10 23:03:18 -05:00