Skip to content

Commit

Permalink
ixgbevf: Do not rewind the Rx ring before bumping tail
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Duyck authored and Jeff Kirsher committed Jul 18, 2012
1 parent 5d9a533 commit 18c6308
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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));
}
}

Expand Down

0 comments on commit 18c6308

Please sign in to comment.