aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2012-02-08 02:49:23 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-03-12 23:26:27 -0400
commit7f83a9e6292b49d1540f82f295ac8710ba562c5f (patch)
tree3d5292d14d37792b8bc14b2bd40ffb7af07ce7a2 /drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
parentb37c0fbe3f6dfba1f8ad2aed47fb40578a254635 (diff)
ixgbe: Do no clear Tx status bits since eop_desc provides enough info
There isn't any need to clear the status bits in the descriptors due to the fact that the eop_desc provides enough information for us to know that we have cleaned to the last packet that the software has put on the ring. The status bits are cleared as a part of putting the frame on the ring so as long as we do not read the descriptor bit prior to reading the value eop_desc we should be able to guarantee that we will not clean beyond the end of the current data stream. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 060964378e58..a2c14bfd4b3f 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -763,6 +763,9 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_q_vector *q_vector,
763 if (!eop_desc) 763 if (!eop_desc)
764 break; 764 break;
765 765
766 /* prevent any other reads prior to eop_desc */
767 rmb();
768
766 /* if DD is not set pending work has not been completed */ 769 /* if DD is not set pending work has not been completed */
767 if (!(eop_desc->wb.status & cpu_to_le32(IXGBE_TXD_STAT_DD))) 770 if (!(eop_desc->wb.status & cpu_to_le32(IXGBE_TXD_STAT_DD)))
768 break; 771 break;
@@ -773,12 +776,8 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_q_vector *q_vector,
773 /* clear next_to_watch to prevent false hangs */ 776 /* clear next_to_watch to prevent false hangs */
774 tx_buffer->next_to_watch = NULL; 777 tx_buffer->next_to_watch = NULL;
775 778
776 /* prevent any other reads prior to eop_desc being verified */
777 rmb();
778
779 do { 779 do {
780 ixgbe_unmap_tx_resource(tx_ring, tx_buffer); 780 ixgbe_unmap_tx_resource(tx_ring, tx_buffer);
781 tx_desc->wb.status = 0;
782 if (likely(tx_desc == eop_desc)) { 781 if (likely(tx_desc == eop_desc)) {
783 eop_desc = NULL; 782 eop_desc = NULL;
784 dev_kfree_skb_any(tx_buffer->skb); 783 dev_kfree_skb_any(tx_buffer->skb);