diff options
author | David S. Miller <davem@davemloft.net> | 2008-12-17 02:53:20 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-17 02:54:24 -0500 |
commit | c0700f90e5300c63d01c70e157e75e4510dd2981 (patch) | |
tree | f4889b62ab770b943eb5c2bd0778eab3b5118a91 /drivers/net/bnx2x_main.c | |
parent | f6d52432a4bc6da5de2a0bbb350f735db3206aa5 (diff) |
bnx2x: Fix namespace collision with FLOW_CTRL_{TX,RX}
These are now defined in linux/mii.h and the bnx2x driver
defines different values which are shared with hardware
data structures.
So add a "BNX2X_" prefix to these macro names.
Based upon a report from Stephen Rothwell.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x_main.c')
-rw-r--r-- | drivers/net/bnx2x_main.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index a9c4de0d2020..24d2ae8b74bf 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c | |||
@@ -1921,10 +1921,10 @@ static void bnx2x_link_report(struct bnx2x *bp) | |||
1921 | else | 1921 | else |
1922 | printk("half duplex"); | 1922 | printk("half duplex"); |
1923 | 1923 | ||
1924 | if (bp->link_vars.flow_ctrl != FLOW_CTRL_NONE) { | 1924 | if (bp->link_vars.flow_ctrl != BNX2X_FLOW_CTRL_NONE) { |
1925 | if (bp->link_vars.flow_ctrl & FLOW_CTRL_RX) { | 1925 | if (bp->link_vars.flow_ctrl & BNX2X_FLOW_CTRL_RX) { |
1926 | printk(", receive "); | 1926 | printk(", receive "); |
1927 | if (bp->link_vars.flow_ctrl & FLOW_CTRL_TX) | 1927 | if (bp->link_vars.flow_ctrl & BNX2X_FLOW_CTRL_TX) |
1928 | printk("& transmit "); | 1928 | printk("& transmit "); |
1929 | } else { | 1929 | } else { |
1930 | printk(", transmit "); | 1930 | printk(", transmit "); |
@@ -1948,11 +1948,11 @@ static u8 bnx2x_initial_phy_init(struct bnx2x *bp) | |||
1948 | /* It is recommended to turn off RX FC for jumbo frames | 1948 | /* It is recommended to turn off RX FC for jumbo frames |
1949 | for better performance */ | 1949 | for better performance */ |
1950 | if (IS_E1HMF(bp)) | 1950 | if (IS_E1HMF(bp)) |
1951 | bp->link_params.req_fc_auto_adv = FLOW_CTRL_BOTH; | 1951 | bp->link_params.req_fc_auto_adv = BNX2X_FLOW_CTRL_BOTH; |
1952 | else if (bp->dev->mtu > 5000) | 1952 | else if (bp->dev->mtu > 5000) |
1953 | bp->link_params.req_fc_auto_adv = FLOW_CTRL_TX; | 1953 | bp->link_params.req_fc_auto_adv = BNX2X_FLOW_CTRL_TX; |
1954 | else | 1954 | else |
1955 | bp->link_params.req_fc_auto_adv = FLOW_CTRL_BOTH; | 1955 | bp->link_params.req_fc_auto_adv = BNX2X_FLOW_CTRL_BOTH; |
1956 | 1956 | ||
1957 | bnx2x_acquire_phy_lock(bp); | 1957 | bnx2x_acquire_phy_lock(bp); |
1958 | rc = bnx2x_phy_init(&bp->link_params, &bp->link_vars); | 1958 | rc = bnx2x_phy_init(&bp->link_params, &bp->link_vars); |
@@ -7362,9 +7362,9 @@ static void __devinit bnx2x_link_settings_requested(struct bnx2x *bp) | |||
7362 | 7362 | ||
7363 | bp->link_params.req_flow_ctrl = (bp->port.link_config & | 7363 | bp->link_params.req_flow_ctrl = (bp->port.link_config & |
7364 | PORT_FEATURE_FLOW_CONTROL_MASK); | 7364 | PORT_FEATURE_FLOW_CONTROL_MASK); |
7365 | if ((bp->link_params.req_flow_ctrl == FLOW_CTRL_AUTO) && | 7365 | if ((bp->link_params.req_flow_ctrl == BNX2X_FLOW_CTRL_AUTO) && |
7366 | !(bp->port.supported & SUPPORTED_Autoneg)) | 7366 | !(bp->port.supported & SUPPORTED_Autoneg)) |
7367 | bp->link_params.req_flow_ctrl = FLOW_CTRL_NONE; | 7367 | bp->link_params.req_flow_ctrl = BNX2X_FLOW_CTRL_NONE; |
7368 | 7368 | ||
7369 | BNX2X_DEV_INFO("req_line_speed %d req_duplex %d req_flow_ctrl 0x%x" | 7369 | BNX2X_DEV_INFO("req_line_speed %d req_duplex %d req_flow_ctrl 0x%x" |
7370 | " advertising 0x%x\n", | 7370 | " advertising 0x%x\n", |
@@ -8353,13 +8353,13 @@ static void bnx2x_get_pauseparam(struct net_device *dev, | |||
8353 | { | 8353 | { |
8354 | struct bnx2x *bp = netdev_priv(dev); | 8354 | struct bnx2x *bp = netdev_priv(dev); |
8355 | 8355 | ||
8356 | epause->autoneg = (bp->link_params.req_flow_ctrl == FLOW_CTRL_AUTO) && | 8356 | epause->autoneg = (bp->link_params.req_flow_ctrl == BNX2X_FLOW_CTRL_AUTO) && |
8357 | (bp->link_params.req_line_speed == SPEED_AUTO_NEG); | 8357 | (bp->link_params.req_line_speed == SPEED_AUTO_NEG); |
8358 | 8358 | ||
8359 | epause->rx_pause = ((bp->link_vars.flow_ctrl & FLOW_CTRL_RX) == | 8359 | epause->rx_pause = ((bp->link_vars.flow_ctrl & BNX2X_FLOW_CTRL_RX) == |
8360 | FLOW_CTRL_RX); | 8360 | BNX2X_FLOW_CTRL_RX); |
8361 | epause->tx_pause = ((bp->link_vars.flow_ctrl & FLOW_CTRL_TX) == | 8361 | epause->tx_pause = ((bp->link_vars.flow_ctrl & BNX2X_FLOW_CTRL_TX) == |
8362 | FLOW_CTRL_TX); | 8362 | BNX2X_FLOW_CTRL_TX); |
8363 | 8363 | ||
8364 | DP(NETIF_MSG_LINK, "ethtool_pauseparam: cmd %d\n" | 8364 | DP(NETIF_MSG_LINK, "ethtool_pauseparam: cmd %d\n" |
8365 | DP_LEVEL " autoneg %d rx_pause %d tx_pause %d\n", | 8365 | DP_LEVEL " autoneg %d rx_pause %d tx_pause %d\n", |
@@ -8378,16 +8378,16 @@ static int bnx2x_set_pauseparam(struct net_device *dev, | |||
8378 | DP_LEVEL " autoneg %d rx_pause %d tx_pause %d\n", | 8378 | DP_LEVEL " autoneg %d rx_pause %d tx_pause %d\n", |
8379 | epause->cmd, epause->autoneg, epause->rx_pause, epause->tx_pause); | 8379 | epause->cmd, epause->autoneg, epause->rx_pause, epause->tx_pause); |
8380 | 8380 | ||
8381 | bp->link_params.req_flow_ctrl = FLOW_CTRL_AUTO; | 8381 | bp->link_params.req_flow_ctrl = BNX2X_FLOW_CTRL_AUTO; |
8382 | 8382 | ||
8383 | if (epause->rx_pause) | 8383 | if (epause->rx_pause) |
8384 | bp->link_params.req_flow_ctrl |= FLOW_CTRL_RX; | 8384 | bp->link_params.req_flow_ctrl |= BNX2X_FLOW_CTRL_RX; |
8385 | 8385 | ||
8386 | if (epause->tx_pause) | 8386 | if (epause->tx_pause) |
8387 | bp->link_params.req_flow_ctrl |= FLOW_CTRL_TX; | 8387 | bp->link_params.req_flow_ctrl |= BNX2X_FLOW_CTRL_TX; |
8388 | 8388 | ||
8389 | if (bp->link_params.req_flow_ctrl == FLOW_CTRL_AUTO) | 8389 | if (bp->link_params.req_flow_ctrl == BNX2X_FLOW_CTRL_AUTO) |
8390 | bp->link_params.req_flow_ctrl = FLOW_CTRL_NONE; | 8390 | bp->link_params.req_flow_ctrl = BNX2X_FLOW_CTRL_NONE; |
8391 | 8391 | ||
8392 | if (epause->autoneg) { | 8392 | if (epause->autoneg) { |
8393 | if (!(bp->port.supported & SUPPORTED_Autoneg)) { | 8393 | if (!(bp->port.supported & SUPPORTED_Autoneg)) { |
@@ -8396,7 +8396,7 @@ static int bnx2x_set_pauseparam(struct net_device *dev, | |||
8396 | } | 8396 | } |
8397 | 8397 | ||
8398 | if (bp->link_params.req_line_speed == SPEED_AUTO_NEG) | 8398 | if (bp->link_params.req_line_speed == SPEED_AUTO_NEG) |
8399 | bp->link_params.req_flow_ctrl = FLOW_CTRL_AUTO; | 8399 | bp->link_params.req_flow_ctrl = BNX2X_FLOW_CTRL_AUTO; |
8400 | } | 8400 | } |
8401 | 8401 | ||
8402 | DP(NETIF_MSG_LINK, | 8402 | DP(NETIF_MSG_LINK, |