Author: emax Date: Mon Apr 20 17:09:53 2009 New Revision: 191327 URL: http://svn.freebsd.org/changeset/base/191327
Log: MFC r191164 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> Approved by: re (kib) Modified: releng/7.2/sys/ (props changed) releng/7.2/sys/contrib/pf/ (props changed) releng/7.2/sys/dev/ath/ath_hal/ (props changed) releng/7.2/sys/dev/atkbdc/atkbd.c releng/7.2/sys/dev/cxgb/ (props changed) Modified: releng/7.2/sys/dev/atkbdc/atkbd.c ============================================================================== --- releng/7.2/sys/dev/atkbdc/atkbd.c Mon Apr 20 16:57:43 2009 (r191326) +++ releng/7.2/sys/dev/atkbdc/atkbd.c Mon Apr 20 17:09:53 2009 (r191327) @@ -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, _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"