Re: [PATCH v3 1/5] scsi: Adjust DBD setting in mode sense for caching mode page per LLD

cang
2019-11-13T03:22:33Z

On 2019-11-13 11:03, Martin K. Petersen wrote:
> 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!

Hi Martin,

Thank you, good idea. I will make the change in your way.

Best regards,
Can Guo.