From owner-freebsd-hackers@FreeBSD.ORG Wed May 11 15:17:52 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F05FF16A4CE for ; Wed, 11 May 2005 15:17:52 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E69343D46 for ; Wed, 11 May 2005 15:17:52 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.3/8.13.1) with ESMTP id j4BFGSHq086923; Wed, 11 May 2005 09:16:28 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 11 May 2005 09:17:34 -0600 (MDT) Message-Id: <20050511.091734.90823828.imp@bsdimp.com> To: hselasky@c2i.net From: "M. Warner Losh" In-Reply-To: <200505111627.04961.hselasky@c2i.net> References: <90204a4c376919189910f8a570d65f48@cs.cmu.edu> <200505111627.04961.hselasky@c2i.net> 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: freebsd-hackers@FreeBSD.org cc: dga+@cs.cmu.edu Subject: Re: Panic when removing Airprime PC5220 card (usb hub). X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 May 2005 15:17:53 -0000 In message: <200505111627.04961.hselasky@c2i.net> Hans Petter Selasky writes: : On Wednesday 11 May 2005 09:59, David Andersen wrote: : > I'm hacking up a quick and dirty driver for the AirPrime PC5220 (EVDO / : > 1xRTT) card, but I'm encountering a crash unrelated to my driver. The : > card is a pc card that presents itself as a USB hub with one device : > hanging off of it. Removing the card from the system causes a kernel : > panic. The backtrace looks something like: : > : > kobj_delete+0xb : > device_delete_child + 0x98 : > usb_disconnect_port + 0xf3 : > uhub_detach + 0x7a : > device_detach + 0x57 : > device_delete_child + 0x2b : > device_delete_child + 0x17 : > ohci_pci_detach + 0x85 : > device_detach + 0x57 : > cardbus_detach_card + 0x93 : > cbb_removal + 0x6f : > cbb_event_thread + 0xb6 : > fork_exit + 0x74 : > fork_trampoline() + 0x8 : > trap 0x1 eip = 0 esp = 0xedf66d6c : > : > (sorry for the poor formatting; I don't have serial debug support at : > the moment to copy-paste. :) : > : I think that the existing USB driver does not allow USB-controllers to be : detached. At least the root-hub does not allow this. And when they try to : detach, the devices are deleted twice (which is due to the fact that the code : was ported from NetBSD, which bus interface is a little different). Actually, -current has fixed both of these problems. At least that's what my looking at the source shows in addition to being the one to make the fixes... Warner