diff options
author | Can Guo <cang@codeaurora.org> | 2019-12-05 03:14:25 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-12-20 04:08:52 +0100 |
commit | 0ec96913344de9efdb388720247ea9f207bdc3aa (patch) | |
tree | 0d9c522f6f6969730e585b93c647d835b2427c83 /drivers/scsi/scsi_lib.c | |
parent | scsi: ufs: Complete pending requests in host reset and restore path (diff) | |
download | linux-0ec96913344de9efdb388720247ea9f207bdc3aa.tar.xz linux-0ec96913344de9efdb388720247ea9f207bdc3aa.zip |
scsi: core: Adjust DBD setting in MODE SENSE for caching mode page per LLD
UFS JEDEC standards require DBD field to be set to 1 in mode sense
command. This patch allows LLD to define the setting of DBD, if
required.
Link: https://lore.kernel.org/r/0101016ed3d643f9-ffd45d6c-c593-4a13-a18f-a32da3d3bb97-000000@us-west-2.amazonses.com
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 3e7a45d0daca..610ee41fa54c 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -2108,6 +2108,8 @@ scsi_mode_sense(struct scsi_device *sdev, int dbd, int modepage, memset(data, 0, sizeof(*data)); memset(&cmd[0], 0, 12); + + dbd = sdev->set_dbd_for_ms ? 8 : dbd; cmd[1] = dbd & 0x18; /* allows DBD and LLBA bits */ cmd[2] = modepage; |