Skip to content

Commit 61a65d3

Browse files
minimaxwelldavem330
authored andcommitted
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: 20b2af3 ("net: phy: add Marvell Alaska X 88X3310 10Gigabit PHY support") Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reported-by: Russell King <linux@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent ea34a00 commit 61a65d3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/net/phy/marvell10g.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
#include <linux/marvell_phy.h>
2727
#include <linux/phy.h>
2828

29+
#define MDIO_AN_10GBT_CTRL_ADV_NBT_MASK 0x01e0
30+
2931
enum {
3032
MV_PCS_BASE_T = 0x0000,
3133
MV_PCS_BASE_R = 0x1000,
@@ -386,8 +388,10 @@ static int mv3310_config_aneg(struct phy_device *phydev)
386388
else
387389
reg = 0;
388390

391+
/* Make sure we clear unsupported 2.5G/5G advertising */
389392
ret = mv3310_modify(phydev, MDIO_MMD_AN, MDIO_AN_10GBT_CTRL,
390-
MDIO_AN_10GBT_CTRL_ADV10G, reg);
393+
MDIO_AN_10GBT_CTRL_ADV10G |
394+
MDIO_AN_10GBT_CTRL_ADV_NBT_MASK, reg);
391395
if (ret < 0)
392396
return ret;
393397
if (ret > 0)

0 commit comments

Comments
 (0)