[PATCH] kbdmux(4), atkbd(4) and ddb(4)
- From: Maksim Yevmenkin <maksim.yevmenkin@xxxxxxxxxx>
- Date: Thu, 27 Apr 2006 16:43:28 -0700
dear hackers,
there were many complains about atkbd(4) not working in ddb(4) with kbdmux(4) enabled.
i had a minute of free time and looked into this. it seems to me that atkbd(4) is not dealing properly with "polled" mode. after looking at the code, i came up with the attached patch.
i did some very brief testing and the patch works for me. atkbd(4) now works in ddb(4) and single user mode with kbdmux(4) enabled.
the patch is rather ugly (imo), because it assumes that something will call "poll" method repeatedly (which seems like we do it). also, ukbd(4) has somewhat similar code.
could someone (with atkbd(4), syscons(4) and ddb(4) fu) please review it and tell me if its ok to commit.
also, i would appreciate if someone would perform more extensive testing to see if there are any regressions.
thanks,
max
--- atkbd.c.orig Thu Apr 27 16:29:26 2006
+++ atkbd.c Thu Apr 27 16:30:13 2006
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: /repoman/r/ncvs/src/sys/dev/atkbdc/atkbd.c,v 1.47 2005/06/10 20:56:37 marius Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/atkbdc/atkbd.c,v 1.47 2005/06/10 20:56:37 marius Exp $");
#include "opt_kbd.h"
#include "opt_atkbd.h"
@@ -1023,6 +1023,15 @@
++state->ks_polling;
else
--state->ks_polling;
+
+ if (state->ks_polling) {
+ if ((*kbdsw[kbd->kb_index]->lock)(kbd, TRUE)) {
+ (*kbdsw[kbd->kb_index]->lock)(kbd, FALSE);
+ if ((*kbdsw[kbd->kb_index]->check_char)(kbd))
+ (*kbdsw[kbd->kb_index]->intr)(kbd, NULL);
+ }
+ }
+
splx(s);
return 0;
}
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: [PATCH] kbdmux(4), atkbd(4) and ddb(4)
- From: Dominique Goncalves
- Re: [PATCH] kbdmux(4), atkbd(4) and ddb(4)
- Prev by Date: Re: nve0: device timeout (1)
- Next by Date: Re: RELENG_4 -> 5 -> 6: significant performance regression
- Previous by thread: Re: New version of iwi(4) - Call for testers [regression!]
- Next by thread: Re: [PATCH] kbdmux(4), atkbd(4) and ddb(4)
- Index(es):
Relevant Pages
- Cluster Patch Installation (Single User/Multiuser Mode install)?
... I was wondering if it is ok to install the Solaris Recommended Patch ... Cluster
set while running a system in Multiuser mode. ... Sun recommends that you do this while in
single user mode, ... (comp.sys.sun.admin) - RE: [Full-Disclosure] The new Microsoft math: 1 patch for 14 vul nerabilities, MS04-011
... Or maybe it is a conspiracy to make us patch our systems once instead of 14 ...
By doing so we would have more free time which probably increases ... Subject: [Full-Disclosure]
The new Microsoft math: 1 patch for 14 ... Charter: http://lists.netsys.com/full-disclosure-charter.html
... (Full-Disclosure) - useful little patch manager scripts
... configured Patch Manager. ... single-user mode and wish to install all patches
in single user mode. ... Some patches require a reconfiguration reboot after application
because ... You may wish to install this script in /etc/rc3.d and if you do be sure ...
(SunManagers) - Re: pci-resume patch from 2.6.7-rc2 breakes S3 resume on some machines
... > Please note that these tests were run in single user mode with a ... patch
is way too ugly. ... theory, fix the crash, and you'll avoid touching common code with
it. ... send the line "unsubscribe linux-kernel" in ... (Linux-Kernel) - Re: [Patch v2] Make PCI extended config space (MMCONFIG) a driver opt-in
... different things, some with signed-off-bys and others without, so for ... complains
about those releases... ... I complain about Arjan's patch. ... More majordomo
info at http://vger.kernel.org/majordomo-info.html ... (Linux-Kernel)