[DC21X4] Improve MII link status indication (#9220)

This code should be generic for all MII PHYs so always read the BMSR register twice.
This commit is contained in:
Dmitry Borisov
2026-06-28 20:35:01 +02:00
committed by GitHub
parent ff7ed205fb
commit c54a9ca090
+1 -4
View File
@@ -145,14 +145,11 @@ MediaMiiCheckLink(
BOOLEAN FullDuplex, Speed100;
/* The link status is a latched-low bit, read it twice */
MiiRead(Adapter, Adapter->PhyAddress, MII_STATUS, &MiiStatus);
if (!MiiRead(Adapter, Adapter->PhyAddress, MII_STATUS, &MiiStatus))
{
goto NoLink;
}
if (!(MiiStatus & MII_SR_LINK_STATUS))
{
MiiRead(Adapter, Adapter->PhyAddress, MII_STATUS, &MiiStatus);
}
TRACE("MII Status %04lx\n", MiiStatus);
/* Check the link status */