Commit 5a99bfde authored by François Romieu's avatar François Romieu Committed by Jeff Garzik

[netdrvr r8169] Barrier against compiler optimization.

parent b4bf4278
......@@ -1369,6 +1369,7 @@ rtl8169_tx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
while (tx_left > 0) {
int entry = dirty_tx % NUM_TX_DESC;
rmb();
if (!(le32_to_cpu(tp->TxDescArray[entry].status) & OWNbit)) {
struct sk_buff *skb = tp->Tx_skbuff[entry];
......@@ -1430,7 +1431,10 @@ rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
while (rx_left > 0) {
int entry = cur_rx % NUM_RX_DESC;
u32 status = le32_to_cpu(tp->RxDescArray[entry].status);
u32 status;
rmb();
status = le32_to_cpu(tp->RxDescArray[entry].status);
if (status & OWNbit)
break;
......
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