Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jul 2005 10:45:24 -0600 (MDT)
From:      Warner Losh <imp@bsdimp.com>
To:        arch@freebsd.org
Subject:   miibus diffs
Message-ID:  <20050719.104524.41687111.imp@bsdimp.com>

next in thread | raw e-mail | index | archive | help
Here's what I had in mind when I replied to phk.  This seems to work
well.  The included message doesn't have the conf/mii.all file, but
that looks like

#
# All the PHy devices.  If your NIC has a subset of these, you can refrain
# from adding the include line in your config file and instead list
# the individual devices you need for your setup.
#
# $FreeBSD$
#
device acphy
device amphy
device bmtphy
device brgphy
device ciphy
device dcphy
device e1000phy
device exphy
device inphy
device lxtphy
device mlphy
device nsgphy
device nsphy
device pnaphy
device pnphy
device qsphy
device rgephy
device rlphy
device ruephy
device tdkphy
device tlphy
device xmphy
device miibus

If we start moving the PHYs used by only one driver to their modules,
this might save a small amount in the miibus.ko.  However, those
drivers will still need the entire miibus.ko file anyway.  I'd rather
we not premature submicro optimize the module builds for a while to
give me a chance to succeed or fail on the module work I'm about to
start on.

Warner

http://perforce.freebsd.org/chv.cgi?CH=80531

Change 80531 by imp@imp_harmony on 2005/07/19 16:38:59

	Make it possible to subset the mii bus trivially.
	
	# Note: the mii module still has all the mii bus drivers in it
	# since it has no way of knowing what the right subsetting should
	# be.  Future work on the module system to parse files* will
	# correct this shortcoming.

Affected files ...

.. //depot/user/imp/newcard/conf/files#232 edit
.. //depot/user/imp/newcard/conf/mii.all#1 add
.. //depot/user/imp/newcard/i386/conf/GENERIC#73 edit

Differences ...

==== //depot/user/imp/newcard/conf/files#232 (text+ko) ====

@@ -638,33 +638,33 @@
 dev/mcd/mcd_isa.c		optional mcd isa nowerror
 dev/md/md.c			optional md
 dev/mem/memdev.c		optional mem
-dev/mii/acphy.c			optional miibus
-dev/mii/amphy.c			optional miibus
-dev/mii/bmtphy.c		optional miibus
-dev/mii/brgphy.c		optional miibus
-dev/mii/ciphy.c			optional miibus
-dev/mii/dcphy.c			optional miibus pci
-dev/mii/e1000phy.c		optional miibus
-dev/mii/exphy.c			optional miibus
-dev/mii/inphy.c			optional miibus
-dev/mii/lxtphy.c		optional miibus
+dev/mii/acphy.c			optional acphy
+dev/mii/amphy.c			optional amphy
+dev/mii/bmtphy.c		optional bmtphy
+dev/mii/brgphy.c		optional brgphy
+dev/mii/ciphy.c			optional ciphy
+dev/mii/dcphy.c			optional dcphy pci
+dev/mii/e1000phy.c		optional e1000phy
+dev/mii/exphy.c			optional exphy
+dev/mii/inphy.c			optional inphy
+dev/mii/lxtphy.c		optional lxtphy
 dev/mii/mii.c			optional miibus
 dev/mii/mii_physubr.c		optional miibus
 dev/mii/miibus_if.m		optional miibus
-dev/mii/mlphy.c			optional miibus
-dev/mii/nsgphy.c		optional miibus
-dev/mii/nsphy.c			optional miibus
-dev/mii/pnaphy.c		optional miibus
-dev/mii/pnphy.c			optional miibus
-dev/mii/qsphy.c			optional miibus
-dev/mii/rgephy.c		optional miibus
-dev/mii/rlphy.c			optional miibus
-dev/mii/ruephy.c		optional miibus
-dev/mii/tdkphy.c		optional miibus
-dev/mii/tlphy.c			optional miibus
+dev/mii/mlphy.c			optional mlphy
+dev/mii/nsgphy.c		optional nsgphy
+dev/mii/nsphy.c			optional nsphy
+dev/mii/pnaphy.c		optional pnaphy
+dev/mii/pnphy.c			optional pnphy
+dev/mii/qsphy.c			optional qsphy
+dev/mii/rgephy.c		optional rgephy
+dev/mii/rlphy.c			optional rlphy
+dev/mii/ruephy.c		optional ruephy
+dev/mii/tdkphy.c		optional tdkphy
+dev/mii/tlphy.c			optional tlphy
 dev/mii/ukphy.c			optional miibus
 dev/mii/ukphy_subr.c		optional miibus
-dev/mii/xmphy.c			optional miibus
+dev/mii/xmphy.c			optional xmphy
 dev/mk48txx/mk48txx.c		optional mk48txx
 dev/mlx/mlx.c			optional mlx
 dev/mlx/mlx_disk.c		optional mlx

==== //depot/user/imp/newcard/i386/conf/GENERIC#73 (text+ko) ====

@@ -203,8 +203,9 @@
 device		vx		# 3Com 3c590, 3c595 (``Vortex'')
 
 # PCI Ethernet NICs that use the common MII bus controller code.
-# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
-device		miibus		# MII bus support
+# NOTE: Be sure to keep the 'include mii.all' line in order to use these NICs!
+# NOTE: When subsetting, make sure you get the phy your nics need!
+include		"mii.all"
 device		bfe		# Broadcom BCM440x 10/100 Ethernet
 device		bge		# Broadcom BCM570xx Gigabit Ethernet
 device		dc		# DEC/Intel 21143 and various workalikes
@@ -229,7 +230,7 @@
 
 # ISA Ethernet NICs.  pccard NICs included.
 device		cs		# Crystal Semiconductor CS89x0 NIC
-# 'device ed' requires 'device miibus'
+# 'device ed' requires 'include mii.all'
 device		ed		# NE[12]000, SMC Ultra, 3c503, DS8390 cards
 device		ex		# Intel EtherExpress Pro/10 and Pro/10+
 device		ep		# Etherlink III based cards




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050719.104524.41687111.imp>