summaryrefslogtreecommitdiffstats
path: root/sys/isa
diff options
context:
space:
mode:
authoryokota <yokota@FreeBSD.org>2001-09-23 08:42:06 +0000
committeryokota <yokota@FreeBSD.org>2001-09-23 08:42:06 +0000
commit28287d86fce9a62fc773c31554342b154fd5af16 (patch)
tree94f5542a18dfe503cd56fc3fbd8473d83dcdee7d /sys/isa
parentfb7e435d4ddd00ae0f3381c4f56336c99bf0e1c9 (diff)
downloadFreeBSD-src-28287d86fce9a62fc773c31554342b154fd5af16.zip
FreeBSD-src-28287d86fce9a62fc773c31554342b154fd5af16.tar.gz
Reinitialize the keyboard after the ACPI resume event.
I am not sure if this is absolutely necessary on all systems. Yet, there certainly are motherboards and notebook systems which require this, although there are other systems which just don't. I hope we shall know when to do this on which systems, as the development of our ACPI subsystem progresses... (I know we didn't need this for the APM resume.)
Diffstat (limited to 'sys/isa')
-rw-r--r--sys/isa/atkbd_isa.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/isa/atkbd_isa.c b/sys/isa/atkbd_isa.c
index 5300d2f..0e505dad 100644
--- a/sys/isa/atkbd_isa.c
+++ b/sys/isa/atkbd_isa.c
@@ -148,12 +148,21 @@ atkbdattach(device_t dev)
static int
atkbdresume(device_t dev)
{
+ atkbd_softc_t *sc;
keyboard_t *kbd;
+ int args[2];
+ sc = device_get_softc(dev);
kbd = kbd_get_keyboard(kbd_find_keyboard(ATKBD_DRIVER_NAME,
device_get_unit(dev)));
- if (kbd)
+ if (kbd) {
+ kbd->kb_flags &= ~KB_INITIALIZED;
+ args[0] = device_get_unit(device_get_parent(dev));
+ args[1] = rman_get_start(sc->intr);
+ (*kbdsw[kbd->kb_index]->init)(device_get_unit(dev), &kbd,
+ args, device_get_flags(dev));
(*kbdsw[kbd->kb_index]->clear_state)(kbd);
+ }
return 0;
}
OpenPOWER on IntegriCloud