[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1218041582.7493.19.camel@localhost.localdomain>
Date: Wed, 06 Aug 2008 09:53:02 -0700
From: James Bottomley <James.Bottomley@...senPartnership.com>
To: Hugh Dickins <hugh@...itas.com>
Cc: "Martin K. Petersen" <martin.petersen@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][SCS] sd: Read Capacity if (16) fails
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) \
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists