From owner-freebsd-hackers@FreeBSD.ORG Wed May 11 14:26:27 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 8ADAC16A4D0 for ; Wed, 11 May 2005 14:26:27 +0000 (GMT) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id C0A0843D76 for ; Wed, 11 May 2005 14:26:26 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: Y1QAsIk9O44SO+J/q9KNyQ== Received: from mp-217-233-228.daxnet.no ([193.217.233.228] verified) by mailfe04.swip.net (CommuniGate Pro SMTP 4.3c5) with ESMTP id 363511421; Wed, 11 May 2005 16:26:24 +0200 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Wed, 11 May 2005 16:27:01 +0200 User-Agent: KMail/1.7 References: <90204a4c376919189910f8a570d65f48@cs.cmu.edu> In-Reply-To: <90204a4c376919189910f8a570d65f48@cs.cmu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200505111627.04961.hselasky@c2i.net> cc: David Andersen Subject: Re: Panic when removing Airprime PC5220 card (usb hub). X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: hselasky@c2i.net 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 14:26:27 -0000 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). But I've got a USB driver that might fix that, if you want to try that: Download the three files below into a new directory and type "make install" (to uninstall type "make deinstall") http://home.c2i.net/hselasky/isdn4bsd/privat/usb/Makefile http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.diff.bz2 http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.tar.bz2 You need FreeBSD-5/6 to get it compiled. Yours --HPS