From: "David C. Partridge" <david.partridge@perdrix.co.uk>
To: "'Greg KH'" <gregkh@linuxfoundation.org>,
"'Oliver Neukum'" <oneukum@suse.com>
Cc: <linux-usb@vger.kernel.org>
Subject: RE: [PATCH] USB: UAS: introduce a quirk to set no_write_same
Date: Wed, 9 Dec 2020 14:06:46 -0000 [thread overview]
Message-ID: <000001d6ce34$88ed1b70$9ac75250$@perdrix.co.uk> (raw)
In-Reply-To: <X9C9Gt5chKLAE1Vq@kroah.com>
Probably here:
https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html
in the usb-storage.quirks section?
I assume there's also a header file that defines all this stuff?
David
-----Original Message-----
From: Greg KH <gregkh@linuxfoundation.org>
Sent: 09 December 2020 12:04
To: Oliver Neukum <oneukum@suse.com>
Cc: linux-usb@vger.kernel.org; david.partridge@perdrix.co.uk
Subject: Re: [PATCH] USB: UAS: introduce a quirk to set no_write_same
On Wed, Dec 09, 2020 at 12:07:34PM +0100, Oliver Neukum wrote:
> UAS does not share the pessimistic assumption storage
> is making that devices cannot deal with WRITE_SAME.
> A few devices supported by UAS, are reported to not
> deal well with WRITE_SAME. Those need a quirk.
>
> Add it to the device that needs it.
>
> Signed-off-by: Oliver Neukum <oneukum@suse.com>
> Reported-by: David C. Partridge <david.partridge@perdrix.co.uk>
> ---
> drivers/usb/storage/uas.c | 3 +++
> drivers/usb/storage/unusual_uas.h | 7 +++++--
> drivers/usb/storage/usb.c | 3 +++
> include/linux/usb_usual.h | 2 ++
> 4 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
> index 56422c4b4ff3..bef89c6bd1d7 100644
> --- a/drivers/usb/storage/uas.c
> +++ b/drivers/usb/storage/uas.c
> @@ -868,6 +868,9 @@ static int uas_slave_configure(struct scsi_device
*sdev)
> if (devinfo->flags & US_FL_NO_READ_CAPACITY_16)
> sdev->no_read_capacity_16 = 1;
>
> + /* Some disks cannot handle WRITE_SAME */
> + if (devinfo->flags & US_FL_NO_SAME)
> + sdev->no_write_same = 1;
> /*
> * Some disks return the total number of blocks in response
> * to READ CAPACITY rather than the highest block number.
> diff --git a/drivers/usb/storage/unusual_uas.h
b/drivers/usb/storage/unusual_uas.h
> index 711ab240058c..870e9cf3d5dc 100644
> --- a/drivers/usb/storage/unusual_uas.h
> +++ b/drivers/usb/storage/unusual_uas.h
> @@ -35,12 +35,15 @@ UNUSUAL_DEV(0x054c, 0x087d, 0x0000, 0x9999,
> USB_SC_DEVICE, USB_PR_DEVICE, NULL,
> US_FL_NO_REPORT_OPCODES),
>
> -/* Reported-by: Julian Groß <julian.g@posteo.de> */
> +/*
> + * Initially Reported-by: Julian Groß <julian.g@posteo.de>
> + * Further reports David C. Partridge <david.partridge@perdrix.co.uk>
> + */
> UNUSUAL_DEV(0x059f, 0x105f, 0x0000, 0x9999,
> "LaCie",
> "2Big Quadra USB3",
> USB_SC_DEVICE, USB_PR_DEVICE, NULL,
> - US_FL_NO_REPORT_OPCODES),
> + US_FL_NO_REPORT_OPCODES | US_FL_NO_SAME),
>
> /*
> * Apricorn USB3 dongle sometimes returns "USBSUSBSUSBS" in response to
SCSI
> diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
> index 94a64729dc27..90aa9c12ffac 100644
> --- a/drivers/usb/storage/usb.c
> +++ b/drivers/usb/storage/usb.c
> @@ -541,6 +541,9 @@ void usb_stor_adjust_quirks(struct usb_device *udev,
unsigned long *fflags)
> case 'j':
> f |= US_FL_NO_REPORT_LUNS;
> break;
> + case 'k':
> + f |= US_FL_NO_SAME;
> + break;
Shouldn't this new flag be documented somewhere?
thanks,
greg k-h
prev parent reply other threads:[~2020-12-09 14:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-09 11:07 [PATCH] USB: UAS: introduce a quirk to set no_write_same Oliver Neukum
2020-12-09 12:03 ` Greg KH
2020-12-09 14:06 ` David C. Partridge [this message]
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='000001d6ce34$88ed1b70$9ac75250$@perdrix.co.uk' \
--to=david.partridge@perdrix.co.uk \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).