patch-2.1.106 linux/drivers/char/pc_keyb.c

Next file: linux/drivers/char/radio-aimslab.c
Previous file: linux/drivers/char/nvram.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.105/linux/drivers/char/pc_keyb.c linux/drivers/char/pc_keyb.c
@@ -178,6 +178,20 @@
 		              | KBD_MODE_DISABLE_MOUSE
 		              | KBD_MODE_KCC);
 
+	/* ibm powerpc portables need this to use scan-code set 1 -- Cort */
+	kbd_write(KBD_CNTL_REG, KBD_CCMD_READ_MODE);
+	if (!(kbd_wait_for_input() & KBD_MODE_KCC)) {
+		/*
+		 * If the controller does not support conversion,
+		 * Set the keyboard to scan-code set 1.
+		 */
+		kbd_write(KBD_DATA_REG, 0xF0);
+		kbd_wait_for_input();
+		kbd_write(KBD_DATA_REG, 0x01);
+		kbd_wait_for_input();
+	}
+
+	
 	kbd_write(KBD_DATA_REG, KBD_CMD_ENABLE);
 	if (kbd_wait_for_input() != KBD_REPLY_ACK)
 		return "Enable keyboard: no ACK";

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov