aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDavid Dillow <dave@thedillows.org>2010-03-03 11:33:10 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-12 18:02:51 -0400
commit669eda1d13d3ad19f10a05b22f7e07e413508b58 (patch)
treebb73600b225362d951596bfa732cf9e24c9e4642 /drivers/net
parent4c001c0bb68a1672bd85f08f44a3901a5e0382a7 (diff)
r8169: use correct barrier between cacheable and non-cacheable memory
commit 4c020a961a812ffae9846b917304cea504c3a733 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: David Dillow <dave@thedillows.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/r8169.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 3db85daa3671..f65bb69a086b 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -4316,7 +4316,7 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
4316 4316
4317 tp->cur_tx += frags + 1; 4317 tp->cur_tx += frags + 1;
4318 4318
4319 smp_wmb(); 4319 wmb();
4320 4320
4321 RTL_W8(TxPoll, NPQ); /* set polling bit */ 4321 RTL_W8(TxPoll, NPQ); /* set polling bit */
4322 4322
@@ -4675,7 +4675,7 @@ static int rtl8169_poll(struct napi_struct *napi, int budget)
4675 * until it does. 4675 * until it does.
4676 */ 4676 */
4677 tp->intr_mask = 0xffff; 4677 tp->intr_mask = 0xffff;
4678 smp_wmb(); 4678 wmb();
4679 RTL_W16(IntrMask, tp->intr_event); 4679 RTL_W16(IntrMask, tp->intr_event);
4680 } 4680 }
4681 4681