From: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Alan Stern <stern@rowland.harvard.edu>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"open list:USB MASS STORAGE DRIVER" <linux-usb@vger.kernel.org>,
"open list:USB MASS STORAGE DRIVER"
<usb-storage@lists.one-eyed-alien.net>
Subject: Re: [PATCH v2] usb: storage: scsiglue: Do not skip VPD if try_vpd_pages is set
Date: Tue, 25 Jun 2019 13:57:11 -0300 [thread overview]
Message-ID: <20190625165709.GA31932@continental> (raw)
In-Reply-To: <20190618224454.16595-1-marcos.souza.org@gmail.com>
humble ping :)
On Tue, Jun 18, 2019 at 07:44:54PM -0300, Marcos Paulo de Souza wrote:
> If BLIST_TRY_VPD_PAGES is set for a device, even for an USB, it should
> be honored, so only set skip_vpd_pages is try_vpd_pages is not set.
>
> Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
> ---
>
> Changes from v1:
> changed the check of try_vpd_pages from:
> sdev->try_vpd_pages == 0;
> to:
> !sdev->try_vpd_pages;
> (as suggested by Alan Stern)
>
> drivers/usb/storage/scsiglue.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
> index 59190d88fa9f..30790240aec6 100644
> --- a/drivers/usb/storage/scsiglue.c
> +++ b/drivers/usb/storage/scsiglue.c
> @@ -195,8 +195,11 @@ static int slave_configure(struct scsi_device *sdev)
> */
> sdev->skip_ms_page_8 = 1;
>
> - /* Some devices don't handle VPD pages correctly */
> - sdev->skip_vpd_pages = 1;
> + /*
> + * Some devices don't handle VPD pages correctly, so skip vpd
> + * pages if not forced by SCSI layer.
> + */
> + sdev->skip_vpd_pages = !sdev->try_vpd_pages;
>
> /* Do not attempt to use REPORT SUPPORTED OPERATION CODES */
> sdev->no_report_opcodes = 1;
> --
> 2.21.0
>
next prev parent reply other threads:[~2019-06-25 16:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-18 22:44 [PATCH v2] usb: storage: scsiglue: Do not skip VPD if try_vpd_pages is set Marcos Paulo de Souza
2019-06-25 16:57 ` Marcos Paulo de Souza [this message]
2019-07-02 22:58 ` Marcos Paulo de Souza
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190625165709.GA31932@continental \
--to=marcos.souza.org@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=usb-storage@lists.one-eyed-alien.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.