Message ID | 1268153703-4186-1-git-send-email-sgruszka@redhat.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
On Tue, 2010-03-09 at 08:55 -0800, Stanislaw Gruszka wrote: > 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> Singed-of-by: Eilon Greenstein <eilong@broadcom.com> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: "Eilon Greenstein" <eilong@broadcom.com> Date: Wed, 10 Mar 2010 17:59:44 +0200 > On Tue, 2010-03-09 at 08:55 -0800, Stanislaw Gruszka wrote: >> 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> > Singed-of-by: Eilon Greenstein <eilong@broadcom.com> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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))) {
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(-)