]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ixgbe: Fix usage of netif_*_all_queues() with netif_carrier_{off|on}()
authorPJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
Fri, 7 Nov 2008 12:16:08 +0000 (12:16 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 16 Nov 2008 08:31:35 +0000 (00:31 -0800)
netif_carrier_off() is sufficient to stop Tx into the driver.  Stopping the Tx
queues is redundant and unnecessary.  By the same token, netif_carrier_on()
will be sufficient to re-enable Tx, so waking the queues is unnecessary.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ixgbe/ixgbe_main.c

index ae06d48e9ebbbf3caeed3a3d9b0448f65b52995f..d1f80dd88bc9ff572812f52e190d249fd1949b4f 100644 (file)
@@ -1997,6 +1997,9 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter)
 
        ixgbe_irq_enable(adapter);
 
+       /* enable transmits */
+       netif_tx_start_all_queues(netdev);
+
        /* bring the link up in the watchdog, this could race with our first
         * link up interrupt but shouldn't be a problem */
        adapter->flags |= IXGBE_FLAG_NEED_LINK_UPDATE;
@@ -3247,7 +3250,6 @@ static void ixgbe_watchdog_task(struct work_struct *work)
                                 (FLOW_TX ? "TX" : "None"))));
 
                        netif_carrier_on(netdev);
-                       netif_tx_wake_all_queues(netdev);
                } else {
                        /* Force detection of hung controller */
                        adapter->detect_tx_hung = true;
@@ -3258,7 +3260,6 @@ static void ixgbe_watchdog_task(struct work_struct *work)
                if (netif_carrier_ok(netdev)) {
                        DPRINTK(LINK, INFO, "NIC Link is Down\n");
                        netif_carrier_off(netdev);
-                       netif_tx_stop_all_queues(netdev);
                }
        }
 
@@ -3943,7 +3944,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
        }
 
        netif_carrier_off(netdev);
-       netif_tx_stop_all_queues(netdev);
 
        ixgbe_napi_add_all(adapter);