aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorRon Mercer <ron.mercer@qlogic.com>2009-06-07 09:58:25 -0400
committerDavid S. Miller <davem@davemloft.net>2009-06-08 03:09:44 -0400
commitd6f58c2e63b4197cba99edd3a4c5c7f4935708fb (patch)
treef5205161ce569aaa06f1f8c8db47b30bd2d821c5 /drivers/net
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')
-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 9f81b797f10b..7cb30fdc9bac 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)
831 container_of(work, struct ql_adapter, mpi_work.work); 831 container_of(work, struct ql_adapter, mpi_work.work);
832 struct mbox_params mbc; 832 struct mbox_params mbc;
833 struct mbox_params *mbcp = &mbc; 833 struct mbox_params *mbcp = &mbc;
834 int err = 0;
834 835
835 mutex_lock(&qdev->mpi_mutex); 836 mutex_lock(&qdev->mpi_mutex);
836 837
837 while (ql_read32(qdev, STS) & STS_PI) { 838 while (ql_read32(qdev, STS) & STS_PI) {
838 memset(mbcp, 0, sizeof(struct mbox_params)); 839 memset(mbcp, 0, sizeof(struct mbox_params));
839 mbcp->out_count = 1; 840 mbcp->out_count = 1;
840 ql_mpi_handler(qdev, mbcp); 841 /* Don't continue if an async event
842 * did not complete properly.
843 */
844 err = ql_mpi_handler(qdev, mbcp);
845 if (err)
846 break;
841 } 847 }
842 848
843 mutex_unlock(&qdev->mpi_mutex); 849 mutex_unlock(&qdev->mpi_mutex);