From owner-freebsd-current@FreeBSD.ORG Mon Sep 28 14:11:06 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20B95106566C; Mon, 28 Sep 2009 14:11:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E5D678FC27; Mon, 28 Sep 2009 14:11:05 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 8D77F46B06; Mon, 28 Sep 2009 10:11:05 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 905418A024; Mon, 28 Sep 2009 10:11:04 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Date: Mon, 28 Sep 2009 10:10:49 -0400 User-Agent: KMail/1.9.7 References: <4ABA36B1.9070706@icyb.net.ua> <200909280748.45528.john@baldwin.cx> <4AC0C060.20109@freebsd.org> In-Reply-To: <4AC0C060.20109@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909281010.50427.jhb@FreeBSD.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 28 Sep 2009 10:11:04 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-usb@freebsd.org, Andriy Gapon , Hans Petter Selasky Subject: Re: sb600/sb700 ohci experimental patch 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: Mon, 28 Sep 2009 14:11:06 -0000 On Monday 28 September 2009 9:55:44 am Andriy Gapon wrote: > on 28/09/2009 14:48 John Baldwin said the following: > > I don't think you can do this because it is a "feature" to not disable SMM if > > ohci(4) is not loaded so that a USB keyboard works when the USB driver isn't > > loaded via PS/2 emulation, even when the OS is running. > > Very good point. > > > I am curious if we > > really need to do the handover for each controller or if disabling it for > > ohci0 effectively disables it for all controllers? What do other OS's do? > > > > Don't have an answer about other OSes. > But OHCI controllers have individual "used by SMM" bits and taking over one > controller doesn't affect the bits of the other controllers - they remain set. > Not that it means that SMM code actually keeps on controlling them. > > Actually, just checked - Linux also does it per controller: > http://lxr.linux.no/#linux+v2.6.31/drivers/usb/host/ohci-hcd.c#L495 Hmm, it seems Linux now disables SMM for USB controllers (ohci, ehci, and uhci) via PCI quirks rather than doing it in the device drivers themselves, which matches your original suggestion. I'm not sure how best to fix that while also allowing USB to work w/o drivers loaded. -- John Baldwin