ref: bfcd6944a21217315bd79810dd5482b73ebeef6a
parent: 606af7b470e56ceaab0139e52f299545f551c444
author: mia soweli <inbox@tachibana-labs.org>
date: Sat Apr 19 16:56:33 EDT 2025
etheri225: add clause 45 phy auto-negotiation this means 2.5 gigabit links are reported correctly.
--- a/sys/src/9/pc/etheri225.c
+++ b/sys/src/9/pc/etheri225.c
@@ -594,6 +594,7 @@
csr32w(c, Rdevctrl, csr32r(c, Rdevctrl) | DClink | DClinkauto);
miimiw(phy, Bmcr, miimir(phy, Bmcr) & ~BmcrPd); microdelay(300);
miiane(phy, ~0, ~0, ~0);
+ miianec45(phy, ~0);
}
static void
@@ -1021,12 +1022,15 @@
/* phy missing? */
continue;
}
- miistatus(phy);
+
+ if (miistatus(phy) == 0)
+ miistatusc45(phy);
if (phy->speed == 0) {
/* phy errata: rinse and repeat, should only happen once */
miireset(phy);
continue;
}
+
/* report status */
ethersetspeed(c->edev, phy->speed);
ethersetlink(c->edev, phy->link);
--
⑨