aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTrent Piepho <tpiepho@freescale.com>2008-10-02 07:12:24 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-08 20:03:12 -0400
commitd3eab82b554eeb51f038ac327b6c68c6afdee978 (patch)
tree741ad313ae6a23434677ae037ab48964739ceae4 /drivers
parentc3efab8ed4755e26962704731322bafdf5022f98 (diff)
gianfar: Create net device with carrier down
The device's carrier status is controlled via the functions netif_carrier_on() and netif_carrier_off(). These set or clear a bit indicating the carrier (aka lower level link) is down, and if the state changed, they fire off a routing netlink event. Add a call to netif_carrier_off() before register_netdev() so that the newly created device will be set to carrier down. Then when the carrier comes up for the first time, a netlink event will be generated, as the carrier changed from down to up. Otherwise the initial carrier up will appear to be changing the status from up to up, and so no event is generated since that's not a change. Signed-off-by: Trent Piepho <tpiepho@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/gianfar.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 4320a983a588..b5bb7ae2817f 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -339,6 +339,9 @@ static int gfar_probe(struct platform_device *pdev)
339 /* Enable most messages by default */ 339 /* Enable most messages by default */
340 priv->msg_enable = (NETIF_MSG_IFUP << 1 ) - 1; 340 priv->msg_enable = (NETIF_MSG_IFUP << 1 ) - 1;
341 341
342 /* Carrier starts down, phylib will bring it up */
343 netif_carrier_off(dev);
344
342 err = register_netdev(dev); 345 err = register_netdev(dev);
343 346
344 if (err) { 347 if (err) {