Subject: Re: Mouse troble.
To: mats <netbsd@comhem.se>
From: Martin Husemann <martin@duskware.de>
List: netbsd-users
Date: 08/13/2006 21:24:30
--LQksG6bCIzRHxTLp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Sun, Aug 13, 2006 at 09:10:57PM +0200, mats wrote:
> could 3.01 make any difference?
Unlikely.
> The dmesg looks normal and dont show anything special about the mouse.
Well, to debug this problem, you could add "options PMSDEBUG" to your
kernel config and rebuild the kenrel. This will be a bit noisy, but
should point out the underlying problem.
If you like you could also try the attached patch and add options
PMS_NOT_PLUGGABLE, but I'm not sure that will help. (You might try
to need to remove the include of opt_pms.h, this is from a slightly
modified tree)
Martin
--LQksG6bCIzRHxTLp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch
Index: pms.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pckbport/pms.c,v
retrieving revision 1.11
diff -u -r1.11 pms.c
--- pms.c 7 Jun 2006 22:33:37 -0000 1.11
+++ pms.c 13 Aug 2006 19:23:20 -0000
@@ -51,6 +51,8 @@
#include <dev/wscons/wsconsio.h>
#include <dev/wscons/wsmousevar.h>
+#include "opt_pms.h"
+
#ifdef PMSDEBUG
int pmsdebug = 1;
#define DPRINTF(x) if (pmsdebug) printf x
@@ -81,8 +83,10 @@
static int pms_protocol(pckbport_tag_t, pckbport_slot_t);
static void do_enable(struct pms_softc *);
static void do_disable(struct pms_softc *);
+#ifndef PMS_NOT_PLUGGABLE
static void pms_reset_thread(void*);
static void pms_spawn_reset_thread(void*);
+#endif
int pms_enable(void *);
int pms_ioctl(void *, u_long, caddr_t, int, struct lwp *);
void pms_disable(void *);
@@ -225,7 +229,9 @@
printf("pmsattach: disable error\n");
pckbport_slot_enable(sc->sc_kbctag, sc->sc_kbcslot, 0);
+#ifndef PMS_NOT_PLUGGABLE
kthread_create(pms_spawn_reset_thread, sc);
+#endif
#ifndef PMS_DISABLE_POWERHOOK
sc->sc_powerhook = powerhook_establish(pms_power, sc);
@@ -406,6 +412,7 @@
return 0;
}
+#ifndef PMS_NOT_PLUGGABLE
static void
pms_spawn_reset_thread(void *arg)
{
@@ -478,6 +485,7 @@
}
}
}
+#endif /* PMS_NOT_PLUGGABLE */
/* Masks for the first byte of a packet */
#define PMS_LBUTMASK 0x01
@@ -499,6 +507,7 @@
return;
}
+#ifndef PMS_NOT_PLUGGABLE
getmicrouptime(&sc->current);
if (sc->inputstate > 0) {
@@ -527,6 +536,7 @@
}
}
sc->last = sc->current;
+#endif
if (sc->inputstate == 0) {
/*
--LQksG6bCIzRHxTLp--