diff options
author | Eilon Greenstein <eilong@broadcom.com> | 2009-02-12 03:37:16 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-16 02:31:42 -0500 |
commit | 052a38e096dece43e38a19a896ae7ad019415bc1 (patch) | |
tree | 127b34c6948872a535bfc13e102d852515c44679 /drivers/net/bnx2x_link.c | |
parent | c2c8b03e200bdda3ba23d27f5c33bac784dced01 (diff) |
bnx2x: Using registers name
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 | 71 |
1 files changed, 36 insertions, 35 deletions
diff --git a/drivers/net/bnx2x_link.c b/drivers/net/bnx2x_link.c index 4a594b84ba20..39db995c6985 100644 --- a/drivers/net/bnx2x_link.c +++ b/drivers/net/bnx2x_link.c | |||
@@ -2094,7 +2094,7 @@ static u8 bnx2x_8073_is_snr_needed(struct link_params *params) | |||
2094 | PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073, | 2094 | PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073, |
2095 | ext_phy_addr, | 2095 | ext_phy_addr, |
2096 | MDIO_PMA_DEVAD, | 2096 | MDIO_PMA_DEVAD, |
2097 | 0xc801, &val); | 2097 | MDIO_PMA_REG_8073_CHIP_REV, &val); |
2098 | 2098 | ||
2099 | if (val != 1) { | 2099 | if (val != 1) { |
2100 | /* No need to workaround in 8073 A1 */ | 2100 | /* No need to workaround in 8073 A1 */ |
@@ -2126,7 +2126,7 @@ static u8 bnx2x_bcm8073_xaui_wa(struct link_params *params) | |||
2126 | PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073, | 2126 | PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073, |
2127 | ext_phy_addr, | 2127 | ext_phy_addr, |
2128 | MDIO_PMA_DEVAD, | 2128 | MDIO_PMA_DEVAD, |
2129 | 0xc801, &val); | 2129 | MDIO_PMA_REG_8073_CHIP_REV, &val); |
2130 | 2130 | ||
2131 | if (val > 0) { | 2131 | if (val > 0) { |
2132 | /* No need to workaround in 8073 A1 */ | 2132 | /* No need to workaround in 8073 A1 */ |
@@ -2142,7 +2142,8 @@ static u8 bnx2x_bcm8073_xaui_wa(struct link_params *params) | |||
2142 | PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073, | 2142 | PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073, |
2143 | ext_phy_addr, | 2143 | ext_phy_addr, |
2144 | MDIO_PMA_DEVAD, | 2144 | MDIO_PMA_DEVAD, |
2145 | 0xc820, &val); | 2145 | MDIO_PMA_REG_8073_SPEED_LINK_STATUS, |
2146 | &val); | ||
2146 | /* If bit [14] = 0 or bit [13] = 0, continue on with | 2147 | /* If bit [14] = 0 or bit [13] = 0, continue on with |
2147 | system initialization (XAUI work-around not required, | 2148 | system initialization (XAUI work-around not required, |
2148 | as these bits indicate 2.5G or 1G link up). */ | 2149 | as these bits indicate 2.5G or 1G link up). */ |
@@ -2160,7 +2161,7 @@ static u8 bnx2x_bcm8073_xaui_wa(struct link_params *params) | |||
2160 | PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073, | 2161 | PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073, |
2161 | ext_phy_addr, | 2162 | ext_phy_addr, |
2162 | MDIO_PMA_DEVAD, | 2163 | MDIO_PMA_DEVAD, |
2163 | 0xc841, &val); | 2164 | MDIO_PMA_REG_8073_XAUI_WA, &val); |
2164 | if (val & (1<<15)) { | 2165 | if (val & (1<<15)) { |
2165 | DP(NETIF_MSG_LINK, | 2166 | DP(NETIF_MSG_LINK, |
2166 | "XAUI workaround has completed\n"); | 2167 | "XAUI workaround has completed\n"); |
@@ -2758,7 +2759,7 @@ static void bnx2x_bcm8073_set_xaui_low_power_mode(struct link_params *params) | |||
2758 | PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073, | 2759 | PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073, |
2759 | ext_phy_addr, | 2760 | ext_phy_addr, |
2760 | MDIO_PMA_DEVAD, | 2761 | MDIO_PMA_DEVAD, |
2761 | 0xc801, &val); | 2762 | MDIO_PMA_REG_8073_CHIP_REV, &val); |
2762 | 2763 | ||
2763 | if (val == 0) { | 2764 | if (val == 0) { |
2764 | /* Mustn't set low power mode in 8073 A0 */ | 2765 | /* Mustn't set low power mode in 8073 A0 */ |
@@ -3283,7 +3284,7 @@ static u8 bnx2x_ext_phy_init(struct link_params *params, struct link_vars *vars) | |||
3283 | ext_phy_type, | 3284 | ext_phy_type, |
3284 | ext_phy_addr, | 3285 | ext_phy_addr, |
3285 | MDIO_PMA_DEVAD, | 3286 | MDIO_PMA_DEVAD, |
3286 | 0xca13, | 3287 | MDIO_PMA_REG_M8051_MSGOUT_REG, |
3287 | &tmp1); | 3288 | &tmp1); |
3288 | 3289 | ||
3289 | bnx2x_cl45_read(bp, params->port, | 3290 | bnx2x_cl45_read(bp, params->port, |
@@ -3350,7 +3351,7 @@ static u8 bnx2x_ext_phy_init(struct link_params *params, struct link_vars *vars) | |||
3350 | ext_phy_type, | 3351 | ext_phy_type, |
3351 | ext_phy_addr, | 3352 | ext_phy_addr, |
3352 | MDIO_AN_DEVAD, | 3353 | MDIO_AN_DEVAD, |
3353 | 0x8329, &tmp1); | 3354 | MDIO_AN_REG_8073_2_5G, &tmp1); |
3354 | 3355 | ||
3355 | if (((params->speed_cap_mask & | 3356 | if (((params->speed_cap_mask & |
3356 | PORT_HW_CFG_SPEED_CAPABILITY_D0_2_5G) && | 3357 | PORT_HW_CFG_SPEED_CAPABILITY_D0_2_5G) && |
@@ -3364,7 +3365,7 @@ static u8 bnx2x_ext_phy_init(struct link_params *params, struct link_vars *vars) | |||
3364 | PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073, | 3365 | PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073, |
3365 | ext_phy_addr, | 3366 | ext_phy_addr, |
3366 | MDIO_PMA_DEVAD, | 3367 | MDIO_PMA_DEVAD, |
3367 | 0xc801, &phy_ver); | 3368 | MDIO_PMA_REG_8073_CHIP_REV, &phy_ver); |
3368 | DP(NETIF_MSG_LINK, "Add 2.5G\n"); | 3369 | DP(NETIF_MSG_LINK, "Add 2.5G\n"); |
3369 | if (phy_ver > 0) | 3370 | if (phy_ver > 0) |
3370 | tmp1 |= 1; | 3371 | tmp1 |= 1; |
@@ -3379,7 +3380,7 @@ static u8 bnx2x_ext_phy_init(struct link_params *params, struct link_vars *vars) | |||
3379 | ext_phy_type, | 3380 | ext_phy_type, |
3380 | ext_phy_addr, | 3381 | ext_phy_addr, |
3381 | MDIO_AN_DEVAD, | 3382 | MDIO_AN_DEVAD, |
3382 | 0x8329, tmp1); | 3383 | MDIO_AN_REG_8073_2_5G, tmp1); |
3383 | } | 3384 | } |
3384 | 3385 | ||
3385 | /* Add support for CL37 (passive mode) II */ | 3386 | /* Add support for CL37 (passive mode) II */ |
@@ -3737,7 +3738,7 @@ static u8 bnx2x_ext_phy_is_link_up(struct link_params *params, | |||
3737 | ext_phy_type, | 3738 | ext_phy_type, |
3738 | ext_phy_addr, | 3739 | ext_phy_addr, |
3739 | MDIO_PMA_DEVAD, | 3740 | MDIO_PMA_DEVAD, |
3740 | 0xca13, | 3741 | MDIO_PMA_REG_M8051_MSGOUT_REG, |
3741 | &val1); | 3742 | &val1); |
3742 | 3743 | ||
3743 | /* Check the LASI */ | 3744 | /* Check the LASI */ |
@@ -3782,17 +3783,17 @@ static u8 bnx2x_ext_phy_is_link_up(struct link_params *params, | |||
3782 | } | 3783 | } |
3783 | } | 3784 | } |
3784 | bnx2x_cl45_read(bp, params->port, | 3785 | bnx2x_cl45_read(bp, params->port, |
3785 | ext_phy_type, | 3786 | ext_phy_type, |
3786 | ext_phy_addr, | 3787 | ext_phy_addr, |
3787 | MDIO_AN_DEVAD, | 3788 | MDIO_AN_DEVAD, |
3788 | 0x8304, | 3789 | MDIO_AN_REG_LINK_STATUS, |
3789 | &an1000_status); | 3790 | &an1000_status); |
3790 | bnx2x_cl45_read(bp, params->port, | 3791 | bnx2x_cl45_read(bp, params->port, |
3791 | ext_phy_type, | 3792 | ext_phy_type, |
3792 | ext_phy_addr, | 3793 | ext_phy_addr, |
3793 | MDIO_AN_DEVAD, | 3794 | MDIO_AN_DEVAD, |
3794 | 0x8304, | 3795 | MDIO_AN_REG_LINK_STATUS, |
3795 | &an1000_status); | 3796 | &an1000_status); |
3796 | 3797 | ||
3797 | /* Check the link status on 1.1.2 */ | 3798 | /* Check the link status on 1.1.2 */ |
3798 | bnx2x_cl45_read(bp, params->port, | 3799 | bnx2x_cl45_read(bp, params->port, |
@@ -3837,11 +3838,11 @@ static u8 bnx2x_ext_phy_is_link_up(struct link_params *params, | |||
3837 | 3838 | ||
3838 | } | 3839 | } |
3839 | bnx2x_cl45_read(bp, params->port, | 3840 | bnx2x_cl45_read(bp, params->port, |
3840 | ext_phy_type, | 3841 | ext_phy_type, |
3841 | ext_phy_addr, | 3842 | ext_phy_addr, |
3842 | MDIO_PMA_DEVAD, | 3843 | MDIO_PMA_DEVAD, |
3843 | 0xc820, | 3844 | MDIO_PMA_REG_8073_SPEED_LINK_STATUS, |
3844 | &link_status); | 3845 | &link_status); |
3845 | 3846 | ||
3846 | /* Bits 0..2 --> speed detected, | 3847 | /* Bits 0..2 --> speed detected, |
3847 | bits 13..15--> link is down */ | 3848 | bits 13..15--> link is down */ |
@@ -3875,17 +3876,17 @@ static u8 bnx2x_ext_phy_is_link_up(struct link_params *params, | |||
3875 | } else { | 3876 | } else { |
3876 | /* See if 1G link is up for the 8072 */ | 3877 | /* See if 1G link is up for the 8072 */ |
3877 | bnx2x_cl45_read(bp, params->port, | 3878 | bnx2x_cl45_read(bp, params->port, |
3878 | ext_phy_type, | 3879 | ext_phy_type, |
3879 | ext_phy_addr, | 3880 | ext_phy_addr, |
3880 | MDIO_AN_DEVAD, | 3881 | MDIO_AN_DEVAD, |
3881 | 0x8304, | 3882 | MDIO_AN_REG_LINK_STATUS, |
3882 | &an1000_status); | 3883 | &an1000_status); |
3883 | bnx2x_cl45_read(bp, params->port, | 3884 | bnx2x_cl45_read(bp, params->port, |
3884 | ext_phy_type, | 3885 | ext_phy_type, |
3885 | ext_phy_addr, | 3886 | ext_phy_addr, |
3886 | MDIO_AN_DEVAD, | 3887 | MDIO_AN_DEVAD, |
3887 | 0x8304, | 3888 | MDIO_AN_REG_LINK_STATUS, |
3888 | &an1000_status); | 3889 | &an1000_status); |
3889 | if (an1000_status & (1<<1)) { | 3890 | if (an1000_status & (1<<1)) { |
3890 | ext_phy_link_up = 1; | 3891 | ext_phy_link_up = 1; |
3891 | vars->line_speed = SPEED_1000; | 3892 | vars->line_speed = SPEED_1000; |