summaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x.h
diff options
context:
space:
mode:
authorEilon Greenstein <eilong@broadcom.com>2009-01-14 06:42:44 +0000
committerDavid S. Miller <davem@davemloft.net>2009-01-19 16:20:14 -0800
commit237907c1ded8a1a447cea7c4f97ab853e8b46052 (patch)
treeabe06a24be466869f8252a3b8e80aa0bc9637ef6 /drivers/net/bnx2x.h
parente47d7e6eb841c1850f0e69b95ae6cf3c86881f53 (diff)
downloadop-kernel-dev-237907c1ded8a1a447cea7c4f97ab853e8b46052.zip
op-kernel-dev-237907c1ded8a1a447cea7c4f97ab853e8b46052.tar.gz
bnx2x: Barriers for the compiler
To make sure no swapping are made by the compiler, changed HAS_WORK to inline functions and added all the necessary barriers Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x.h')
-rw-r--r--drivers/net/bnx2x.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/bnx2x.h b/drivers/net/bnx2x.h
index 6fcccef..18f60aa 100644
--- a/drivers/net/bnx2x.h
+++ b/drivers/net/bnx2x.h
@@ -271,14 +271,7 @@ struct bnx2x_fastpath {
#define bnx2x_fp(bp, nr, var) (bp->fp[nr].var)
-#define BNX2X_HAS_TX_WORK(fp) \
- ((fp->tx_pkt_prod != le16_to_cpu(*fp->tx_cons_sb)) || \
- (fp->tx_pkt_prod != fp->tx_pkt_cons))
-
-#define BNX2X_HAS_RX_WORK(fp) \
- (fp->rx_comp_cons != rx_cons_sb)
-
-#define BNX2X_HAS_WORK(fp) (BNX2X_HAS_RX_WORK(fp) || BNX2X_HAS_TX_WORK(fp))
+#define BNX2X_HAS_WORK(fp) (bnx2x_has_rx_work(fp) || bnx2x_has_tx_work(fp))
/* MC hsi */
OpenPOWER on IntegriCloud