summaryrefslogtreecommitdiffstats
path: root/drivers/net/qlge
diff options
context:
space:
mode:
authorRon Mercer <ron.mercer@qlogic.com>2009-06-07 13:58:25 +0000
committerDavid S. Miller <davem@davemloft.net>2009-06-08 00:09:44 -0700
commitd6f58c2e63b4197cba99edd3a4c5c7f4935708fb (patch)
treef5205161ce569aaa06f1f8c8db47b30bd2d821c5 /drivers/net/qlge
parentdf911e2dc4c59e259b65c502fe0679ade309b575 (diff)
qlge: Fix firmware event handler loop.
Check status on every iteration of event handler loop and exit if an error occurred. If an error occurred then recover process will be queued so this loop should no continue. 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.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/qlge/qlge_mpi.c b/drivers/net/qlge/qlge_mpi.c
index 9f81b797f10..7cb30fdc9ba 100644
--- a/drivers/net/qlge/qlge_mpi.c
+++ b/drivers/net/qlge/qlge_mpi.c
@@ -831,13 +831,19 @@ void ql_mpi_work(struct work_struct *work)
container_of(work, struct ql_adapter, mpi_work.work);
struct mbox_params mbc;
struct mbox_params *mbcp = &mbc;
+ int err = 0;
mutex_lock(&qdev->mpi_mutex);
while (ql_read32(qdev, STS) & STS_PI) {
memset(mbcp, 0, sizeof(struct mbox_params));
mbcp->out_count = 1;
- ql_mpi_handler(qdev, mbcp);
+ /* Don't continue if an async event
+ * did not complete properly.
+ */
+ err = ql_mpi_handler(qdev, mbcp);
+ if (err)
+ break;
}
mutex_unlock(&qdev->mpi_mutex);