public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor@insightbb.com>
To: Paul Albrecht <albrecht@rdi1.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] via c3/2.6.20 -- ps/2 keyboard doesn't work with console
Date: Tue, 12 Jun 2007 01:14:48 -0400	[thread overview]
Message-ID: <200706120114.48645.dtor@insightbb.com> (raw)
In-Reply-To: <1181588095.2436.5.camel@albrecht.rdi1.com>

On Monday 11 June 2007 14:54, Paul Albrecht wrote:
> 
> Is i8042.noaux a workaround or a fix?
> 

Just a workaround. Do you have a PS/2 mouse you could test with? If so could
you check if both keybioard and mouse work with mouse plugged in and without
i8042.noaux.

Also cxould you please try the patch below (again with mouse if you have one
and without).

Thanks a lot!

-- 
Dmitry

Input: i8042 - give more trust PNP data on i386

On some boxes that don't have PS/2 mice connected at startup BIOS
completely disables AUX port and attempts to access it result in
hosed keyboard. Historically we do not trust ACPI/PNP data on
i386 and try to poke AUX port even if we did not find an active
PNP node for it. However in cases when BIOS writers got KBD port
properly described we can assume that they did the right thing
for AUX port as well.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
 drivers/input/serio/i8042-x86ia64io.h |   36 +++++++++++++++++++++++++++-------
 1 file changed, 29 insertions(+), 7 deletions(-)

Index: linux/drivers/input/serio/i8042-x86ia64io.h
===================================================================
--- linux.orig/drivers/input/serio/i8042-x86ia64io.h
+++ linux/drivers/input/serio/i8042-x86ia64io.h
@@ -356,6 +356,7 @@ static void i8042_pnp_exit(void)
 static int __init i8042_pnp_init(void)
 {
 	char kbd_irq_str[4] = { 0 }, aux_irq_str[4] = { 0 };
+	int pnp_data_busted = 0;
 	int err;
 
 	if (i8042_nopnp) {
@@ -403,27 +404,48 @@ static int __init i8042_pnp_init(void)
 #endif
 
 	if (((i8042_pnp_data_reg & ~0xf) == (i8042_data_reg & ~0xf) &&
-	      i8042_pnp_data_reg != i8042_data_reg) || !i8042_pnp_data_reg) {
-		printk(KERN_WARNING "PNP: PS/2 controller has invalid data port %#x; using default %#x\n",
+	      i8042_pnp_data_reg != i8042_data_reg) ||
+	    !i8042_pnp_data_reg) {
+		printk(KERN_WARNING
+			"PNP: PS/2 controller has invalid data port %#x; "
+			"using default %#x\n",
 			i8042_pnp_data_reg, i8042_data_reg);
 		i8042_pnp_data_reg = i8042_data_reg;
+		pnp_data_busted = 1;
 	}
 
 	if (((i8042_pnp_command_reg & ~0xf) == (i8042_command_reg & ~0xf) &&
-	      i8042_pnp_command_reg != i8042_command_reg) || !i8042_pnp_command_reg) {
-		printk(KERN_WARNING "PNP: PS/2 controller has invalid command port %#x; using default %#x\n",
+	      i8042_pnp_command_reg != i8042_command_reg) ||
+	    !i8042_pnp_command_reg) {
+		printk(KERN_WARNING
+			"PNP: PS/2 controller has invalid command port %#x; "
+			"using default %#x\n",
 			i8042_pnp_command_reg, i8042_command_reg);
 		i8042_pnp_command_reg = i8042_command_reg;
+		pnp_data_busted = 1;
 	}
 
 	if (!i8042_nokbd && !i8042_pnp_kbd_irq) {
-		printk(KERN_WARNING "PNP: PS/2 controller doesn't have KBD irq; using default %d\n", i8042_kbd_irq);
+		printk(KERN_WARNING
+			"PNP: PS/2 controller doesn't have KBD irq; "
+			"using default %d\n", i8042_kbd_irq);
 		i8042_pnp_kbd_irq = i8042_kbd_irq;
+		pnp_data_busted = 1;
 	}
 
 	if (!i8042_noaux && !i8042_pnp_aux_irq) {
-		printk(KERN_WARNING "PNP: PS/2 controller doesn't have AUX irq; using default %d\n", i8042_aux_irq);
-		i8042_pnp_aux_irq = i8042_aux_irq;
+		if (!pnp_data_busted && i8042_pnp_kbd_irq) {
+			printk(KERN_WARNING
+				"PNP: PS/2 appears to have AUX port disabled, "
+				"if this is incorrect please boot with "
+				"i8042.nopnp\n");
+			i8042_noaux = 1;
+		} else {
+			printk(KERN_WARNING
+				"PNP: PS/2 controller doesn't have AUX irq; "
+				"using default %d\n", i8042_aux_irq);
+			i8042_pnp_aux_irq = i8042_aux_irq;
+		}
 	}
 
 	i8042_data_reg = i8042_pnp_data_reg;

  parent reply	other threads:[~2007-06-12  5:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-07 17:17 [BUG] via c3/2.6.20 -- ps/2 keyboard doesn't work with console Paul Albrecht
2007-06-08  3:23 ` Dmitry Torokhov
2007-06-08 18:00   ` Paul Albrecht
2007-06-08 19:08     ` Dmitry Torokhov
2007-06-08 19:15       ` Paul Albrecht
2007-06-11 17:22       ` Paul Albrecht
2007-06-11 18:26         ` Dmitry Torokhov
2007-06-11 18:27           ` Paul Albrecht
2007-06-11 19:28             ` Dmitry Torokhov
2007-06-11 18:54               ` Paul Albrecht
2007-06-11 22:28                 ` Chris Wright
2007-06-12 12:46                   ` Paul Albrecht
2007-06-12  5:14                 ` Dmitry Torokhov [this message]
2007-06-12 14:02                   ` Paul Albrecht
2007-06-12 18:50                     ` Dmitry Torokhov
2007-06-12 19:02                       ` Paul Albrecht
2007-06-12 20:10                         ` 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=200706120114.48645.dtor@insightbb.com \
    --to=dtor@insightbb.com \
    --cc=albrecht@rdi1.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