Can,
Host sends MODE_SENSE_10 with caching mode page, to check if the
device supports the cache feature. UFS JEDEC standards require DBD
field to be set to 1.
UFS requires DBD for all MODE SENSE(10) invocations, not just for
accessing the caching mode page. I think the flag name needs to reflect
this.
Also, I do not particularly like this being a scsi_host flag. All the
other flags we have in this department are per scsi_device.
My recommendation would be to add a set_dbd_for_ms flag to struct
scsi_device and then do:
sdev->set_dbd_for_ms = 1;
in ufshcd_slave_alloc() mirroring the existing:
sdev->use_10_for_ms = 1;
This makes the MODE SENSE tweakery consistent.
Thanks!