diff options
author | Ron Mercer <ron.mercer@qlogic.com> | 2009-03-03 07:10:34 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-04 02:50:48 -0500 |
commit | f56b54f5423177d26da0aee1f8e7d5da6225ce6d (patch) | |
tree | 311cbcd927a79a81d023b75256101db525362ed9 /drivers/net/qlge | |
parent | 2ee1e272d1661d7846da753248a4141ad5f16d69 (diff) |
qlge: Clean up event handler for firmware init.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge')
-rw-r--r-- | drivers/net/qlge/qlge_mpi.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/drivers/net/qlge/qlge_mpi.c b/drivers/net/qlge/qlge_mpi.c index 9f1fe542e271..3a660f9e9001 100644 --- a/drivers/net/qlge/qlge_mpi.c +++ b/drivers/net/qlge/qlge_mpi.c | |||
@@ -286,20 +286,21 @@ static int ql_sfp_out(struct ql_adapter *qdev, struct mbox_params *mbcp) | |||
286 | 286 | ||
287 | static void ql_init_fw_done(struct ql_adapter *qdev, struct mbox_params *mbcp) | 287 | static void ql_init_fw_done(struct ql_adapter *qdev, struct mbox_params *mbcp) |
288 | { | 288 | { |
289 | int status; | ||
290 | |||
289 | mbcp->out_count = 2; | 291 | mbcp->out_count = 2; |
290 | 292 | ||
291 | if (ql_get_mb_sts(qdev, mbcp)) { | 293 | status = ql_get_mb_sts(qdev, mbcp); |
294 | if (status) { | ||
292 | QPRINTK(qdev, DRV, ERR, "Firmware did not initialize!\n"); | 295 | QPRINTK(qdev, DRV, ERR, "Firmware did not initialize!\n"); |
293 | goto exit; | 296 | } else { |
297 | QPRINTK(qdev, DRV, ERR, "Firmware Revision = 0x%.08x.\n", | ||
298 | mbcp->mbox_out[1]); | ||
299 | status = ql_cam_route_initialize(qdev); | ||
300 | if (status) | ||
301 | QPRINTK(qdev, IFUP, ERR, | ||
302 | "Failed to init CAM/Routing tables.\n"); | ||
294 | } | 303 | } |
295 | QPRINTK(qdev, DRV, ERR, "Firmware initialized!\n"); | ||
296 | QPRINTK(qdev, DRV, ERR, "Firmware status = 0x%.08x.\n", | ||
297 | mbcp->mbox_out[0]); | ||
298 | QPRINTK(qdev, DRV, ERR, "Firmware Revision = 0x%.08x.\n", | ||
299 | mbcp->mbox_out[1]); | ||
300 | exit: | ||
301 | /* Clear the MPI firmware status. */ | ||
302 | ql_write32(qdev, CSR, CSR_CMD_CLR_R2PCI_INT); | ||
303 | } | 304 | } |
304 | 305 | ||
305 | /* Process an async event and clear it unless it's an | 306 | /* Process an async event and clear it unless it's an |
@@ -374,6 +375,15 @@ static int ql_mpi_handler(struct ql_adapter *qdev, struct mbox_params *mbcp) | |||
374 | break; | 375 | break; |
375 | 376 | ||
376 | case AEN_FW_INIT_DONE: | 377 | case AEN_FW_INIT_DONE: |
378 | /* If we're in process on executing the firmware, | ||
379 | * then convert the status to normal mailbox status. | ||
380 | */ | ||
381 | if (mbcp->mbox_in[0] == MB_CMD_EX_FW) { | ||
382 | mbcp->out_count = orig_count; | ||
383 | status = ql_get_mb_sts(qdev, mbcp); | ||
384 | mbcp->mbox_out[0] = MB_CMD_STS_GOOD; | ||
385 | return status; | ||
386 | } | ||
377 | ql_init_fw_done(qdev, mbcp); | 387 | ql_init_fw_done(qdev, mbcp); |
378 | break; | 388 | break; |
379 | 389 | ||