Skip to content

Commit

Permalink
gianfar: Don't needlessly set the wrap bit for the last RX BD
Browse files Browse the repository at this point in the history
startup_gfar() sets the wrap bit for the last rxbd just after
gfar_new_rxbdp() call, which is issued for all rxbds. And
gfar_new_rxbdp() has the following check already:

	if (bdp == priv->rx_bd_base + priv->rx_ring_size - 1)
		lstatus |= BD_LFLAG(RXBD_WRAP);

So we don't need to set the bit again.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Anton Vorontsov authored and David S. Miller committed Oct 13, 2009
1 parent e69edd2 commit 1423117
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/net/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -1028,10 +1028,6 @@ int startup_gfar(struct net_device *ndev)
rxbdp++;
}

/* Set the last descriptor in the ring to wrap */
rxbdp--;
rxbdp->status |= RXBD_WRAP;

/* If the device has multiple interrupts, register for
* them. Otherwise, only register for the one */
if (priv->device_flags & FSL_GIANFAR_DEV_HAS_MULTI_INTR) {
Expand Down

0 comments on commit 1423117

Please sign in to comment.