From owner-freebsd-stable@FreeBSD.ORG Sat Dec 22 13:46:46 2007 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26DFE16A473; Sat, 22 Dec 2007 13:46:46 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost2.sentex.ca (smarthost2.sentex.ca [205.211.164.50]) by mx1.freebsd.org (Postfix) with ESMTP id E255D13C4F8; Sat, 22 Dec 2007 13:46:45 +0000 (UTC) (envelope-from mike@sentex.net) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by smarthost2.sentex.ca (8.14.1/8.13.8) with ESMTP id lBMDE00M076466; Sat, 22 Dec 2007 08:14:00 -0500 (EST) (envelope-from mike@sentex.net) Received: from mdt-xp.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.13.8/8.13.3) with ESMTP id lBMDDx5M036478 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 22 Dec 2007 08:13:59 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <200712221313.lBMDDx5M036478@lava.sentex.ca> X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Sat, 22 Dec 2007 08:14:04 -0500 To: Mikhail Teterin , stable@freebsd.org From: Mike Tancsa In-Reply-To: <200712212341.44308@aldan> References: <200712212341.44308@aldan> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Cc: freebsd-usb@freebsd.org Subject: Re: usb/umass, devfs: this sucks X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Dec 2007 13:46:46 -0000 At 11:41 PM 12/21/2007, Mikhail Teterin wrote: >Another attempt to use USB-storage with FreeBSD, another moment of >hair-pulling frustration. > >I attach the card-reader with the media card already inserted (detection of >card-insertion has not worked in a long time, if ever). Perhaps its the one card reader you are using is particularly problematic ? I have been using the multi-type cheapo reader below for some time port 6 addr 2: high speed, power 100 mA, config 1, Mass Storage Device(0x6362), Generic(0x058f), rev 1.26 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: Attempt to query device size failed: NOT READY, Medium not present da1 at umass-sim0 bus 0 target 0 lun 1 da1: Removable Direct Access SCSI-0 device da1: 40.000MB/s transfers da1: 976MB (2000880 512 byte sectors: 64H 32S/T 976C) da2 at umass-sim0 bus 0 target 0 lun 2 da2: Removable Direct Access SCSI-0 device da2: 40.000MB/s transfers da2: Attempt to query device size failed: NOT READY, Medium not present da3 at umass-sim0 bus 0 target 0 lun 3 da3: Removable Direct Access SCSI-0 device da3: 40.000MB/s transfers da3: Attempt to query device size failed: NOT READY, Medium not present We go through the following steps when using it. We always plug the reader in without a card. Then we put the card in and do a cat /dev/null > /dev/da1 ... or whatever the device is. Its been quite reliable this way for us. The other caveat is never to pull the card or reader when its mounted. ---Mike >The "disk" appears: > > umass1: Genesys USB Reader, rev 2.00/91.38, addr 3 > da6 at umass-sim1 bus 1 target 0 lun 0 > da6: Removable Direct Access > SCSI-0 device > da6: 40.000MB/s transfers > da6: 1938MB (3970048 512 byte sectors: 255H 63S/T 247C) > (da6:umass-sim1:1:0:0): AutoSense Failed > >But the "slices" (/dev/da6s1, etc.) don't appear: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=usb/76461 > >In the past, trying to mount, or otherwise read the da6 would result in the >slices appearing -- an awful wart, when it works. So I try it, but it does >not work: > > root@aldan:/home/mi (116) mount -tmsdosfs /dev/da6 /mnt > ... hang ... > >Pressing Ctrl-T: > load: 0.58 cmd: mount_msdosfs 64452 [GEOM topology] 0.00u > 0.00s 0% 804k > ... > load: 0.47 cmd: mount_msdosfs 64452 [GEOM topology] 0.00u > 0.00s 0% 804k > >It still hangs, and now other things hang too. top, for example, hangs on >start-up: > > mi@aldan:~ (1084) top > ... hang ... >Pressing Ctrl-T: > load: 0.57 cmd: top 64480 [devfs] 0.00u 0.00s 0% 1652k > load: 0.57 cmd: top 64480 [devfs] 0.00u 0.00s 0% 1652k > load: 0.57 cmd: top 64480 [devfs] 0.00u 0.00s 0% 1652k > load: 0.57 cmd: top 64480 [devfs] 0.00u 0.00s 0% 1652k > >No new window can be opened either -- presumably due to devfs hanging. I >suspect, that anything attempting to use even the /dev/null is hanging now. > >So, not only the USB itself is broken, our wonderful devfs is rather creaky >too -- nothing should be in an uninterruptible state like this for more than >a millisecond. > >25 minutes later the mount finally gave up: > > umass1: BBB reset failed, TIMEOUT > umass1: BBB bulk-in clear stall failed, TIMEOUT > umass1: BBB bulk-out clear stall failed, TIMEOUT > mount_msdosfs: /dev/da6: Input/output error > >Things are back to "normal" again, but the media card is still inaccessible. >I'll try to work with it using mtools -- I had some success in the pass >accessing the FAT-filesystem on the media cards using mcopy, mdir, etc. > >I'm using 6.3-PRERELEASE as of Dec 6th, but a search for umass-related bugs > > http://www.freebsd.org/cgi/query-pr-summary.cgi?text=umass > >reveals plenty of really old problems, which don't even have a single >follow-up from FreeBSD-developers. Like: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=usb/95037 > http://www.freebsd.org/cgi/query-pr.cgi?pr=usb/95173 > http://www.freebsd.org/cgi/query-pr.cgi?pr=usb/107848 > >Looks like USB is unmaintained and getting worse. Are we really shipping this >as "the most recent stable release"? > > -mi >_______________________________________________ >freebsd-usb@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-usb >To unsubscribe, send any mail to "freebsd-usb-unsubscribe@freebsd.org"