Bug 18819

Summary: miibus modules loaded for non-existant devices
Product: Base System Reporter: cwasser <cwasser>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.0-STABLE   
Hardware: Any   
OS: Any   

Description cwasser 2000-05-25 22:50:02 UTC
Kernel loads miibus modules for non-existant interfaces. Not sure if this is a design implementation or an oversight. Current kernel uses if_xl and if_dc, kldstat -v reports (relevant sections):

30 xl/miibus
31 pci/if_xl
32 dc/miibus
33 pci/if_dc

miibus section:

36 miibus/rlphy
37 miibus/tlphy
38 miibus/pnphy
39 miibus/nsphy
40 miibus/mlphy
41 miibus/xlphy
42 miibus/dcphy
43 miibus/amphy
44 miibus/ukphy

Not sure if this is the way it's supposed to be, but seeing as how I don't use any of those other interfaces, I don't see why those miibus modules are loaded in the first place for interfaces not compiled into the kernel.

Relevant kernel config sections:

device miibus # MII bus support
device dc     # DEC/Intel 21143 and various workalikes
device xl     # 3Com 3c90x PCI 10/100

relevant dmesg output:

dc0: <LC82C115 PNIC II 10/100BaseTX> port 0xe400-0xe4ff mem 0xe4001000-0xe40010ff irq 10 at device 11.0 on pci0
dc0: Ethernet address: 00:a0:cc:32:eb:7c
miibus0: <MII bus> on dc0
dcphy0: <Intel 21143 NWAY media interface> on miibus0
dcphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0xe800-0xe87f mem 0xe4000000-0xe400007f irq 11 at device 15.0 on pci0
xl0: Ethernet address: 00:50:da:cc:f3:e0
miibus1: <MII bus> on xl0
xlphy0: <3c905C 10/100 internal PHY> on miibus1
xlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto

Fix: 

Again, unsure if this is intentional or not, so I dunno. Haven't tried unloading those modules either.
How-To-Repeat: Compile a 4.0 kernel and enable miibus and specific network interfaces which use the miibus driver.
Comment 1 Jens Schweikhardt freebsd_committer freebsd_triage 2002-08-13 22:04:11 UTC
State Changed
From-To: open->feedback

Does this problem still persist on a recent -stable?
Comment 2 Jens Schweikhardt freebsd_committer freebsd_triage 2002-08-14 21:36:52 UTC
State Changed
From-To: feedback->closed

Feedback request bounced. If still an issue, let us know.