From: Trent Piepho Date: Thu, 2 Oct 2008 11:12:24 +0000 (+0000) Subject: gianfar: Create net device with carrier down X-Git-Tag: upstream/snapshot3+hdmi~22513^2~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d3eab82b554eeb51f038ac327b6c68c6afdee978;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 4320a98..b5bb7ae 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c @@ -339,6 +339,9 @@ static int gfar_probe(struct platform_device *pdev) /* Enable most messages by default */ priv->msg_enable = (NETIF_MSG_IFUP << 1 ) - 1; + /* Carrier starts down, phylib will bring it up */ + netif_carrier_off(dev); + err = register_netdev(dev); if (err) {