From owner-freebsd-current@FreeBSD.ORG Thu Sep 11 10:51:07 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE2631065672; Thu, 11 Sep 2008 10:51:07 +0000 (UTC) (envelope-from rink@rink.nu) Received: from mx1.rink.nu (gloom.rink.nu [213.34.49.2]) by mx1.freebsd.org (Postfix) with ESMTP id 66E6C8FC19; Thu, 11 Sep 2008 10:51:07 +0000 (UTC) (envelope-from rink@rink.nu) Received: from localhost (localhost [127.0.0.1]) by mx1.rink.nu (Postfix) with ESMTP id DBC4A6D41A; Thu, 11 Sep 2008 12:33:53 +0200 (CEST) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([213.34.49.2]) by localhost (gloom.rink.nu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NPJakWZTD1bJ; Thu, 11 Sep 2008 12:33:43 +0200 (CEST) Received: by mx1.rink.nu (Postfix, from userid 1000) id 66CF96D42B; Thu, 11 Sep 2008 12:33:43 +0200 (CEST) Date: Thu, 11 Sep 2008 12:33:43 +0200 From: Rink Springer To: Hans Petter Selasky Message-ID: <20080911103343.GH1413@rink.nu> References: <20080819211814.6CD685B4D@mail.bitblocks.com> <48B0EA50.2090105@mawer.org> <48B3299F.5080101@vwsoft.com> <200809111013.23994.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200809111013.23994.hselasky@c2i.net> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Volker , current@freebsd.org, freebsd-usb@freebsd.org, Antony Mawer Subject: Re: "legacy" usb stack fixes (was: Re: HEADSUP new usb code coming in.) 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: Thu, 11 Sep 2008 10:51:07 -0000 On Thu, Sep 11, 2008 at 10:13:22AM +0200, Hans Petter Selasky wrote: > I also see crashes with my new stuff and the umass driver when the USB device > is un-plugged too early. The backtraces I've got so far does not indicate a > USB problem, though .... That is correct, this is a bug in CAM. More specifically, CAM does not handle the removal of busses well. There are two possible options: 1) Obviously, fix CAM to handle this scenarion DragonflyBSD seems to have a lot of fixes in this area, which I intend to take a look at 'some day' (no thanks to $reallife...) 2) Create a CAM bus per USB bus I think this is reasonable, and it makes a lot more sense than the one-bus-per-device approach that we have now. The idea is that every USB controller hub creates a CAM bus, and umass(4) attaches to this bus instead of creating its own. Of course, until CAM is fixed, detaching PCMCIA or equivalent USB cards will still cause panics, but it would be a lot better than it is now... Personally, I'd like to see option 2 implemented in the USB2 stack, as it avoids the issue and makes a lot more sense from user perspective (I'm probably onot the only one who gets scared by 'camcontrol devlist' if you have a single MP3 player which advertises 2 disks :-)) Regards, -- Rink P.W. Springer - http://rink.nu "Anyway boys, this is America. Just because you get more votes doesn't mean you win." - Fox Mulder