There is a workaround, if not a fix, for this problem in -CURRENT.

Apply the following patch to /sys/isa/psm.c and add flags 0x8000
to psm driver in your kernel config file as follows.

device          psm0    at atkbdc? irq 12 flags 0x8000

Kazu

>I have an intermittent (and fairly rare) problem with various
>PS/2 mice on a set of boxes running 4.1-R (but the problem was
>also evident under 3.{1,2,3,4}-R).  The boxes all run X and, on
>occasion, the mouse will stop working and hundreds of "psmintr:
>out of sync" messages will be logged.
>
>It happens maybe once in 6 weeks on one of seven machines, so is
>not easy to diagnose.
>
>I can fix it by logging in with ssh (or switching to one of the
>virtual consoles if the box is handy), killing and re-starting
>moused.
>
>This is not a very useful solution for distant clients who are
>not competent to do stuff like that and tend to resort to the
>power switch if I'm not available instantly -- and that leads to
>undesirable collateral damage.
>
>I'm keen to hear practical suggestions for a fix, or even better
>that a bug has been found and fixed.

Index: psm.c
===================================================================
RCS file: /src/CVS/src/sys/isa/psm.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- psm.c       2000/12/01 05:24:30     1.33
+++ psm.c       2000/12/01 05:26:24     1.34
@@ -20,7 +20,7 @@
  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/isa/psm.c,v 1.33 2000/12/01 05:24:30 yokota Exp $
+ * $FreeBSD: src/sys/isa/psm.c,v 1.34 2000/12/01 05:26:24 yokota Exp $
  */
 
 /*
@@ -176,10 +176,12 @@
 #define PSM_CONFIG_IGNPORTERROR        0x1000  /* ignore error in aux port test */
 #define PSM_CONFIG_HOOKRESUME  0x2000  /* hook the system resume event */
 #define PSM_CONFIG_INITAFTERSUSPEND 0x4000 /* init the device at the resume event */
+#define PSM_CONFIG_SYNCHACK    0x8000 /* enable `out-of-sync' hack */
 
 #define PSM_CONFIG_FLAGS       (PSM_CONFIG_RESOLUTION          \
                                    | PSM_CONFIG_ACCEL          \
                                    | PSM_CONFIG_NOCHECKSYNC    \
+                                   | PSM_CONFIG_SYNCHACK       \
                                    | PSM_CONFIG_NOIDPROBE      \
                                    | PSM_CONFIG_NORESET        \
                                    | PSM_CONFIG_FORCETAP       \
@@ -1900,6 +1902,15 @@
             log(LOG_DEBUG, "psmintr: out of sync (%04x != %04x).\n", 
                c & sc->mode.syncmask[0], sc->mode.syncmask[1]);
            sc->inputbytes = 0;
+           if (sc->config & PSM_CONFIG_SYNCHACK) {
+               /*
+                * XXX: this is a grotesque hack to get us out of
+                * dreaded "out of sync" error.
+                */
+               log(LOG_DEBUG, "psmintr: re-enable the mouse.\n");
+               disable_aux_dev(sc->kbdc);
+               enable_aux_dev(sc->kbdc);
+           }
             continue;
        }
 


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to