Don't reset pms/pmsi devices when attempting to set the mode. Makes nicm@'s,
authorkrw <krw@openbsd.org>
Fri, 30 Jul 2010 17:15:14 +0000 (17:15 +0000)
committerkrw <krw@openbsd.org>
Fri, 30 Jul 2010 17:15:14 +0000 (17:15 +0000)
todd@'s and my machines all work as expected. Various other success stories
and no reports of failures. Also fix DEBUG compiles by removing a return
that was unneeded anyway.

"gud" miod@

sys/dev/pckbc/pms_intelli.c

index 69435f9..8e14798 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: pms_intelli.c,v 1.4 2010/07/25 22:46:17 miod Exp $ */
+/* $OpenBSD: pms_intelli.c,v 1.5 2010/07/30 17:15:14 krw Exp $ */
 /* $NetBSD: psm_intelli.c,v 1.8 2000/06/05 22:20:57 sommerfeld Exp $ */
 
 /*-
@@ -241,7 +241,7 @@ pmsiactivate(struct device *self, int act)
 int
 pmsi_change_state(struct pmsi_softc *sc, int newstate)
 {
-       u_char cmd[1], resp[2];
+       u_char cmd[1];
        int res;
 
        switch (newstate) {
@@ -254,22 +254,10 @@ pmsi_change_state(struct pmsi_softc *sc, int newstate)
                pckbc_slot_enable(sc->sc_kbctag, sc->sc_kbcslot, 1);
 
                pckbc_flush(sc->sc_kbctag, sc->sc_kbcslot);
-
-               /* reset the device */
-               cmd[0] = PMS_RESET;
-               res = pckbc_poll_cmd(sc->sc_kbctag, sc->sc_kbcslot,
-                   cmd, 1, 2, resp, 1);
-#ifdef DEBUG
-               if (res || resp[0] != PMS_RSTDONE || resp[1] != 0) {
-                       printf("pmsi_change_state: reset error\n");
-                       return;
-               }
-#endif
                res = pmsi_setintellimode(sc->sc_kbctag, sc->sc_kbcslot, 0);
 #ifdef DEBUG
                if (res) {
                        printf("pmsi_change_state: error setting intelli mode\n");
-                       return;
                }
 #endif