[PATCH net-next 0/2] Fixes for mv88e6161

STALE3426d

7 messages, 3 authors, 2017-06-05 · open the first message on its own page

[PATCH net-next 0/2] Fixes for mv88e6161

From: Andrew Lunn <andrew@lunn.ch>
Date: 2017-06-02 21:24:16

Testing a board with an mv88e6161 turned up two issues. The PHYs were
not found, because the wrong method to access them was used. The
statistics did not work, because the wrong snapshot method was used

Andrew Lunn (2):
  net: dsa: mv88e6xxx: mv88e6161 uses global 2 for PHY access
  net: dsa: mv88e6xxx: mv88e6161 uses mv88e6320 stats snapshot

 drivers/net/dsa/mv88e6xxx/chip.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

-- 
2.11.0

[PATCH net-next 1/2] net: dsa: mv88e6xxx: 6161 uses global 2 for PHY access

From: Andrew Lunn <andrew@lunn.ch>
Date: 2017-06-02 21:23:12

Access to the internal PHYs of the 6161 and 6123 go through global 2
SMI registers. Fix the ops structure.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 drivers/net/dsa/mv88e6xxx/chip.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 7cf470c3e662..80ed4ab84028 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -2455,8 +2455,8 @@ static const struct mv88e6xxx_ops mv88e6097_ops = {
 static const struct mv88e6xxx_ops mv88e6123_ops = {
 	/* MV88E6XXX_FAMILY_6165 */
 	.set_switch_mac = mv88e6xxx_g2_set_switch_mac,
-	.phy_read = mv88e6165_phy_read,
-	.phy_write = mv88e6165_phy_write,
+	.phy_read = mv88e6xxx_g2_smi_phy_read,
+	.phy_write = mv88e6xxx_g2_smi_phy_write,
 	.port_set_link = mv88e6xxx_port_set_link,
 	.port_set_duplex = mv88e6xxx_port_set_duplex,
 	.port_set_speed = mv88e6185_port_set_speed,
@@ -2544,8 +2544,8 @@ static const struct mv88e6xxx_ops mv88e6141_ops = {
 static const struct mv88e6xxx_ops mv88e6161_ops = {
 	/* MV88E6XXX_FAMILY_6165 */
 	.set_switch_mac = mv88e6xxx_g2_set_switch_mac,
-	.phy_read = mv88e6165_phy_read,
-	.phy_write = mv88e6165_phy_write,
+	.phy_read = mv88e6xxx_g2_smi_phy_read,
+	.phy_write = mv88e6xxx_g2_smi_phy_write,
 	.port_set_link = mv88e6xxx_port_set_link,
 	.port_set_duplex = mv88e6xxx_port_set_duplex,
 	.port_set_speed = mv88e6185_port_set_speed,
-- 
2.11.0

[PATCH net-next 2/2] net: dsa: mv88e6xxx: mv88e6161 uses mv88e6320 stats snapshot

From: Andrew Lunn <andrew@lunn.ch>
Date: 2017-06-02 21:23:33

The mv88e6161 was using the wrong method to perform statistics
snapshot.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 drivers/net/dsa/mv88e6xxx/chip.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 80ed4ab84028..084bc655020a 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -2464,7 +2464,7 @@ static const struct mv88e6xxx_ops mv88e6123_ops = {
 	.port_set_egress_floods = mv88e6352_port_set_egress_floods,
 	.port_disable_learn_limit = mv88e6xxx_port_disable_learn_limit,
 	.port_disable_pri_override = mv88e6xxx_port_disable_pri_override,
-	.stats_snapshot = mv88e6xxx_g1_stats_snapshot,
+	.stats_snapshot = mv88e6320_g1_stats_snapshot,
 	.stats_get_sset_count = mv88e6095_stats_get_sset_count,
 	.stats_get_strings = mv88e6095_stats_get_strings,
 	.stats_get_stats = mv88e6095_stats_get_stats,
@@ -2558,7 +2558,7 @@ static const struct mv88e6xxx_ops mv88e6161_ops = {
 	.port_pause_config = mv88e6097_port_pause_config,
 	.port_disable_learn_limit = mv88e6xxx_port_disable_learn_limit,
 	.port_disable_pri_override = mv88e6xxx_port_disable_pri_override,
-	.stats_snapshot = mv88e6xxx_g1_stats_snapshot,
+	.stats_snapshot = mv88e6320_g1_stats_snapshot,
 	.stats_get_sset_count = mv88e6095_stats_get_sset_count,
 	.stats_get_strings = mv88e6095_stats_get_strings,
 	.stats_get_stats = mv88e6095_stats_get_stats,
-- 
2.11.0

Re: [PATCH net-next 1/2] net: dsa: mv88e6xxx: 6161 uses global 2 for PHY access

From: Vivien Didelot <hidden>
Date: 2017-06-02 21:30:39

Andrew Lunn [off-list ref] writes:
Access to the internal PHYs of the 6161 and 6123 go through global 2
SMI registers. Fix the ops structure.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Vivien Didelot <redacted>

Re: [PATCH net-next 2/2] net: dsa: mv88e6xxx: mv88e6161 uses mv88e6320 stats snapshot

From: Vivien Didelot <hidden>
Date: 2017-06-02 21:31:00

Andrew Lunn [off-list ref] writes:
The mv88e6161 was using the wrong method to perform statistics
snapshot.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Vivien Didelot <redacted>

Re: [PATCH net-next 0/2] Fixes for mv88e6161

From: Vivien Didelot <hidden>
Date: 2017-06-02 21:31:21

Hi Andrew,

Andrew Lunn [off-list ref] writes:
Testing a board with an mv88e6161 turned up two issues. The PHYs were
not found, because the wrong method to access them was used. The
statistics did not work, because the wrong snapshot method was used
Thanks for testing!

Re: [PATCH net-next 0/2] Fixes for mv88e6161

From: David Miller <davem@davemloft.net>
Date: 2017-06-05 01:35:07

From: Andrew Lunn <andrew@lunn.ch>
Date: Fri,  2 Jun 2017 23:22:44 +0200
Testing a board with an mv88e6161 turned up two issues. The PHYs were
not found, because the wrong method to access them was used. The
statistics did not work, because the wrong snapshot method was used
Series applied, thanks Andrew.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help