From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][SCS] sd: Read Capacity if (16) fails
Date: Wed, 06 Aug 2008 09:53:02 -0700 [thread overview]
Message-ID: <1218041582.7493.19.camel@localhost.localdomain> (raw)
In-Reply-To: <1218040613.7493.13.camel@localhost.localdomain>
On Wed, 2008-08-06 at 09:36 -0700, James Bottomley wrote:
> On Wed, 2008-08-06 at 16:34 +0100, Hugh Dickins wrote:
> > PQual=0 Device_type=0 RMB=1 version=0x00 [no conformance
> > claimed]
>
> We could try using this as the trigger. I assume all DIF supporting
> devices must also claim conformance to SPC3/SBC2 or higher?
Just to formalise it, that would be this patch. Hugh, could you try it?
Thanks,
James
---
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 291d56a..ffbc84a 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -426,7 +426,7 @@ static inline int scsi_device_enclosure(struct scsi_device *sdev)
static inline int scsi_device_protection(struct scsi_device *sdev)
{
- return sdev->inquiry[5] & (1<<0);
+ return sdev->scsi_level > SCSI_2 && sdev->inquiry[5] & (1<<0);
}
#define MODULE_ALIAS_SCSI_DEVICE(type) \
next prev parent reply other threads:[~2008-08-06 16:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-06 14:06 [PATCH][SCS] sd: Read Capacity if (16) fails Hugh Dickins
2008-08-06 14:25 ` Matthew Wilcox
2008-08-06 16:35 ` James Bottomley
2008-08-06 14:27 ` Martin K. Petersen
2008-08-06 15:34 ` Hugh Dickins
2008-08-06 16:36 ` James Bottomley
2008-08-06 16:44 ` Martin K. Petersen
2008-08-06 16:53 ` James Bottomley [this message]
2008-08-06 17:21 ` Hugh Dickins
2008-08-06 17:32 ` Martin K. Petersen
2008-08-06 17:36 ` James Bottomley
2008-08-06 16:44 ` Douglas Gilbert
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=1218041582.7493.19.camel@localhost.localdomain \
--to=james.bottomley@hansenpartnership.com \
--cc=akpm@linux-foundation.org \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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