diff options
Diffstat (limited to 'drivers/net/bnx2x/bnx2x_main.c')
-rw-r--r-- | drivers/net/bnx2x/bnx2x_main.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c index 150709111548..f74582a22c68 100644 --- a/drivers/net/bnx2x/bnx2x_main.c +++ b/drivers/net/bnx2x/bnx2x_main.c | |||
@@ -5798,6 +5798,12 @@ static int bnx2x_init_hw_common(struct bnx2x *bp) | |||
5798 | 5798 | ||
5799 | DP(BNX2X_MSG_MCP, "starting common init func %d\n", BP_ABS_FUNC(bp)); | 5799 | DP(BNX2X_MSG_MCP, "starting common init func %d\n", BP_ABS_FUNC(bp)); |
5800 | 5800 | ||
5801 | /* | ||
5802 | * take the UNDI lock to protect undi_unload flow from accessing | ||
5803 | * registers while we're resetting the chip | ||
5804 | */ | ||
5805 | bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_UNDI); | ||
5806 | |||
5801 | bnx2x_reset_common(bp); | 5807 | bnx2x_reset_common(bp); |
5802 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET, 0xffffffff); | 5808 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET, 0xffffffff); |
5803 | 5809 | ||
@@ -5808,6 +5814,8 @@ static int bnx2x_init_hw_common(struct bnx2x *bp) | |||
5808 | } | 5814 | } |
5809 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET, val); | 5815 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET, val); |
5810 | 5816 | ||
5817 | bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_UNDI); | ||
5818 | |||
5811 | bnx2x_init_block(bp, BLOCK_MISC, PHASE_COMMON); | 5819 | bnx2x_init_block(bp, BLOCK_MISC, PHASE_COMMON); |
5812 | 5820 | ||
5813 | if (!CHIP_IS_E1x(bp)) { | 5821 | if (!CHIP_IS_E1x(bp)) { |
@@ -10251,10 +10259,17 @@ static int __devinit bnx2x_init_dev(struct pci_dev *pdev, | |||
10251 | /* clean indirect addresses */ | 10259 | /* clean indirect addresses */ |
10252 | pci_write_config_dword(bp->pdev, PCICFG_GRC_ADDRESS, | 10260 | pci_write_config_dword(bp->pdev, PCICFG_GRC_ADDRESS, |
10253 | PCICFG_VENDOR_ID_OFFSET); | 10261 | PCICFG_VENDOR_ID_OFFSET); |
10254 | REG_WR(bp, PXP2_REG_PGL_ADDR_88_F0 + BP_PORT(bp)*16, 0); | 10262 | /* Clean the following indirect addresses for all functions since it |
10255 | REG_WR(bp, PXP2_REG_PGL_ADDR_8C_F0 + BP_PORT(bp)*16, 0); | 10263 | * is not used by the driver. |
10256 | REG_WR(bp, PXP2_REG_PGL_ADDR_90_F0 + BP_PORT(bp)*16, 0); | 10264 | */ |
10257 | REG_WR(bp, PXP2_REG_PGL_ADDR_94_F0 + BP_PORT(bp)*16, 0); | 10265 | REG_WR(bp, PXP2_REG_PGL_ADDR_88_F0, 0); |
10266 | REG_WR(bp, PXP2_REG_PGL_ADDR_8C_F0, 0); | ||
10267 | REG_WR(bp, PXP2_REG_PGL_ADDR_90_F0, 0); | ||
10268 | REG_WR(bp, PXP2_REG_PGL_ADDR_94_F0, 0); | ||
10269 | REG_WR(bp, PXP2_REG_PGL_ADDR_88_F1, 0); | ||
10270 | REG_WR(bp, PXP2_REG_PGL_ADDR_8C_F1, 0); | ||
10271 | REG_WR(bp, PXP2_REG_PGL_ADDR_90_F1, 0); | ||
10272 | REG_WR(bp, PXP2_REG_PGL_ADDR_94_F1, 0); | ||
10258 | 10273 | ||
10259 | /* | 10274 | /* |
10260 | * Enable internal target-read (in case we are probed after PF FLR). | 10275 | * Enable internal target-read (in case we are probed after PF FLR). |