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: <Generic USB SD Reader 1.00> 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: <Generic USB CF Reader 1.01> 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: <Generic USB SM Reader 1.02> 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: <Generic USB MS Reader 1.03> 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: <Generic STORAGE DEVICE 9138> 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"