From owner-freebsd-current@FreeBSD.ORG Mon Jul 19 22:38:55 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1015C16A4CE; Mon, 19 Jul 2004 22:38:55 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id ABC7543D53; Mon, 19 Jul 2004 22:38:54 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.11/8.12.11) with ESMTP id i6JMblZR034849; Mon, 19 Jul 2004 16:37:47 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 19 Jul 2004 16:37:51 -0600 (MDT) Message-Id: <20040719.163751.16873514.imp@bsdimp.com> To: iedowse@maths.tcd.ie From: "M. Warner Losh" In-Reply-To: <200407191950.aa12733@salmon.maths.tcd.ie> References: <20040719175241.GJ57678@darkness.comp.waw.pl> <200407191950.aa12733@salmon.maths.tcd.ie> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: scottl@freebsd.org cc: freebsd-current@freebsd.org cc: pjd@freebsd.org Subject: Re: Unloading USB driver while device is attached. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2004 22:38:55 -0000 In message: <200407191950.aa12733@salmon.maths.tcd.ie> Ian Dowse 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