diff options
author | David S. Miller <davem@davemloft.net> | 2016-11-13 22:36:42 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-11-13 22:36:42 -0500 |
commit | 5aad5b42bd4b8c067cdac153636db56b00ac874c (patch) | |
tree | 9f6b2fedc17e9e8804dfefb5dded2b2307ed87fe | |
parent | 63fb571ee50320191a3cc2c4634c9c9f918a2c44 (diff) | |
parent | 94d66ae63151ab8db47fe468f5fe37a616f7bfeb (diff) | |
download | linux-5aad5b42bd4b8c067cdac153636db56b00ac874c.tar.bz2 |
Merge branch 'dsa-mv88e6xxx-post-refactor-fixes'
Andrew Lunn says:
====================
dsa: mv88e6xxx: Fixes for port refactoring
The patches which refactored setting up the switch MACs introduced a
couple of regressions. The RGMII delays for a port can be set using
other mechanism than just phy-mode. Don't overwrite the delays unless
explicitly asked to. This broke my Armada 370 RD. Also, the mv88e6351
family supports setting RGMII delays, but is missing the necessary
entries in the ops structures to allow this.
These fixes are to patches currently in net-next. No need for stable
etc.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/chip.c | 4 | ||||
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/port.c | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index c8f824d4ff26..d6d9d66b81ce 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3196,6 +3196,7 @@ static const struct mv88e6xxx_ops mv88e6171_ops = { .phy_write = mv88e6xxx_g2_smi_phy_write, .port_set_link = mv88e6xxx_port_set_link, .port_set_duplex = mv88e6xxx_port_set_duplex, + .port_set_rgmii_delay = mv88e6352_port_set_rgmii_delay, .port_set_speed = mv88e6185_port_set_speed, }; @@ -3217,6 +3218,7 @@ static const struct mv88e6xxx_ops mv88e6175_ops = { .phy_write = mv88e6xxx_g2_smi_phy_write, .port_set_link = mv88e6xxx_port_set_link, .port_set_duplex = mv88e6xxx_port_set_duplex, + .port_set_rgmii_delay = mv88e6352_port_set_rgmii_delay, .port_set_speed = mv88e6185_port_set_speed, }; @@ -3281,6 +3283,7 @@ static const struct mv88e6xxx_ops mv88e6350_ops = { .phy_write = mv88e6xxx_g2_smi_phy_write, .port_set_link = mv88e6xxx_port_set_link, .port_set_duplex = mv88e6xxx_port_set_duplex, + .port_set_rgmii_delay = mv88e6352_port_set_rgmii_delay, .port_set_speed = mv88e6185_port_set_speed, }; @@ -3290,6 +3293,7 @@ static const struct mv88e6xxx_ops mv88e6351_ops = { .phy_write = mv88e6xxx_g2_smi_phy_write, .port_set_link = mv88e6xxx_port_set_link, .port_set_duplex = mv88e6xxx_port_set_duplex, + .port_set_rgmii_delay = mv88e6352_port_set_rgmii_delay, .port_set_speed = mv88e6185_port_set_speed, }; diff --git a/drivers/net/dsa/mv88e6xxx/port.c b/drivers/net/dsa/mv88e6xxx/port.c index 18eeed083cbd..e4978f6367aa 100644 --- a/drivers/net/dsa/mv88e6xxx/port.c +++ b/drivers/net/dsa/mv88e6xxx/port.c @@ -63,9 +63,10 @@ static int mv88e6xxx_port_set_rgmii_delay(struct mv88e6xxx_chip *chip, int port, reg |= PORT_PCS_CTRL_RGMII_DELAY_RXCLK | PORT_PCS_CTRL_RGMII_DELAY_TXCLK; break; - default: - /* no delay */ + case PHY_INTERFACE_MODE_RGMII: break; + default: + return 0; } err = mv88e6xxx_port_write(chip, port, PORT_PCS_CTRL, reg); |