From: Ron Mercer Date: Mon, 5 Oct 2009 11:46:48 +0000 (+0000) Subject: qlge: Fix queueing of firmware handler in ISR. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5ee22a5aa9cd85527b93b24402db9ae2567d5aa6;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git qlge: Fix queueing of firmware handler in ISR. Check that we are not already polling firmware events before we queue the firmware event worker, then disable firmware interrupts. Otherwise we can queue the same event multiple times. Signed-off-by: Ron Mercer Signed-off-by: David S. Miller --- diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 3d0efea3211..c21eda03fa5 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c @@ -2001,15 +2001,17 @@ static irqreturn_t qlge_isr(int irq, void *dev_id) /* * Check MPI processor activity. */ - if (var & STS_PI) { + if ((var & STS_PI) && + (ql_read32(qdev, INTR_MASK) & INTR_MASK_PI)) { /* * We've got an async event or mailbox completion. * Handle it and clear the source of the interrupt. */ QPRINTK(qdev, INTR, ERR, "Got MPI processor interrupt.\n"); ql_disable_completion_interrupt(qdev, intr_context->intr); - queue_delayed_work_on(smp_processor_id(), qdev->workqueue, - &qdev->mpi_work, 0); + ql_write32(qdev, INTR_MASK, (INTR_MASK_PI << 16)); + queue_delayed_work_on(smp_processor_id(), + qdev->workqueue, &qdev->mpi_work, 0); work_done++; }