summaryrefslogtreecommitdiffstats
path: root/sys/conf
diff options
context:
space:
mode:
authorzbb <zbb@FreeBSD.org>2015-10-25 22:00:56 +0000
committerzbb <zbb@FreeBSD.org>2015-10-25 22:00:56 +0000
commit4a3e4c4e49eaba6494d9e8213943d23e342fc87f (patch)
treeb21424351cdb040f4a1a977b906c102068320777 /sys/conf
parent92cbdbeed70870417df21047ea1dc0b90ea87062 (diff)
downloadFreeBSD-src-4a3e4c4e49eaba6494d9e8213943d23e342fc87f.zip
FreeBSD-src-4a3e4c4e49eaba6494d9e8213943d23e342fc87f.tar.gz
Add etherswitch support to mge
This commit introduces support for etherswitch devices that utilize SMI as a way of accessing its registers. SMI register is located in address space of mge -- access to it was exported through MDIO interface. Attachment functions were enhanced so as to ensure proper initialisation in both cases: 1) PHYs attached directly to mge, 2) PHYs attached to switch device and switch attached to mge. Attachment of etherswitch device depends on dts entry with compatible="mrvl,sw" property. If none is found, typical PHY attachment procedure follows. In case of switch attached, PHYs' status and configuration is accessible via etherswitchcfg, and ifconfig shows always-up, non-configurable mge interfaces. Due to the fact that there may be simultaneous accessess to SMI registers (e.g. from PHY attached to one of mge instances and switch to the other), SMI access interlock was added. It is SX lock, because sleep ability is necessary -- busy-waiting would result in poor performance due to long delays required by hardware. Underlying switch driver is obliged to use sleepable locks as well. Reviewed by: adrian Obtained from: Semihalf Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Differential revision: https://reviews.freebsd.org/D3900
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/files4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/conf/files b/sys/conf/files
index 9533c2b..9a6dec4 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -1398,8 +1398,8 @@ dev/etherswitch/ip17x/ip175c.c optional ip17x
dev/etherswitch/ip17x/ip175d.c optional ip17x
dev/etherswitch/ip17x/ip17x_phy.c optional ip17x
dev/etherswitch/ip17x/ip17x_vlans.c optional ip17x
-dev/etherswitch/mdio_if.m optional miiproxy
-dev/etherswitch/mdio.c optional miiproxy
+dev/etherswitch/mdio_if.m optional miiproxy | mdio
+dev/etherswitch/mdio.c optional miiproxy | mdio
dev/etherswitch/miiproxy.c optional miiproxy
dev/etherswitch/rtl8366/rtl8366rb.c optional rtl8366rb
dev/etherswitch/ukswitch/ukswitch.c optional ukswitch
OpenPOWER on IntegriCloud