Skip to content

Commit

Permalink
dsa: add support for the Marvell 88E6131 switch chip
Browse files Browse the repository at this point in the history
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 <buytenh@marvell.com>
Tested-by: Nicolas Pitre <nico@marvell.com>
Tested-by: Peter van Valderen <linux@ddcrew.com>
Tested-by: Dirk Teurlings <dirk@upexia.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
buytenh authored and davem330 committed Oct 9, 2008
1 parent cf85d08 commit 2e5f032
Show file tree
Hide file tree
Showing 5 changed files with 555 additions and 0 deletions.
13 changes: 13 additions & 0 deletions net/dsa/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ config NET_DSA_MV88E6XXX
bool
default n

config NET_DSA_MV88E6XXX_NEED_PPU
bool
default n

config NET_DSA_MV88E6131
bool "Marvell 88E6131 ethernet switch chip support"
select NET_DSA_MV88E6XXX
select NET_DSA_MV88E6XXX_NEED_PPU
select NET_DSA_TAG_DSA
---help---
This enables support for the Marvell 88E6131 ethernet switch
chip.

config NET_DSA_MV88E6123_61_65
bool "Marvell 88E6123/6161/6165 ethernet switch chip support"
select NET_DSA_MV88E6XXX
Expand Down
1 change: 1 addition & 0 deletions net/dsa/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ obj-$(CONFIG_NET_DSA_TAG_EDSA) += tag_edsa.o
# switch drivers
obj-$(CONFIG_NET_DSA_MV88E6XXX) += mv88e6xxx.o
obj-$(CONFIG_NET_DSA_MV88E6123_61_65) += mv88e6123_61_65.o
obj-$(CONFIG_NET_DSA_MV88E6131) += mv88e6131.o

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

0 comments on commit 2e5f032

Please sign in to comment.