diff options
author | Andrew Lunn <andrew@lunn.ch> | 2018-11-11 00:32:15 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-11 10:17:46 -0800 |
commit | fdc71eea8c0aefab80020044f8abf5c3c6814b44 (patch) | |
tree | 9cce69d90f3becd63709886140d3e3032fe48293 /drivers/net/dsa/mv88e6xxx/port.c | |
parent | b3dce4da5bb4c4c991b10c9899e6dd6ce29e8b3e (diff) | |
download | linux-stable-fdc71eea8c0aefab80020044f8abf5c3c6814b44.tar.gz linux-stable-fdc71eea8c0aefab80020044f8abf5c3c6814b44.tar.bz2 linux-stable-fdc71eea8c0aefab80020044f8abf5c3c6814b44.zip |
net: dsa: mv88e6xxx: Differentiate between 6390 and 6390X cmodes
The X family variants support additional ports modes, for 10G
operation, which the non-X variants don't have. Add a port_set_cmode()
for non-X variants to enforce this.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/port.c')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/port.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/port.c b/drivers/net/dsa/mv88e6xxx/port.c index cd7db60a508b..e718404a5e03 100644 --- a/drivers/net/dsa/mv88e6xxx/port.c +++ b/drivers/net/dsa/mv88e6xxx/port.c @@ -437,6 +437,21 @@ int mv88e6390x_port_set_cmode(struct mv88e6xxx_chip *chip, int port, return 0; } +int mv88e6390_port_set_cmode(struct mv88e6xxx_chip *chip, int port, + phy_interface_t mode) +{ + switch (mode) { + case PHY_INTERFACE_MODE_XGMII: + case PHY_INTERFACE_MODE_XAUI: + case PHY_INTERFACE_MODE_RXAUI: + return -EINVAL; + default: + break; + } + + return mv88e6390x_port_set_cmode(chip, port, mode); +} + int mv88e6185_port_get_cmode(struct mv88e6xxx_chip *chip, int port, u8 *cmode) { int err; |