public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor@insightbb.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>, Grant Coady <gcoady.lk@gmail.com>
Subject: [RFC/PATCH-mm] i8042: activate panic blink only in X
Date: Sat, 2 Sep 2006 23:20:36 -0400	[thread overview]
Message-ID: <200609022320.36754.dtor@insightbb.com> (raw)

Hi,

Here is an attempt to make panicblink only active in X so there is a
chance of keyboard still working after panic in text console. Any reason
why is should not be done this way?

-- 
Dmitry

Input: i8042 - blink keyboard LEDs during panic only when in X

This gives keyboard a chance to work in text console so user
can attempt to exctract more useful data form crashed box
(for example some backtraces from SysRq)

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

 drivers/input/serio/i8042.c |   10 ++++++++++
 1 files changed, 10 insertions(+)

Index: work/drivers/input/serio/i8042.c
===================================================================
--- work.orig/drivers/input/serio/i8042.c
+++ work/drivers/input/serio/i8042.c
@@ -20,6 +20,7 @@
 #include <linux/err.h>
 #include <linux/rcupdate.h>
 #include <linux/platform_device.h>
+#include <linux/vt_kern.h>
 
 #include <asm/io.h>
 
@@ -831,6 +832,15 @@ static long i8042_panic_blink(long count
 	static char led;
 
 	/*
+	 * Only blink while in X because it messes up scrollback in console
+	 * preventing users to see the entire oops.
+	 */
+#ifdef CONFIG_HW_CONSOLE
+	if (vc_cons[fg_console].d->vc_mode != KD_GRAPHICS)
+		return 0;
+#endif
+
+	/*
 	 * We expect frequency to be about 1/2s. KDB uses about 1s.
 	 * Make sure they are different.
 	 */

-- 
VGER BF report: H 0.00257812

             reply	other threads:[~2006-09-03  3:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-03  3:20 Dmitry Torokhov [this message]
2006-09-03 13:20 ` [RFC/PATCH-mm] i8042: activate panic blink only in X Grant Coady
2006-09-04 14:58 ` Andi Kleen
2006-09-04 22:29   ` Grant Coady
2006-09-04 23:03     ` Andreas Mohr
2006-09-05  0:16       ` Grant Coady
2006-09-21  4:07     ` Dmitry Torokhov

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=200609022320.36754.dtor@insightbb.com \
    --to=dtor@insightbb.com \
    --cc=akpm@osdl.org \
    --cc=gcoady.lk@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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