From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 20 01:59:33 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A6B9D16A4CE for ; Tue, 20 Apr 2004 01:59:33 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id DDD0043D31 for ; Tue, 20 Apr 2004 01:59:32 -0700 (PDT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) (authenticated bits=0) i3K8xLPo052295 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Tue, 20 Apr 2004 10:59:24 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id i3K8w9hn034920 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 20 Apr 2004 10:58:10 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id i3K8w9FM003354; Tue, 20 Apr 2004 10:58:09 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id i3K8w6t1003353; Tue, 20 Apr 2004 10:58:06 +0200 (CEST) (envelope-from ticso) Date: Tue, 20 Apr 2004 10:58:05 +0200 From: Bernd Walter To: "Daniel O'Connor" Message-ID: <20040420085805.GA5279@cicely12.cicely.de> References: <200404192247.48015.doconnor@gsoft.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200404192247.48015.doconnor@gsoft.com.au> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=ham version=2.63 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on cicely12.cicely.de cc: freebsd-hackers@freebsd.org Subject: Re: Detecting 'floppy' like umass devices X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2004 08:59:33 -0000 On Mon, Apr 19, 2004 at 10:47:48PM +0930, Daniel O'Connor wrote: > A friend of mine handed me a USB flash key today that has 2 'partition' - one > 1.44Mb chunk pretends to be a floppy drive and the rest is a normal umass > device. > > I am wondering if there is any way of telling if a given umass device is > a floppy drive (or wants to look like one) - eg I have a USB FDD which > I imagine should fall into the same basket. What do do you mean with "wants to look like one". In which way does a floppy look different from other direct access drives? They all read and store direct access data. > I note that you get wacky values from fdisk when you try and read partition > table from them too.. > > On another note my USB floppy drive does 2k/sec in FreeBSD :( Sound like another instance of msdosfs does no clustering and drive is too stupid to get speed without. IIRC there were some work on this point, but I don't now the state. Check the speed with dd and different blocksizes. > It's one of these -> > Apr 19 22:45:32 inchoate kernel: umass0: NEC NEC USB UF000x, rev 1.10/1.50, addr 2 > Apr 19 22:45:33 inchoate kernel: (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 0 0 0 24 0 > Apr 19 22:45:33 inchoate kernel: (probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error > Apr 19 22:45:33 inchoate kernel: (probe0:umass-sim0:0:0:0): SCSI Status: Check Condition > Apr 19 22:45:33 inchoate kernel: (probe0:umass-sim0:0:0:0): UNIT ATTENTION asc:29,0 > Apr 19 22:45:33 inchoate kernel: (probe0:umass-sim0:0:0:0): Power on, reset, or bus device reset occurred > Apr 19 22:45:33 inchoate kernel: (probe0:umass-sim0:0:0:0): Retrying Command (per Sense Data) > Apr 19 22:45:35 inchoate kernel: da0 at umass-sim0 bus 0 target 0 lun 0 > Apr 19 22:45:35 inchoate kernel: da0: Removable Direct Access SCSI-0 device > Apr 19 22:45:35 inchoate kernel: da0: 1.000MB/s transfers > Apr 19 22:45:35 inchoate kernel: da0: 1MB (2880 512 byte sectors: 64H 32S/T 1C) > Apr 19 22:45:36 inchoate kernel: umass0: Unsupported UFI command 0x35 > Apr 19 22:45:36 inchoate kernel: (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x6, scsi status == 0x0 > Apr 19 22:45:36 inchoate kernel: umass0: Unsupported UFI command 0x35 > Apr 19 22:45:36 inchoate kernel: (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x6, scsi status == 0x0 Nothing wrong with those messages. > I have a Dell Inspiron 8600 with a > uhci0: port 0xbf80-0xbf9f irq 11 at device 29.0 on pci0 > > I have tried a USB flash card reader which gets ~500k/sec. If a drive doesn't preread blocks then each access has to wait for the media - undoubly flash has a faster access time than floppies... -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de