Leave the USB keyboard registered with the keyboard subsystem even if the
authorMatthew Dillon <dillon@dragonflybsd.org>
Sun, 5 Sep 2004 21:23:34 +0000 (21:23 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sun, 5 Sep 2004 21:23:34 +0000 (21:23 +0000)
commit0abf15afeed378d38f331837f2fcde7051888541
treeed598532d51a9ec0cbb25d503f4d77c0f7653a25
parentddc97c056391abc122f0072583116f85f9782c6b
Leave the USB keyboard registered with the keyboard subsystem even if the
USB keyboard is unplugged or reset.  USB keyboard resets can occur under a
number of conditions, including during system boot and when other devices
on the same controller are pulled or create problems for the controller.  If
we were to deregister the keyboard then the console would disconnect from it
and the keyboard would become unusable.

Use the new keyboard preference feature and give a USB keyboard a higher
priority then a standard atkbd keyboard.  ATKBD keyboards often probe even
when no keyboard exists, especially if the BIOS was set to USB keyboard
compatibility mode.  This way if there is a USB keyboard connected up, it
will get priority over the AT keyboard even if the system thinks an AT
keyboard exists.
sys/dev/usbmisc/ukbd/ukbd.c