From owner-freebsd-current@FreeBSD.ORG Mon Jul 19 18:50:50 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 488B316A4CE; Mon, 19 Jul 2004 18:50:50 +0000 (GMT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 2CE4E43D31; Mon, 19 Jul 2004 18:50:49 +0000 (GMT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 19 Jul 2004 19:50:48 +0100 (BST) To: Pawel Jakub Dawidek In-Reply-To: Your message of "Mon, 19 Jul 2004 19:52:41 +0200." <20040719175241.GJ57678@darkness.comp.waw.pl> Date: Mon, 19 Jul 2004 19:50:48 +0100 From: Ian Dowse Message-ID: <200407191950.aa12733@salmon.maths.tcd.ie> cc: freebsd-current@FreeBSD.org cc: Scott Long 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 18:50:50 -0000 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. Ian