[PATCH v2 11/11] net: phy: at803x: disable extended next page bit
Marco Felsch
m.felsch at pengutronix.de
Fri Aug 11 03:26:57 PDT 2023
This commit ports Linux commit:
| commit 3c51fa5d2afe7a4909b53af5019635326389dd29
| Author: Russell King <rmk+kernel at armlinux.org.uk>
| Date: Tue Jan 12 22:59:43 2021 +0000
|
| net: phy: ar803x: disable extended next page bit
|
| This bit is enabled by default and advertises support for extended
| next page support. XNP is only needed for 10GBase-T and MultiGig
| support which is not supported. Additionally, Cisco MultiGig switches
| will read this bit and attempt 10Gb negotiation even though Next Page
| support is disabled. This will cause timeouts when the interface is
| forced to 100Mbps and auto-negotiation will fail. The interfaces are
| only 1000Base-T and supporting auto-negotiation for this only requires
| the Next Page bit to be set.
|
| Taken from:
| https://github.com/SolidRun/linux-stable/commit/7406c5244b7ea6bc17a2afe8568277a8c4b126a9
| and adapted to mainline kernels by rmk.
|
| Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
| Reviewed-by: Andrew Lunn <andrew at lunn.ch>
| Link: https://lore.kernel.org/r/E1kzSdb-000417-FJ@rmk-PC.armlinux.org.uk
| Signed-off-by: Jakub Kicinski <kuba at kernel.org>
Signed-off-by: Marco Felsch <m.felsch at pengutronix.de>
Reviewed-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
v2
- add afa's rb
drivers/net/phy/at803x.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
index b9e11025b86c..8d6b879a27ab 100644
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
@@ -303,7 +303,13 @@ static int at803x_config_init(struct phy_device *phydev)
if (ret < 0)
return ret;
- return 0;
+ /* Ar803x extended next page bit is enabled by default. Cisco
+ * multigig switches read this bit and attempt to negotiate 10Gbps
+ * rates even if the next page bit is disabled. This is incorrect
+ * behaviour but we still need to accommodate it. XNP is only needed
+ * for 10Gbps support, so disable XNP.
+ */
+ return phy_modify(phydev, MII_ADVERTISE, MDIO_AN_CTRL1_XNP, 0);
}
static struct phy_driver at803x_driver[] = {
--
2.39.2
More information about the barebox
mailing list