aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom
diff options
context:
space:
mode:
authorYaniv Rosner <yanivr@broadcom.com>2012-01-16 21:33:27 -0500
committerDavid S. Miller <davem@davemloft.net>2012-01-17 10:44:43 -0500
commit75318327802235ecd7e90b0760cceb994bf975ca (patch)
tree0d57527bc7f139656ea95ff25c4e05fe7340098f /drivers/net/ethernet/broadcom
parent127302bb42257eef5d357722d670c4ac53327088 (diff)
bnx2x: Remove 100Mb force speed for BCM84833
Remove unsupported speed of 100Mb force for BCM84833 due to hardware limitation. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c7
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c20
2 files changed, 21 insertions, 6 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
index a688b9d975a2..f99c6e312a5d 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
@@ -365,13 +365,18 @@ static int bnx2x_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
365 DP(NETIF_MSG_LINK, "cfg_idx = %x\n", cfg_idx); 365 DP(NETIF_MSG_LINK, "cfg_idx = %x\n", cfg_idx);
366 366
367 if (cmd->autoneg == AUTONEG_ENABLE) { 367 if (cmd->autoneg == AUTONEG_ENABLE) {
368 u32 an_supported_speed = bp->port.supported[cfg_idx];
369 if (bp->link_params.phy[EXT_PHY1].type ==
370 PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833)
371 an_supported_speed |= (SUPPORTED_100baseT_Half |
372 SUPPORTED_100baseT_Full);
368 if (!(bp->port.supported[cfg_idx] & SUPPORTED_Autoneg)) { 373 if (!(bp->port.supported[cfg_idx] & SUPPORTED_Autoneg)) {
369 DP(NETIF_MSG_LINK, "Autoneg not supported\n"); 374 DP(NETIF_MSG_LINK, "Autoneg not supported\n");
370 return -EINVAL; 375 return -EINVAL;
371 } 376 }
372 377
373 /* advertise the requested speed and duplex if supported */ 378 /* advertise the requested speed and duplex if supported */
374 if (cmd->advertising & ~(bp->port.supported[cfg_idx])) { 379 if (cmd->advertising & ~an_supported_speed) {
375 DP(NETIF_MSG_LINK, "Advertisement parameters " 380 DP(NETIF_MSG_LINK, "Advertisement parameters "
376 "are not supported\n"); 381 "are not supported\n");
377 return -EINVAL; 382 return -EINVAL;
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index cc806378464d..1d1a8093e62e 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@ -9454,13 +9454,10 @@ static int bnx2x_848xx_cmn_config_init(struct bnx2x_phy *phy,
9454 an_1000_val); 9454 an_1000_val);
9455 9455
9456 /* set 100 speed advertisement */ 9456 /* set 100 speed advertisement */
9457 if (((phy->req_line_speed == SPEED_AUTO_NEG) && 9457 if ((phy->req_line_speed == SPEED_AUTO_NEG) &&
9458 (phy->speed_cap_mask & 9458 (phy->speed_cap_mask &
9459 (PORT_HW_CFG_SPEED_CAPABILITY_D0_100M_FULL | 9459 (PORT_HW_CFG_SPEED_CAPABILITY_D0_100M_FULL |
9460 PORT_HW_CFG_SPEED_CAPABILITY_D0_100M_HALF)) && 9460 PORT_HW_CFG_SPEED_CAPABILITY_D0_100M_HALF))) {
9461 (phy->supported &
9462 (SUPPORTED_100baseT_Half |
9463 SUPPORTED_100baseT_Full)))) {
9464 an_10_100_val |= (1<<7); 9461 an_10_100_val |= (1<<7);
9465 /* Enable autoneg and restart autoneg for legacy speeds */ 9462 /* Enable autoneg and restart autoneg for legacy speeds */
9466 autoneg_val |= (1<<9 | 1<<12); 9463 autoneg_val |= (1<<9 | 1<<12);
@@ -11528,6 +11525,19 @@ static int bnx2x_populate_ext_phy(struct bnx2x *bp,
11528 } 11525 }
11529 phy->mdio_ctrl = bnx2x_get_emac_base(bp, mdc_mdio_access, port); 11526 phy->mdio_ctrl = bnx2x_get_emac_base(bp, mdc_mdio_access, port);
11530 11527
11528 if ((phy->type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84833) &&
11529 (phy->ver_addr)) {
11530 /*
11531 * Remove 100Mb link supported for BCM84833 when phy fw
11532 * version lower than or equal to 1.39
11533 */
11534 u32 raw_ver = REG_RD(bp, phy->ver_addr);
11535 if (((raw_ver & 0x7F) <= 39) &&
11536 (((raw_ver & 0xF80) >> 7) <= 1))
11537 phy->supported &= ~(SUPPORTED_100baseT_Half |
11538 SUPPORTED_100baseT_Full);
11539 }
11540
11531 /* 11541 /*
11532 * In case mdc/mdio_access of the external phy is different than the 11542 * In case mdc/mdio_access of the external phy is different than the
11533 * mdc/mdio access of the XGXS, a HW lock must be taken in each access 11543 * mdc/mdio access of the XGXS, a HW lock must be taken in each access