Date: Fri, 17 Apr 2009 00:30:56 +0000 (UTC) From: Maksim Yevmenkin <emax@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r191164 - head/sys/dev/atkbdc Message-ID: <200904170030.n3H0UuPj098002@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emax Date: Fri Apr 17 00:30:56 2009 New Revision: 191164 URL: http://svn.freebsd.org/changeset/base/191164 Log: Prevent atkbd(4) interrupt handler from calling keyboard callback function when polled mode is enabled. This should help with duplicated/missing characters problem at mountroot, geli, etc. prompts on multi CPU systems while kbdmux(4) is enabled. Tested by: Tobias Grosser <grosser -at- fim -dot- uni-passau -dot- de> Tested by: Fabian Keil <freebsd-listen -at- fabiankeil -dot- de> MFC after: 3 days Modified: head/sys/dev/atkbdc/atkbd.c Modified: head/sys/dev/atkbdc/atkbd.c ============================================================================== --- head/sys/dev/atkbdc/atkbd.c Thu Apr 16 23:42:00 2009 (r191163) +++ head/sys/dev/atkbdc/atkbd.c Fri Apr 17 00:30:56 2009 (r191164) @@ -476,7 +476,7 @@ atkbd_term(keyboard_t *kbd) static int atkbd_intr(keyboard_t *kbd, void *arg) { - atkbd_state_t *state; + atkbd_state_t *state = (atkbd_state_t *)kbd->kb_data; int delay[2]; int c; @@ -485,7 +485,6 @@ atkbd_intr(keyboard_t *kbd, void *arg) * The keyboard was not detected before; * it must have been reconnected! */ - state = (atkbd_state_t *)kbd->kb_data; init_keyboard(state->kbdc, &kbd->kb_type, kbd->kb_config); KBD_FOUND_DEVICE(kbd); @@ -496,6 +495,9 @@ atkbd_intr(keyboard_t *kbd, void *arg) atkbd_ioctl(kbd, KDSETREPEAT, (caddr_t)delay); } + if (state->ks_polling) + return 0; + if (KBD_IS_ACTIVE(kbd) && KBD_IS_BUSY(kbd)) { /* let the callback function to process the input */ (*kbd->kb_callback.kc_func)(kbd, KBDIO_KEYINPUT,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904170030.n3H0UuPj098002>