linux/drivers/scsi/ufs
Can Guo a3a7639172 scsi: ufs: Use DBD setting in mode sense
UFS standard requires DBD field to be set to 1 in MODE SENSE(10).

Some card vendors are more strict and check the DBD field, hence respond
with CHECK_CONDITION (Sense key set to ILLEGAL_REQUEST and ASC set to
INVALID FIELD IN CDB).  When host sends MODE SENSE for page caching, as a
result of the CHECK_CONDITION response, host assumes that the device
doesn't support the cache feature and doesn't send SYNCHRONIZE_CACHE
commands to flush the device cache. This can result in data corruption in
case of sudden power down when there is data stored in the device cache.

This patch fixes the DBD field setting as required in UFS standard.

Link: https://lore.kernel.org/r/0101016ed3d657e4-32a6dd52-1505-4312-97ff-2bd3bee59eb7-000000@us-west-2.amazonses.com
Reviewed-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-12-19 22:08:52 -05:00
..
cdns-pltfrm.c scsi: ufs: Disable autohibern8 feature in Cadence UFS 2019-12-09 19:03:38 -05:00
Kconfig scsi: ufs: Add driver for TI wrapper for Cadence UFS IP 2019-11-12 22:21:33 -05:00
Makefile scsi: ufs: Add driver for TI wrapper for Cadence UFS IP 2019-11-12 22:21:33 -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: Add driver for TI wrapper for Cadence UFS IP 2019-11-12 22:21:33 -05:00
ufs_bsg.c scsi: ufs: Give an unique ID to each ufs-bsg 2019-12-09 18:46:18 -05:00
ufs_bsg.h
ufs_quirks.h
ufs-hisi.c
ufs-hisi.h
ufs-mediatek.c
ufs-mediatek.h
ufs-qcom.c scsi: ufs-qcom: Add reset control support for host controller 2019-11-18 23:15:50 -05:00
ufs-qcom.h scsi: ufs-qcom: Add reset control support for host controller 2019-11-18 23:15:50 -05:00
ufs-sysfs.c scsi: ufs: Fix up auto hibern8 enablement 2019-11-18 23:15:51 -05:00
ufs-sysfs.h
ufs.h scsi: ufs: Update VCCQ2 and VCCQ min/max voltage hard codes 2019-12-19 22:08:52 -05:00
ufshcd-dwc.c
ufshcd-dwc.h
ufshcd-pci.c
ufshcd-pltfrm.c scsi: ufs: ufshcd: Remove dev_err() on platform_get_irq() failure 2019-11-12 22:21:34 -05:00
ufshcd-pltfrm.h
ufshcd.c scsi: ufs: Use DBD setting in mode sense 2019-12-19 22:08:52 -05:00
ufshcd.h scsi: ufs: Complete pending requests in host reset and restore path 2019-12-19 22:08:52 -05:00
ufshci-dwc.h
ufshci.h scsi: ufs: Fix irq return code 2019-11-19 21:37:09 -05:00
unipro.h