aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index e8aad76fa530..e5a4eb62b27c 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -804,13 +804,13 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_q_vector *q_vector,
804 struct ixgbe_tx_buffer *tx_buffer; 804 struct ixgbe_tx_buffer *tx_buffer;
805 union ixgbe_adv_tx_desc *tx_desc; 805 union ixgbe_adv_tx_desc *tx_desc;
806 unsigned int total_bytes = 0, total_packets = 0; 806 unsigned int total_bytes = 0, total_packets = 0;
807 u16 budget = q_vector->tx.work_limit;
807 u16 i = tx_ring->next_to_clean; 808 u16 i = tx_ring->next_to_clean;
808 u16 count;
809 809
810 tx_buffer = &tx_ring->tx_buffer_info[i]; 810 tx_buffer = &tx_ring->tx_buffer_info[i];
811 tx_desc = IXGBE_TX_DESC_ADV(tx_ring, i); 811 tx_desc = IXGBE_TX_DESC_ADV(tx_ring, i);
812 812
813 for (count = 0; count < q_vector->tx.work_limit; count++) { 813 for (; budget; budget--) {
814 union ixgbe_adv_tx_desc *eop_desc = tx_buffer->next_to_watch; 814 union ixgbe_adv_tx_desc *eop_desc = tx_buffer->next_to_watch;
815 815
816 /* if next_to_watch is not set then there is no work pending */ 816 /* if next_to_watch is not set then there is no work pending */
@@ -891,11 +891,11 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_q_vector *q_vector,
891 ixgbe_tx_timeout_reset(adapter); 891 ixgbe_tx_timeout_reset(adapter);
892 892
893 /* the adapter is about to reset, no point in enabling stuff */ 893 /* the adapter is about to reset, no point in enabling stuff */
894 return true; 894 return budget;
895 } 895 }
896 896
897#define TX_WAKE_THRESHOLD (DESC_NEEDED * 2) 897#define TX_WAKE_THRESHOLD (DESC_NEEDED * 2)
898 if (unlikely(count && netif_carrier_ok(tx_ring->netdev) && 898 if (unlikely(total_packets && netif_carrier_ok(tx_ring->netdev) &&
899 (ixgbe_desc_unused(tx_ring) >= TX_WAKE_THRESHOLD))) { 899 (ixgbe_desc_unused(tx_ring) >= TX_WAKE_THRESHOLD))) {
900 /* Make sure that anybody stopping the queue after this 900 /* Make sure that anybody stopping the queue after this
901 * sees the new next_to_clean. 901 * sees the new next_to_clean.
@@ -908,7 +908,7 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_q_vector *q_vector,
908 } 908 }
909 } 909 }
910 910
911 return count < q_vector->tx.work_limit; 911 return budget;
912} 912}
913 913
914#ifdef CONFIG_IXGBE_DCA 914#ifdef CONFIG_IXGBE_DCA