aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2007-07-16 21:26:43 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-18 04:46:47 -0400
commitc2d3db8c7cbb94e77461627085b85d74dc64d716 (patch)
tree7edcefface1c3298675c0efcba664772eb2f2319 /drivers
parente30372c91273bb5777597362c74e63f96d9cd434 (diff)
[BNX2]: Add delay before reading firmware version.
The management firmware may still be loading during bnx2_init_one() because of the D3hot -> D0 transition and the firmware version may not be available without waiting a bit. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bnx2.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 311c8595c64b..28399d8d8d2b 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -4143,10 +4143,6 @@ bnx2_init_chip(struct bnx2 *bp)
4143 4143
4144 REG_WR(bp, BNX2_HC_ATTN_BITS_ENABLE, STATUS_ATTN_EVENTS); 4144 REG_WR(bp, BNX2_HC_ATTN_BITS_ENABLE, STATUS_ATTN_EVENTS);
4145 4145
4146 if (REG_RD_IND(bp, bp->shmem_base + BNX2_PORT_FEATURE) &
4147 BNX2_PORT_FEATURE_ASF_ENABLED)
4148 bp->flags |= ASF_ENABLE_FLAG;
4149
4150 /* Initialize the receive filter. */ 4146 /* Initialize the receive filter. */
4151 bnx2_set_rx_mode(bp->dev); 4147 bnx2_set_rx_mode(bp->dev);
4152 4148
@@ -6645,6 +6641,18 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
6645 if (i != 2) 6641 if (i != 2)
6646 bp->fw_version[j++] = '.'; 6642 bp->fw_version[j++] = '.';
6647 } 6643 }
6644 if (REG_RD_IND(bp, bp->shmem_base + BNX2_PORT_FEATURE) &
6645 BNX2_PORT_FEATURE_ASF_ENABLED) {
6646 bp->flags |= ASF_ENABLE_FLAG;
6647
6648 for (i = 0; i < 30; i++) {
6649 reg = REG_RD_IND(bp, bp->shmem_base +
6650 BNX2_BC_STATE_CONDITION);
6651 if (reg & BNX2_CONDITION_MFW_RUN_MASK)
6652 break;
6653 msleep(10);
6654 }
6655 }
6648 reg = REG_RD_IND(bp, bp->shmem_base + BNX2_BC_STATE_CONDITION); 6656 reg = REG_RD_IND(bp, bp->shmem_base + BNX2_BC_STATE_CONDITION);
6649 reg &= BNX2_CONDITION_MFW_RUN_MASK; 6657 reg &= BNX2_CONDITION_MFW_RUN_MASK;
6650 if (reg != BNX2_CONDITION_MFW_RUN_UNKNOWN && 6658 if (reg != BNX2_CONDITION_MFW_RUN_UNKNOWN &&