From owner-freebsd-current@FreeBSD.ORG Fri Jun 24 00:50:19 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 2C14F16A41C for ; Fri, 24 Jun 2005 00:50:19 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DFD243D48 for ; Fri, 24 Jun 2005 00:49:57 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.3/8.13.3) with ESMTP id j5O0wWmL015080; Thu, 23 Jun 2005 18:58:33 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <42BB58AD.1050501@samsco.org> Date: Thu, 23 Jun 2005 18:49:49 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050615 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Martin Cracauer References: <20050623184322.A67708@cons.org> In-Reply-To: <20050623184322.A67708@cons.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on pooker.samsco.org Cc: 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, 24 Jun 2005 00:50:19 -0000 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? Scott