net: dsa: mv88e6xxx: 6161 uses global 2 for PHY access
authorAndrew Lunn <andrew@lunn.ch>
Fri, 2 Jun 2017 21:22:45 +0000 (23:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Jun 2017 01:34:17 +0000 (21:34 -0400)
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 <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c

index 0176254..5751723 100644 (file)
@@ -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,