Commit c35ca399 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Jeff Garzik

[PATCH] b44: fix laptop carrier detect

On my laptop, the b44 device is created and the carrier state defaults
to ON when created by alloc_etherdev. This means tools like NetworkManager
see the carrier as On and try and bring the device up.  The correct thing
to do is mark the carrier as Off when device is created.
Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 6f9d4722
...@@ -1399,7 +1399,6 @@ static int b44_open(struct net_device *dev) ...@@ -1399,7 +1399,6 @@ static int b44_open(struct net_device *dev)
b44_init_rings(bp); b44_init_rings(bp);
b44_init_hw(bp); b44_init_hw(bp);
netif_carrier_off(dev);
b44_check_phy(bp); b44_check_phy(bp);
err = request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev); err = request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev);
...@@ -1464,7 +1463,7 @@ static int b44_close(struct net_device *dev) ...@@ -1464,7 +1463,7 @@ static int b44_close(struct net_device *dev)
#endif #endif
b44_halt(bp); b44_halt(bp);
b44_free_rings(bp); b44_free_rings(bp);
netif_carrier_off(bp->dev); netif_carrier_off(dev);
spin_unlock_irq(&bp->lock); spin_unlock_irq(&bp->lock);
...@@ -2000,6 +1999,8 @@ static int __devinit b44_init_one(struct pci_dev *pdev, ...@@ -2000,6 +1999,8 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
dev->irq = pdev->irq; dev->irq = pdev->irq;
SET_ETHTOOL_OPS(dev, &b44_ethtool_ops); SET_ETHTOOL_OPS(dev, &b44_ethtool_ops);
netif_carrier_off(dev);
err = b44_get_invariants(bp); err = b44_get_invariants(bp);
if (err) { if (err) {
printk(KERN_ERR PFX "Problem fetching invariants of chip, " printk(KERN_ERR PFX "Problem fetching invariants of chip, "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment