[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <MN2PR04MB6991724DFB7DCEF5DA43EC5AFC5C0@MN2PR04MB6991.namprd04.prod.outlook.com>
Date: Thu, 5 Dec 2019 07:10:54 +0000
From: Avri Altman <Avri.Altman@....com>
To: Can Guo <cang@...eaurora.org>,
"asutoshd@...eaurora.org" <asutoshd@...eaurora.org>,
"nguyenb@...eaurora.org" <nguyenb@...eaurora.org>,
"rnayak@...eaurora.org" <rnayak@...eaurora.org>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"kernel-team@...roid.com" <kernel-team@...roid.com>,
"saravanak@...gle.com" <saravanak@...gle.com>,
"salyzyn@...gle.com" <salyzyn@...gle.com>
CC: "James E.J. Bottomley" <jejb@...ux.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
open list <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v6 1/5] scsi: 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.
>
> Signed-off-by: Can Guo <cang@...eaurora.org>
Reviewed-by: Avri Altman <avri.altman@....com>
> ---
> drivers/scsi/scsi_lib.c | 2 ++
> include/scsi/scsi_device.h | 1 +
> 2 files changed, 3 insertions(+)
>
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index
> 5447738..3812e90 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -2108,6 +2108,8 @@ void scsi_exit_queue(void)
>
> 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;
>
> diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index
> 3ed836d..f8312a3 100644
> --- a/include/scsi/scsi_device.h
> +++ b/include/scsi/scsi_device.h
> @@ -172,6 +172,7 @@ struct scsi_device {
> * because we did a bus reset. */
> unsigned use_10_for_rw:1; /* first try 10-byte read / write */
> unsigned use_10_for_ms:1; /* first try 10-byte mode sense/select */
> + unsigned set_dbd_for_ms:1; /* Set "DBD" field in mode sense */
> unsigned no_report_opcodes:1; /* no REPORT SUPPORTED OPERATION
> CODES */
> unsigned no_write_same:1; /* no WRITE SAME command */
> unsigned use_16_for_rw:1; /* Use read/write(16) over read/write(10) */
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
Powered by blists - more mailing lists