]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: phy: marvell: avoid configuring fiber page for SGMII-to-Copper
authorRussell King <rmk+kernel@armlinux.org.uk>
Wed, 13 Dec 2017 09:22:03 +0000 (09:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Dec 2017 21:10:54 +0000 (16:10 -0500)
When in SGMII-to-Copper mode, the fiber page is used for the MAC facing
link, and does not require configuration of the fiber auto-negotiation
settings.  Avoid trying.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/marvell.c

index 4d02b27df0445e7c1ad6f0774e44a5b7013bb05e..b5a8f750e4337ce04fc46b3cf784cf84a2c42c77 100644 (file)
@@ -637,6 +637,10 @@ static int m88e1510_config_aneg(struct phy_device *phydev)
        if (err < 0)
                goto error;
 
+       /* Do not touch the fiber page if we're in copper->sgmii mode */
+       if (phydev->interface == PHY_INTERFACE_MODE_SGMII)
+               return 0;
+
        /* Then the fiber link */
        err = marvell_set_page(phydev, MII_MARVELL_FIBER_PAGE);
        if (err < 0)