Make sure not to set the intellimouse mode more than once at boot, but still

reset the intellimouse mode on suspend/resume. Fixes problems with pmsi mice
locking the keyboard controller when X starts.
This commit is contained in:
jmcneill 2002-01-25 14:53:43 +00:00
parent e87cf5777c
commit 8a10d0653d

View File

@ -1,4 +1,4 @@
/* $NetBSD: psm_intelli.c,v 1.10 2002/01/14 21:56:10 jmcneill Exp $ */ /* $NetBSD: psm_intelli.c,v 1.11 2002/01/25 14:53:43 jmcneill Exp $ */
/*- /*-
* Copyright (c) 1994 Charles M. Hannum. * Copyright (c) 1994 Charles M. Hannum.
@ -24,7 +24,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: psm_intelli.c,v 1.10 2002/01/14 21:56:10 jmcneill Exp $"); __KERNEL_RCSID(0, "$NetBSD: psm_intelli.c,v 1.11 2002/01/25 14:53:43 jmcneill Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -236,6 +236,9 @@ do_enable(sc)
if (res) if (res)
printf("pmsi_enable: command error\n"); printf("pmsi_enable: command error\n");
if (sc->sc_powerhook == NULL)
return;
if ((res = pmsi_setintellimode(sc->sc_kbctag, sc->sc_kbcslot))) { if ((res = pmsi_setintellimode(sc->sc_kbctag, sc->sc_kbcslot))) {
#ifdef DEBUG #ifdef DEBUG
printf("pmsi_enable: intellimode -> %d\n", res); printf("pmsi_enable: intellimode -> %d\n", res);