From owner-freebsd-stable@FreeBSD.ORG Wed Nov 12 12:33:17 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CF6C106567B for ; Wed, 12 Nov 2008 12:33:17 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA04.emeryville.ca.mail.comcast.net (qmta04.emeryville.ca.mail.comcast.net [76.96.30.40]) by mx1.freebsd.org (Postfix) with ESMTP id E95BD8FC1A for ; Wed, 12 Nov 2008 12:33:16 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA05.emeryville.ca.mail.comcast.net ([76.96.30.43]) by QMTA04.emeryville.ca.mail.comcast.net with comcast id eCEQ1a0090vp7WLA4CZGmp; Wed, 12 Nov 2008 12:33:16 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA05.emeryville.ca.mail.comcast.net with comcast id eCZF1a00B2P6wsM8RCZGvm; Wed, 12 Nov 2008 12:33:16 +0000 X-Authority-Analysis: v=1.0 c=1 a=6I5d2MoRAAAA:8 a=QycZ5dHgAAAA:8 a=XZrmyMB4JYGd_-K7JrwA:9 a=tBf9LV8KMpQLkPyohSoA:7 a=cY6_MBOsBNGUNeLVBIN5XP9PPJ8A:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id B20FB5C19; Wed, 12 Nov 2008 04:33:15 -0800 (PST) Date: Wed, 12 Nov 2008 04:33:15 -0800 From: Jeremy Chadwick To: Andriy Gapon Message-ID: <20081112123315.GA24907@icarus.home.lan> References: <4911BA93.9030006@icyb.net.ua> <491ABFCD.3060309@icyb.net.ua> <491AC502.9000507@icyb.net.ua> <20081112121410.GA24629@icarus.home.lan> <491ACA19.2040008@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <491ACA19.2040008@icyb.net.ua> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Nate Eldredge , freebsd-hackers@FreeBSD.org, FreeBSD Stable , freebsd-usb@FreeBSD.org Subject: Re: ukbd attachment and root mount X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 12:33:17 -0000 On Wed, Nov 12, 2008 at 02:20:41PM +0200, Andriy Gapon wrote: > on 12/11/2008 14:14 Jeremy Chadwick said the following: > > On Wed, Nov 12, 2008 at 01:58:58PM +0200, Andriy Gapon wrote: > [snip] > >> 2. if ukbd driver is not attached then I don't see any way USB keyboard > >> would work in non-legacy way > > > > Regarding #2: at which stage? boot0/boot2/loader require an AT or PS/2 > > keyboard to work. None of these stages use ukbd(4) or anything -- there > > is no kernel loaded at this point!! Meaning: if you have a USB keyboard, > > your BIOS will need to have a "USB Legacy" option to cause it to act as > > a PS/2 keyboard, for typing in boot0/boot2/loader to work. > > > > Device hints are for kernel drivers, once the kernel is loaded. > > Jeremy, > > I understand all of this. > In subject line and earlier messages I say that I am interested in > mountroot prompt - the prompt where kernel can ask about what device to > use for root filesystem. > Essentially I would like kernel to recognize USB keyboard (and disable > all the legacy stuff if needed) before it prompts for the root device. I fully understand that fact. However, I don't see the logic in that statement. You should be able to remove and add a keyboard at any time and be able to type immediately. Meaning: I don't see why when the keyboard recognition is performed (e.g. before printing mountroot or after) matters. It should not. I think this is a red herring. I've seen the problem where I have a fully functional USB keyboard in boot0/boot2/loader and in multi-user, but when booting into single-user or when getting a mountroot prompt, the keyboard does not function. When the mountroot prompt is printed (before or after ukbd attached) makes no difference for me in this scenario -- I tested it many times. It's very possible that "something" (kbdcontrol?) is getting run only during late stages of multi-user, which makes the keyboard work. But prior to that "something" being run (but AFTER boot2/loader), the keyboard is not truly usable. I hope everyone here is also aware of that fact that not all keyboards are created equal. Case in point (and this reason is exactly why I am purchasing a native PS/2 keyboard, as USB4BSD doesn't work with all USB keyboards right now): http://lists.freebsd.org/pipermail/freebsd-current/2008-November/000219.html The bottom line: FreeBSD cannot be reliably used with a USB keyboard in all circumstances. And that is a very sad reality, because 90% of the keyboards you find on the consumer and enterprise market are USB -- native PS/2 keyboards are now a scarcity. Do not even for a minute tell me "buy a USB-to-PS2 adapter", because the "green ones" that come with USB mice do not work with USB keyboards. I have even bought a "purple" USB-to-PS2 keyboard adapter from Amazon, specifically for this purpose, and it *does not work*. I found out weeks later the adapters only work on CERTAIN models of USB keyboards, depending upon how they're engineered. What really needs to happen here should be obvious: we need some form of inexpensive keyboard-only USB support in boot2/loader. I would *love* to know how Linux and Windows solve this problem. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |