aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2005-06-08 15:11:57 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-06-27 00:46:40 -0400
commite254e9bff5283aad1af6d74d2a312ee011b84d61 (patch)
tree7b87098577463bca2576d3cabe20360122c4ba84
parent1fe2cb32763457a829d33b38ec117ffe5c98e045 (diff)
downloadkernel_samsung_smdk4412-e254e9bff5283aad1af6d74d2a312ee011b84d61.zip
kernel_samsung_smdk4412-e254e9bff5283aad1af6d74d2a312ee011b84d61.tar.gz
kernel_samsung_smdk4412-e254e9bff5283aad1af6d74d2a312ee011b84d61.tar.bz2
[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 <linville@tuxdriver.com>
-rw-r--r--drivers/net/b44.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index 3fe8ba9..f1bd45e 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);