Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752572AbZG0Pr4 (ORCPT ); Mon, 27 Jul 2009 11:47:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752059AbZG0Prz (ORCPT ); Mon, 27 Jul 2009 11:47:55 -0400 Received: from ip67-152-220-66.z220-152-67.customer.algx.net ([67.152.220.66]:27818 "EHLO daytona.int.panasas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751896AbZG0Prz (ORCPT ); Mon, 27 Jul 2009 11:47:55 -0400 Message-ID: <4A6DCC28.7000309@panasas.com> Date: Mon, 27 Jul 2009 18:47:52 +0300 From: Boaz Harrosh User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090315 Remi/3.0-0.b2.fc10.remi Thunderbird/3.0b2 MIME-Version: 1.0 To: "Martin K. Petersen" CC: Matthew Wilcox , Tarkan Erimer , linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org Subject: Re: [BISECTED] Re: [BUG] Linux-2.6.31-rc1 Fails To Recognize Some USB Disks References: <4A4472DF.1050900@turknet.net.tr> <4A4878AC.3050208@turknet.net.tr> <4A69932E.90906@turknet.net.tr> <4A69D093.8020108@turknet.net.tr> <20090727020611.GC3711@parisc-linux.org> <4A6D64DC.3020001@panasas.com> <4A6DBEEB.5020302@panasas.com> <4A6DCA7F.4080006@panasas.com> In-Reply-To: <4A6DCA7F.4080006@panasas.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 27 Jul 2009 15:47:55.0826 (UTC) FILETIME=[9BCBD120:01CA0ED1] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2217 Lines: 61 On 07/27/2009 06:40 PM, Boaz Harrosh wrote: > On 07/27/2009 06:19 PM, Martin K. Petersen wrote: >>>>>>> "Boaz" == Boaz Harrosh writes: >> Boaz> Haa, OK. I thought INQUIRY EVPD=1 page=0 was so old it sure must >> Boaz> be supported but you are saying it's only SBC2/SPC3. So I guess >> Boaz> there is nothing else we can do. >> >> Yes, EVPD must be supported. USB-ATA bridge firmware writers are >> dyslexic. Film at 11. >> >> What I'm saying is that *our* reason for sending out extended inquiry >> appeared in SBC2 (block limits VPD). So there is no point in asking >> devices older than that. >> >> The fact that this fixes the problem for Tarkan's crappy disk is a >> (quasi-intentional) side effect. My patch simply tries to be >> conservative about asking for those pages. >> >> >> Boaz> What I hate about all this is that in USB the scsi_level is hard >> Boaz> coded at the driver, without actually been able to probe the >> Boaz> device about it. >> >> Huh, what? >> > > Look in drivers/usb/storage::slave_configure > > /* Some devices report a SCSI revision level above 2 but are > * unable to handle the REPORT LUNS command (for which > * support is mandatory at level 3). Since we already have > * a Get-Max-LUN request, we won't lose much by setting the > * revision level down to 2. The only devices that would be > * affected are those with sparse LUNs. */ > if (sdev->scsi_level > SCSI_2) > sdev->sdev_target->scsi_level = > sdev->scsi_level = SCSI_2; > Maybe it should be: if (sdev->scsi_level > SCSI_2 && sdev->scsi_level < SCSI_SPC_2) sdev->sdev_target->scsi_level = sdev->scsi_level = SCSI_2; To account for the devices the comment is talking about. Which seems to be written at the time SCSI_3 was the highest level. > So the scsi_level is hard coded to very low. > Or am I reading this code wrong and it is only triggered for some but not > all devices? > > Boaz > -- Sigh Boaz -- 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/