aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlge
diff options
context:
space:
mode:
authorRon Mercer <ron.mercer@qlogic.com>2009-03-03 07:10:37 -0500
committerDavid S. Miller <davem@davemloft.net>2009-03-04 02:50:49 -0500
commitfc1f9ea51de726b3b8003539788d918814c9deff (patch)
tree3991185f670ecbbc656f90fcd36d99cf876cf541 /drivers/net/qlge
parentbb6676705e41efdf4ba788340a885b19fd5a0215 (diff)
qlge: Add support for lost firmware events.
When the firmware is issuing events to the driver the events must be removed from the queue. If the queue overflows, the firmware will build and special event that captures those that are lost. 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.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/qlge/qlge_mpi.c b/drivers/net/qlge/qlge_mpi.c
index f9a237165fc1..9f81b797f10b 100644
--- a/drivers/net/qlge/qlge_mpi.c
+++ b/drivers/net/qlge/qlge_mpi.c
@@ -284,6 +284,27 @@ static int ql_sfp_out(struct ql_adapter *qdev, struct mbox_params *mbcp)
284 return status; 284 return status;
285} 285}
286 286
287static int ql_aen_lost(struct ql_adapter *qdev, struct mbox_params *mbcp)
288{
289 int status;
290
291 mbcp->out_count = 6;
292
293 status = ql_get_mb_sts(qdev, mbcp);
294 if (status)
295 QPRINTK(qdev, DRV, ERR, "Lost AEN broken!\n");
296 else {
297 int i;
298 QPRINTK(qdev, DRV, ERR, "Lost AEN detected.\n");
299 for (i = 0; i < mbcp->out_count; i++)
300 QPRINTK(qdev, DRV, ERR, "mbox_out[%d] = 0x%.08x.\n",
301 i, mbcp->mbox_out[i]);
302
303 }
304
305 return status;
306}
307
287static void ql_init_fw_done(struct ql_adapter *qdev, struct mbox_params *mbcp) 308static void ql_init_fw_done(struct ql_adapter *qdev, struct mbox_params *mbcp)
288{ 309{
289 int status; 310 int status;
@@ -421,6 +442,10 @@ static int ql_mpi_handler(struct ql_adapter *qdev, struct mbox_params *mbcp)
421 status = -EIO; 442 status = -EIO;
422 break; 443 break;
423 444
445 case AEN_AEN_LOST:
446 ql_aen_lost(qdev, mbcp);
447 break;
448
424 default: 449 default:
425 QPRINTK(qdev, DRV, ERR, 450 QPRINTK(qdev, DRV, ERR,
426 "Unsupported AE %.08x.\n", mbcp->mbox_out[0]); 451 "Unsupported AE %.08x.\n", mbcp->mbox_out[0]);