aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
authorJohn Fastabend <john.r.fastabend@intel.com>2010-05-18 12:00:10 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-18 22:44:19 -0400
commit7483d9ddaf8a68a055bf3f14b5cff2e16c0469ff (patch)
tree95e02756181599d1fb1d4ccbfab61eef99e13c8a /drivers/net/ixgbe/ixgbe_main.c
parent38e0bd9898e5d04d464e92973785a26e774f5430 (diff)
ixgbe: fix ixgbe_tx_is_paused logic
The TFCS bits show the current XON state. Meaning that the device is paused if these bits are 0. This fixes the logic to work as it was intended. Signed-off-by: John Fastabend <john.r.fastabend@intel.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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index f0f7329ea357..d80bb1a77ecb 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -625,16 +625,16 @@ static void ixgbe_unmap_and_free_tx_resource(struct ixgbe_adapter *adapter,
625} 625}
626 626
627/** 627/**
628 * ixgbe_tx_is_paused - check if the tx ring is paused 628 * ixgbe_tx_xon_state - check the tx ring xon state
629 * @adapter: the ixgbe adapter 629 * @adapter: the ixgbe adapter
630 * @tx_ring: the corresponding tx_ring 630 * @tx_ring: the corresponding tx_ring
631 * 631 *
632 * If not in DCB mode, checks TFCS.TXOFF, otherwise, find out the 632 * If not in DCB mode, checks TFCS.TXOFF, otherwise, find out the
633 * corresponding TC of this tx_ring when checking TFCS. 633 * corresponding TC of this tx_ring when checking TFCS.
634 * 634 *
635 * Returns : true if paused 635 * Returns : true if in xon state (currently not paused)
636 */ 636 */
637static inline bool ixgbe_tx_is_paused(struct ixgbe_adapter *adapter, 637static inline bool ixgbe_tx_xon_state(struct ixgbe_adapter *adapter,
638 struct ixgbe_ring *tx_ring) 638 struct ixgbe_ring *tx_ring)
639{ 639{
640 u32 txoff = IXGBE_TFCS_TXOFF; 640 u32 txoff = IXGBE_TFCS_TXOFF;
@@ -690,7 +690,7 @@ static inline bool ixgbe_check_tx_hang(struct ixgbe_adapter *adapter,
690 adapter->detect_tx_hung = false; 690 adapter->detect_tx_hung = false;
691 if (tx_ring->tx_buffer_info[eop].time_stamp && 691 if (tx_ring->tx_buffer_info[eop].time_stamp &&
692 time_after(jiffies, tx_ring->tx_buffer_info[eop].time_stamp + HZ) && 692 time_after(jiffies, tx_ring->tx_buffer_info[eop].time_stamp + HZ) &&
693 !ixgbe_tx_is_paused(adapter, tx_ring)) { 693 ixgbe_tx_xon_state(adapter, tx_ring)) {
694 /* detected Tx unit hang */ 694 /* detected Tx unit hang */
695 union ixgbe_adv_tx_desc *tx_desc; 695 union ixgbe_adv_tx_desc *tx_desc;
696 tx_desc = IXGBE_TX_DESC_ADV(*tx_ring, eop); 696 tx_desc = IXGBE_TX_DESC_ADV(*tx_ring, eop);