Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Risto Suominen <Risto.Suominen@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Risto Suominen and committed by
David S. Miller
b991d2bc cfbf84fc

+2 -1
+2 -1
drivers/net/tulip/de2104x.c
··· 464 464 drop = 1; 465 465 466 466 rx_next: 467 - de->rx_ring[rx_tail].opts1 = cpu_to_le32(DescOwn); 468 467 if (rx_tail == (DE_RX_RING_SIZE - 1)) 469 468 de->rx_ring[rx_tail].opts2 = 470 469 cpu_to_le32(RingEnd | de->rx_buf_sz); 471 470 else 472 471 de->rx_ring[rx_tail].opts2 = cpu_to_le32(de->rx_buf_sz); 473 472 de->rx_ring[rx_tail].addr1 = cpu_to_le32(mapping); 473 + wmb(); 474 + de->rx_ring[rx_tail].opts1 = cpu_to_le32(DescOwn); 474 475 rx_tail = NEXT_RX(rx_tail); 475 476 } 476 477