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.
Unified · Split
| @@ -26,6 +26,8 @@ · 25 unmodified lines | |||
| 26 | #include <linux/marvell_phy.h> | 26 | #include <linux/marvell_phy.h> |
| 27 | #include <linux/phy.h> | 27 | #include <linux/phy.h> |
| 28 | 28 | ||
| 29 | #define MDIO_AN_10GBT_CTRL_ADV_NBT_MASK 0x01e0 | ||
| 30 | |||
| 29 | enum { | 31 | enum { |
| 30 | MV_PCS_BASE_T = 0x0000, | 32 | MV_PCS_BASE_T = 0x0000, |
| 31 | MV_PCS_BASE_R = 0x1000, | 33 | MV_PCS_BASE_R = 0x1000, |
| @@ -386,8 +388,10 @@ static int mv3310_config_aneg(struct phy_device *phydev) · 354 unmodified lines | |||
| 386 | else | 388 | else |
| 387 | reg = 0; | 389 | reg = 0; |
| 388 | 390 | ||
| 391 | /* Make sure we clear unsupported 2.5G/5G advertising */ | ||
| 389 | ret = mv3310_modify(phydev, MDIO_MMD_AN, MDIO_AN_10GBT_CTRL, | 392 | 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); | ||
| 391 | if (ret < 0) | 395 | if (ret < 0) |
| 392 | return ret; | 396 | return ret; |
| 393 | if (ret > 0) | 397 | if (ret > 0) |