From owner-freebsd-current Thu Dec 19 10:48:52 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 218C937B401; Thu, 19 Dec 2002 10:48:49 -0800 (PST) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B61C43EC2; Thu, 19 Dec 2002 10:48:48 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.5/8.12.5) with ESMTP id gBJImgOM099847; Thu, 19 Dec 2002 10:48:42 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.5/8.12.5/Submit) id gBJImgOq099846; Thu, 19 Dec 2002 10:48:42 -0800 (PST) (envelope-from dillon) Date: Thu, 19 Dec 2002 10:48:42 -0800 (PST) From: Matthew Dillon Message-Id: <200212191848.gBJImgOq099846@apollo.backplane.com> To: Bernd Walter Cc: John Baldwin , Bernd Walter , "Brian F. Feldman" , Josef Karthauser , freebsd-current@FreeBSD.ORG, Matthew Dillon Subject: Re: UMASS USB bug? (getting the Sony disk-on-key device working) References: <20021219172844.GJ29286@cicely8.cicely.de> <20021219180144.GK29286@cicely8.cicely.de> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :> :> Eh? For ATAPI and UFM devices we never send a 6 byte command to the :> device that can fail, only 10 byte commands. : :I believed this was a SCSI over bulk only device. : :-- :B.Walter COSMO-Project http://www.cosmo-project.de :ticso@cicely.de Usergroup info@cosmo-project.de Yes, this is a USB DiskKey - UMASS storage, SCSI over bulk only device. I've done some further testing on both -current and -stable. I cannot get the device to work unless I have the quirk entry in scsi_da.c. -Current has a quirk table for umass.c and already has a flag which disables the residue test. The patch for current thus does not require #if 0'ing out that code, only a quirk entry. Since I don't need any hacks beyond what is there already I am going to commit the two quirk entries for -current now. However, I am still unable to get the device to work properly in -Current. This is what happens (see below). test2 kernel: umass0: Sony USB Storage Media, rev 1.10/2.00, addr 2 test2 kernel: umass0: Get Max Lun not supported (IOERROR) test2 kernel: da2 at umass-sim0 bus 0 target 0 lun 0 test2 kernel: da2: Removable Direct Access SCSI-0 device test2 kernel: da2: 1.000MB/s transfers test2 kernel: da2: Attempt to query device size failed: UNIT ATTENTION, Medium not present test2 kernel: (da2:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 test2 kernel: (da2:umass-sim0:0:0:0): CAM Status: SCSI Status Error test2 kernel: (da2:umass-sim0:0:0:0): SCSI Status: Check Condition test2 kernel: (da2:umass-sim0:0:0:0): UNIT ATTENTION asc:3a,0 test2 kernel: (da2:umass-sim0:0:0:0): Medium not present test2 kernel: (da2:umass-sim0:0:0:0): Retrying Command (per Sense Data) test2 kernel: (da2:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 test2 kernel: (da2:umass-sim0:0:0:0): CAM Status: SCSI Status Error test2 kernel: (da2:umass-sim0:0:0:0): SCSI Status: Check Condition test2 kernel: (da2:umass-sim0:0:0:0): UNIT ATTENTION asc:3a,0 test2 kernel: (da2:umass-sim0:0:0:0): Medium not present test2 kernel: (da2:umass-sim0:0:0:0): Retrying Command (per Sense Data) test2 kernel: (da2:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 test2 kernel: (da2:umass-sim0:0:0:0): CAM Status: SCSI Status Error test2 kernel: (da2:umass-sim0:0:0:0): SCSI Status: Check Condition test2 kernel: (da2:umass-sim0:0:0:0): UNIT ATTENTION asc:3a,0 test2 kernel: (da2:umass-sim0:0:0:0): Medium not present test2 kernel: (da2:umass-sim0:0:0:0): Retrying Command (per Sense Data) test2 kernel: (da2:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 test2 kernel: (da2:umass-sim0:0:0:0): CAM Status: SCSI Status Error test2 kernel: (da2:umass-sim0:0:0:0): SCSI Status: Check Condition test2 kernel: (da2:umass-sim0:0:0:0): UNIT ATTENTION asc:3a,0 test2 kernel: (da2:umass-sim0:0:0:0): Medium not present test2 kernel: (da2:umass-sim0:0:0:0): Retrying Command (per Sense Data) test2 kernel: (da2:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 test2 kernel: (da2:umass-sim0:0:0:0): CAM Status: SCSI Status Error test2 kernel: (da2:umass-sim0:0:0:0): SCSI Status: Check Condition test2 kernel: (da2:umass-sim0:0:0:0): UNIT ATTENTION asc:3a,0 test2 kernel: (da2:umass-sim0:0:0:0): Medium not present test2 kernel: (da2:umass-sim0:0:0:0): Retries Exhausted test2 kernel: Opened disk da2 -> 6 But then I get this: test2 kernel: (da2:umass-sim0:0:0:0): Not ready to ready change, medium may have changed test2 kernel: (da2:umass-sim0:0:0:0): Retrying Command (per Sense Data) (no retry occurs) And if I tell cam to rescan a different Lun it works: camcontrol rescan 2:0:1 da3 at umass-sim0 bus 0 target 0 lun 1 da3: Removable Direct Access SCSI-0 device da3: 1.000MB/s transfers da3: 125MB (256352 512 byte sectors: 64H 32S/T 125C) camcontrol rescan 2:0:2 da3 at umass-sim0 bus 0 target 0 lun 1 da3: Removable Direct Access SCSI-0 device da3: 1.000MB/s transfers da3: 125MB (256352 512 byte sectors: 64H 32S/T 125C) I am not sure what is going on but I think in -current CAM is exhausting its retries too quickly (the messages are instantanious) and not giving the device enough time to boot up. This is because, I believe, the usb controller is now a kerneland thread instead of a userland usbd and is responding instantly to the device presence. I would have expected 'camcontrol rescan 2:0:0' but it doesn't. It just says: # camcontrol rescan 2:0:0 Re-scan of 2:0:0 was successful But then doesn't do anything. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message