Skip to content

Commit

Permalink
de2104x: force correct order when writing to rx ring
Browse files Browse the repository at this point in the history
DescOwn should not be set, thus allowing the chip to use the
descriptor, before everything else is set up correctly.

Signed-off-by: Risto Suominen <Risto.Suominen@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Risto Suominen authored and David S. Miller committed Feb 9, 2009
1 parent cfbf84f commit b991d2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/tulip/de2104x.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,13 +464,14 @@ static void de_rx (struct de_private *de)
drop = 1;

rx_next:
de->rx_ring[rx_tail].opts1 = cpu_to_le32(DescOwn);
if (rx_tail == (DE_RX_RING_SIZE - 1))
de->rx_ring[rx_tail].opts2 =
cpu_to_le32(RingEnd | de->rx_buf_sz);
else
de->rx_ring[rx_tail].opts2 = cpu_to_le32(de->rx_buf_sz);
de->rx_ring[rx_tail].addr1 = cpu_to_le32(mapping);
wmb();
de->rx_ring[rx_tail].opts1 = cpu_to_le32(DescOwn);
rx_tail = NEXT_RX(rx_tail);
}

Expand Down

0 comments on commit b991d2b

Please sign in to comment.