DragonFly BSD
DragonFly kernel List (threaded) for 2004-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: Andreas Fuchs <asf@xxxxxxxxxxx>
Date: Thu, 18 Mar 2004 23:38:46 +0100

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@xxxxxxxxxxx>, asf@xxxxxxxxx, antifuchs




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]