diff options
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_txrx.c')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_txrx.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c index 366624a51229..4bf49d2acb04 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c | |||
@@ -607,6 +607,7 @@ static u32 i40e_get_tx_pending(struct i40e_ring *ring) | |||
607 | static bool i40e_check_tx_hang(struct i40e_ring *tx_ring) | 607 | static bool i40e_check_tx_hang(struct i40e_ring *tx_ring) |
608 | { | 608 | { |
609 | u32 tx_pending = i40e_get_tx_pending(tx_ring); | 609 | u32 tx_pending = i40e_get_tx_pending(tx_ring); |
610 | struct i40e_pf *pf = tx_ring->vsi->back; | ||
610 | bool ret = false; | 611 | bool ret = false; |
611 | 612 | ||
612 | clear_check_for_tx_hang(tx_ring); | 613 | clear_check_for_tx_hang(tx_ring); |
@@ -623,10 +624,17 @@ static bool i40e_check_tx_hang(struct i40e_ring *tx_ring) | |||
623 | * pending but without time to complete it yet. | 624 | * pending but without time to complete it yet. |
624 | */ | 625 | */ |
625 | if ((tx_ring->tx_stats.tx_done_old == tx_ring->stats.packets) && | 626 | if ((tx_ring->tx_stats.tx_done_old == tx_ring->stats.packets) && |
626 | tx_pending) { | 627 | (tx_pending >= I40E_MIN_DESC_PENDING)) { |
627 | /* make sure it is true for two checks in a row */ | 628 | /* make sure it is true for two checks in a row */ |
628 | ret = test_and_set_bit(__I40E_HANG_CHECK_ARMED, | 629 | ret = test_and_set_bit(__I40E_HANG_CHECK_ARMED, |
629 | &tx_ring->state); | 630 | &tx_ring->state); |
631 | } else if ((tx_ring->tx_stats.tx_done_old == tx_ring->stats.packets) && | ||
632 | (tx_pending < I40E_MIN_DESC_PENDING) && | ||
633 | (tx_pending > 0)) { | ||
634 | if (I40E_DEBUG_FLOW & pf->hw.debug_mask) | ||
635 | dev_info(tx_ring->dev, "HW needs some more descs to do a cacheline flush. tx_pending %d, queue %d", | ||
636 | tx_pending, tx_ring->queue_index); | ||
637 | pf->tx_sluggish_count++; | ||
630 | } else { | 638 | } else { |
631 | /* update completed stats and disarm the hang check */ | 639 | /* update completed stats and disarm the hang check */ |
632 | tx_ring->tx_stats.tx_done_old = tx_ring->stats.packets; | 640 | tx_ring->tx_stats.tx_done_old = tx_ring->stats.packets; |