aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x/bnx2x_cmn.h
diff options
context:
space:
mode:
authorPekka Enberg <penberg@kernel.org>2011-03-11 11:10:45 -0500
committerPekka Enberg <penberg@kernel.org>2011-03-11 11:10:45 -0500
commitc9149556756d56c68451a4a8735c37e7062fd3d7 (patch)
treea2dae56b22adaa9a23c8f92f30c3b3ad3b610850 /drivers/net/bnx2x/bnx2x_cmn.h
parentd71f606f687ef9d0cdddfd3619ca7cb9a0b3fb63 (diff)
parent5bfe53a77e8a3ffce4a10003c75f464a138e272d (diff)
Merge branch 'slab/rcu' into slab/next
Conflicts: mm/slub.c
Diffstat (limited to 'drivers/net/bnx2x/bnx2x_cmn.h')
-rw-r--r--drivers/net/bnx2x/bnx2x_cmn.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/bnx2x/bnx2x_cmn.h b/drivers/net/bnx2x/bnx2x_cmn.h
index 03eb4d68e6bb..326ba44b3ded 100644
--- a/drivers/net/bnx2x/bnx2x_cmn.h
+++ b/drivers/net/bnx2x/bnx2x_cmn.h
@@ -1044,4 +1044,24 @@ static inline void storm_memset_cmng(struct bnx2x *bp,
1044void bnx2x_acquire_phy_lock(struct bnx2x *bp); 1044void bnx2x_acquire_phy_lock(struct bnx2x *bp);
1045void bnx2x_release_phy_lock(struct bnx2x *bp); 1045void bnx2x_release_phy_lock(struct bnx2x *bp);
1046 1046
1047/**
1048 * Extracts MAX BW part from MF configuration.
1049 *
1050 * @param bp
1051 * @param mf_cfg
1052 *
1053 * @return u16
1054 */
1055static inline u16 bnx2x_extract_max_cfg(struct bnx2x *bp, u32 mf_cfg)
1056{
1057 u16 max_cfg = (mf_cfg & FUNC_MF_CFG_MAX_BW_MASK) >>
1058 FUNC_MF_CFG_MAX_BW_SHIFT;
1059 if (!max_cfg) {
1060 BNX2X_ERR("Illegal configuration detected for Max BW - "
1061 "using 100 instead\n");
1062 max_cfg = 100;
1063 }
1064 return max_cfg;
1065}
1066
1047#endif /* BNX2X_CMN_H */ 1067#endif /* BNX2X_CMN_H */