Commit 0c03e80e authored by David Dillow's avatar David Dillow Committed by Greg Kroah-Hartman

r8169: use correct barrier between cacheable and non-cacheable memory

commit 4c020a96 upstream.

r8169 needs certain writes to be visible to other CPUs or the NIC before
touching the hardware, but was using smp_wmb() which is only required to
order cacheable memory access. Switch to wmb() which is required to
order both cacheable and non-cacheable memory.

Noticed by Catalin Marinas and Paul Mackerras.
Signed-off-by: default avatarDavid Dillow <dave@thedillows.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 150d8a1f
......@@ -4316,7 +4316,7 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
tp->cur_tx += frags + 1;
smp_wmb();
wmb();
RTL_W8(TxPoll, NPQ); /* set polling bit */
......@@ -4676,7 +4676,7 @@ static int rtl8169_poll(struct napi_struct *napi, int budget)
* until it does.
*/
tp->intr_mask = 0xffff;
smp_wmb();
wmb();
RTL_W16(IntrMask, tp->intr_event);
}
......
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