Skip to content

Commit

Permalink
bnx2x: use smp_mb() to keep ordering of read write operations
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Stanislaw Gruszka authored and David S. Miller committed Mar 15, 2010
1 parent d4a2ac3 commit 2d99cf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))) {
Expand Down

0 comments on commit 2d99cf1

Please sign in to comment.