aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x
diff options
context:
space:
mode:
authorDmitry Kravkov <dmitry@broadcom.com>2010-10-05 23:26:40 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-06 17:10:36 -0400
commitfb3bff178e722fe88b5ab02319c9636da0980e25 (patch)
tree137b9073e0fb18d26c4aafce714631b25494c95a /drivers/net/bnx2x
parent6f7aeeec7e142caf30e3b420c2411ad85f23b9f5 (diff)
bnx2x: rename MF related fields
MF (multi-function) mode supported not only by 57711E (E1H) devices, but also by coming 57712E, then we use more generic names. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x')
-rw-r--r--drivers/net/bnx2x/bnx2x.h8
-rw-r--r--drivers/net/bnx2x/bnx2x_cmn.c2
-rw-r--r--drivers/net/bnx2x/bnx2x_ethtool.c24
-rw-r--r--drivers/net/bnx2x/bnx2x_main.c56
-rw-r--r--drivers/net/bnx2x/bnx2x_stats.c4
5 files changed, 47 insertions, 47 deletions
diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h
index 8b053e0c00ab..d7b24f9e7939 100644
--- a/drivers/net/bnx2x/bnx2x.h
+++ b/drivers/net/bnx2x/bnx2x.h
@@ -933,9 +933,9 @@ struct bnx2x {
933 u32 vn_weight_sum; 933 u32 vn_weight_sum;
934 934
935 u32 mf_config; 935 u32 mf_config;
936 u16 e1hov; 936 u16 mf_ov;
937 u8 e1hmf; 937 u8 mf_mode;
938#define IS_E1HMF(bp) (bp->e1hmf != 0) 938#define IS_MF(bp) (bp->mf_mode != 0)
939 939
940 u8 wol; 940 u8 wol;
941 941
@@ -1127,7 +1127,7 @@ struct bnx2x {
1127#define RSS_IPV6_CAP 0x0004 1127#define RSS_IPV6_CAP 0x0004
1128#define RSS_IPV6_TCP_CAP 0x0008 1128#define RSS_IPV6_TCP_CAP 0x0008
1129 1129
1130#define BNX2X_MAX_QUEUES(bp) (IS_E1HMF(bp) ? (MAX_CONTEXT/E1HVN_MAX) \ 1130#define BNX2X_MAX_QUEUES(bp) (IS_MF(bp) ? (MAX_CONTEXT/E1HVN_MAX) \
1131 : MAX_CONTEXT) 1131 : MAX_CONTEXT)
1132#define BNX2X_NUM_QUEUES(bp) (bp->num_queues) 1132#define BNX2X_NUM_QUEUES(bp) (bp->num_queues)
1133#define is_multi(bp) (BNX2X_NUM_QUEUES(bp) > 1) 1133#define is_multi(bp) (BNX2X_NUM_QUEUES(bp) > 1)
diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c
index bcc4a8f4677b..ae05987e647e 100644
--- a/drivers/net/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/bnx2x/bnx2x_cmn.c
@@ -745,7 +745,7 @@ void bnx2x_link_report(struct bnx2x *bp)
745 netdev_info(bp->dev, "NIC Link is Up, "); 745 netdev_info(bp->dev, "NIC Link is Up, ");
746 746
747 line_speed = bp->link_vars.line_speed; 747 line_speed = bp->link_vars.line_speed;
748 if (IS_E1HMF(bp)) { 748 if (IS_MF(bp)) {
749 u16 vn_max_rate; 749 u16 vn_max_rate;
750 750
751 vn_max_rate = 751 vn_max_rate =
diff --git a/drivers/net/bnx2x/bnx2x_ethtool.c b/drivers/net/bnx2x/bnx2x_ethtool.c
index 56a0cb579c21..fa8f9526f93c 100644
--- a/drivers/net/bnx2x/bnx2x_ethtool.c
+++ b/drivers/net/bnx2x/bnx2x_ethtool.c
@@ -41,7 +41,7 @@ static int bnx2x_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
41 (bp->link_vars.link_up)) { 41 (bp->link_vars.link_up)) {
42 cmd->speed = bp->link_vars.line_speed; 42 cmd->speed = bp->link_vars.line_speed;
43 cmd->duplex = bp->link_vars.duplex; 43 cmd->duplex = bp->link_vars.duplex;
44 if (IS_E1HMF(bp)) { 44 if (IS_MF(bp)) {
45 u16 vn_max_rate; 45 u16 vn_max_rate;
46 46
47 vn_max_rate = 47 vn_max_rate =
@@ -89,7 +89,7 @@ static int bnx2x_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
89 struct bnx2x *bp = netdev_priv(dev); 89 struct bnx2x *bp = netdev_priv(dev);
90 u32 advertising, cfg_idx, old_multi_phy_config, new_multi_phy_config; 90 u32 advertising, cfg_idx, old_multi_phy_config, new_multi_phy_config;
91 91
92 if (IS_E1HMF(bp)) 92 if (IS_MF(bp))
93 return 0; 93 return 0;
94 94
95 DP(NETIF_MSG_LINK, "ethtool_cmd: cmd %d\n" 95 DP(NETIF_MSG_LINK, "ethtool_cmd: cmd %d\n"
@@ -1027,7 +1027,7 @@ static int bnx2x_set_pauseparam(struct net_device *dev,
1027{ 1027{
1028 struct bnx2x *bp = netdev_priv(dev); 1028 struct bnx2x *bp = netdev_priv(dev);
1029 u32 cfg_idx = bnx2x_get_link_cfg_idx(bp); 1029 u32 cfg_idx = bnx2x_get_link_cfg_idx(bp);
1030 if (IS_E1HMF(bp)) 1030 if (IS_MF(bp))
1031 return 0; 1031 return 0;
1032 1032
1033 DP(NETIF_MSG_LINK, "ethtool_pauseparam: cmd %d\n" 1033 DP(NETIF_MSG_LINK, "ethtool_pauseparam: cmd %d\n"
@@ -1616,7 +1616,7 @@ static void bnx2x_self_test(struct net_device *dev,
1616 return; 1616 return;
1617 1617
1618 /* offline tests are not supported in MF mode */ 1618 /* offline tests are not supported in MF mode */
1619 if (IS_E1HMF(bp)) 1619 if (IS_MF(bp))
1620 etest->flags &= ~ETH_TEST_FL_OFFLINE; 1620 etest->flags &= ~ETH_TEST_FL_OFFLINE;
1621 is_serdes = (bp->link_vars.link_status & LINK_STATUS_SERDES_LINK) > 0; 1621 is_serdes = (bp->link_vars.link_status & LINK_STATUS_SERDES_LINK) > 0;
1622 1622
@@ -1808,8 +1808,8 @@ static const struct {
1808#define IS_PORT_STAT(i) \ 1808#define IS_PORT_STAT(i) \
1809 ((bnx2x_stats_arr[i].flags & STATS_FLAGS_BOTH) == STATS_FLAGS_PORT) 1809 ((bnx2x_stats_arr[i].flags & STATS_FLAGS_BOTH) == STATS_FLAGS_PORT)
1810#define IS_FUNC_STAT(i) (bnx2x_stats_arr[i].flags & STATS_FLAGS_FUNC) 1810#define IS_FUNC_STAT(i) (bnx2x_stats_arr[i].flags & STATS_FLAGS_FUNC)
1811#define IS_E1HMF_MODE_STAT(bp) \ 1811#define IS_MF_MODE_STAT(bp) \
1812 (IS_E1HMF(bp) && !(bp->msg_enable & BNX2X_MSG_STATS)) 1812 (IS_MF(bp) && !(bp->msg_enable & BNX2X_MSG_STATS))
1813 1813
1814static int bnx2x_get_sset_count(struct net_device *dev, int stringset) 1814static int bnx2x_get_sset_count(struct net_device *dev, int stringset)
1815{ 1815{
@@ -1820,10 +1820,10 @@ static int bnx2x_get_sset_count(struct net_device *dev, int stringset)
1820 case ETH_SS_STATS: 1820 case ETH_SS_STATS:
1821 if (is_multi(bp)) { 1821 if (is_multi(bp)) {
1822 num_stats = BNX2X_NUM_Q_STATS * bp->num_queues; 1822 num_stats = BNX2X_NUM_Q_STATS * bp->num_queues;
1823 if (!IS_E1HMF_MODE_STAT(bp)) 1823 if (!IS_MF_MODE_STAT(bp))
1824 num_stats += BNX2X_NUM_STATS; 1824 num_stats += BNX2X_NUM_STATS;
1825 } else { 1825 } else {
1826 if (IS_E1HMF_MODE_STAT(bp)) { 1826 if (IS_MF_MODE_STAT(bp)) {
1827 num_stats = 0; 1827 num_stats = 0;
1828 for (i = 0; i < BNX2X_NUM_STATS; i++) 1828 for (i = 0; i < BNX2X_NUM_STATS; i++)
1829 if (IS_FUNC_STAT(i)) 1829 if (IS_FUNC_STAT(i))
@@ -1856,14 +1856,14 @@ static void bnx2x_get_strings(struct net_device *dev, u32 stringset, u8 *buf)
1856 bnx2x_q_stats_arr[j].string, i); 1856 bnx2x_q_stats_arr[j].string, i);
1857 k += BNX2X_NUM_Q_STATS; 1857 k += BNX2X_NUM_Q_STATS;
1858 } 1858 }
1859 if (IS_E1HMF_MODE_STAT(bp)) 1859 if (IS_MF_MODE_STAT(bp))
1860 break; 1860 break;
1861 for (j = 0; j < BNX2X_NUM_STATS; j++) 1861 for (j = 0; j < BNX2X_NUM_STATS; j++)
1862 strcpy(buf + (k + j)*ETH_GSTRING_LEN, 1862 strcpy(buf + (k + j)*ETH_GSTRING_LEN,
1863 bnx2x_stats_arr[j].string); 1863 bnx2x_stats_arr[j].string);
1864 } else { 1864 } else {
1865 for (i = 0, j = 0; i < BNX2X_NUM_STATS; i++) { 1865 for (i = 0, j = 0; i < BNX2X_NUM_STATS; i++) {
1866 if (IS_E1HMF_MODE_STAT(bp) && IS_PORT_STAT(i)) 1866 if (IS_MF_MODE_STAT(bp) && IS_PORT_STAT(i))
1867 continue; 1867 continue;
1868 strcpy(buf + j*ETH_GSTRING_LEN, 1868 strcpy(buf + j*ETH_GSTRING_LEN,
1869 bnx2x_stats_arr[i].string); 1869 bnx2x_stats_arr[i].string);
@@ -1907,7 +1907,7 @@ static void bnx2x_get_ethtool_stats(struct net_device *dev,
1907 } 1907 }
1908 k += BNX2X_NUM_Q_STATS; 1908 k += BNX2X_NUM_Q_STATS;
1909 } 1909 }
1910 if (IS_E1HMF_MODE_STAT(bp)) 1910 if (IS_MF_MODE_STAT(bp))
1911 return; 1911 return;
1912 hw_stats = (u32 *)&bp->eth_stats; 1912 hw_stats = (u32 *)&bp->eth_stats;
1913 for (j = 0; j < BNX2X_NUM_STATS; j++) { 1913 for (j = 0; j < BNX2X_NUM_STATS; j++) {
@@ -1928,7 +1928,7 @@ static void bnx2x_get_ethtool_stats(struct net_device *dev,
1928 } else { 1928 } else {
1929 hw_stats = (u32 *)&bp->eth_stats; 1929 hw_stats = (u32 *)&bp->eth_stats;
1930 for (i = 0, j = 0; i < BNX2X_NUM_STATS; i++) { 1930 for (i = 0, j = 0; i < BNX2X_NUM_STATS; i++) {
1931 if (IS_E1HMF_MODE_STAT(bp) && IS_PORT_STAT(i)) 1931 if (IS_MF_MODE_STAT(bp) && IS_PORT_STAT(i))
1932 continue; 1932 continue;
1933 if (bnx2x_stats_arr[i].size == 0) { 1933 if (bnx2x_stats_arr[i].size == 0) {
1934 /* skip this counter */ 1934 /* skip this counter */
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c
index 119ca871f016..238e38f051fb 100644
--- a/drivers/net/bnx2x/bnx2x_main.c
+++ b/drivers/net/bnx2x/bnx2x_main.c
@@ -1013,7 +1013,7 @@ void bnx2x_int_enable(struct bnx2x *bp)
1013 1013
1014 if (CHIP_IS_E1H(bp)) { 1014 if (CHIP_IS_E1H(bp)) {
1015 /* init leading/trailing edge */ 1015 /* init leading/trailing edge */
1016 if (IS_E1HMF(bp)) { 1016 if (IS_MF(bp)) {
1017 val = (0xee0f | (1 << (BP_E1HVN(bp) + 4))); 1017 val = (0xee0f | (1 << (BP_E1HVN(bp) + 4)));
1018 if (bp->port.pmf) 1018 if (bp->port.pmf)
1019 /* enable nig and gpio3 attention */ 1019 /* enable nig and gpio3 attention */
@@ -1792,7 +1792,7 @@ static int bnx2x_get_cmng_fns_mode(struct bnx2x *bp)
1792{ 1792{
1793 if (CHIP_REV_IS_SLOW(bp)) 1793 if (CHIP_REV_IS_SLOW(bp))
1794 return CMNG_FNS_NONE; 1794 return CMNG_FNS_NONE;
1795 if (IS_E1HMF(bp)) 1795 if (IS_MF(bp))
1796 return CMNG_FNS_MINMAX; 1796 return CMNG_FNS_MINMAX;
1797 1797
1798 return CMNG_FNS_NONE; 1798 return CMNG_FNS_NONE;
@@ -1906,7 +1906,7 @@ static void bnx2x_link_attn(struct bnx2x *bp)
1906 if (prev_link_status != bp->link_vars.link_status) 1906 if (prev_link_status != bp->link_vars.link_status)
1907 bnx2x_link_report(bp); 1907 bnx2x_link_report(bp);
1908 1908
1909 if (IS_E1HMF(bp)) { 1909 if (IS_MF(bp)) {
1910 int port = BP_PORT(bp); 1910 int port = BP_PORT(bp);
1911 int func; 1911 int func;
1912 int vn; 1912 int vn;
@@ -2160,7 +2160,7 @@ static inline u16 bnx2x_get_cl_flags(struct bnx2x *bp,
2160 /* calculate queue flags */ 2160 /* calculate queue flags */
2161 flags |= QUEUE_FLG_CACHE_ALIGN; 2161 flags |= QUEUE_FLG_CACHE_ALIGN;
2162 flags |= QUEUE_FLG_HC; 2162 flags |= QUEUE_FLG_HC;
2163 flags |= IS_E1HMF(bp) ? QUEUE_FLG_OV : 0; 2163 flags |= IS_MF(bp) ? QUEUE_FLG_OV : 0;
2164 2164
2165#ifdef BCM_VLAN 2165#ifdef BCM_VLAN
2166 flags |= QUEUE_FLG_VLAN; 2166 flags |= QUEUE_FLG_VLAN;
@@ -2262,7 +2262,7 @@ void bnx2x_pf_init(struct bnx2x *bp)
2262 2262
2263 /* pf specific setups */ 2263 /* pf specific setups */
2264 if (!CHIP_IS_E1(bp)) 2264 if (!CHIP_IS_E1(bp))
2265 storm_memset_ov(bp, bp->e1hov, BP_FUNC(bp)); 2265 storm_memset_ov(bp, bp->mf_ov, BP_FUNC(bp));
2266 2266
2267 /* function setup flags */ 2267 /* function setup flags */
2268 flags = (FUNC_FLG_STATS | FUNC_FLG_LEADING | FUNC_FLG_SPQ); 2268 flags = (FUNC_FLG_STATS | FUNC_FLG_LEADING | FUNC_FLG_SPQ);
@@ -3855,13 +3855,13 @@ static void bnx2x_init_internal_common(struct bnx2x *bp)
3855 /* xstorm needs to know whether to add ovlan to packets or not, 3855 /* xstorm needs to know whether to add ovlan to packets or not,
3856 * in switch-independent we'll write 0 to here... */ 3856 * in switch-independent we'll write 0 to here... */
3857 REG_WR8(bp, BAR_XSTRORM_INTMEM + XSTORM_FUNCTION_MODE_OFFSET, 3857 REG_WR8(bp, BAR_XSTRORM_INTMEM + XSTORM_FUNCTION_MODE_OFFSET,
3858 bp->e1hmf); 3858 bp->mf_mode);
3859 REG_WR8(bp, BAR_TSTRORM_INTMEM + TSTORM_FUNCTION_MODE_OFFSET, 3859 REG_WR8(bp, BAR_TSTRORM_INTMEM + TSTORM_FUNCTION_MODE_OFFSET,
3860 bp->e1hmf); 3860 bp->mf_mode);
3861 REG_WR8(bp, BAR_CSTRORM_INTMEM + CSTORM_FUNCTION_MODE_OFFSET, 3861 REG_WR8(bp, BAR_CSTRORM_INTMEM + CSTORM_FUNCTION_MODE_OFFSET,
3862 bp->e1hmf); 3862 bp->mf_mode);
3863 REG_WR8(bp, BAR_USTRORM_INTMEM + USTORM_FUNCTION_MODE_OFFSET, 3863 REG_WR8(bp, BAR_USTRORM_INTMEM + USTORM_FUNCTION_MODE_OFFSET,
3864 bp->e1hmf); 3864 bp->mf_mode);
3865 } 3865 }
3866 3866
3867 /* Zero this manually as its initialization is 3867 /* Zero this manually as its initialization is
@@ -4418,7 +4418,7 @@ static int bnx2x_init_hw_common(struct bnx2x *bp, u32 load_code)
4418 4418
4419 bnx2x_init_block(bp, MISC_BLOCK, COMMON_STAGE); 4419 bnx2x_init_block(bp, MISC_BLOCK, COMMON_STAGE);
4420 if (CHIP_IS_E1H(bp)) 4420 if (CHIP_IS_E1H(bp))
4421 REG_WR(bp, MISC_REG_E1HMF_MODE, IS_E1HMF(bp)); 4421 REG_WR(bp, MISC_REG_E1HMF_MODE, IS_MF(bp));
4422 4422
4423 REG_WR(bp, MISC_REG_LCPLL_CTRL_REG_2, 0x100); 4423 REG_WR(bp, MISC_REG_LCPLL_CTRL_REG_2, 0x100);
4424 msleep(30); 4424 msleep(30);
@@ -4518,7 +4518,7 @@ static int bnx2x_init_hw_common(struct bnx2x *bp, u32 load_code)
4518 REG_WR(bp, PRS_REG_NIC_MODE, 1); 4518 REG_WR(bp, PRS_REG_NIC_MODE, 1);
4519#endif 4519#endif
4520 if (CHIP_IS_E1H(bp)) 4520 if (CHIP_IS_E1H(bp))
4521 REG_WR(bp, PRS_REG_E1HOV_MODE, IS_E1HMF(bp)); 4521 REG_WR(bp, PRS_REG_E1HOV_MODE, IS_MF(bp));
4522 4522
4523 bnx2x_init_block(bp, TSDM_BLOCK, COMMON_STAGE); 4523 bnx2x_init_block(bp, TSDM_BLOCK, COMMON_STAGE);
4524 bnx2x_init_block(bp, CSDM_BLOCK, COMMON_STAGE); 4524 bnx2x_init_block(bp, CSDM_BLOCK, COMMON_STAGE);
@@ -4596,8 +4596,8 @@ static int bnx2x_init_hw_common(struct bnx2x *bp, u32 load_code)
4596 4596
4597 bnx2x_init_block(bp, NIG_BLOCK, COMMON_STAGE); 4597 bnx2x_init_block(bp, NIG_BLOCK, COMMON_STAGE);
4598 if (CHIP_IS_E1H(bp)) { 4598 if (CHIP_IS_E1H(bp)) {
4599 REG_WR(bp, NIG_REG_LLH_MF_MODE, IS_E1HMF(bp)); 4599 REG_WR(bp, NIG_REG_LLH_MF_MODE, IS_MF(bp));
4600 REG_WR(bp, NIG_REG_LLH_E1HOV_MODE, IS_E1HMF(bp)); 4600 REG_WR(bp, NIG_REG_LLH_E1HOV_MODE, IS_MF(bp));
4601 } 4601 }
4602 4602
4603 if (CHIP_REV_IS_SLOW(bp)) 4603 if (CHIP_REV_IS_SLOW(bp))
@@ -4692,7 +4692,7 @@ static int bnx2x_init_hw_port(struct bnx2x *bp)
4692 low = 0; 4692 low = 0;
4693 high = 513; 4693 high = 513;
4694 } else { 4694 } else {
4695 if (IS_E1HMF(bp)) 4695 if (IS_MF(bp))
4696 low = ((bp->flags & ONE_PORT_FLAG) ? 160 : 246); 4696 low = ((bp->flags & ONE_PORT_FLAG) ? 160 : 246);
4697 else if (bp->dev->mtu > 4096) { 4697 else if (bp->dev->mtu > 4096) {
4698 if (bp->flags & ONE_PORT_FLAG) 4698 if (bp->flags & ONE_PORT_FLAG)
@@ -4758,7 +4758,7 @@ static int bnx2x_init_hw_port(struct bnx2x *bp)
4758 * - MF mode: bit 3 is masked. bits 0-2 are in use as in SF 4758 * - MF mode: bit 3 is masked. bits 0-2 are in use as in SF
4759 * bits 4-7 are used for "per vn group attention" */ 4759 * bits 4-7 are used for "per vn group attention" */
4760 REG_WR(bp, MISC_REG_AEU_MASK_ATTN_FUNC_0 + port*4, 4760 REG_WR(bp, MISC_REG_AEU_MASK_ATTN_FUNC_0 + port*4,
4761 (IS_E1HMF(bp) ? 0xF7 : 0x7)); 4761 (IS_MF(bp) ? 0xF7 : 0x7));
4762 4762
4763 bnx2x_init_block(bp, PXPCS_BLOCK, init_stage); 4763 bnx2x_init_block(bp, PXPCS_BLOCK, init_stage);
4764 bnx2x_init_block(bp, EMAC0_BLOCK, init_stage); 4764 bnx2x_init_block(bp, EMAC0_BLOCK, init_stage);
@@ -4771,9 +4771,9 @@ static int bnx2x_init_hw_port(struct bnx2x *bp)
4771 REG_WR(bp, NIG_REG_XGXS_SERDES0_MODE_SEL + port*4, 1); 4771 REG_WR(bp, NIG_REG_XGXS_SERDES0_MODE_SEL + port*4, 1);
4772 4772
4773 if (CHIP_IS_E1H(bp)) { 4773 if (CHIP_IS_E1H(bp)) {
4774 /* 0x2 disable e1hov, 0x1 enable */ 4774 /* 0x2 disable mf_ov, 0x1 enable */
4775 REG_WR(bp, NIG_REG_LLH0_BRB1_DRV_MASK_MF + port*4, 4775 REG_WR(bp, NIG_REG_LLH0_BRB1_DRV_MASK_MF + port*4,
4776 (IS_E1HMF(bp) ? 0x1 : 0x2)); 4776 (IS_MF(bp) ? 0x1 : 0x2));
4777 4777
4778 { 4778 {
4779 REG_WR(bp, NIG_REG_LLFC_ENABLE_0 + port*4, 0); 4779 REG_WR(bp, NIG_REG_LLFC_ENABLE_0 + port*4, 0);
@@ -4883,9 +4883,9 @@ static int bnx2x_init_hw_func(struct bnx2x *bp)
4883 4883
4884 bnx2x_init_block(bp, CFC_BLOCK, FUNC0_STAGE + func); 4884 bnx2x_init_block(bp, CFC_BLOCK, FUNC0_STAGE + func);
4885 4885
4886 if (IS_E1HMF(bp)) { 4886 if (IS_MF(bp)) {
4887 REG_WR(bp, NIG_REG_LLH0_FUNC_EN + port*8, 1); 4887 REG_WR(bp, NIG_REG_LLH0_FUNC_EN + port*8, 1);
4888 REG_WR(bp, NIG_REG_LLH0_FUNC_VLAN_ID + port*8, bp->e1hov); 4888 REG_WR(bp, NIG_REG_LLH0_FUNC_VLAN_ID + port*8, bp->mf_ov);
4889 } 4889 }
4890 4890
4891 bnx2x_init_block(bp, MISC_AEU_BLOCK, FUNC0_STAGE + func); 4891 bnx2x_init_block(bp, MISC_AEU_BLOCK, FUNC0_STAGE + func);
@@ -7189,8 +7189,8 @@ static int __devinit bnx2x_get_hwinfo(struct bnx2x *bp)
7189 bp->igu_base_sb = 0; 7189 bp->igu_base_sb = 0;
7190 bp->igu_sb_cnt = min_t(u8, FP_SB_MAX_E1x, bp->l2_cid_count); 7190 bp->igu_sb_cnt = min_t(u8, FP_SB_MAX_E1x, bp->l2_cid_count);
7191 7191
7192 bp->e1hov = 0; 7192 bp->mf_ov = 0;
7193 bp->e1hmf = 0; 7193 bp->mf_mode = 0;
7194 if (CHIP_IS_E1H(bp) && !BP_NOMCP(bp)) { 7194 if (CHIP_IS_E1H(bp) && !BP_NOMCP(bp)) {
7195 7195
7196 bp->common.mf_cfg_base = bp->common.shmem_base + 7196 bp->common.mf_cfg_base = bp->common.shmem_base +
@@ -7202,19 +7202,19 @@ static int __devinit bnx2x_get_hwinfo(struct bnx2x *bp)
7202 val = (MF_CFG_RD(bp, func_mf_config[FUNC_0].e1hov_tag) & 7202 val = (MF_CFG_RD(bp, func_mf_config[FUNC_0].e1hov_tag) &
7203 FUNC_MF_CFG_E1HOV_TAG_MASK); 7203 FUNC_MF_CFG_E1HOV_TAG_MASK);
7204 if (val != FUNC_MF_CFG_E1HOV_TAG_DEFAULT) 7204 if (val != FUNC_MF_CFG_E1HOV_TAG_DEFAULT)
7205 bp->e1hmf = 1; 7205 bp->mf_mode = 1;
7206 BNX2X_DEV_INFO("%s function mode\n", 7206 BNX2X_DEV_INFO("%s function mode\n",
7207 IS_E1HMF(bp) ? "multi" : "single"); 7207 IS_MF(bp) ? "multi" : "single");
7208 7208
7209 if (IS_E1HMF(bp)) { 7209 if (IS_MF(bp)) {
7210 val = (MF_CFG_RD(bp, func_mf_config[func]. 7210 val = (MF_CFG_RD(bp, func_mf_config[func].
7211 e1hov_tag) & 7211 e1hov_tag) &
7212 FUNC_MF_CFG_E1HOV_TAG_MASK); 7212 FUNC_MF_CFG_E1HOV_TAG_MASK);
7213 if (val != FUNC_MF_CFG_E1HOV_TAG_DEFAULT) { 7213 if (val != FUNC_MF_CFG_E1HOV_TAG_DEFAULT) {
7214 bp->e1hov = val; 7214 bp->mf_ov = val;
7215 BNX2X_DEV_INFO("E1HOV for func %d is %d " 7215 BNX2X_DEV_INFO("E1HOV for func %d is %d "
7216 "(0x%04x)\n", 7216 "(0x%04x)\n",
7217 func, bp->e1hov, bp->e1hov); 7217 func, bp->mf_ov, bp->mf_ov);
7218 } else { 7218 } else {
7219 BNX2X_ERROR("No valid E1HOV for func %d," 7219 BNX2X_ERROR("No valid E1HOV for func %d,"
7220 " aborting\n", func); 7220 " aborting\n", func);
@@ -7230,7 +7230,7 @@ static int __devinit bnx2x_get_hwinfo(struct bnx2x *bp)
7230 } 7230 }
7231 7231
7232 /* adjust igu_sb_cnt to MF */ 7232 /* adjust igu_sb_cnt to MF */
7233 if (IS_E1HMF(bp)) 7233 if (IS_MF(bp))
7234 bp->igu_sb_cnt /= E1HVN_MAX; 7234 bp->igu_sb_cnt /= E1HVN_MAX;
7235 7235
7236 if (!BP_NOMCP(bp)) { 7236 if (!BP_NOMCP(bp)) {
@@ -7241,7 +7241,7 @@ static int __devinit bnx2x_get_hwinfo(struct bnx2x *bp)
7241 BNX2X_DEV_INFO("fw_seq 0x%08x\n", bp->fw_seq); 7241 BNX2X_DEV_INFO("fw_seq 0x%08x\n", bp->fw_seq);
7242 } 7242 }
7243 7243
7244 if (IS_E1HMF(bp)) { 7244 if (IS_MF(bp)) {
7245 val2 = MF_CFG_RD(bp, func_mf_config[func].mac_upper); 7245 val2 = MF_CFG_RD(bp, func_mf_config[func].mac_upper);
7246 val = MF_CFG_RD(bp, func_mf_config[func].mac_lower); 7246 val = MF_CFG_RD(bp, func_mf_config[func].mac_lower);
7247 if ((val2 != FUNC_MF_CFG_UPPERMAC_DEFAULT) && 7247 if ((val2 != FUNC_MF_CFG_UPPERMAC_DEFAULT) &&
diff --git a/drivers/net/bnx2x/bnx2x_stats.c b/drivers/net/bnx2x/bnx2x_stats.c
index 1256f62f7bff..c271fc52613d 100644
--- a/drivers/net/bnx2x/bnx2x_stats.c
+++ b/drivers/net/bnx2x/bnx2x_stats.c
@@ -253,7 +253,7 @@ static void bnx2x_stats_pmf_update(struct bnx2x *bp)
253 u32 *stats_comp = bnx2x_sp(bp, stats_comp); 253 u32 *stats_comp = bnx2x_sp(bp, stats_comp);
254 254
255 /* sanity */ 255 /* sanity */
256 if (!IS_E1HMF(bp) || !bp->port.pmf || !bp->port.port_stx) { 256 if (!IS_MF(bp) || !bp->port.pmf || !bp->port.port_stx) {
257 BNX2X_ERR("BUG!\n"); 257 BNX2X_ERR("BUG!\n");
258 return; 258 return;
259 } 259 }
@@ -1284,7 +1284,7 @@ static void bnx2x_port_stats_base_init(struct bnx2x *bp)
1284 1284
1285static void bnx2x_func_stats_base_init(struct bnx2x *bp) 1285static void bnx2x_func_stats_base_init(struct bnx2x *bp)
1286{ 1286{
1287 int vn, vn_max = IS_E1HMF(bp) ? E1HVN_MAX : E1VN_MAX; 1287 int vn, vn_max = IS_MF(bp) ? E1HVN_MAX : E1VN_MAX;
1288 int port = BP_PORT(bp); 1288 int port = BP_PORT(bp);
1289 int func; 1289 int func;
1290 u32 func_stx; 1290 u32 func_stx;