]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[forcedeth] Clear the MII link status register on link status changes
authorYann Cézard <yann.cezard@free.fr>
Sun, 20 Mar 2011 12:29:05 +0000 (12:29 +0000)
committerMichael Brown <mcb30@ipxe.org>
Sun, 20 Mar 2011 12:36:09 +0000 (12:36 +0000)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/forcedeth.c

index 6876b005adcb163b6e2cf3ebc487c83dace6647b..918f502f4b316c3661edb5836af7bd2c722dda87 100644 (file)
@@ -967,6 +967,12 @@ static void
 forcedeth_link_status ( struct net_device *netdev )
 {
        struct forcedeth_private *priv = netdev_priv ( netdev );
+       void *ioaddr = priv->mmio_addr;
+       u32 mii_status;
+
+       /* Clear the MII link change status */
+       mii_status = readl ( ioaddr + NvRegMIIStatus );
+       writel ( NVREG_MIISTAT_LINKCHANGE, ioaddr + NvRegMIIStatus );
 
        if ( nv_update_linkspeed ( priv ) == 1 )
                netdev_link_up ( netdev );