RFC Lenovo builtin keyboard fix

Franco Fichtner <[email protected]>
Newsgroups gmane.os.dragonfly-bsd.kernel
Message-ID <[email protected]>
Hi all,

I have traced back the issue to the Kernel config itself.  I am not
sure if it's the right thing to get rid of the KB_CONF_FAIL_IF_NO_KBD
in all configs that still have the flag set.  Only tested on x86_64.

Any input and testing of the attached patch is greatly appreciated.


Cheers,
Franco
0001-config-fix-stale-ThinkPad-keyboard-issue.patch (application/octet-stream, 2.1 KB)
From d04fa6aad45c662376def327e2fe26eddf6a63b8 Mon Sep 17 00:00:00 2001
From: Franco Fichtner <[email protected]>
Date: Wed, 2 Oct 2013 21:46:16 +0200
Subject: [PATCH] config: fix stale ThinkPad keyboard issue

Neither the DragonFly release nor snapshots accept the builtin keyboard
of a Lenovo T430u (and apparently a couple of others).  FreeBSD as old as
8.3, however, works just fine.  Turns out that the KB_CONF_FAIL_IF_NO_KBD
flag of atkbd(4) still lingers in GENERIC, SOEKRIS and X86_64_GENERIC.

Tested against regressions when hotplugging USB keyboards without a PS/2
keyboard present on an old Athlon64 box as suggested by swildner.
---
 sys/config/GENERIC        | 2 +-
 sys/config/SOEKRIS        | 2 +-
 sys/config/X86_64_GENERIC | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/config/GENERIC b/sys/config/GENERIC
index 0255ae3..d7f17e0 100644
--- a/sys/config/GENERIC
+++ b/sys/config/GENERIC
@@ -169,7 +169,7 @@ device		virtio_pci	# VirtIO transport over PCI bus
 
 # atkbdc0 controls both the keyboard and the PS/2 mouse
 device		atkbdc0	at isa? port IO_KBD
-device		atkbd0	at atkbdc? irq 1 flags 0x1
+device		atkbd0	at atkbdc? irq 1
 device		psm0	at atkbdc? irq 12
 
 device		vga0	at isa?
diff --git a/sys/config/SOEKRIS b/sys/config/SOEKRIS
index b389f68..511e77e 100644
--- a/sys/config/SOEKRIS
+++ b/sys/config/SOEKRIS
@@ -87,7 +87,7 @@ device		sg		# Passthrough device (linux scsi generic)
 
 # atkbdc0 controls both the keyboard and the PS/2 mouse
 device		atkbdc0	at isa? port IO_KBD
-device		atkbd0	at atkbdc? irq 1 flags 0x1
+device		atkbd0	at atkbdc? irq 1
 device		psm0	at atkbdc? irq 12
 
 device		vga0	at isa?
diff --git a/sys/config/X86_64_GENERIC b/sys/config/X86_64_GENERIC
index 0d5568c..c114293 100644
--- a/sys/config/X86_64_GENERIC
+++ b/sys/config/X86_64_GENERIC
@@ -154,7 +154,7 @@ device		virtio_pci	# VirtIO transport over PCI bus
 
 # atkbdc0 controls both the keyboard and the PS/2 mouse
 device		atkbdc0	at isa? port IO_KBD
-device		atkbd0	at atkbdc? irq 1 flags 0x1
+device		atkbd0	at atkbdc? irq 1
 device		psm0	at atkbdc? irq 12
 
 device		vga0	at isa?
-- 
1.8.3.4 (Apple Git-47)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.