aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x/bnx2x_ethtool.c
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/bnx2x_ethtool.c
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/bnx2x_ethtool.c')
-rw-r--r--drivers/net/bnx2x/bnx2x_ethtool.c24
1 files changed, 12 insertions, 12 deletions
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 */