From 7d27f93ac4515b655bb1dc5eabf7411f5ba136d3 Mon Sep 17 00:00:00 2001 From: Kazutaka YOKOTA Date: Sun, 22 Aug 1999 06:11:52 +0000 Subject: Improve the detection code for GlidePoint. This is still a kludge, but better than before... PR: kern/13215 --- sys/dev/atkbdc/psm.c | 6 ++++-- sys/isa/psm.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index fa5ba720878f..bdc39dc665bb 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -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. * - * $Id: psm.c,v 1.14 1999/07/12 15:16:04 yokota Exp $ + * $Id: psm.c,v 1.15 1999/08/17 12:14:13 yokota Exp $ */ /* @@ -2209,9 +2209,11 @@ enable_aglide(struct psm_softc *sc) * NOTE: ALPS produces several models of GlidePoint. Some of those * do not respond to this sequence, thus, cannot be detected this way. */ + if (set_mouse_sampling_rate(sc->kbdc, 100) != 100) + return FALSE; if (!mouse_id_proc1(sc->kbdc, PSMD_RES_LOW, 2, status)) return FALSE; - if ((status[0] & 0x10) || (status[1] == PSMD_RES_LOW)) + if ((status[1] == PSMD_RES_LOW) || (status[2] == 100)) return FALSE; return TRUE; } diff --git a/sys/isa/psm.c b/sys/isa/psm.c index fa5ba720878f..bdc39dc665bb 100644 --- a/sys/isa/psm.c +++ b/sys/isa/psm.c @@ -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. * - * $Id: psm.c,v 1.14 1999/07/12 15:16:04 yokota Exp $ + * $Id: psm.c,v 1.15 1999/08/17 12:14:13 yokota Exp $ */ /* @@ -2209,9 +2209,11 @@ enable_aglide(struct psm_softc *sc) * NOTE: ALPS produces several models of GlidePoint. Some of those * do not respond to this sequence, thus, cannot be detected this way. */ + if (set_mouse_sampling_rate(sc->kbdc, 100) != 100) + return FALSE; if (!mouse_id_proc1(sc->kbdc, PSMD_RES_LOW, 2, status)) return FALSE; - if ((status[0] & 0x10) || (status[1] == PSMD_RES_LOW)) + if ((status[1] == PSMD_RES_LOW) || (status[2] == 100)) return FALSE; return TRUE; } -- cgit v1.3