scsi: ufs: Set DBD setting in mode sense for caching mode page
Host sends MODE_SENSE_10 with caching mode page, to check if the device
supports the cache feature.
UFS standards requires DBD field to be set to 1.
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).
As a result of the CHECK_CONDITION response, host assumes that the
device doesn't support the cache feature and doesn't send
SYNCHORONIZE_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 in case of caching mode page.
Change-Id: I4d63cba26331f04c34e87b99dbdf17c05ab96839
Signed-off-by:
Maya Erez <merez@codeaurora.org>
Loading
Please register or sign in to comment