From b9a09edee8fcb479c571cc3c8778211ebb64fb73 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sat, 6 Feb 2010 00:26:38 -0800 Subject: [PATCH] kernel - usb keyboard - Fix polling issue on x86_64 when dropping into DDB * USB keyboards stop responding when x86_64 drops into DDB. For some reason this does not occur on 32-bit. Add a missing call to usbd_dopoll() in ukbd_check() to proactively solve the problem. --- sys/dev/usbmisc/ukbd/ukbd.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/usbmisc/ukbd/ukbd.c b/sys/dev/usbmisc/ukbd/ukbd.c index 4fa40ca86d..e830b5ba75 100644 --- a/sys/dev/usbmisc/ukbd/ukbd.c +++ b/sys/dev/usbmisc/ukbd/ukbd.c @@ -957,8 +957,16 @@ ukbd_read(keyboard_t *kbd, int wait) static int ukbd_check(keyboard_t *kbd) { + ukbd_state_t *state; + if (!KBD_IS_ACTIVE(kbd)) return FALSE; + state = (ukbd_state_t *)kbd->kb_data; + if (state->ks_polling) { + crit_enter(); + usbd_dopoll(state->ks_iface); + crit_exit(); + } #ifdef UKBD_EMULATE_ATSCANCODE if (((ukbd_state_t *)kbd->kb_data)->ks_buffered_char[0]) return TRUE; -- 2.11.4.GIT