diff options
author | Yaniv Rosner <yanivr@broadcom.com> | 2009-11-05 12:18:21 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-05 23:00:39 -0500 |
commit | b5bbf0080e258383ecf67e57c7b46f4249878280 (patch) | |
tree | 1ff742d89c366627c4edce8566a9f907f978a0f0 /drivers/net/bnx2x_link.c | |
parent | 15ddd2d0ef4849410a2251587b3652fe6a689fda (diff) |
bnx2x: Modify BCM8706 link init seq
Modify BCM8706 link initialization sequence so that first it link up
between Serdes and BCM8706, and only then between BCM8706 to network
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/bnx2x_link.c')
-rw-r--r-- | drivers/net/bnx2x_link.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/drivers/net/bnx2x_link.c b/drivers/net/bnx2x_link.c index 4c16a46f0caf..b08ff77f1f96 100644 --- a/drivers/net/bnx2x_link.c +++ b/drivers/net/bnx2x_link.c | |||
@@ -1930,6 +1930,8 @@ static u8 bnx2x_link_settings_status(struct link_params *params, | |||
1930 | (XGXS_EXT_PHY_TYPE(params->ext_phy_config) == | 1930 | (XGXS_EXT_PHY_TYPE(params->ext_phy_config) == |
1931 | PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8705) || | 1931 | PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8705) || |
1932 | (XGXS_EXT_PHY_TYPE(params->ext_phy_config) == | 1932 | (XGXS_EXT_PHY_TYPE(params->ext_phy_config) == |
1933 | PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8706) || | ||
1934 | (XGXS_EXT_PHY_TYPE(params->ext_phy_config) == | ||
1933 | PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8726))) { | 1935 | PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8726))) { |
1934 | vars->autoneg = AUTO_NEG_ENABLED; | 1936 | vars->autoneg = AUTO_NEG_ENABLED; |
1935 | 1937 | ||
@@ -3772,19 +3774,6 @@ static u8 bnx2x_ext_phy_init(struct link_params *params, struct link_vars *vars) | |||
3772 | } | 3774 | } |
3773 | } | 3775 | } |
3774 | /* Force speed */ | 3776 | /* Force speed */ |
3775 | /* First enable LASI */ | ||
3776 | bnx2x_cl45_write(bp, params->port, | ||
3777 | ext_phy_type, | ||
3778 | ext_phy_addr, | ||
3779 | MDIO_PMA_DEVAD, | ||
3780 | MDIO_PMA_REG_RX_ALARM_CTRL, | ||
3781 | 0x0400); | ||
3782 | bnx2x_cl45_write(bp, params->port, | ||
3783 | ext_phy_type, | ||
3784 | ext_phy_addr, | ||
3785 | MDIO_PMA_DEVAD, | ||
3786 | MDIO_PMA_REG_LASI_CTRL, 0x0004); | ||
3787 | |||
3788 | if (params->req_line_speed == SPEED_10000) { | 3777 | if (params->req_line_speed == SPEED_10000) { |
3789 | DP(NETIF_MSG_LINK, "XGXS 8706 force 10Gbps\n"); | 3778 | DP(NETIF_MSG_LINK, "XGXS 8706 force 10Gbps\n"); |
3790 | 3779 | ||
@@ -3794,6 +3783,9 @@ static u8 bnx2x_ext_phy_init(struct link_params *params, struct link_vars *vars) | |||
3794 | MDIO_PMA_DEVAD, | 3783 | MDIO_PMA_DEVAD, |
3795 | MDIO_PMA_REG_DIGITAL_CTRL, | 3784 | MDIO_PMA_REG_DIGITAL_CTRL, |
3796 | 0x400); | 3785 | 0x400); |
3786 | bnx2x_cl45_write(bp, params->port, ext_phy_type, | ||
3787 | ext_phy_addr, MDIO_PMA_DEVAD, | ||
3788 | MDIO_PMA_REG_LASI_CTRL, 1); | ||
3797 | } else { | 3789 | } else { |
3798 | /* Force 1Gbps using autoneg with 1G | 3790 | /* Force 1Gbps using autoneg with 1G |
3799 | advertisment */ | 3791 | advertisment */ |
@@ -3835,6 +3827,17 @@ static u8 bnx2x_ext_phy_init(struct link_params *params, struct link_vars *vars) | |||
3835 | MDIO_AN_DEVAD, | 3827 | MDIO_AN_DEVAD, |
3836 | MDIO_AN_REG_CTRL, | 3828 | MDIO_AN_REG_CTRL, |
3837 | 0x1200); | 3829 | 0x1200); |
3830 | bnx2x_cl45_write(bp, params->port, | ||
3831 | ext_phy_type, | ||
3832 | ext_phy_addr, | ||
3833 | MDIO_PMA_DEVAD, | ||
3834 | MDIO_PMA_REG_RX_ALARM_CTRL, | ||
3835 | 0x0400); | ||
3836 | bnx2x_cl45_write(bp, params->port, | ||
3837 | ext_phy_type, | ||
3838 | ext_phy_addr, | ||
3839 | MDIO_PMA_DEVAD, | ||
3840 | MDIO_PMA_REG_LASI_CTRL, 0x0004); | ||
3838 | 3841 | ||
3839 | } | 3842 | } |
3840 | bnx2x_save_bcm_spirom_ver(bp, params->port, | 3843 | bnx2x_save_bcm_spirom_ver(bp, params->port, |
@@ -5952,6 +5955,7 @@ static u8 bnx2x_link_initialize(struct link_params *params, | |||
5952 | 5955 | ||
5953 | if (non_ext_phy || | 5956 | if (non_ext_phy || |
5954 | (ext_phy_type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8705) || | 5957 | (ext_phy_type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8705) || |
5958 | (ext_phy_type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8706) || | ||
5955 | (ext_phy_type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8726) || | 5959 | (ext_phy_type == PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8726) || |
5956 | (params->loopback_mode == LOOPBACK_EXT_PHY)) { | 5960 | (params->loopback_mode == LOOPBACK_EXT_PHY)) { |
5957 | if (params->req_line_speed == SPEED_AUTO_NEG) | 5961 | if (params->req_line_speed == SPEED_AUTO_NEG) |
@@ -6421,6 +6425,7 @@ u8 bnx2x_link_update(struct link_params *params, struct link_vars *vars) | |||
6421 | 6425 | ||
6422 | if ((ext_phy_type != PORT_HW_CFG_SERDES_EXT_PHY_TYPE_DIRECT) && | 6426 | if ((ext_phy_type != PORT_HW_CFG_SERDES_EXT_PHY_TYPE_DIRECT) && |
6423 | (ext_phy_type != PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8705) && | 6427 | (ext_phy_type != PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8705) && |
6428 | (ext_phy_type != PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8706) && | ||
6424 | (ext_phy_type != PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8726) && | 6429 | (ext_phy_type != PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8726) && |
6425 | (ext_phy_link_up && !vars->phy_link_up)) | 6430 | (ext_phy_link_up && !vars->phy_link_up)) |
6426 | bnx2x_init_internal_phy(params, vars, 0); | 6431 | bnx2x_init_internal_phy(params, vars, 0); |