Re: Driver that works only when module is loaded late, not from loader.conf

From: Martin Cracauer <cracauer_at_cons.org>
Date: Fri, 15 Jul 2005 16:50:22 -0400
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_at_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: <VIA Networking Gigabit Ethernet>
> > 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: <VIA Networking Gigabit Ethernet> 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 <cracauer_at_cons.org>   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.
Received on Fri Jul 15 2005 - 18:50:25 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:38 UTC