Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion atkb: supress repeated warning messages

View Parsed - Show only message text

Path: g2news2.google.com!news3.google.com!news.glorb.com!zen.net.uk!dedekind.zen.co.uk!erode.bofh.it!bofh.it!news.nic.it!robomod
From: "Alan J. Wylie" <a...@wylie.me.uk>
Newsgroups: linux.kernel
Subject: [PATCH 2.6.19 1/1] atkb: supress repeated warning messages
Date: Tue, 05 Dec 2006 21:40:11 +0100
Message-ID: <7oPfd-7fz-31@gated-at.bofh.it>
References: <7nDzM-8n6-15@gated-at.bofh.it>
X-Original-To: linux-ker...@vger.kernel.org
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: VM 7.19 under Emacs 21.4.1
Sender: robo...@news.nic.it
X-Mailing-List: linux-kernel@vger.kernel.org
Approved: robo...@news.nic.it
Lines: 56
Organization: linux.* mail to news gateway
X-Original-Date: Tue, 5 Dec 2006 20:37:50 +0000
X-Original-Message-ID: <17781.55454.538734.421950@wylie.me.uk>
X-Original-References: <17777.34301.958405.967...@wylie.me.uk>
X-Original-Sender: linux-kernel-ow...@vger.kernel.org

On Sat, 2 Dec 2006 13:56:13 +0000, "Alan J. Wylie" <a...@wylie.me.uk> said:

> I was presented with a continous stream of error messages:

> atkbd.c: Spurious ACK on isa0060/serio Some program might be trying
> to access hardware directly.

> These seem to be as a result of the keyboard LEDs being flashed.

> They cause the real error message:

> Cannot open root device

> and the preceding kernel messages which show a lack of detection of
> the SATA hard drive to be rapidly scrolled off screen.

> The atkbd message should at the very least be rate limited.

Here is an ugly hack that limits the above error message.

--- linux/drivers/input/keyboard/atkbd.c.orig	2006-12-05 20:34:50.000000000 +0000
+++ linux/drivers/input/keyboard/atkbd.c	2006-12-03 13:43:13.000000000 +0000
@@ -412,9 +412,16 @@
 			goto out;
 		case ATKBD_RET_ACK:
 		case ATKBD_RET_NAK:
-			printk(KERN_WARNING "atkbd.c: Spurious %s on %s. "
-			       "Some program might be trying access hardware directly.\n",
-			       data == ATKBD_RET_ACK ? "ACK" : "NAK", serio->phys);
+			{
+				static int warned = 0;
+
+				if (!warned) {
+					printk(KERN_WARNING "atkbd.c: Spurious %s on %s. "
+					       "Some program might be trying access hardware directly.\n",
+					       data == ATKBD_RET_ACK ? "ACK" : "NAK", serio->phys);
+					warned = 1;
+				}
+			}
 			goto out;
 		case ATKBD_RET_HANGEUL:
 		case ATKBD_RET_HANJA:


Signed-off-by: Alan J. Wylie <a...@wylie.me.uk>

-- 
Alan J. Wylie                                          http://www.wylie.me.uk/
"Perfection [in design] is achieved not when there is nothing left to add,
but rather when there is nothing left to take away."
  -- Antoine de Saint-Exupery
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google