freebsd-nq/sys
Zbigniew Bodek 3c71b84f0a 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
2015-10-25 22:00:56 +00:00
..
amd64 Intel SDM before revision 56 described the CLFLUSH instruction as only 2015-10-24 21:37:47 +00:00
arm Add etherswitch support to mge 2015-10-25 22:00:56 +00:00
arm64 arm64: remove exception instruction length assertion 2015-10-23 15:24:00 +00:00
boot Make vers.c creation atomic by using a temporary file, then moving 2015-10-24 21:59:58 +00:00
bsm
cam Give CTL support for PIM_EXTLUNS when talking to CAM. 2015-10-24 17:24:19 +00:00
cddl Rename remaining linux32 symbols such as linux_sysent[] and 2015-10-22 21:28:20 +00:00
compat Fix build for the KTR-enabled kernels. 2015-10-23 11:41:55 +00:00
conf Add etherswitch support to mge 2015-10-25 22:00:56 +00:00
contrib Rename linuxapi[.ko] into linuxkpi[.ko], to reflect that it is a 2015-10-22 09:50:45 +00:00
crypto const'ify an arg that we don't update... 2015-07-29 23:37:15 +00:00
ddb Make kstack_pages a tunable on arm, x86, and powepc. On i386, the 2015-08-10 17:18:21 +00:00
dev Add etherswitch support to mge 2015-10-25 22:00:56 +00:00
fs Ensure that when a blockable open of fifo returns success, a valid 2015-09-20 21:18:33 +00:00
gdb
geom Remove compatibility shims for legacy ATA device names. 2015-10-11 13:01:51 +00:00
gnu Fixing a memory leak on module unloading. 2015-09-11 22:43:35 +00:00
i386 Intel SDM before revision 56 described the CLFLUSH instruction as only 2015-10-24 21:37:47 +00:00
isa
kern The aio_waitcomplete(2) syscall should not sleep when the given timeout 2015-10-25 18:48:09 +00:00
kgssapi
libkern libkern: ffs, fls: s/4/3/ the 3rd BSD clause 2015-10-22 21:04:47 +00:00
mips arge(4): flip this on for AR9344 SoCs. 2015-10-24 22:37:59 +00:00
modules Add aarch64 files to the hwpmc(4) module build 2015-10-23 21:09:28 +00:00
net pf: Fix compliation warning with gcc 2015-10-25 18:09:03 +00:00
net80211 net80211: move ieee80211_free_node() call on error from ic_raw_xmit() to ieee80211_raw_output(). 2015-10-12 04:55:20 +00:00
netgraph Add support for PPP-Max-Payload PPPoE tag (RFC4638). 2015-09-11 09:15:27 +00:00
netinet Use __func__ instead of __FUNCTION__. 2015-10-19 11:17:54 +00:00
netinet6 Invoke lle_event for new entry iff it has lladdr set. 2015-10-04 19:10:27 +00:00
netipsec Take extra reference to security policy before calling crypto_dispatch(). 2015-09-30 08:16:33 +00:00
netnatm
netpfil pf: Fix TSO issues 2015-10-14 16:21:41 +00:00
netsmb
nfs Wait up to 10 seconds for late-initializing network interfaces to arrive. 2015-09-26 13:55:55 +00:00
nfsclient
nfsserver
nlm
ofed Build fix for non-i386 and non-amd64 platforms. 2015-10-23 14:52:05 +00:00
opencrypto Make IPsec work with AES-GCM and AES-ICM (aka CTR) in OCF... IPsec 2015-08-04 17:47:11 +00:00
pc98 Remove compatibility shims for legacy ATA device names. 2015-10-11 13:01:51 +00:00
powerpc Use IIC_EBUSBSY and IIC_BUSERR status values consistantly across all drivers. 2015-10-09 22:49:50 +00:00
rpc Increase group limit for kerberized NFSv4 2015-09-26 16:30:16 +00:00
security fd: make 'rights' a manadatory argument to fget* functions 2015-07-05 19:05:16 +00:00
sparc64 Add support for weak symbols to the kernel linkers. It means that 2015-09-20 01:27:59 +00:00
sys Remove an erroneous semicolon. 2015-10-24 03:16:40 +00:00
teken Sync HPA and VPA implementations with CUP. 2015-08-24 07:49:27 +00:00
tools Rename the /usr/share/doc/legal files to driver.LICENSE to work around 2015-10-16 00:38:05 +00:00
ufs Do not relocate extents to make them contiguous if the underlying drive can do 2015-10-16 03:06:02 +00:00
vm Reduce the amount of calls to VOP_BMAP() made from the local vnode 2015-10-24 21:59:22 +00:00
x86 xen: Add missing semi-colon for BITSET_DEFINE() 2015-10-24 19:04:55 +00:00
xdr
xen xen: Code cleanup and small bug fixes 2015-10-21 10:44:07 +00:00
Makefile Kill EoL whitespace. 2015-05-29 14:03:07 +00:00