aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
authorJesse Brandeburg <jesse.brandeburg@intel.com>2009-04-17 16:44:27 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-20 05:00:37 -0400
commit5438646724c34c2180664a57f862a1da8dd21db1 (patch)
tree37a5dced3dd45c5cedd5752490649212b12e1220 /drivers/net/ixgbe/ixgbe_main.c
parent3ef8e4e9e4d18910cd03dcd481a5dced437b83cf (diff)
ixgbe: fix link down initial state
As reported by Andrew Lutomirski <amluto@gmail.com> All the intel wired ethernet drivers were calling netif_carrier_off and netif_stop_queue (or variants) before calling register_netdevice This is incorrect behavior as was pointed out by davem, and causes ifconfig and friends to report a strange state before first link after the driver was loaded, since without a netif_carrier_off, the stack assumes carrier_on, but before register_netdev, netlink messages are not sent out telling link state. This apparently confused *some* versions of networkmanager. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Reported-by: Andrew Lutomirski <amluto@gmail.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 0d9a3ac043a6..d5d9589ae086 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -3459,6 +3459,8 @@ static int ixgbe_open(struct net_device *netdev)
3459 if (test_bit(__IXGBE_TESTING, &adapter->state)) 3459 if (test_bit(__IXGBE_TESTING, &adapter->state))
3460 return -EBUSY; 3460 return -EBUSY;
3461 3461
3462 netif_carrier_off(netdev);
3463
3462 /* allocate transmit descriptors */ 3464 /* allocate transmit descriptors */
3463 err = ixgbe_setup_all_tx_resources(adapter); 3465 err = ixgbe_setup_all_tx_resources(adapter);
3464 if (err) 3466 if (err)
@@ -4772,13 +4774,14 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
4772 /* reset the hardware with the new settings */ 4774 /* reset the hardware with the new settings */
4773 hw->mac.ops.start_hw(hw); 4775 hw->mac.ops.start_hw(hw);
4774 4776
4775 netif_carrier_off(netdev);
4776
4777 strcpy(netdev->name, "eth%d"); 4777 strcpy(netdev->name, "eth%d");
4778 err = register_netdev(netdev); 4778 err = register_netdev(netdev);
4779 if (err) 4779 if (err)
4780 goto err_register; 4780 goto err_register;
4781 4781
4782 /* carrier off reporting is important to ethtool even BEFORE open */
4783 netif_carrier_off(netdev);
4784
4782#ifdef CONFIG_IXGBE_DCA 4785#ifdef CONFIG_IXGBE_DCA
4783 if (dca_add_requester(&pdev->dev) == 0) { 4786 if (dca_add_requester(&pdev->dev) == 0) {
4784 adapter->flags |= IXGBE_FLAG_DCA_ENABLED; 4787 adapter->flags |= IXGBE_FLAG_DCA_ENABLED;