Re: Unloading USB driver while device is attached.

From: Scott Long <scottl_at_freebsd.org>
Date: Mon, 19 Jul 2004 11:43:14 -0600
Pawel Jakub Dawidek wrote:

> On Mon, Jul 19, 2004 at 10:23:16AM -0700, Doug White wrote:
> +> Theres a discussion going on in -arch about making kldunload a bit more
> +> careful about cleaning up before detaching.  In the interim adding a
> +> method that just vetos any unload request would prevent this from
> +> occuring, but also preclude unloading the driver. :)
> 
> 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.

Scott
Received on Mon Jul 19 2004 - 15:44:24 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:02 UTC