From c54a9ca0905c8e606d19e54bb54e02e96e654927 Mon Sep 17 00:00:00 2001 From: Dmitry Borisov Date: Mon, 29 Jun 2026 00:35:01 +0600 Subject: [PATCH] [DC21X4] Improve MII link status indication (#9220) This code should be generic for all MII PHYs so always read the BMSR register twice. --- drivers/network/dd/dc21x4/media.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/network/dd/dc21x4/media.c b/drivers/network/dd/dc21x4/media.c index ea35b20534b..0d324d7e576 100644 --- a/drivers/network/dd/dc21x4/media.c +++ b/drivers/network/dd/dc21x4/media.c @@ -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 */