From owner-freebsd-current@FreeBSD.ORG Fri Jun 8 22:00:06 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2675816A421 for ; Fri, 8 Jun 2007 22:00:06 +0000 (UTC) (envelope-from pete@altadena.net) Received: from kestrel.altadena.net (kestrel.altadena.net [207.136.131.34]) by mx1.freebsd.org (Postfix) with ESMTP id CAF6A13C44B for ; Fri, 8 Jun 2007 22:00:05 +0000 (UTC) (envelope-from pete@altadena.net) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=1.kestrel; d=altadena.net; h=Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=LzkF3gbo9hE06EgzE9ZhGpTGkuLRVpuOxOgei+CIrEjDSUIXK5DHXIO8rs7wb+kkoYqugPgHPLbTYQ6e2ztYhDPwCD3GssPCaLHYAV4hHv7Xn7ffFC0kQjGNVJicIhjoxmLy1RquqiegMPShq0hh02uhS2x/0cknrDGmjawFUHU=; Received: from 24-38-81-166-st.chvlva.adelphia.net ([24.38.81.166] helo=port3.altadena.net) by kestrel.altadena.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.66) (envelope-from ) id 1HwmCw-000DzT-30; Fri, 08 Jun 2007 14:41:22 -0700 Message-ID: <4669CCEC.2010901@altadena.net> Date: Fri, 08 Jun 2007 17:41:00 -0400 From: Pete Carah User-Agent: Thunderbird 2.0.0.0 (X11/20070526) MIME-Version: 1.0 To: current@freebsd.org References: <466913F0.2060200@cytexbg.com> <20070608.121532.1136082067.imp@bsdimp.com> In-Reply-To: <20070608.121532.1136082067.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Warner Losh Subject: Re: panic when removing pccard X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 08 Jun 2007 22:00:06 -0000 Warner wrote: > I'll take a look at this problem. The one difference between what you > are doing and what I do all the time is that you have devices plugged > into your usb bus and I don't. Given the name of the card, I suspect > that's because they are soldered onto the usb bus. > I see the same problem (in 6.x stable and 5.x stable; not using current lately) with a Verizon (audiovox) card; the Sierra 555 doesn't do it (no USB). If I'm VERY careful stopping ppp (not pppd...) and waiting "long enough" sometimes it doesn't panic and sometimes it does. I think the panic requires the serial sub-device to be open, and the teardown on unplugging the usb controller is in the wrong order. (the usb side doesn't check refcounts?) Windoze handles this right, presumably by passing the disconnect message to the serial layer and waiting for it to clean up before disconnecting the usb. This is mostly with the old usb stack; I used newusb for a while but managing cvsup+build was too much trouble... Most of the cell-modems are fixed usb (indeed soldered in place). Removing a umass before camcontrol eject acts (eject before umount panics later...) will sometimes (usually) do this too; it isn't just a serial-port (or soldered usb) problem. Since umount wants to write in the normal case, one has to think carefully about what to do with the layering violation that results from disconnecting the usb. (clearly will require fsck later in any event; it would be nice not to panic, though). > We need to solve this problem for 7.0, I think. Maybe even in 6.x. Interlayer messaging would handle these disconnect situations easily but probably slows things down in the "normal" case. > > Warner -- Pete