]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
bnx2x: remove not necessary compiler barrier
authorStanislaw Gruszka <sgruszka@redhat.com>
Tue, 9 Mar 2010 06:55:01 +0000 (06:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Mar 2010 22:47:00 +0000 (15:47 -0700)
Access to fp->tx_bd_prod is protected by __netif_tx_lock, so we do not
need any barrier for that.

Update of fp->tx_bd_cons in bnx2x_tx_int() is not protected by lock, but
barrier() nor smb_mb() in bnx2x_tx_avail() not guarantee we will see
values that is written on other cpu. Ordering issues between
netif_tx_stop_queue(), netif_tx_queue_stopped(), fp->tx_bd_cons = bd_cons
and bnx2x_tx_avail() are already handled by smp_mb() in bnx2x_tx_int()
and bnx2x_start_xmit().

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bnx2x_main.c

index 9fc0f6a7a5e9c0c571904a4e5608f3c3eca13a13..ae62b67aa597bf163d9a006690c96ecac69f3a4a 100644 (file)
@@ -893,7 +893,6 @@ static inline u16 bnx2x_tx_avail(struct bnx2x_fastpath *fp)
        u16 prod;
        u16 cons;
 
-       barrier(); /* Tell compiler that prod and cons can change */
        prod = fp->tx_bd_prod;
        cons = fp->tx_bd_cons;