Skip to content

Commit 2e5f032

Browse files
buytenhdavem330
authored andcommitted
dsa: add support for the Marvell 88E6131 switch chip
Add support for the Marvell 88E6131 switch chip. This chip only supports the original (ethertype-less) DSA tagging format. On the 88E6131, there is a PHY Polling Unit (PPU) which has exclusive access to each of the PHYs's MII management registers. If we want to talk to the PHYs from software, we have to disable the PPU and wait for it to complete its current transaction before we can do so, and we need to re-enable the PPU afterwards to make sure that the switch will notice changes in link state and speed on the individual ports as they occur. Since disabling the PPU is rather slow, and since MII management accesses are typically done in bursts, this patch keeps the PPU disabled for 10ms after a software access completes. This makes handling the PPU slightly more complex, but speeds up something like running ethtool on one of the switch slave interfaces from ~300ms to ~30ms on typical hardware. Signed-off-by: Lennert Buytenhek <[email protected]> Tested-by: Nicolas Pitre <[email protected]> Tested-by: Peter van Valderen <[email protected]> Tested-by: Dirk Teurlings <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent cf85d08 commit 2e5f032

File tree

5 files changed

+555
-0
lines changed

5 files changed

+555
-0
lines changed

net/dsa/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ config NET_DSA_MV88E6XXX
2424
bool
2525
default n
2626

27+
config NET_DSA_MV88E6XXX_NEED_PPU
28+
bool
29+
default n
30+
31+
config NET_DSA_MV88E6131
32+
bool "Marvell 88E6131 ethernet switch chip support"
33+
select NET_DSA_MV88E6XXX
34+
select NET_DSA_MV88E6XXX_NEED_PPU
35+
select NET_DSA_TAG_DSA
36+
---help---
37+
This enables support for the Marvell 88E6131 ethernet switch
38+
chip.
39+
2740
config NET_DSA_MV88E6123_61_65
2841
bool "Marvell 88E6123/6161/6165 ethernet switch chip support"
2942
select NET_DSA_MV88E6XXX

net/dsa/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ obj-$(CONFIG_NET_DSA_TAG_EDSA) += tag_edsa.o
55
# switch drivers
66
obj-$(CONFIG_NET_DSA_MV88E6XXX) += mv88e6xxx.o
77
obj-$(CONFIG_NET_DSA_MV88E6123_61_65) += mv88e6123_61_65.o
8+
obj-$(CONFIG_NET_DSA_MV88E6131) += mv88e6131.o
89

910
# the core
1011
obj-$(CONFIG_NET_DSA) += dsa.o slave.o

0 commit comments

Comments
 (0)