Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/wscons If there are no devices attached to the mux a...



details:   https://anonhg.NetBSD.org/src/rev/f096bd8f2f54
branches:  trunk
changeset: 785532:f096bd8f2f54
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Mon Mar 18 11:40:39 2013 +0000

description:
If there are no devices attached to the mux and software does
WSxxxIO_SETVERSION, the change doesn't actually get applied to the event
source as wsmux hands off processing of these ioctls to attached devices.
Handle these ioctls directly from the mux device instead of passing them
through, to correct an issue that prevented keyboards and mice from working
in X if there were zero devices attached when the X server started.

diffstat:

 sys/dev/wscons/wsmux.c |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r 737c06d6e42c -r f096bd8f2f54 sys/dev/wscons/wsmux.c
--- a/sys/dev/wscons/wsmux.c    Mon Mar 18 02:24:45 2013 +0000
+++ b/sys/dev/wscons/wsmux.c    Mon Mar 18 11:40:39 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wsmux.c,v 1.54 2012/01/30 01:54:08 rmind Exp $ */
+/*     $NetBSD: wsmux.c,v 1.55 2013/03/18 11:40:39 jmcneill Exp $      */
 
 /*
  * Copyright (c) 1998, 2005 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsmux.c,v 1.54 2012/01/30 01:54:08 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsmux.c,v 1.55 2013/03/18 11:40:39 jmcneill Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_modular.h"
@@ -481,6 +481,16 @@
                DPRINTF(("wsmux_do_ioctl: save rawkbd = %d\n", sc->sc_rawkbd));
                break;
 #endif
+
+       case WSKBDIO_SETVERSION:
+       case WSMOUSEIO_SETVERSION:
+       case WSDISPLAYIO_SETVERSION:
+               DPRINTF(("%s: WSxxxIO_SETVERSION\n", device_xname(sc->sc_base.me_dv)));
+               evar = sc->sc_base.me_evp;
+               if (evar == NULL)
+                       return (EINVAL);
+               return wsevent_setversion(evar, *(int *)data);
+
        case FIONBIO:
                DPRINTF(("%s: FIONBIO\n", device_xname(sc->sc_base.me_dv)));
                return (0);



Home | Main Index | Thread Index | Old Index