Commit 1974c841 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] i8042 timer fix

From: Jim Collette <jim@hamachi.net>

There's an exit path in i8042_interrupt() which forgets to rearm the timer.
It can make the mouse die when X is started.
parent 511566a5
...@@ -377,6 +377,7 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -377,6 +377,7 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs)
unsigned long flags; unsigned long flags;
unsigned char str, data; unsigned char str, data;
unsigned int dfl; unsigned int dfl;
int ret;
spin_lock_irqsave(&i8042_lock, flags); spin_lock_irqsave(&i8042_lock, flags);
str = i8042_read_status(); str = i8042_read_status();
...@@ -385,7 +386,8 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -385,7 +386,8 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if (~str & I8042_STR_OBF) { if (~str & I8042_STR_OBF) {
if (irq) dbg("Interrupt %d, without any data", irq); if (irq) dbg("Interrupt %d, without any data", irq);
return IRQ_RETVAL(0); ret = 0;
goto out;
} }
dfl = ((str & I8042_STR_PARITY) ? SERIO_PARITY : 0) | dfl = ((str & I8042_STR_PARITY) ? SERIO_PARITY : 0) |
...@@ -428,9 +430,10 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -428,9 +430,10 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs)
serio_interrupt(&i8042_kbd_port, data, dfl, regs); serio_interrupt(&i8042_kbd_port, data, dfl, regs);
irq_ret: irq_ret:
ret = 1;
out:
mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD); mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD);
return IRQ_RETVAL(1); return IRQ_RETVAL(ret);
} }
/* /*
......
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