Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135046
b: refs/heads/master
c: f56b54f
h: refs/heads/master
v: v3
  • Loading branch information
Ron Mercer authored and David S. Miller committed Mar 4, 2009
1 parent 9de4434 commit f630844
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2ee1e272d1661d7846da753248a4141ad5f16d69
refs/heads/master: f56b54f5423177d26da0aee1f8e7d5da6225ce6d
30 changes: 20 additions & 10 deletions trunk/drivers/net/qlge/qlge_mpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,20 +286,21 @@ static int ql_sfp_out(struct ql_adapter *qdev, struct mbox_params *mbcp)

static void ql_init_fw_done(struct ql_adapter *qdev, struct mbox_params *mbcp)
{
int status;

mbcp->out_count = 2;

if (ql_get_mb_sts(qdev, mbcp)) {
status = ql_get_mb_sts(qdev, mbcp);
if (status) {
QPRINTK(qdev, DRV, ERR, "Firmware did not initialize!\n");
goto exit;
} else {
QPRINTK(qdev, DRV, ERR, "Firmware Revision = 0x%.08x.\n",
mbcp->mbox_out[1]);
status = ql_cam_route_initialize(qdev);
if (status)
QPRINTK(qdev, IFUP, ERR,
"Failed to init CAM/Routing tables.\n");
}
QPRINTK(qdev, DRV, ERR, "Firmware initialized!\n");
QPRINTK(qdev, DRV, ERR, "Firmware status = 0x%.08x.\n",
mbcp->mbox_out[0]);
QPRINTK(qdev, DRV, ERR, "Firmware Revision = 0x%.08x.\n",
mbcp->mbox_out[1]);
exit:
/* Clear the MPI firmware status. */
ql_write32(qdev, CSR, CSR_CMD_CLR_R2PCI_INT);
}

/* Process an async event and clear it unless it's an
Expand Down Expand Up @@ -374,6 +375,15 @@ static int ql_mpi_handler(struct ql_adapter *qdev, struct mbox_params *mbcp)
break;

case AEN_FW_INIT_DONE:
/* If we're in process on executing the firmware,
* then convert the status to normal mailbox status.
*/
if (mbcp->mbox_in[0] == MB_CMD_EX_FW) {
mbcp->out_count = orig_count;
status = ql_get_mb_sts(qdev, mbcp);
mbcp->mbox_out[0] = MB_CMD_STS_GOOD;
return status;
}
ql_init_fw_done(qdev, mbcp);
break;

Expand Down

0 comments on commit f630844

Please sign in to comment.