Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030450AbYHFPsq (ORCPT ); Wed, 6 Aug 2008 11:48:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759664AbYHFPfB (ORCPT ); Wed, 6 Aug 2008 11:35:01 -0400 Received: from extu-mxob-2.symantec.com ([216.10.194.135]:56378 "EHLO extu-mxob-2.symantec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759622AbYHFPe7 (ORCPT ); Wed, 6 Aug 2008 11:34:59 -0400 Date: Wed, 6 Aug 2008 16:34:16 +0100 (BST) From: Hugh Dickins X-X-Sender: hugh@blonde.site To: "Martin K. Petersen" cc: James Bottomley , 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: Message-ID: References: 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: 1699 Lines: 40 On Wed, 6 Aug 2008, Martin K. Petersen wrote: > >>>>> "Hugh" == Hugh Dickins writes: > > Hugh> Commit e0597d70012c82e16ee152270a55d89d8bf66693 (sd: Identify > Hugh> DIF protection type and application tag ownership) says that if > Hugh> a disk is formatted with Inquiry bit PROTECT=1, it is required > Hugh> to support Read Capacity(16). But my SD cards, accessed by > Hugh> builtin cardreader and generic USB storage, disagree. > > Argh. That's really broken. USB storage has no business setting > PROTECT. > > Can you send me the sg_inq output so I can see what else they are > returning? sg_inq? I assume that's the same as the inquiry_len bytes at inquiry: 00000000: 00 8d 00 01 1f 01 00 00 47 65 6e 65 72 69 63 2d ........Generic- 00000010: 4d 75 6c 74 69 2d 43 61 72 64 20 20 20 20 20 20 Multi-Card 00000020: 31 2e 30 30 1.00 Ah, sg_inq is a command which spells that out, here you go: standard INQUIRY: PQual=0 Device_type=0 RMB=1 version=0x00 [no conformance claimed] [AERC=0] [TrmTsk=0] NormACA=0 HiSUP=0 Resp_data_format=1 SCCS=0 ACC=0 TGPS=0 3PC=0 Protect=1 BQue=0 EncServ=0 MultiP=0 [MChngr=0] [ACKREQQ=0] Addr16=0 [RelAdr=0] WBus16=0 Sync=0 Linked=0 [TranDis=0] CmdQue=0 length=36 (0x24) Peripheral device type: disk Vendor identification: Generic- Product identification: Multi-Card Product revision level: 1.00 Hugh -- 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/