Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jul 2004 16:41:16 -0600
From:      Scott Long <scottl@freebsd.org>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        pjd@freebsd.org
Subject:   Re: Unloading USB driver while device is attached.
Message-ID:  <40FC4E0C.1040404@freebsd.org>
In-Reply-To: <20040719.163751.16873514.imp@bsdimp.com>
References:  <20040719175241.GJ57678@darkness.comp.waw.pl> <200407191950.aa12733@salmon.maths.tcd.ie> <20040719.163751.16873514.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
M. Warner Losh wrote:

> In message: <200407191950.aa12733@salmon.maths.tcd.ie>
>             Ian Dowse <iedowse@maths.tcd.ie> writes:
> : In message <20040719175241.GJ57678@darkness.comp.waw.pl>, Pawel Jakub Dawidek w
> : rites:
> : >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.
> : 
> : I'm not sure if it will help in this particular case, but I have a
> : lot of local cleanups and improvements in the USB code. There's a
> : large patch at
> : 
> : 	http://people.freebsd.org/~iedowse/usb.diff
> : 
> : but unfortunately I haven't had time to work on this lately (and
> : there are all the problems of divergence from NetBSD etc. if bits
> : of this get committed). The (small) uhub.c changes look like they
> : might possibly help in your case. With the full patch I was able
> : to `kldunload usb' without crashes a while ago, but there were still
> : memory leaks.
> 
> Personally, I think that divergence from NetBSD is less of a problem
> than it not working at all.
> 
> Warner

We've been fighting the NetBSD divergence issue for a lot of years.  I
think that we have to start accepting that there are places where
divergence gives us large net gains.  Probably the best goal to keep
going forward is to keep the intra-stack APIs as similar as possible so
that new modules can be added without much porting work.

Scott



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40FC4E0C.1040404>