Commit 61a65d32 authored by Maxime Chevallier's avatar Maxime Chevallier Committed by David S. Miller

net: phy: marvell10g: Fix Multi-G advertisement to only advertise 10G

Some Marvell Alaska PHYs support 2.5G, 5G and 10G BaseT links. Their
default behaviour is to advertise all of these modes, but at the moment,
only 10GBaseT is supported. To prevent link partners from establishing
link at that speed, clear these modes upon configuring aneg parameters.

Fixes: 20b2af32 ("net: phy: add Marvell Alaska X 88X3310 10Gigabit PHY support")
Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
Reported-by: default avatarRussell King <linux@armlinux.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ea34a003
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#include <linux/marvell_phy.h> #include <linux/marvell_phy.h>
#include <linux/phy.h> #include <linux/phy.h>
#define MDIO_AN_10GBT_CTRL_ADV_NBT_MASK 0x01e0
enum { enum {
MV_PCS_BASE_T = 0x0000, MV_PCS_BASE_T = 0x0000,
MV_PCS_BASE_R = 0x1000, MV_PCS_BASE_R = 0x1000,
...@@ -386,8 +388,10 @@ static int mv3310_config_aneg(struct phy_device *phydev) ...@@ -386,8 +388,10 @@ static int mv3310_config_aneg(struct phy_device *phydev)
else else
reg = 0; reg = 0;
/* Make sure we clear unsupported 2.5G/5G advertising */
ret = mv3310_modify(phydev, MDIO_MMD_AN, MDIO_AN_10GBT_CTRL, ret = mv3310_modify(phydev, MDIO_MMD_AN, MDIO_AN_10GBT_CTRL,
MDIO_AN_10GBT_CTRL_ADV10G, reg); MDIO_AN_10GBT_CTRL_ADV10G |
MDIO_AN_10GBT_CTRL_ADV_NBT_MASK, reg);
if (ret < 0) if (ret < 0)
return ret; return ret;
if (ret > 0) if (ret > 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment