b43-dev.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] b43: Add RX side DMA memory barrier
@ 2011-07-04 17:51 Michael Büsch
  0 siblings, 0 replies; only message in thread
From: Michael Büsch @ 2011-07-04 17:51 UTC (permalink / raw)
  To: b43-dev

This adds a memory barrier to ensure the writes to the ring memory
are committed before the DMA ring pointer is updated.
We do a similar thing on the TX side already.

Signed-off-by: Michael Buesch <m@bues.ch>

---

There's no bug report or known breakage (as far as I know) on this,
so no CC to stable.


Index: linux-2.6.39/drivers/net/wireless/b43/dma.c
===================================================================
--- linux-2.6.39.orig/drivers/net/wireless/b43/dma.c	2011-05-19 06:06:34.000000000 +0200
+++ linux-2.6.39/drivers/net/wireless/b43/dma.c	2011-07-04 17:24:56.327210182 +0200
@@ -1599,6 +1599,7 @@ void b43_dma_rx(struct b43_dmaring *ring
 		dma_rx(ring, &slot);
 		update_max_used_slots(ring, ++used_slots);
 	}
+	wmb();
 	ops->set_current_rxslot(ring, slot);
 	ring->current_slot = slot;
 }


-- 
Greetings, Michael.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-07-04 17:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-04 17:51 [PATCH] b43: Add RX side DMA memory barrier Michael Büsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).