All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] r8169: use correct barrier between cacheable and non-cacheable memory
@ 2010-03-04  2:33 David Dillow
  2010-03-04  8:40 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: David Dillow @ 2010-03-04  2:33 UTC (permalink / raw)
  To: netdev; +Cc: Francois Romieu, Paul Mackerras, Catalin Marinas

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>
---
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index dfc3573..9d3ebf3 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -4270,7 +4270,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 */
 
@@ -4621,7 +4621,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);
 	}
 



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] r8169: use correct barrier between cacheable and non-cacheable memory
  2010-03-04  2:33 [PATCH] r8169: use correct barrier between cacheable and non-cacheable memory David Dillow
@ 2010-03-04  8:40 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-03-04  8:40 UTC (permalink / raw)
  To: dave; +Cc: netdev, romieu, paulus, catalin.marinas

From: David Dillow <dave@thedillows.org>
Date: Wed, 03 Mar 2010 21:33:10 -0500

> 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>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-04  8:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-04  2:33 [PATCH] r8169: use correct barrier between cacheable and non-cacheable memory David Dillow
2010-03-04  8:40 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.