summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2017-12-13 10:22:03 +0100
committerDavid S. Miller <davem@davemloft.net>2017-12-13 22:10:54 +0100
commitde9c4e06bbe872d725f306e34f3eea21155488e2 (patch)
treef794bce1df2fb1a763146969967371af2ef16611 /drivers/net/phy
parentdwc-xlgmac: Add co-maintainer (diff)
downloadlinux-de9c4e06bbe872d725f306e34f3eea21155488e2.tar.xz
linux-de9c4e06bbe872d725f306e34f3eea21155488e2.zip
net: phy: marvell: avoid configuring fiber page for SGMII-to-Copper
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>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/marvell.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 4d02b27df044..b5a8f750e433 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -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)