From: John W. Linville Date: Wed, 8 Jun 2005 19:11:57 +0000 (-0400) Subject: [PATCH] b44: check link state during open X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e254e9bff5283aad1af6d74d2a312ee011b84d61;p=mv-sheeva.git [PATCH] b44: check link state during open Check the link state during b44_open. This closes a 1 HZ window that existed after b44_open ran but before the b44_timer handler ran, during which ethtool would report "Link detected: yes" no matter what the link state actually was. Signed-off-by: John W. Linville --- diff --git a/drivers/net/b44.c b/drivers/net/b44.c index 3fe8ba992c3..f1bd45e3da3 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c @@ -1285,6 +1285,9 @@ static int b44_open(struct net_device *dev) b44_init_hw(bp); bp->flags |= B44_FLAG_INIT_COMPLETE; + netif_carrier_off(dev); + b44_check_phy(bp); + spin_unlock_irq(&bp->lock); init_timer(&bp->timer);