diff options
| author | Andrew Lunn <andrew@lunn.ch> | 2018-11-10 18:32:16 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2018-11-11 13:17:46 -0500 |
| commit | 787799a9d5557f9494bf79b7052d3b9ee68f3b80 (patch) | |
| tree | a23cbae2d1d80da3dab85fdb5bfebc10cb610297 /drivers/net | |
| parent | fdc71eea8c0aefab80020044f8abf5c3c6814b44 (diff) | |
net: dsa: mv88e6xxx: Default ports 9/10 6390X CMODE to 1000BaseX
The 6390X family has 8 SERDES interfaces. This allows ports 9 and 10
to support up to 10Gbps using 4 SERDES interfaces. However, when lower
speeds are used, which need fewer SERDES interfaces, the unused SERDES
interfaces can be used by ports 2-8.
The hardware defaults to ports 9 and 10 having all 4 SERDES interfaces
assigned to them. This only gets changed when the interface is
configured after what the SFP supports has been determined, or the 10G
PHY completes auto-neg.
For hardware designs which limit ports 9 and 10 to one or two SERDES
interfaces, and place SFPs on the lower interfaces, this is too
late. Those ports with SFP should not wait until ports 9/10 are up in
order to get access to the SERDES interface. So change the default
configuration when the driver is initialised. Configure ports 9 and 10
to 1000BaseX, so they use a single SERDES interface, freeing up the
others. They can steal them back if they need them.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
| -rw-r--r-- | drivers/net/dsa/mv88e6xxx/port.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/port.c b/drivers/net/dsa/mv88e6xxx/port.c index e718404a5e03..ebd26b6a93e6 100644 --- a/drivers/net/dsa/mv88e6xxx/port.c +++ b/drivers/net/dsa/mv88e6xxx/port.c | |||
| @@ -368,12 +368,15 @@ int mv88e6390x_port_set_cmode(struct mv88e6xxx_chip *chip, int port, | |||
| 368 | u16 reg; | 368 | u16 reg; |
| 369 | int err; | 369 | int err; |
| 370 | 370 | ||
| 371 | if (mode == PHY_INTERFACE_MODE_NA) | ||
| 372 | return 0; | ||
| 373 | |||
| 374 | if (port != 9 && port != 10) | 371 | if (port != 9 && port != 10) |
| 375 | return -EOPNOTSUPP; | 372 | return -EOPNOTSUPP; |
| 376 | 373 | ||
| 374 | /* Default to a slow mode, so freeing up SERDES interfaces for | ||
| 375 | * other ports which might use them for SFPs. | ||
| 376 | */ | ||
| 377 | if (mode == PHY_INTERFACE_MODE_NA) | ||
| 378 | mode = PHY_INTERFACE_MODE_1000BASEX; | ||
| 379 | |||
| 377 | switch (mode) { | 380 | switch (mode) { |
| 378 | case PHY_INTERFACE_MODE_1000BASEX: | 381 | case PHY_INTERFACE_MODE_1000BASEX: |
| 379 | cmode = MV88E6XXX_PORT_STS_CMODE_1000BASE_X; | 382 | cmode = MV88E6XXX_PORT_STS_CMODE_1000BASE_X; |
