mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user