netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] bnx2x: use smp_mb() to keep ordering of read write operations
@ 2010-03-09 16:55 Stanislaw Gruszka
  2010-03-09 16:55 ` [PATCH 2/4] bnx2x: remove not necessary compiler barrier Stanislaw Gruszka
  2010-03-10 15:59 ` [PATCH 1/4] bnx2x: use smp_mb() to keep ordering of read write operations Eilon Greenstein
  0 siblings, 2 replies; 11+ messages in thread
From: Stanislaw Gruszka @ 2010-03-09 16:55 UTC (permalink / raw)
  To: netdev
  Cc: Vladislav Zolotarov, Eilon Greenstein, Michael Chan,
	Stanislaw Gruszka

Since we want to keep ordering of write to fp->bd_tx_cons and
netif_tx_queue_stopped(txq), what is read of txq->state, we have to use
general memory barrier.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/bnx2x_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index ed785a3..9fc0f6a 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -963,7 +963,7 @@ static int bnx2x_tx_int(struct bnx2x_fastpath *fp)
 	 * start_xmit() will miss it and cause the queue to be stopped
 	 * forever.
 	 */
-	smp_wmb();
+	smp_mb();
 
 	/* TBD need a thresh? */
 	if (unlikely(netif_tx_queue_stopped(txq))) {
-- 
1.6.2.5


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

end of thread, other threads:[~2010-03-15 22:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-09 16:55 [PATCH 1/4] bnx2x: use smp_mb() to keep ordering of read write operations Stanislaw Gruszka
2010-03-09 16:55 ` [PATCH 2/4] bnx2x: remove not necessary compiler barrier Stanislaw Gruszka
2010-03-09 16:55   ` [PATCH 3/4] bnx2x: change smp_mb() comment to conform the true Stanislaw Gruszka
2010-03-09 16:55     ` [PATCH 4/4] bnx2x: merge common code when stopping queue Stanislaw Gruszka
2010-03-10 16:02       ` Eilon Greenstein
2010-03-10 16:01     ` [PATCH 3/4] bnx2x: change smp_mb() comment to conform the true Eilon Greenstein
2010-03-15 22:47       ` David Miller
2010-03-10 16:00   ` [PATCH 2/4] bnx2x: remove not necessary compiler barrier Eilon Greenstein
2010-03-15 22:47     ` David Miller
2010-03-10 15:59 ` [PATCH 1/4] bnx2x: use smp_mb() to keep ordering of read write operations Eilon Greenstein
2010-03-15 22:47   ` David Miller

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