From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 15 18:39:05 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 408EC16A401 for ; Wed, 15 Mar 2006 18:39:05 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from kiwi-computer.com (megan.kiwi-computer.com [63.224.10.3]) by mx1.FreeBSD.org (Postfix) with SMTP id B396743D4C for ; Wed, 15 Mar 2006 18:39:03 +0000 (GMT) (envelope-from rick@kiwi-computer.com) Received: (qmail 39081 invoked by uid 2001); 15 Mar 2006 18:39:02 -0000 Date: Wed, 15 Mar 2006 12:39:02 -0600 From: "Rick C. Petty" To: John Baldwin Message-ID: <20060315183902.GC37945@megan.kiwi-computer.com> References: <20060315005348.GA32144@megan.kiwi-computer.com> <200603151046.03551.jhb@freebsd.org> <20060315171154.GA37945@megan.kiwi-computer.com> <200603151227.10535.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200603151227.10535.jhb@freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: freebsd-hackers@freebsd.org Subject: Re: 6.1-PRE boot locks up, using USB keyboard X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2006 18:39:05 -0000 On Wed, Mar 15, 2006 at 12:27:08PM -0500, John Baldwin wrote: > On Wednesday 15 March 2006 12:11, Rick C. Petty wrote: > > > > My BIOS (Asus A8N-E rev 1010) has no option for disabling USB keyboard > > support, but I can either disable the USB controller or disable the USB > > legacy support. I doubt either of these is desirable. Fortunately, I > > discovered the problem.. > > The "legacy support" option is the one that makes a USB keyboard look like > a PS/2 keyboard. If I disable legacy support, the USB keyboard is useless until the kernel comes up multi-user and usbd is started, as I expected. Other than that, everything behaves identically. > > Whenever ukbd is loaded by /boot/loader and that > > device already exists in the kernel, the boot locks up after: > > > > atkbdc0: at port 0x60,0x64 on isa0 > > > > when using a USB keyboard. I would think this is a bug. It is 100% > > repeatable for me. If I comment out the line in /boot/loader.conf, the > > system boots nicely. > > Ok. There are several edge cases that can blow up if you kldload a module > or load a module from the loader that is already present in the kernel. I would think the loader or the kernel should be smart enough not to break when loading an already-loaded module. Is there a workaround? If not, all kernels must be compiled with ukbd (if they are to support USB keyboards in single-user mode, e.g.). There should also be a warning "BEWARE: Do not set ukbd_load in your loader.conf" :-P Seriously, though, the kernel should not break when loading an unloaded module. I first noticed this whenever I had umass(4) in the kernel and it wouldn't detect my USB memory stick but then kldload'd it, saw "File exists", but then it would be detected. I remember removing umass from my config and it behaving quite differently. I never had time to pursue that problem. -- Rick C. Petty