summaryrefslogtreecommitdiff
path: root/drivers/net/qlge
diff options
context:
space:
mode:
authorRon Mercer <ron.mercer@qlogic.com>2009-03-03 15:10:37 +0300
committerDavid S. Miller <davem@davemloft.net>2009-03-04 10:50:49 +0300
commitfc1f9ea51de726b3b8003539788d918814c9deff (patch)
tree3991185f670ecbbc656f90fcd36d99cf876cf541 /drivers/net/qlge
parentbb6676705e41efdf4ba788340a885b19fd5a0215 (diff)
downloadlinux-fc1f9ea51de726b3b8003539788d918814c9deff.tar.xz
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)
return status;
}
+static int ql_aen_lost(struct ql_adapter *qdev, struct mbox_params *mbcp)
+{
+ int status;
+
+ mbcp->out_count = 6;
+
+ status = ql_get_mb_sts(qdev, mbcp);
+ if (status)
+ QPRINTK(qdev, DRV, ERR, "Lost AEN broken!\n");
+ else {
+ int i;
+ QPRINTK(qdev, DRV, ERR, "Lost AEN detected.\n");
+ for (i = 0; i < mbcp->out_count; i++)
+ QPRINTK(qdev, DRV, ERR, "mbox_out[%d] = 0x%.08x.\n",
+ i, mbcp->mbox_out[i]);
+
+ }
+
+ return status;
+}
+
static void ql_init_fw_done(struct ql_adapter *qdev, struct mbox_params *mbcp)
{
int status;
@@ -421,6 +442,10 @@ static int ql_mpi_handler(struct ql_adapter *qdev, struct mbox_params *mbcp)
status = -EIO;
break;
+ case AEN_AEN_LOST:
+ ql_aen_lost(qdev, mbcp);
+ break;
+
default:
QPRINTK(qdev, DRV, ERR,
"Unsupported AE %.08x.\n", mbcp->mbox_out[0]);