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

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


From: Andreas Fuchs <asf@xxxxxxxxxxx>
Date: Sun, 21 Mar 2004 12:55:22 +0100

On 2004-03-19, Matthew Dillon <dillon@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@xxxxxxxxxxx>, asf@xxxxxxxxx, antifuchs




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