This is a note to let you know that I've just added the patch titled

    net: Fix issue with netdev_tx_reset_queue not resetting queue from XOFF 
state

to the 3.3-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     
net-fix-issue-with-netdev_tx_reset_queue-not-resetting-queue-from-xoff-state.patch
and it can be found in the queue-3.3 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From b64e540a89b568ceaa12f982a21789bedc00c88a Mon Sep 17 00:00:00 2001
From: Alexander Duyck <[email protected]>
Date: Tue, 7 Feb 2012 02:29:01 +0000
Subject: net: Fix issue with netdev_tx_reset_queue not resetting queue from 
XOFF state


From: Alexander Duyck <[email protected]>

[ Upstream commit 5c4903549c05bbb373479e0ce2992573c120654a ]

We are seeing dev_watchdog hangs on several drivers.  I suspect this is due
to the __QUEUE_STATE_STACK_XOFF bit being set prior to a reset for link
change, and then not being cleared by netdev_tx_reset_queue.  This change
corrects that.

In addition we were seeing dev_watchdog hangs on igb after running the
ethtool tests.  We found this to be due to the fact that the ethtool test
runs the same logic as ndo_start_xmit, but we were never clearing the XOFF
flag since the loopback test in ethtool does not do byte queue accounting.

Signed-off-by: Alexander Duyck <[email protected]>
Tested-by: Stephen Ko <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 drivers/net/ethernet/intel/igb/igb_main.c |    3 ++-
 include/linux/netdevice.h                 |    1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -2750,6 +2750,8 @@ void igb_configure_tx_ring(struct igb_ad
 
        txdctl |= E1000_TXDCTL_QUEUE_ENABLE;
        wr32(E1000_TXDCTL(reg_idx), txdctl);
+
+       netdev_tx_reset_queue(txring_txq(ring));
 }
 
 /**
@@ -3242,7 +3244,6 @@ static void igb_clean_tx_ring(struct igb
                buffer_info = &tx_ring->tx_buffer_info[i];
                igb_unmap_and_free_tx_resource(tx_ring, buffer_info);
        }
-       netdev_tx_reset_queue(txring_txq(tx_ring));
 
        size = sizeof(struct igb_tx_buffer) * tx_ring->count;
        memset(tx_ring->tx_buffer_info, 0, size);
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1955,6 +1955,7 @@ static inline void netdev_completed_queu
 static inline void netdev_tx_reset_queue(struct netdev_queue *q)
 {
 #ifdef CONFIG_BQL
+       clear_bit(__QUEUE_STATE_STACK_XOFF, &q->state);
        dql_reset(&q->dql);
 #endif
 }


Patches currently in stable-queue which might be from 
[email protected] are

queue-3.3/net-add-memory-barriers-to-prevent-possible-race-in-byte-queue-limits.patch
queue-3.3/net-fix-issue-with-netdev_tx_reset_queue-not-resetting-queue-from-xoff-state.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to