linux/drivers/scsi/ufs
Kiwoong Kim 2b2bfc8aa5 scsi: ufs: Introduce a quirk to allow only page-aligned sg entries
Some SoCs require a single scatterlist entry for smaller than page size,
i.e. 4KB. When dispatching commands with more than one scatterlist entry
under 4KB in size the following behavior is observed:

A command to read a block range is dispatched with two scatterlist entries
that are named AAA and BBB. After dispatching, the host builds two PRDT
entries and during transmission, device sends just one DATA IN because
device doesn't care about host DMA. The host then transfers the combined
amount of data from start address of the area named AAA. As a consequence,
the area that follows AAA in memory would be corrupted.

    |<------------->|
    +-------+------------         +-------+
    +  AAA  + (corrupted)   ...   +  BBB  +
    +-------+------------         +-------+

To avoid this we need to enforce page size alignment for sg entries.

Link: https://lore.kernel.org/r/56dddef94f60bd9466fd77e69f64bbbd657ed2a1.1611026909.git.kwmad.kim@samsung.com
Signed-off-by: Kiwoong Kim <kwmad.kim@samsung.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-01-20 21:53:44 -05:00
..
cdns-pltfrm.c scsi: ufs-cdns: Use phy_initialization helper 2020-12-07 18:00:06 -05:00
Kconfig scsi: ufs: Fix all Kconfig help text indentation 2021-01-07 22:39:58 -05:00
Makefile scsi: ufs: ufs-debugfs: Add error counters 2021-01-12 22:14:06 -05:00
tc-dwc-g210-pci.c
tc-dwc-g210-pltfrm.c
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_bsg.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ufs_bsg.h
ufs_quirks.h scsi: ufs: Introduce device quirk "DELAY_AFTER_LPM" 2020-07-30 21:10:29 -04:00
ufs-debugfs.c scsi: ufs: ufs-debugfs: Add error counters 2021-01-12 22:14:06 -05:00
ufs-debugfs.h scsi: ufs: ufs-debugfs: Add error counters 2021-01-12 22:14:06 -05:00
ufs-exynos.c scsi: ufs: ufs-exynos: Apply vendor-specific values for three timeouts 2021-01-05 23:02:09 -05:00
ufs-exynos.h scsi: ufs: ufs-exynos: Use device parameter initialization function 2020-11-17 01:03:18 -05:00
ufs-hisi.c scsi: ufs: ufs-hisi: Use device parameter initialization function 2020-11-17 01:03:18 -05: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-mediatek: Enable UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL 2021-01-05 22:03:04 -05: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-qcom: Fix ufs RST_n spec violation 2021-01-12 23:37:34 -05: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: Protect PM ops and err_handler from user access through sysfs 2021-01-14 22:12:35 -05:00
ufs-sysfs.h
ufs.h scsi: ufs: WB is only available on LUN #0 to #7 2021-01-13 00:27:46 -05:00
ufshcd-crypto.c scsi: ufs: Remove unnecessary devm_kfree() 2021-01-13 00:30:04 -05:00
ufshcd-crypto.h scsi: ufs: Add inline encryption support to UFS 2020-07-08 01:23:32 -04: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-pci: Enable UFSHCD_CAP_RPM_AUTOSUSPEND for Intel controllers 2020-12-09 11:34:20 -05:00
ufshcd-pltfrm.c scsi: ufs: Remove pre-defined initial voltage values of device power 2020-12-07 18:13:31 -05:00
ufshcd-pltfrm.h scsi: ufs: Introduce device parameter initialization function 2020-11-17 01:03:18 -05:00
ufshcd.c scsi: ufs: Introduce a quirk to allow only page-aligned sg entries 2021-01-20 21:53:44 -05:00
ufshcd.h scsi: ufs: Introduce a quirk to allow only page-aligned sg entries 2021-01-20 21:53:44 -05:00
ufshci-dwc.h
ufshci.h scsi: ufs: Handle LINERESET indication in err handler 2020-09-02 22:49:07 -04:00
unipro.h scsi: ufs: Add enums for UniPro version higher than 1.6 2020-11-10 23:03:18 -05:00