[PATCH] b44: check link state during open
authorJohn W. Linville <linville@tuxdriver.com>
Wed, 8 Jun 2005 19:11:57 +0000 (15:11 -0400)
committerJeff Garzik <jgarzik@pobox.com>
Mon, 27 Jun 2005 04:46:40 +0000 (00:46 -0400)
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 <linville@tuxdriver.com>
drivers/net/b44.c

index 3fe8ba992c38b32b8fd5b55e8f503e6231afbfaf..f1bd45e3da31cd0ea482fd0db6995ae319977415 100644 (file)
@@ -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);