Skip to content

Commit

Permalink
b44: fix carrier detection on bind
Browse files Browse the repository at this point in the history
For carrier detection to work properly when binding the driver with a cable
unplugged, netif_carrier_off() should be called after register_netdev(),
not before.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Paul Fertser authored and David S. Miller committed Oct 11, 2010
1 parent b00916b commit bcf64aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/b44.c
Original file line number Diff line number Diff line change
Expand Up @@ -2170,8 +2170,6 @@ static int __devinit b44_init_one(struct ssb_device *sdev,
dev->irq = sdev->irq;
SET_ETHTOOL_OPS(dev, &b44_ethtool_ops);

netif_carrier_off(dev);

err = ssb_bus_powerup(sdev->bus, 0);
if (err) {
dev_err(sdev->dev,
Expand Down Expand Up @@ -2213,6 +2211,8 @@ static int __devinit b44_init_one(struct ssb_device *sdev,
goto err_out_powerdown;
}

netif_carrier_off(dev);

ssb_set_drvdata(sdev, dev);

/* Chip reset provides power to the b44 MAC & PCI cores, which
Expand Down

0 comments on commit bcf64aa

Please sign in to comment.