* [PATCH net-next 1/2] net: dsa: mv88e6xxx: Don't modify RGMII delays when not RGMII mode
2016-11-10 14:43 [PATCH net-next 0/2] Fixes for port refactoring Andrew Lunn
@ 2016-11-10 14:44 ` Andrew Lunn
2016-11-10 14:44 ` [PATCH net-next 2/2] net: dsa: mv88e6xxx: 6351 family also has RGMII delays Andrew Lunn
2016-11-10 18:05 ` [PATCH net-next 0/2] Fixes for port refactoring David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2016-11-10 14:44 UTC (permalink / raw)
To: David Miller; +Cc: Vivien Didelot, netdev, Andrew Lunn
The RGMII modes delays can be set via strapping pings or EEPROM.
Don't change them unless explicitly asked to change them. The recent
refactoring of setting the MAC configuration changed this behaviours,
in that CPU and DSA ports have any pre-configured RGMII delays
removed. This breaks the Armada 370RD board. Restore the previous
behaviour, in that RGMII delays are only applied/removed when
explicitly asked for via an phy-mode being PHY_INTERFACE_MODE_RGMII*
Fixes: 7340e5ecdbb1 ("net: dsa: mv88e6xxx: setup port's MAC")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/net/dsa/mv88e6xxx/port.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
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);
--
2.10.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH net-next 2/2] net: dsa: mv88e6xxx: 6351 family also has RGMII delays
2016-11-10 14:43 [PATCH net-next 0/2] Fixes for port refactoring Andrew Lunn
2016-11-10 14:44 ` [PATCH net-next 1/2] net: dsa: mv88e6xxx: Don't modify RGMII delays when not RGMII mode Andrew Lunn
@ 2016-11-10 14:44 ` Andrew Lunn
2016-11-10 18:05 ` [PATCH net-next 0/2] Fixes for port refactoring David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2016-11-10 14:44 UTC (permalink / raw)
To: David Miller; +Cc: Vivien Didelot, netdev, Andrew Lunn
The recent refactoring of setting the MAC configuration broke setting
of RGMII delays, via the phy-mode, on the 6351 family. Add the missing
ops to the structure.
Fixes: 7340e5ecdbb1 ("net: dsa: mv88e6xxx: setup port's MAC")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/net/dsa/mv88e6xxx/chip.c | 4 ++++
1 file changed, 4 insertions(+)
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,
};
--
2.10.2
^ permalink raw reply related [flat|nested] 4+ messages in thread