mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 19:08:58 +00:00
One more patch for the atkbd driver. It will make sure that the
keyboard port and interrupt is enabled and the driver is attached even when the keyboard itself is not present when the system is booting. (This has been the behavior through out 2.X and 3.X, but is somehow broken in 4.0.) # I certainly don't recommend people to `hot-plug' the AT keyboard, # because the interface isn't designed for hot-plugging and such act # will often break the keyboard controller. But, so many people want to # do that anyway... Approved by: jkh
This commit is contained in:
parent
510a809e64
commit
a68d00e3fe
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57902
@ -1108,6 +1108,17 @@ probe_keyboard(KBDC kbdc, int flags)
|
||||
test_kbd_port(kbdc);
|
||||
|
||||
err = get_kbd_echo(kbdc);
|
||||
|
||||
/*
|
||||
* Even if the keyboard doesn't seem to be present (err != 0),
|
||||
* we shall enable the keyboard port and interrupt so that
|
||||
* the driver will be operable when the keyboard is attached
|
||||
* to the system later. It is NOT recommended to hot-plug
|
||||
* the AT keyboard, but many people do so...
|
||||
*/
|
||||
kbdc_set_device_mask(kbdc, m | KBD_KBD_CONTROL_BITS);
|
||||
setup_kbd_port(kbdc, TRUE, TRUE);
|
||||
#if 0
|
||||
if (err == 0) {
|
||||
kbdc_set_device_mask(kbdc, m | KBD_KBD_CONTROL_BITS);
|
||||
} else {
|
||||
@ -1115,6 +1126,7 @@ probe_keyboard(KBDC kbdc, int flags)
|
||||
set_controller_command_byte(kbdc, 0xff, c);
|
||||
kbdc_set_device_mask(kbdc, m);
|
||||
}
|
||||
#endif
|
||||
|
||||
kbdc_lock(kbdc, FALSE);
|
||||
return err;
|
||||
|
@ -1108,6 +1108,17 @@ probe_keyboard(KBDC kbdc, int flags)
|
||||
test_kbd_port(kbdc);
|
||||
|
||||
err = get_kbd_echo(kbdc);
|
||||
|
||||
/*
|
||||
* Even if the keyboard doesn't seem to be present (err != 0),
|
||||
* we shall enable the keyboard port and interrupt so that
|
||||
* the driver will be operable when the keyboard is attached
|
||||
* to the system later. It is NOT recommended to hot-plug
|
||||
* the AT keyboard, but many people do so...
|
||||
*/
|
||||
kbdc_set_device_mask(kbdc, m | KBD_KBD_CONTROL_BITS);
|
||||
setup_kbd_port(kbdc, TRUE, TRUE);
|
||||
#if 0
|
||||
if (err == 0) {
|
||||
kbdc_set_device_mask(kbdc, m | KBD_KBD_CONTROL_BITS);
|
||||
} else {
|
||||
@ -1115,6 +1126,7 @@ probe_keyboard(KBDC kbdc, int flags)
|
||||
set_controller_command_byte(kbdc, 0xff, c);
|
||||
kbdc_set_device_mask(kbdc, m);
|
||||
}
|
||||
#endif
|
||||
|
||||
kbdc_lock(kbdc, FALSE);
|
||||
return err;
|
||||
|
Loading…
Reference in New Issue
Block a user