aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x.h
diff options
context:
space:
mode:
authorEilon Greenstein <eilong@broadcom.com>2009-01-14 01:42:44 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-19 19:20:14 -0500
commit237907c1ded8a1a447cea7c4f97ab853e8b46052 (patch)
treeabe06a24be466869f8252a3b8e80aa0bc9637ef6 /drivers/net/bnx2x.h
parente47d7e6eb841c1850f0e69b95ae6cf3c86881f53 (diff)
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 6fcccef4cf3d..18f60aa3efdd 100644
--- a/drivers/net/bnx2x.h
+++ b/drivers/net/bnx2x.h
@@ -271,14 +271,7 @@ struct bnx2x_fastpath {
271 271
272#define bnx2x_fp(bp, nr, var) (bp->fp[nr].var) 272#define bnx2x_fp(bp, nr, var) (bp->fp[nr].var)
273 273
274#define BNX2X_HAS_TX_WORK(fp) \ 274#define BNX2X_HAS_WORK(fp) (bnx2x_has_rx_work(fp) || bnx2x_has_tx_work(fp))
275 ((fp->tx_pkt_prod != le16_to_cpu(*fp->tx_cons_sb)) || \
276 (fp->tx_pkt_prod != fp->tx_pkt_cons))
277
278#define BNX2X_HAS_RX_WORK(fp) \
279 (fp->rx_comp_cons != rx_cons_sb)
280
281#define BNX2X_HAS_WORK(fp) (BNX2X_HAS_RX_WORK(fp) || BNX2X_HAS_TX_WORK(fp))
282 275
283 276
284/* MC hsi */ 277/* MC hsi */