Commit d6f58c2e authored by Ron Mercer's avatar Ron Mercer Committed by David S. Miller

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: default avatarRon Mercer <ron.mercer@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent df911e2d
...@@ -831,13 +831,19 @@ void ql_mpi_work(struct work_struct *work) ...@@ -831,13 +831,19 @@ void ql_mpi_work(struct work_struct *work)
container_of(work, struct ql_adapter, mpi_work.work); container_of(work, struct ql_adapter, mpi_work.work);
struct mbox_params mbc; struct mbox_params mbc;
struct mbox_params *mbcp = &mbc; struct mbox_params *mbcp = &mbc;
int err = 0;
mutex_lock(&qdev->mpi_mutex); mutex_lock(&qdev->mpi_mutex);
while (ql_read32(qdev, STS) & STS_PI) { while (ql_read32(qdev, STS) & STS_PI) {
memset(mbcp, 0, sizeof(struct mbox_params)); memset(mbcp, 0, sizeof(struct mbox_params));
mbcp->out_count = 1; 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); mutex_unlock(&qdev->mpi_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment