Strange error 4.9RC1

Brian Lynn blynn42 at comcast.net
Mon Oct 6 16:33:47 PDT 2003


On Sun, 05 Oct 2003, Jack Raats wrote:
          
> After compiling the kernel 4.9RC1 dmesg gives the following error
> 
> lpt0: Interrupt-driven port
> ppi0: <Parallel I/O> on ppbus0
> ed1: <Realtek Plug & Play Ethernet Card> at port 0x220-0x23f irq 5 on isa0
> ed1: address 52:54:40:28:83:9a, type NE2000 (16 bit)
> ad0: 4112MB <WDC AC24300L> [8912/15/63] at ata0-master WDMA2
> Mounting root from ufs:/dev/ad0s1a
> module_register: module miibus/ukphy already exists!
> linker_file_sysinit "miibus.ko" failed to register! 17
> module_register: module pci/ed already exists!
> linker_file_sysinit "if_ed.ko" failed to register! 17
> 
> /root/kernel/HEAVEN have the following to lines
> 
> # PCI Ethernet NICs that use the common MII bus controller code.
> device          miibus          # MII bus support
> device          ed0     at isa? disable port 0x280 irq 10 iomem 0xd8000
> 
> Is this a bug, a feature or I am doing something wrong?
> 
> 
> 
> Met vriendelijke groeten,
> Jack Raats

There is a bug here, whereby ifconfig(8) does not match the name
registered in the kernel by ed(4).  Erik Trulsson posted some patches
to fix this last month; search the archive for a thread titled
"strange problem with ed driver".  [1]

However, depending on the remainder of your kernel config, there could
be something additional going on here.  Note the discrepancy between the
dmesg (ed1) and the config file (ed0).  You might check whether you are
actually loading if_ed.ko in /boot/loader.conf.

Brian Lynn

[1] The following patch to ifconfig.c also solves this problem on my
system.  This is taken from v1.90 in HEAD and modifies the ifmaybeload()
function.  It does not break on any of the interfaces I use (ed xl lo),
but I don't really know what I'm doing - YMMV.

--- sbin/ifconfig/ifconfig.c.orig	Tue Jan 28 06:02:56 2003
+++ sbin/ifconfig/ifconfig.c	Tue Sep 23 18:06:07 2003
@@ -1995,7 +1995,8 @@
 				cp = mstat.name;
 			}
 			/* already loaded? */
-			if (!strcmp(ifkind, cp))
+		/*	if (!strcmp(ifkind, cp))	*/
+			if (!strncmp(name, cp, strlen(cp)))
 				return;
 		}
 	}


More information about the freebsd-stable mailing list