2002-07-07 14:26:34

by Douglas Gilbert

[permalink] [raw]
Subject: dead keyboard in lk 2.5.25

When I first booted lk 2.5.25 on an Athlon box the AT keyboard
was inactive. The mouse worked and the box was accessible across
the network so it looked like a problem with the keyboard or its
driver.

/var/log/messages contained this sequence:

Jul 6 09:57:00 frig kernel: mice: PS/2 mouse device common for all mice
Jul 6 09:57:00 frig kernel: spurious 8259A interrupt: IRQ7.
Jul 6 09:57:00 frig kernel: i8042.c: Can't get irq 1 for KBD
Jul 6 09:57:00 frig kernel: i8042.c: Can't get irq 1 for KBD
Jul 6 09:57:00 frig kernel: serio: i8042 KBD port at 0x60,0x64 irq 1
Jul 6 09:57:00 frig kernel: input.c: hotplug returned -2

and /proc/interrupts indicated that irq 1 was owned by
"keyboard" which implied drivers/char/pc_keyb.c owned the
keyboard. The attempt by "i8042" to claim irq 1 returned
-EBUSY which caused the "can't get irq 1" line above.

Since nobody else has reported this error it could be
local to my environment. If you get this problem, the
crude patch below fixed it for me.

Doug Gilbert

--- linux/drivers/input/serio/i8042.c Sat Jul 6 08:57:35 2002
+++ linux/drivers/input/serio/i8042.c2525fix Sun Jul 7 09:52:50 2002
@@ -269,8 +269,11 @@
*/

if (request_irq(values->irq, i8042_interrupt, 0, "i8042", NULL)) {
- printk(KERN_ERR "i8042.c: Can't get irq %d for %s\n", values->irq, values->name);
- return -1;
+ free_irq(values->irq, NULL);
+ if (request_irq(values->irq, i8042_interrupt, 0, "i8042", NULL)) {
+ printk(KERN_ERR "i8042.c: Can't get irq %d for %s\n", values->irq, values->name);
+ return -1;
+ }
}

/*


2002-07-07 15:43:19

by Russell King

[permalink] [raw]
Subject: Re: dead keyboard in lk 2.5.25

On Sun, Jul 07, 2002 at 10:20:16AM -0400, Douglas Gilbert wrote:
> --- linux/drivers/input/serio/i8042.c Sat Jul 6 08:57:35 2002
> +++ linux/drivers/input/serio/i8042.c2525fix Sun Jul 7 09:52:50 2002
> @@ -269,8 +269,11 @@
> */
>
> if (request_irq(values->irq, i8042_interrupt, 0, "i8042", NULL)) {
> - printk(KERN_ERR "i8042.c: Can't get irq %d for %s\n", values->irq, values->name);
> - return -1;
> + free_irq(values->irq, NULL);
> + if (request_irq(values->irq, i8042_interrupt, 0, "i8042", NULL)) {
> + printk(KERN_ERR "i8042.c: Can't get irq %d for %s\n", values->irq, values->name);
> + return -1;
> + }
> }
>
> /*

Hmm, interesting concept. "If someone else is using my resource, I'll
free it for them, and re-claim it". It sounds very much like a hack
rather than a fix to me.

I'd guess the real solution would be to stop pc_keyb being initialised
when you're trying to use i8042.c. Vojtech?

--
Russell King ([email protected]) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html

2002-07-07 21:23:56

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: dead keyboard in lk 2.5.25

On Sun, Jul 07, 2002 at 04:45:54PM +0100, Russell King wrote:
> On Sun, Jul 07, 2002 at 10:20:16AM -0400, Douglas Gilbert wrote:
> > --- linux/drivers/input/serio/i8042.c Sat Jul 6 08:57:35 2002
> > +++ linux/drivers/input/serio/i8042.c2525fix Sun Jul 7 09:52:50 2002
> > @@ -269,8 +269,11 @@
> > */
> >
> > if (request_irq(values->irq, i8042_interrupt, 0, "i8042", NULL)) {
> > - printk(KERN_ERR "i8042.c: Can't get irq %d for %s\n", values->irq, values->name);
> > - return -1;
> > + free_irq(values->irq, NULL);
> > + if (request_irq(values->irq, i8042_interrupt, 0, "i8042", NULL)) {
> > + printk(KERN_ERR "i8042.c: Can't get irq %d for %s\n", values->irq, values->name);
> > + return -1;
> > + }
> > }
> >
> > /*
>
> Hmm, interesting concept. "If someone else is using my resource, I'll
> free it for them, and re-claim it". It sounds very much like a hack
> rather than a fix to me.
>
> I'd guess the real solution would be to stop pc_keyb being initialised
> when you're trying to use i8042.c. Vojtech?

The real solution is to delete pc_keyb.c. But that'll take some time
yet. i8042.c is there so that the build problems, and other obvious
stuff gets fixed. Later we can start actually using it.

--
Vojtech Pavlik
SuSE Labs