• R/O
  • HTTP
  • SSH
  • HTTPS

linux-2.4.36: コミット

2.4.36-stable kernel tree


コミットメタ情報

リビジョンf8db8c9c81afb4b04c146cae0e2a1fd311de1f22 (tree)
日時2007-06-05 13:35:41
作者Brian Maly <bmaly@redh...>
コミッターWilly Tarreau

ログメッセージ

[PATCH 2.4.35-pre4] fix 'pc_keyb: controller jammed (0xA7)' error on systems with KVM

Ive had a few requests for this patch, so Im posting it against
linux-2.4.35-pre4 kernel.

Various hardware (IBM BladeCenter, Sun Fire servers, and many other
bladeserver systems)
have an integrated KVM or console switch. The keyboard type on these
systems is often USB,
and the hardware usually does not have a legacy PS/2 console keyboard.
The 2.4 kernel always tries to
initialize the keyboard controller by default, and on systems without
such a keyboard present
at boot you get the following errors spewed to the logs:

Jun 3 10:21:06 sbknpwaq3 kernel: pc_keyb: controller jammed (0xA7).
Jun 3 10:21:08 sbknpwaq3 last message repeated 249 times
Jun 3 10:21:08 sbknpwaq3 kernel: Keyboard timed out[1]
Jun 3 10:21:08 sbknpwaq3 kernel: pc_keyb: controller jammed (0xA7).
Jun 3 10:21:08 sbknpwaq3 last message repeated 249 times
Jun 3 10:21:08 sbknpwaq3 kernel: Keyboard timed out[1]

This patch allows the kernel to skip the keyboard controller init so the
kernel does not try to initialize, fail
and spew errors when no keyboard is attached. This can also be used for
various systems without a traditional
console keyboard present at boot (includes USB or IrDA keyboard too and
systems connected to KVM's).
Ive provided the dmi_scan magic in this parch for the IBM BladeCenter,
but on other hardware, use the "nokeyb"
kernel-param at boot to skip the initialization.

Tested on IBM BladeCenter, and Sun Fire.

Signed-off-by: Brian Maly <bmaly@redhat>

Regards, Brian

Documentation/kernel-parameters.txt | 4 ++++

arch/i386/kernel/dmi_scan.c | 24 ++++++++++++++++++++++++
drivers/char/pc_keyb.c | 15 +++++++++++----
3 files changed, 39 insertions(+), 4 deletions(-)

変更サマリ

差分

--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -430,6 +430,10 @@ running once the system is up.
430430 initial RAM disk.
431431
432432 nointroute [IA-64]
433+
434+ nokeyb [HW] Skip console keyboard initialization for systems
435+ without a console keyboard, removable keyboard, or
436+ bladecenters with a USB console keyboard switch, etc.
433437
434438 nolapic [IA-32,APIC] Do not enable or use the local APIC.
435439
--- a/arch/i386/kernel/dmi_scan.c
+++ b/arch/i386/kernel/dmi_scan.c
@@ -524,6 +524,21 @@ static __init int disable_acpi_pci(struct dmi_blacklist *d)
524524 */
525525
526526
527+/* IBM bladeservers have a USB console switch. The keyboard type is USB
528+ * and the hardware does not have a console keyboard. We disable the
529+ * console keyboard so the kernel does not try to initialize one and
530+ * spew errors. This can be used for all systems without a console
531+ * keyboard like systems with just a USB or IrDA keyboard.
532+ */
533+static __init int disable_console_keyboard(struct dmi_blacklist *d)
534+{
535+ extern int keyboard_controller_present;
536+ printk(KERN_INFO "*** Hardware has no console keyboard controller.\n");
537+ printk(KERN_INFO "*** Disabling console keyboard.\n");
538+ keyboard_controller_present = 0;
539+ return 0;
540+}
541+
527542 /*
528543 * This will be expanded over time to force things like the APM
529544 * interrupt mask settings according to the laptop
@@ -810,6 +825,15 @@ static __initdata struct dmi_blacklist dmi_blacklist[]={
810825 MATCH(DMI_SYS_VENDOR, "IBM"),
811826 NO_MATCH, NO_MATCH, NO_MATCH
812827 } },
828+ /*
829+ * IBM Bladeservers
830+ */
831+
832+ { disable_console_keyboard, "IBM Server Blade", {
833+ MATCH(DMI_SYS_VENDOR,"IBM"),
834+ MATCH(DMI_BOARD_NAME, "Server Blade"),
835+ NO_MATCH, NO_MATCH
836+ } },
813837
814838 #ifdef CONFIG_ACPI_BOOT
815839 /*
--- a/drivers/char/pc_keyb.c
+++ b/drivers/char/pc_keyb.c
@@ -61,6 +61,14 @@ unsigned char pckbd_sysrq_xlate[128] =
6161 "\r\000/"; /* 0x60 - 0x6f */
6262 #endif
6363
64+int keyboard_controller_present __initdata = 1;
65+static int __init removable_keyb(char *str)
66+{
67+ keyboard_controller_present = 0;
68+ return 0;
69+}
70+__setup("nokeyb", removable_keyb);
71+
6472 static void kbd_write_command_w(int data);
6573 static void kbd_write_output_w(int data);
6674 #ifdef CONFIG_PSMOUSE
@@ -69,9 +77,8 @@ static void __aux_write_ack(int val);
6977 static int aux_reconnect = 0;
7078 #endif
7179
72-#ifndef kbd_controller_present
73-#define kbd_controller_present() 1
74-#endif
80+#define kbd_controller_present() keyboard_controller_present
81+
7582 static spinlock_t kbd_controller_lock = SPIN_LOCK_UNLOCKED;
7683 static unsigned char handle_kbd_event(void);
7784
@@ -898,7 +905,7 @@ static char * __init initialize_kbd(void)
898905
899906 void __init pckbd_init_hw(void)
900907 {
901- if (!kbd_controller_present()) {
908+ if (!keyboard_controller_present) {
902909 kbd_exists = 0;
903910 return;
904911 }
旧リポジトリブラウザで表示