diff options
author | Yaniv Rosner <yanivr@broadcom.com> | 2011-01-29 23:15:07 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-31 01:26:16 -0500 |
commit | 5866df6d07cf22749557a0804253c8fee9e87f06 (patch) | |
tree | 647862a41ff9006d4423ad0f697eedf3a574cbe3 /drivers/net/bnx2x | |
parent | c8e64df48a814be1e7066f07b4f709ff63727abf (diff) |
bnx2x: Fix potential link loss in multi-function mode
All functions on a port should be set to take the MDC/MDIO lock to avoid contention on the bus
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')
-rw-r--r-- | drivers/net/bnx2x/bnx2x_main.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c index 8cdcf5b39d1e..404d93e6df21 100644 --- a/drivers/net/bnx2x/bnx2x_main.c +++ b/drivers/net/bnx2x/bnx2x_main.c | |||
@@ -5296,10 +5296,6 @@ static int bnx2x_init_hw_common(struct bnx2x *bp, u32 load_code) | |||
5296 | } | 5296 | } |
5297 | } | 5297 | } |
5298 | 5298 | ||
5299 | bp->port.need_hw_lock = bnx2x_hw_lock_required(bp, | ||
5300 | bp->common.shmem_base, | ||
5301 | bp->common.shmem2_base); | ||
5302 | |||
5303 | bnx2x_setup_fan_failure_detection(bp); | 5299 | bnx2x_setup_fan_failure_detection(bp); |
5304 | 5300 | ||
5305 | /* clear PXP2 attentions */ | 5301 | /* clear PXP2 attentions */ |
@@ -5503,9 +5499,6 @@ static int bnx2x_init_hw_port(struct bnx2x *bp) | |||
5503 | 5499 | ||
5504 | bnx2x_init_block(bp, MCP_BLOCK, init_stage); | 5500 | bnx2x_init_block(bp, MCP_BLOCK, init_stage); |
5505 | bnx2x_init_block(bp, DMAE_BLOCK, init_stage); | 5501 | bnx2x_init_block(bp, DMAE_BLOCK, init_stage); |
5506 | bp->port.need_hw_lock = bnx2x_hw_lock_required(bp, | ||
5507 | bp->common.shmem_base, | ||
5508 | bp->common.shmem2_base); | ||
5509 | if (bnx2x_fan_failure_det_req(bp, bp->common.shmem_base, | 5502 | if (bnx2x_fan_failure_det_req(bp, bp->common.shmem_base, |
5510 | bp->common.shmem2_base, port)) { | 5503 | bp->common.shmem2_base, port)) { |
5511 | u32 reg_addr = (port ? MISC_REG_AEU_ENABLE1_FUNC_1_OUT_0 : | 5504 | u32 reg_addr = (port ? MISC_REG_AEU_ENABLE1_FUNC_1_OUT_0 : |
@@ -8379,6 +8372,17 @@ static void __devinit bnx2x_get_port_hwinfo(struct bnx2x *bp) | |||
8379 | (ext_phy_type != PORT_HW_CFG_XGXS_EXT_PHY_TYPE_NOT_CONN)) | 8372 | (ext_phy_type != PORT_HW_CFG_XGXS_EXT_PHY_TYPE_NOT_CONN)) |
8380 | bp->mdio.prtad = | 8373 | bp->mdio.prtad = |
8381 | XGXS_EXT_PHY_ADDR(ext_phy_config); | 8374 | XGXS_EXT_PHY_ADDR(ext_phy_config); |
8375 | |||
8376 | /* | ||
8377 | * Check if hw lock is required to access MDC/MDIO bus to the PHY(s) | ||
8378 | * In MF mode, it is set to cover self test cases | ||
8379 | */ | ||
8380 | if (IS_MF(bp)) | ||
8381 | bp->port.need_hw_lock = 1; | ||
8382 | else | ||
8383 | bp->port.need_hw_lock = bnx2x_hw_lock_required(bp, | ||
8384 | bp->common.shmem_base, | ||
8385 | bp->common.shmem2_base); | ||
8382 | } | 8386 | } |
8383 | 8387 | ||
8384 | static void __devinit bnx2x_get_mac_hwinfo(struct bnx2x *bp) | 8388 | static void __devinit bnx2x_get_mac_hwinfo(struct bnx2x *bp) |