diff options
author | Eilon Greenstein <eilong@broadcom.com> | 2009-02-12 03:36:47 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-16 02:31:15 -0500 |
commit | 35b19ba51c1e6258a338a0855c72384abc33ce11 (patch) | |
tree | cf67f18b4ec1d228fdef2e607e814c2fa48d8137 /drivers/net/bnx2x_main.c | |
parent | 1c06328c0345638ea7532b45cadfe713c9e9781e (diff) |
bnx2x: Removing the board type
There are too many different board types and this field is not scalable.
Removing it and making decisions according to other fields
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
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 | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index 77793bba7a9f..f4486580b99f 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c | |||
@@ -2505,9 +2505,8 @@ static inline void bnx2x_attn_int_deasserted0(struct bnx2x *bp, u32 attn) | |||
2505 | 2505 | ||
2506 | BNX2X_ERR("SPIO5 hw attention\n"); | 2506 | BNX2X_ERR("SPIO5 hw attention\n"); |
2507 | 2507 | ||
2508 | switch (bp->common.board & SHARED_HW_CFG_BOARD_TYPE_MASK) { | 2508 | switch (XGXS_EXT_PHY_TYPE(bp->link_params.ext_phy_config)) { |
2509 | case SHARED_HW_CFG_BOARD_TYPE_BCM957710A1021G: | 2509 | case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_SFX7101: |
2510 | case SHARED_HW_CFG_BOARD_TYPE_BCM957710A1022G: | ||
2511 | /* Fan failure attention */ | 2510 | /* Fan failure attention */ |
2512 | 2511 | ||
2513 | /* The PHY reset is controlled by GPIO 1 */ | 2512 | /* The PHY reset is controlled by GPIO 1 */ |
@@ -5622,9 +5621,8 @@ static int bnx2x_init_common(struct bnx2x *bp) | |||
5622 | return -EBUSY; | 5621 | return -EBUSY; |
5623 | } | 5622 | } |
5624 | 5623 | ||
5625 | switch (bp->common.board & SHARED_HW_CFG_BOARD_TYPE_MASK) { | 5624 | switch (XGXS_EXT_PHY_TYPE(bp->link_params.ext_phy_config)) { |
5626 | case SHARED_HW_CFG_BOARD_TYPE_BCM957710A1021G: | 5625 | case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_SFX7101: |
5627 | case SHARED_HW_CFG_BOARD_TYPE_BCM957710A1022G: | ||
5628 | /* Fan failure is indicated by SPIO 5 */ | 5626 | /* Fan failure is indicated by SPIO 5 */ |
5629 | bnx2x_set_spio(bp, MISC_REGISTERS_SPIO_5, | 5627 | bnx2x_set_spio(bp, MISC_REGISTERS_SPIO_5, |
5630 | MISC_REGISTERS_SPIO_INPUT_HI_Z); | 5628 | MISC_REGISTERS_SPIO_INPUT_HI_Z); |
@@ -5830,9 +5828,8 @@ static int bnx2x_init_port(struct bnx2x *bp) | |||
5830 | /* Port MCP comes here */ | 5828 | /* Port MCP comes here */ |
5831 | /* Port DMAE comes here */ | 5829 | /* Port DMAE comes here */ |
5832 | 5830 | ||
5833 | switch (bp->common.board & SHARED_HW_CFG_BOARD_TYPE_MASK) { | 5831 | switch (XGXS_EXT_PHY_TYPE(bp->link_params.ext_phy_config)) { |
5834 | case SHARED_HW_CFG_BOARD_TYPE_BCM957710A1021G: | 5832 | case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_SFX7101: |
5835 | case SHARED_HW_CFG_BOARD_TYPE_BCM957710A1022G: | ||
5836 | /* add SPIO 5 to group 0 */ | 5833 | /* add SPIO 5 to group 0 */ |
5837 | val = REG_RD(bp, MISC_REG_AEU_ENABLE1_FUNC_0_OUT_0); | 5834 | val = REG_RD(bp, MISC_REG_AEU_ENABLE1_FUNC_0_OUT_0); |
5838 | val |= AEU_INPUTS_ATTN_BITS_SPIO5; | 5835 | val |= AEU_INPUTS_ATTN_BITS_SPIO5; |
@@ -7433,10 +7430,7 @@ static void __devinit bnx2x_get_common_hwinfo(struct bnx2x *bp) | |||
7433 | BNX2X_ERR("BAD MCP validity signature\n"); | 7430 | BNX2X_ERR("BAD MCP validity signature\n"); |
7434 | 7431 | ||
7435 | bp->common.hw_config = SHMEM_RD(bp, dev_info.shared_hw_config.config); | 7432 | bp->common.hw_config = SHMEM_RD(bp, dev_info.shared_hw_config.config); |
7436 | bp->common.board = SHMEM_RD(bp, dev_info.shared_hw_config.board); | 7433 | BNX2X_DEV_INFO("hw_config 0x%08x\n", bp->common.hw_config); |
7437 | |||
7438 | BNX2X_DEV_INFO("hw_config 0x%08x board 0x%08x\n", | ||
7439 | bp->common.hw_config, bp->common.board); | ||
7440 | 7434 | ||
7441 | bp->link_params.hw_led_mode = ((bp->common.hw_config & | 7435 | bp->link_params.hw_led_mode = ((bp->common.hw_config & |
7442 | SHARED_HW_CFG_LED_MODE_MASK) >> | 7436 | SHARED_HW_CFG_LED_MODE_MASK) >> |