Commit b991d2bc authored by Risto Suominen's avatar Risto Suominen Committed by David S. Miller

de2104x: force correct order when writing to rx ring

DescOwn should not be set, thus allowing the chip to use the
descriptor, before everything else is set up correctly.
Signed-off-by: default avatarRisto Suominen <Risto.Suominen@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cfbf84fc
...@@ -464,13 +464,14 @@ static void de_rx (struct de_private *de) ...@@ -464,13 +464,14 @@ static void de_rx (struct de_private *de)
drop = 1; drop = 1;
rx_next: rx_next:
de->rx_ring[rx_tail].opts1 = cpu_to_le32(DescOwn);
if (rx_tail == (DE_RX_RING_SIZE - 1)) if (rx_tail == (DE_RX_RING_SIZE - 1))
de->rx_ring[rx_tail].opts2 = de->rx_ring[rx_tail].opts2 =
cpu_to_le32(RingEnd | de->rx_buf_sz); cpu_to_le32(RingEnd | de->rx_buf_sz);
else else
de->rx_ring[rx_tail].opts2 = cpu_to_le32(de->rx_buf_sz); de->rx_ring[rx_tail].opts2 = cpu_to_le32(de->rx_buf_sz);
de->rx_ring[rx_tail].addr1 = cpu_to_le32(mapping); 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); rx_tail = NEXT_RX(rx_tail);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment