From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Matthew Wilcox <matthew@wil.cx>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] sd: Try READ CAPACITY 16 first for all SCSI-3 devices
Date: Tue, 27 Jan 2009 19:36:24 +0000 [thread overview]
Message-ID: <1233084984.3231.94.camel@localhost.localdomain> (raw)
In-Reply-To: <20081223164703.GB19967@parisc-linux.org>
On Tue, 2008-12-23 at 09:47 -0700, Matthew Wilcox wrote:
> New features are being added to the READ CAPACITY 16 results, so we want
> to try to issue it in preference to READ CAPACITY 10. Unfortunately,
> some USB devices hang when they see a READ CAPACITY 16, so we limit
> our chances of causing a hang by restricting this command to devices
> which claim conformance to SCSI-3. USB devices are currently limited
> to claiming at most SCSI-2 conformance.
>
> Of course, it's entirely legitimate for devices to not implement READ
> CAPACITY 16, so this patch also includes a fallback to READ CAPACITY 10
> for SCSI-3 devices.
>
> Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
>
> ---
> drivers/scsi/sd.c | 7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> index f244349..25a923b 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -1424,11 +1424,14 @@ sd_read_capacity(struct scsi_disk *sdkp, unsigned char *buffer)
> int sector_size;
> struct scsi_device *sdp = sdkp->device;
>
> - /* Force READ CAPACITY(16) when PROTECT=1 */
> - if (scsi_device_protection(sdp)) {
> + if (sdp->scsi_level > SCSI_2) {
Were you going to update this? Martin Petersen already found an early
SCSI-3 device that crashes upon receiving Read Capacity(16).
James
prev parent reply other threads:[~2009-01-27 19:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-23 16:47 [PATCH] sd: Try READ CAPACITY 16 first for all SCSI-3 devices Matthew Wilcox
2008-12-31 10:18 ` Martin K. Petersen
2008-12-31 13:50 ` Matthew Wilcox
2008-12-31 13:51 ` Matthew Wilcox
2009-02-23 21:51 ` Matthew Wilcox
2009-02-25 22:23 ` James Bottomley
2009-02-25 22:31 ` Matthew Wilcox
2009-02-25 22:43 ` James Bottomley
2009-01-27 19:36 ` James Bottomley [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=1233084984.3231.94.camel@localhost.localdomain \
--to=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
/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