From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 15 18:53:40 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 9572916A420; Wed, 15 Mar 2006 18:53:40 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1858A43D6B; Wed, 15 Mar 2006 18:53:40 +0000 (GMT) (envelope-from sam@errno.com) Received: from [10.0.0.248] (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id k2FIrdo7013498 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 15 Mar 2006 10:53:39 -0800 (PST) (envelope-from sam@errno.com) Message-ID: <44186393.8050005@errno.com> Date: Wed, 15 Mar 2006 10:57:23 -0800 From: Sam Leffler User-Agent: Thunderbird 1.5 (X11/20060210) MIME-Version: 1.0 To: "Rick C. Petty" References: <20060315005348.GA32144@megan.kiwi-computer.com> <200603151046.03551.jhb@freebsd.org> <20060315171154.GA37945@megan.kiwi-computer.com> <200603151227.10535.jhb@freebsd.org> <20060315183902.GC37945@megan.kiwi-computer.com> In-Reply-To: <20060315183902.GC37945@megan.kiwi-computer.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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:53:40 -0000 Rick C. Petty wrote: > 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. I've had several loader/kld bugs on my todo list for a while. For example loading a module with undefined references from the loader will cause the kernel to panic. Feel free to dig in and provide patches... Sam