usbd doesn't trigger "detach" event of umass device?
Andreas Fuchs
asf at boinkor.net
Sun Mar 21 03:55:40 PST 2004
On 2004-03-19, Matthew Dillon <dillon at xxxxxxxxxxxxxxxxxxxx> wrote:
> NetBSD fixed the bug by NULLing out the pointer that was pointing to
> the freed memory. I will incorporate NetBSD's bug fix and re-enable
> the DETACH event in a few moments after I finish testing the fix.
That worked, with a bit of fiddling.
I had in the original config file:
device "USB Stick"
devname "umass0"
attach "echo foo >/dev/console"
detach "echo bar >/dev/console"
This didn't cause the detach event script to be run. Figuring that the
vendor/product/release IDs would be more helpful, I rewrote it thus:
device "USB Stick"
devname "umass0"
vendor 0x08ec
product 0x0834
release 0x0100
attach "echo foo >/dev/console"
detach "echo bar >/dev/console"
But that didn't work, either. Only with this entry does the detach
event run:
device "USB Stick"
vendor 0x08ec
product 0x0834
release 0x0100
attach "echo foo >/dev/console"
detach "echo bar >/dev/console"
i.e. without the "devname" clause. Perhaps that messed up usbd's
match-seeking algorithm? Anyway, it works for me now, so I'm happy.
Thanks,
--
Andreas Fuchs, <asf at xxxxxxxxxxx>, asf at xxxxxxxxx, antifuchs
More information about the Kernel
mailing list