diff options
author | Jesse Brandeburg <jesse.brandeburg@intel.com> | 2008-07-09 00:51:07 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-07-11 07:20:26 +0200 |
commit | 0f8ecbadae4bd9f085e605c08347ed3077a6146f (patch) | |
tree | 7b315dc9d51bf729056c977593c322b33c271ae9 /drivers/net/ixgb | |
parent | ucc_geth: delete non NAPI code from the driver. (diff) | |
download | linux-0f8ecbadae4bd9f085e605c08347ed3077a6146f.tar.xz linux-0f8ecbadae4bd9f085e605c08347ed3077a6146f.zip |
ixgb: maybe stop tx port missed a piece
back when maybe stop tx was added to the ixgb driver some mistakes
were made and the driver
a) didn't remove the tx lock, which is now un-necessary
b) didn't change the restart code to be compliant with maybe_stop
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/ixgb')
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index 41f3adf5f375..04cac41f7d5e 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c @@ -1855,12 +1855,17 @@ ixgb_clean_tx_irq(struct ixgb_adapter *adapter) tx_ring->next_to_clean = i; - if (unlikely(netif_queue_stopped(netdev))) { - spin_lock(&adapter->tx_lock); - if (netif_queue_stopped(netdev) && netif_carrier_ok(netdev) && - (IXGB_DESC_UNUSED(tx_ring) >= DESC_NEEDED)) + if (unlikely(cleaned && netif_carrier_ok(netdev) && + IXGB_DESC_UNUSED(tx_ring) >= DESC_NEEDED)) { + /* Make sure that anybody stopping the queue after this + * sees the new next_to_clean. */ + smp_mb(); + + if (netif_queue_stopped(netdev) && + !(test_bit(__IXGB_DOWN, &adapter->flags))) { netif_wake_queue(netdev); - spin_unlock(&adapter->tx_lock); + ++adapter->restart_queue; + } } if(adapter->detect_tx_hung) { |