aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Brandeburg <jesse.brandeburg@intel.com>2009-04-17 16:44:29 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-20 05:00:38 -0400
commit3a6d1bc4163fee27c312184d5f1a9cc1e110d300 (patch)
treebc8fc191ed4903b113f4aad58b5504b36df4b5e8
parent5438646724c34c2180664a57f862a1da8dd21db1 (diff)
ixgb: 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. in addition this driver appeared to need a netif_start_queue at the end of open. 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>
-rw-r--r--drivers/net/ixgb/ixgb_main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index 4a0826b8f6f2..ff741ca110f5 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -471,10 +471,8 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
471 if (err) 471 if (err)
472 goto err_register; 472 goto err_register;
473 473
474 /* we're going to reset, so assume we have no link for now */ 474 /* carrier off reporting is important to ethtool even BEFORE open */
475
476 netif_carrier_off(netdev); 475 netif_carrier_off(netdev);
477 netif_stop_queue(netdev);
478 476
479 DPRINTK(PROBE, INFO, "Intel(R) PRO/10GbE Network Connection\n"); 477 DPRINTK(PROBE, INFO, "Intel(R) PRO/10GbE Network Connection\n");
480 ixgb_check_options(adapter); 478 ixgb_check_options(adapter);
@@ -592,6 +590,8 @@ ixgb_open(struct net_device *netdev)
592 if (err) 590 if (err)
593 goto err_setup_tx; 591 goto err_setup_tx;
594 592
593 netif_carrier_off(netdev);
594
595 /* allocate receive descriptors */ 595 /* allocate receive descriptors */
596 596
597 err = ixgb_setup_rx_resources(adapter); 597 err = ixgb_setup_rx_resources(adapter);
@@ -602,6 +602,8 @@ ixgb_open(struct net_device *netdev)
602 if (err) 602 if (err)
603 goto err_up; 603 goto err_up;
604 604
605 netif_start_queue(netdev);
606
605 return 0; 607 return 0;
606 608
607err_up: 609err_up: