From owner-freebsd-current@FreeBSD.ORG Fri Jul 15 20:50:25 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A7E916A41C for ; Fri, 15 Jul 2005 20:50:25 +0000 (GMT) (envelope-from cracauer@schlepper.zs64.net) Received: from schlepper.zs64.net (schlepper.zs64.net [212.12.50.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9061843D45 for ; Fri, 15 Jul 2005 20:50:24 +0000 (GMT) (envelope-from cracauer@schlepper.zs64.net) Received: from schlepper.zs64.net (schlepper [212.12.50.230]) by schlepper.zs64.net (8.13.1/8.12.9) with ESMTP id j6FKoMQ6039932; Fri, 15 Jul 2005 22:50:22 +0200 (CEST) (envelope-from cracauer@schlepper.zs64.net) Received: (from cracauer@localhost) by schlepper.zs64.net (8.13.1/8.12.9/Submit) id j6FKoMfs039931; Fri, 15 Jul 2005 16:50:22 -0400 (EDT) (envelope-from cracauer) Date: Fri, 15 Jul 2005 16:50:22 -0400 From: Martin Cracauer To: Scott Long Message-ID: <20050715165022.A39796@cons.org> References: <20050623184322.A67708@cons.org> <42BB58AD.1050501@samsco.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <42BB58AD.1050501@samsco.org>; from scottl@samsco.org on Thu, Jun 23, 2005 at 06:49:49PM -0600 Cc: Martin Cracauer , freebsd-current@freebsd.org Subject: Re: Driver that works only when module is loaded late, not from loader.conf 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: Fri, 15 Jul 2005 20:50:25 -0000 Scott Long wrote on Thu, Jun 23, 2005 at 06:49:49PM -0600: > Martin Cracauer wrote: > > I didn't see a reply but I think this might be be symptom of a larger > > issue that we might have to fix for 6.0. > > > > I found an Ethernet driver which works fine if you load it via kldload > > in a running system but it does not work when loaded in loader.conf. > > > > The bug is http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/82497 > > > > Here's the cut'n'paste: > > ----------------------- > > > > > > Release > > -current of today > > Environment > > > > FreeBSD wings.cons.org 6.0-CURRENT FreeBSD 6.0-CURRENT #4: Tue Jun 21 > > 16:37:57 EDT 2005 > > cracauer@wings.cons.org:/usr/src/sys/amd64/compile/WINGS64 amd64 > > > > > > > > Description > > > > I recently got an AMD64 socket 754 board with Via K8T800, an Abit > > K8V-Pro, which has a if_vge Gigabit Ethernet. > > > > This works only when you load the module after the full machine is up. > > > > If you put if_vge_load="YES" into loader.conf you get: > > > > Jun 21 19:32:46 wings kernel: vge0: > > port 0xb8\ > > 00-0xb8ff mem 0xe3014000-0xe30140ff irq 22 at device 14.0 on pci0 > > Jun 21 19:32:46 wings kernel: vge0: MII read timed out > > Jun 21 19:32:46 wings kernel: vge0: failed to start MII autopoll > > Jun 21 19:32:46 wings kernel: vge0: MII without any phy! > > Jun 21 19:32:46 wings kernel: device_attach: vge0 attach returned 6 > > > > If you don't load it from loader.conf it works fine. > > > > I have mii compiled into the kernel. > > > > > > How-To-Repeat > > > > Put if_vge_load="YES" into loader.conf > > > > reboot. > > > > You will not get an interface and you'll have the above message in > > /var/log/messages. > > > > > > Fix > > > > You can work around it by loading the module later. > > > > It is not clear to me what is going on here. Since I have mii > > statically compiled into the kernel it is not a case of just > > forgetting to load a dependency. > > > > What happens if you compile it into the kernel? As I mailed earlier, at the time of my report it worked that way. However, as of today 7.0 sources it does not (both vge and mii compiled in). The error message is different, though: Jul 15 14:44:03 wings kernel: vge0: port 0xb80 0-0xb8ff mem 0xd3014000-0xd30140ff irq 22 at device 14.0 on pci0 Jul 15 14:44:03 wings kernel: vge0: MII read timed out Jul 15 14:44:03 wings kernel: vge0: failed to start MII autopoll Jul 15 14:44:03 wings kernel: vge0: MII without any phy! Jul 15 14:44:03 wings kernel: device_attach: vge0 attach returned 6 Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/ No warranty. This email is probably produced by one of my cats stepping on the keys. No, I don't have an infinite number of cats.