blob: 92c64ac9c48eae04bb8d6e7feb4528e176a1e2a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
From: David Bauer <mail@david-bauer.net>
Subject: [PATCH] ath79: allow to override AR8033 SGMII aneg status
In order to make the QCA955x SGMII workaround work, the unsuccessful
SGMII autonegotiation on the AR8033 should not block the PHY
state-machine.
Otherwise, the ag71xx driver never becomes aware of the copper-side
link-establishment and the workaround is never executed.
Submitted-by: David Bauer <mail@david-bauer.net>
Submitted-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
---
drivers/net/phy/at803x.c-override.patch | 7 +++++++
1 files changed, 7 insertions(+)
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
@@ -830,6 +830,13 @@ static int at803x_aneg_done(struct phy_d
if (!(phy_read(phydev, AT803X_PSSR) & AT803X_PSSR_MR_AN_COMPLETE)) {
phydev_warn(phydev, "803x_aneg_done: SGMII link is not ok\n");
aneg_done = 0;
+#ifdef CONFIG_OF_MDIO
+ if (phydev->mdio.dev.of_node &&
+ of_property_read_bool(phydev->mdio.dev.of_node,
+ "at803x-override-sgmii-link-check")) {
+ aneg_done = 1;
+ }
+#endif
}
/* switch back to copper page */
phy_write(phydev, AT803X_REG_CHIP_CONFIG, ccr | AT803X_BT_BX_REG_SEL);
|