Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759990AbYHFRVl (ORCPT ); Wed, 6 Aug 2008 13:21:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755070AbYHFRVa (ORCPT ); Wed, 6 Aug 2008 13:21:30 -0400 Received: from extu-mxob-1.symantec.com ([216.10.194.28]:60112 "EHLO extu-mxob-1.symantec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754416AbYHFRV3 (ORCPT ); Wed, 6 Aug 2008 13:21:29 -0400 Date: Wed, 6 Aug 2008 18:21:18 +0100 (BST) From: Hugh Dickins X-X-Sender: hugh@blonde.site To: James Bottomley cc: "Martin K. Petersen" , Andrew Morton , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][SCS] sd: Read Capacity if (16) fails In-Reply-To: <1218041582.7493.19.camel@localhost.localdomain> Message-ID: References: <1218040613.7493.13.camel@localhost.localdomain> <1218041582.7493.19.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1477 Lines: 43 On Wed, 6 Aug 2008, James Bottomley wrote: > 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? Almost: I had to #include to get SCSI_2 for the build somewhere (and a SCSI_2 seems to be worth 1 more than anyone else's 2), then it worked just fine for me thanks. Hugh p.s. sorry for losing an I from the "[SCSI]" Subject --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -6,6 +6,7 @@ #include #include #include +#include #include struct request_queue; @@ -426,7 +427,7 @@ static inline int scsi_device_enclosure( 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/