summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2012-05-11 08:33:11 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-07-18 13:12:08 -0700
commit18c6308971028cc02838adc711c556d992ad8bdf (patch)
tree45b789d521f39e78c7311b1fd33aedc91717a301
parent5d9a533bacff6fbaf711c92575f5f646c2c772f1 (diff)
downloadlinux-3.10-18c6308971028cc02838adc711c556d992ad8bdf.tar.gz
linux-3.10-18c6308971028cc02838adc711c556d992ad8bdf.tar.bz2
linux-3.10-18c6308971028cc02838adc711c556d992ad8bdf.zip
ixgbevf: Do not rewind the Rx ring before bumping tail
The driver is going back one step from its' previous location before bumping tail. This is incorrect. We should just be writing the value of next_to_use into the tail register. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index b88218c7f60..c27ce447e04 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -375,8 +375,6 @@ static void ixgbevf_alloc_rx_buffers(struct ixgbevf_adapter *adapter,
no_buffers:
if (rx_ring->next_to_use != i) {
rx_ring->next_to_use = i;
- if (i-- == 0)
- i = (rx_ring->count - 1);
ixgbevf_release_rx_desc(&adapter->hw, rx_ring, i);
}
@@ -1240,9 +1238,8 @@ static void ixgbevf_configure(struct ixgbevf_adapter *adapter)
ixgbevf_configure_rx(adapter);
for (i = 0; i < adapter->num_rx_queues; i++) {
struct ixgbevf_ring *ring = &adapter->rx_ring[i];
- ixgbevf_alloc_rx_buffers(adapter, ring, ring->count);
- ring->next_to_use = ring->count - 1;
- writel(ring->next_to_use, adapter->hw.hw_addr + ring->tail);
+ ixgbevf_alloc_rx_buffers(adapter, ring,
+ IXGBE_DESC_UNUSED(ring));
}
}