summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-06-08 20:59:30 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-06-08 20:59:30 +0000
commit1d1f6d0a19530aaa5dc91d8324c7a6e1d1237515 (patch)
tree702b8d2cc4380771465fdd93920b8783f7b7e234 /sys/dev/usb
parent1f4c2150b6d5d2dfb9d72754b06df28594301cae (diff)
Now that all ports behave, remove the safety code doing cnpollc behind
the scene around cngetc calls and whining loudly about it. This will save room on floppies (-:
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/ukbd.c30
1 files changed, 3 insertions, 27 deletions
diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c
index 274ce44b69d..81813803875 100644
--- a/sys/dev/usb/ukbd.c
+++ b/sys/dev/usb/ukbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ukbd.c,v 1.41 2008/05/19 18:09:06 miod Exp $ */
+/* $OpenBSD: ukbd.c,v 1.42 2008/06/08 20:59:29 miod Exp $ */
/* $NetBSD: ukbd.c,v 1.85 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -843,31 +843,12 @@ ukbd_hookup_bell(void (*fn)(void *, u_int, u_int, u_int, int), void *arg)
}
}
-/*
- * This is a hack to work around some broken ports that don't call
- * cnpollc() before cngetc().
- */
-static int pollenter, warned;
-
/* Console interface. */
void
ukbd_cngetc(void *v, u_int *type, int *data)
{
struct ukbd_softc *sc = v;
int c;
- int broken;
-
- if (pollenter == 0) {
- if (!warned) {
- printf("\n"
-"This port is broken, it does not call cnpollc() before calling cngetc().\n"
-"This should be fixed, but it will work anyway (for now).\n");
- warned = 1;
- }
- broken = 1;
- ukbd_cnpollc(v, 1);
- } else
- broken = 0;
DPRINTFN(0,("ukbd_cngetc: enter\n"));
sc->sc_polling = 1;
@@ -881,8 +862,6 @@ ukbd_cngetc(void *v, u_int *type, int *data)
*type = c & RELEASE ? WSCONS_EVENT_KEY_UP : WSCONS_EVENT_KEY_DOWN;
*data = c & CODEMASK;
DPRINTFN(0,("ukbd_cngetc: return 0x%02x\n", c));
- if (broken)
- ukbd_cnpollc(v, 0);
}
void
@@ -894,13 +873,10 @@ ukbd_cnpollc(void *v, int on)
DPRINTFN(2,("ukbd_cnpollc: sc=%p on=%d\n", v, on));
usbd_interface2device_handle(sc->sc_hdev.sc_parent->sc_iface, &dev);
- if (on) {
+ if (on)
sc->sc_spl = splusb();
- pollenter++;
- } else {
+ else
splx(sc->sc_spl);
- pollenter--;
- }
usbd_set_polling(dev, on);
}