Skip to content

Commit

Permalink
staging: vt6655: Fix Warning on boot handle_irq_event_percpu.
Browse files Browse the repository at this point in the history
WARNING: CPU: 0 PID: 929 at /home/apw/COD/linux/kernel/irq/handle.c:147 handle_irq_event_percpu+0x1d1/0x1e0()
irq 17 handler device_intr+0x0/0xa80 [vt6655_stage] enabled interrupts

Using spin_lock_irqsave appears to fix this.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Malcolm Priestley authored and Greg Kroah-Hartman committed Jul 24, 2014
1 parent 92e3962 commit 6cff1f6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/staging/vt6655/device_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2318,6 +2318,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
int handled = 0;
unsigned char byData = 0;
int ii = 0;
unsigned long flags;

MACvReadISR(pDevice->PortOffset, &pDevice->dwIsr);

Expand All @@ -2331,7 +2332,8 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {

handled = 1;
MACvIntDisable(pDevice->PortOffset);
spin_lock_irq(&pDevice->lock);

spin_lock_irqsave(&pDevice->lock, flags);

//Make sure current page is 0
VNSvInPortB(pDevice->PortOffset + MAC_REG_PAGE1SEL, &byOrgPageSel);
Expand Down Expand Up @@ -2560,7 +2562,8 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
if (byOrgPageSel == 1)
MACvSelectPage1(pDevice->PortOffset);

spin_unlock_irq(&pDevice->lock);
spin_unlock_irqrestore(&pDevice->lock, flags);

MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE);

return IRQ_RETVAL(handled);
Expand Down

0 comments on commit 6cff1f6

Please sign in to comment.