Unloading USB driver while device is attached.

Pawel Jakub Dawidek pjd at FreeBSD.org
Mon Jul 19 10:52:44 PDT 2004


On Mon, Jul 19, 2004 at 11:43:14AM -0600, Scott Long wrote:
+> >Yeah, but even on 'kldunload -f' it should be possible to clean up
+> >and avoid panic on next load.
+> >
+> 
+> What usually happens in that a timeout happens and the driver handler no
+> longer exists (i.e. forgot to call untimeout), or an interrupt happens
+> and the driver forgot to deregister the interrupt.  There are also a lot
+> of rase possibilities in here even if the driver attempts to do the
+> right thing.  There really isn't a 'one size fits all' way to deal with
+> this kind of thing.  The driver author needs to build quiesce and
+> shutdown semantics into the driver design.

If your device is inserted and you load a driver everything is ok,
because no driver is attached to this device.
So, as I see it, device should be totally detached before unload and
I susspect that something is missing in USB layer, not in all drivers.
That's why when I load a driver again, USB thinks it is somehow connected
to existing device, but it isn't.

-- 
Pawel Jakub Dawidek                       http://www.FreeBSD.org
pjd at FreeBSD.org                           http://garage.freebsd.pl
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040719/3f8be39f/attachment.bin


More information about the freebsd-current mailing list