Extending sys/dev/mii

Aleksandr Rybalko ray at ddteam.net
Sun Feb 12 17:52:13 UTC 2012


On Sat, 11 Feb 2012 17:00:10 -0800
Adrian Chadd <adrian at freebsd.org> wrote:

> Hi Ray,
> 
> Would you please attach the latest diffs:
> 
> * to if_arge, to make it "work";
> * to the mii API, if needed;
> * anything new - ie, the switch API, switch PHYs, etc.
> 
> I'd like to try and finally bring some sanity to the hardcoded PHY
> mask handling in if_arge (and make it actually work for AR71xx and
> AR724x - where AR71xx has one shared MDIO bus between both MACs, but
> AR724x has two independent MDIO busses..)
> 
> 
> 
> Adrian

Hi Adrian,

yes, of course, here it is:
if_arge patch + white space cleanup:
http://my.ddteam.net/files/2012-02-12_sys_mips_atheros.patch
Switch Framework itself:
http://my.ddteam.net/files/2012-02-12_switch_framework.patch
sys/conf/files, as separate item, because my have a bit more difference:
http://my.ddteam.net/files/2012-02-12_switch_framework_sys_conf_files.patch

Just reminder, to enable it:
1. put "device	switch" and driver into kernel config file,
"device	switch_ar8x16" for Atheros switch.
2. add hints (AR7240 for example):
#------------------------------------------------
# No probe at all
hint.miibus.0.phymask="0x00000000"
hint.miibus.1.phymask="0x00000000"

#hint.floatphy.0.at="miibus0"
hint.floatphy.0.phyno=0
hint.floatphy.0.master="switch"	# Find switch0
hint.floatphy.0.master_unit=0
hint.floatphy.0.master_phys=0x00000010 # Sense PHY4
hint.floatphy.0.flags=0x00000000
hint.floatphy.0.speed=100

# Switch attached to MDIO bus on arge0
hint.switch.0.at="miibus0"
hint.switch.0.phyno=1
hint.ar8x16_switch.0.mii_mode=0x012603e2

hint.floatphy.1.at="miibus1"
hint.floatphy.1.phyno=0
hint.floatphy.1.master="switch"	# Find switch0
hint.floatphy.1.master_unit=0
hint.floatphy.1.master_phys=0x0000000f # Link Sensing PHY0-PHY3
hint.floatphy.1.flags=0x00000004 # "Link on any PHYs" | 
				# "Static link speed" 
hint.floatphy.1.speed=1000
#------------------------------------------------



-- 
Aleksandr Rybalko <ray at ddteam.net>


More information about the freebsd-arch mailing list