public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor@insightbb.com>
To: Rene Herman <rene.herman@gmail.com>
Cc: Laurent Riffard <laurent.riffard@free.fr>,
	Dave Jones <davej@redhat.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Vojtech Pavlik <vojtech@suse.cz>
Subject: Re: [BUG 2.6.20-rc2] atkbd.c: Spurious ACK
Date: Sat, 30 Dec 2006 00:25:05 -0500	[thread overview]
Message-ID: <200612300025.06088.dtor@insightbb.com> (raw)
In-Reply-To: <4595679F.6070905@gmail.com>

On Friday 29 December 2006 14:08, Rene Herman wrote:
> Laurent Riffard wrote:
> 
> > Le 29.12.2006 06:54, Rene Herman a écrit :
> 
> >> Not even an analog camera, but with or without the above, I get a single:
> >>
> >> " <7>drivers/input/serio/i8042.c: fa <- i8042 (interrupt, 0, 1) [ 902]"
> 
> ... and when I add "debug" as a kernel param so that I actually get to 
> see them (doh) I get the same as Laurent:
> 
> > ====
> > drivers/input/serio/i8042.c: fa <- i8042 (interrupt, 0, 1) [35172]
> > drivers/input/serio/i8042.c: fa <- i8042 (interrupt, 0, 1) [35172]
> > atkbd.c: Spurious ACK on isa0060/serio0. Some program might be trying 
> > access hardware directly.
> > drivers/input/serio/i8042.c: fa <- i8042 (interrupt, 0, 1) [35296]
> > drivers/input/serio/i8042.c: fa <- i8042 (interrupt, 0, 1) [35297]
> > atkbd.c: Spurious ACK on isa0060/serio0. Some program might be trying 
> > access hardware directly.
> > drivers/input/serio/i8042.c: fa <- i8042 (interrupt, 0, 1) [35420]
> > drivers/input/serio/i8042.c: fa <- i8042 (interrupt, 0, 1) [35421]
> > atkbd.c: Spurious ACK on isa0060/serio0. Some program might be trying 
> > access hardware directly.
> > drivers/input/serio/i8042.c: fa <- i8042 (interrupt, 0, 1) [35544]
> > drivers/input/serio/i8042.c: fa <- i8042 (interrupt, 0, 1) [35545]
> > atkbd.c: Spurious ACK on isa0060/serio0. Some program might be trying 
> > access hardware directly.
> > ===
> 
> I tried just ignoring more ACKs in i8042_interrupt() but that didn't do 
> anything other than alternating between 2 and 1 i8042.c printks between 
> atkbd.c printks when ignoring an even or oneven number, respectively. I 
> guess it's atkbd.c which needs to ack something to keep it from just 
> being delivered over and over again or something like it?
>

No, atkbd does not need to ACK anything, it is keyboard controller
ACKs commands set to it. Normally there is only one owner of a serio
port and atkbd rightfully complains when it gets ACks from keyboard
controller when it does not expect it. However during panic we cut
in the middle and start sending kommands to the keybaord without atkbd
knowledge. Keyboard ACKs commands we sent to it and these ACKs reach
atkbd causing it to complain.

Somehow you get 2 ACks in a row, I wonder if on your boxes i8042 pumps
command and data into keyboard before i8042_interrupt gets a chance to
run. Could you please apply the debug patch below and tell me the
pattern of the data flow.

Thank you.

-- 
Dmitry

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/input/serio/i8042.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

Index: work/drivers/input/serio/i8042.c
===================================================================
--- work.orig/drivers/input/serio/i8042.c
+++ work/drivers/input/serio/i8042.c
@@ -371,7 +371,7 @@ static irqreturn_t i8042_interrupt(int i
 	if (unlikely(i8042_suppress_kbd_ack))
 		if (port_no == I8042_KBD_PORT_NO &&
 		    (data == 0xfa || data == 0xfe)) {
-			i8042_suppress_kbd_ack = 0;
+			i8042_suppress_kbd_ack--;
 			goto out;
 		}
 
@@ -838,13 +838,14 @@ static long i8042_panic_blink(long count
 	led ^= 0x01 | 0x04;
 	while (i8042_read_status() & I8042_STR_IBF)
 		DELAY;
-	i8042_suppress_kbd_ack = 1;
+	dbg("%02x -> i8042 (panic blink)", 0xed);
+	i8042_suppress_kbd_ack = 2;
 	i8042_write_data(0xed); /* set leds */
 	DELAY;
 	while (i8042_read_status() & I8042_STR_IBF)
 		DELAY;
 	DELAY;
-	i8042_suppress_kbd_ack = 1;
+	dbg("%02x -> i8042 (panic blink)", led);
 	i8042_write_data(led);
 	DELAY;
 	last_blink = count;

  reply	other threads:[~2006-12-30  5:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-27 21:32 [BUG 2.6.20-rc2] atkbd.c: Spurious ACK Rene Herman
2006-12-28 19:12 ` Dave Jones
2006-12-28 21:45   ` Rene Herman
2006-12-29  3:40     ` Dmitry Torokhov
2006-12-29  4:20       ` Rene Herman
2006-12-29  5:00         ` Dmitry Torokhov
2006-12-29  5:17           ` Rene Herman
2006-12-29  5:28             ` Dmitry Torokhov
2006-12-29  5:54               ` Rene Herman
2006-12-29 12:45                 ` Laurent Riffard
2006-12-29 19:08                   ` Rene Herman
2006-12-30  5:25                     ` Dmitry Torokhov [this message]
2006-12-30  7:20                       ` Rene Herman
2006-12-30 11:19                         ` Laurent Riffard
2007-01-06  0:21                       ` Tilman Schmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200612300025.06088.dtor@insightbb.com \
    --to=dtor@insightbb.com \
    --cc=davej@redhat.com \
    --cc=laurent.riffard@free.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rene.herman@gmail.com \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox