* [PATCH] GMAC ethernet controller (Apple PowerPC)
@ 2002-08-08 10:04 Roberto Gordo Saez
2002-08-09 6:14 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 2+ messages in thread
From: Roberto Gordo Saez @ 2002-08-08 10:04 UTC (permalink / raw)
To: linux-kernel; +Cc: benh, linuxppc-dev
Small fix for the link status (carrier) on PowerPC GMAC net driver.
Now ifconfig reports correctly the "RUNNING" flag, the same way that it is reported with other network cards i've tested (intel eepro100 on i386).
--- linux-2.4.19.orig/drivers/net/gmac.c 2002-08-08 08:38:10.000000000 +0200
+++ linux-2.4.19/drivers/net/gmac.c 2002-08-08 09:26:07.000000000 +0200
@@ -246,6 +246,7 @@
#endif
full_duplex = ((aux_stat & MII_BCM5201_AUXCTLSTATUS_DUPLEX) != 0);
link_100 = ((aux_stat & MII_BCM5201_AUXCTLSTATUS_SPEED) != 0);
+ netif_carrier_on(gm->dev);
break;
case PHY_B5400:
case PHY_B5401:
@@ -260,6 +261,7 @@
full_duplex = phy_BCM5400_link_table[link][0];
link_100 = phy_BCM5400_link_table[link][1];
gigabit = phy_BCM5400_link_table[link][2];
+ netif_carrier_on(gm->dev);
break;
case PHY_LXT971:
aux_stat = mii_read(gm, gm->phy_addr, MII_LXT971_STATUS2);
@@ -269,6 +271,7 @@
#endif
full_duplex = ((aux_stat & MII_LXT971_STATUS2_FULLDUPLEX) != 0);
link_100 = ((aux_stat & MII_LXT971_STATUS2_SPEED) != 0);
+ netif_carrier_on(gm->dev);
break;
default:
full_duplex = (lpar_ability & MII_ANLPA_FDAM) != 0;
@@ -296,6 +299,7 @@
#ifdef DEBUG_PHY
printk(KERN_INFO "%s: Link down !\n", gm->dev->name);
#endif
+ netif_carrier_off(gm->dev);
}
}
}
@@ -1101,7 +1105,10 @@
/* Initialize the multicast tables & promisc mode if any */
gmac_set_multicast(dev);
-
+
+ /* Initialize the carrier status */
+ netif_carrier_off(dev);
+
/*
* Check out PHY status and start auto-poll
*
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-08-09 6:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-08 10:04 [PATCH] GMAC ethernet controller (Apple PowerPC) Roberto Gordo Saez
2002-08-09 6:14 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox