usbd doesn't trigger "detach" event of umass device?

Andreas Fuchs asf at boinkor.net
Thu Mar 18 14:40:25 PST 2004


Hi,

This is the first time I'm actually trying out a DragonFlyBSD live CD
(2004-03-17b), and I like it so far.

There's one problem with usbd, though: I have a set of scripts to
handle attach/detaching of my USB stick (for mounting a ramdisk image
of its contents read-only and umounting it automatically when I pull
the stick out); they work well in theory, but when I detach the
device, the "detach" script is never run. This is the entry:

device "USB Stick"
       devname "umass0"
       attach "echo attached >/dev/console"
       detach "echo detached >/dev/console"

When I plug it in, I get the "attached" message (and kernel log
messages). When I pull out the stick, usbd doesn't seem to notice,
although there is a kernel log message:

"
umass0: at uhub1 port 1 (addr 2) disconnected
(da0:umass-sim0:0:0:0): lost device
(da0:umass-sim0:0:0:0): removing device entry
umass0: detached
"

after a while (when running with -vvvd), I get:

"usbd: doing timeout discovery on /dev/usb0
usbd: doing timeout discovery on /dev/usb1
usbd: doing timeout discovery on /dev/usb2
usbd: processing event queue due to timeout on /dev/usb"

but no detach event.

BTW, the same problem is occurs in Freebsd 5.2-CURRENT.

Thanks,
-- 
Andreas Fuchs, <asf at xxxxxxxxxxx>, asf at xxxxxxxxx, antifuchs






More information about the Kernel mailing list