Module Name: src Committed By: jmcneill Date: Mon Mar 18 11:40:39 UTC 2013
Modified Files: src/sys/dev/wscons: wsmux.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/dev/wscons/wsmux.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/wscons/wsmux.c diff -u src/sys/dev/wscons/wsmux.c:1.54 src/sys/dev/wscons/wsmux.c:1.55 --- src/sys/dev/wscons/wsmux.c:1.54 Mon Jan 30 01:54:08 2012 +++ src/sys/dev/wscons/wsmux.c Mon Mar 18 11:40:39 2013 @@ -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 @@ wsmux_do_ioctl(device_t dv, u_long cmd, 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);