USB flash drive oddity
dillon at apollo.backplane.com
Wed Apr 4 11:39:25 PDT 2007
: I've been trying a no name mp3 player (USB flash).
: One thing surprised me - it mounts on /mnt automatically on
:insertion but I cannot find where this is being controlled from (I didn't
:put anything in usbd.conf for it). It's neat but I sort of wonder what
:happens in /mnt is in use.
: I'm also having some problems - unmounting it produces error
:messages (below) and files written to it are sometimes corrupt (I suspect
:that data is not always flushed).
:Apr 4 11:49:52 df1 kernel: umass0: BBB reset failed, TIMEOUT
:Apr 4 11:49:58 df1 kernel: umass0: BBB bulk-in clear stall failed, TIMEOUT
:Apr 4 11:50:03 df1 kernel: umass0: BBB bulk-out clear stall failed, TIMEOUT
:Apr 4 11:50:03 df1 kernel: (da0:umass-sim0:0:0:0): Synchronize cache
:failed, status == 0x4, scsi status == 0x0
:Apr 4 11:50:03 df1 kernel: umass0: Invalid CSW: tag 131 should be 132
I dunno about the tag mismatch, but the cache synchronization failure
is due to many UMASS USB devices not implementing that command, and the
USB spec is such that unimplemented commands can cause device timeouts
and require a reset (basically due to horrible decisions made
by the idiots who designed the USB spec).
The simple addition of a quirk table entry to disable the use of the
cache synchronization command should solve the problem. You need the
usb vendor and device id's to enter the information into the quirk
table in /usr/src/sys/dev/usbmisc/umass/umass.c (see around lines
257 and the quirk table is declared around line 314).
I'm not entirely sure how you can dump that information. It may show
up in the dmesg when you plug the device in, or perhaps some usbhidctl
command will dump the info.
<dillon at backplane.com>
More information about the Users