From owner-freebsd-bugs@FreeBSD.ORG Thu Jun 5 12:30:03 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E82010656B5 for ; Thu, 5 Jun 2008 12:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 04F508FC15 for ; Thu, 5 Jun 2008 12:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m55CU2US036081 for ; Thu, 5 Jun 2008 12:30:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m55CU285036079; Thu, 5 Jun 2008 12:30:02 GMT (envelope-from gnats) Resent-Date: Thu, 5 Jun 2008 12:30:02 GMT Resent-Message-Id: <200806051230.m55CU285036079@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Marcin Kucharczyk Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDBB21065679 for ; Thu, 5 Jun 2008 12:27:11 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id C5D4D8FC15 for ; Thu, 5 Jun 2008 12:27:11 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m55CRBND006118 for ; Thu, 5 Jun 2008 12:27:11 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m55CRBsO006117; Thu, 5 Jun 2008 12:27:11 GMT (envelope-from nobody) Message-Id: <200806051227.m55CRBsO006117@www.freebsd.org> Date: Thu, 5 Jun 2008 12:27:11 GMT From: Marcin Kucharczyk To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/124299: Some mice from A4Tech are not properly recognized and initialized X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2008 12:30:03 -0000 >Number: 124299 >Category: kern >Synopsis: Some mice from A4Tech are not properly recognized and initialized >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Jun 05 12:30:02 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Marcin Kucharczyk >Release: 6.2 RELEASE, 7.0-RELEASE >Organization: >Environment: >Description: I have FreeBSD installed and the mouse A4-TECH OP-620D connected to PS/2 port of the machine. The mouse works on Windows XP, Fedora 6 and 9, Vista and Debian 4.0 but doesn't work on FreeBSD. >How-To-Repeat: Try to use A4Tech OP-620D with FreeBSD. As I found, some other A4Tech mice have described problem... >Fix: First I saw that mouse is identified as "Microsoft IntelliMouse Explorer", and other mice, which works, are identified as "Microsoft IntelliMouse". Some time later, I've read this message: http://groups.google.com/group/mailing.freebsd.hardware/browse_thread/thread/27f818b03049e546 And I've made the author's advice: "I did the same in FreeBSD psm.c, i.e., added a call to enable_msintelli() at the very start of enable_msexplorer()." I'm not a good programer, so I've copied initialization code of InteliMouse to InteliMouse Explorer before original lines. Now the mouse works ok. Tested on FreeBSD 6.2 and on 7.0 too. I don't have original Microsoft InteliMouse Explorer to test if it works... First I've just copied InteliMouse initialization procedure to InteliMouse Explorer and the mouse works also. Is it mean than the mouse is not properly detected by FreeBSD? Patch attached with submission follows: --- psm.c.orig Thu Jun 5 14:09:28 2008 +++ psm.c Thu Jun 5 14:20:29 2008 @@ -3103,11 +3103,26 @@ static int enable_msexplorer(struct psm_softc *sc) { - static unsigned char rate0[] = { 200, 100, 80, }; - static unsigned char rate1[] = { 200, 200, 80, }; + static unsigned char rate[] = { 200, 100, 80, }; KBDC kbdc = sc->kbdc; int id; int i; + + /* the special sequence to enable the third button and the roller. */ + for (i = 0; i < sizeof(rate)/sizeof(rate[0]); ++i) { + if (set_mouse_sampling_rate(kbdc, rate[i]) != rate[i]) + return FALSE; + } + /* the device will give the genuine ID only after the above sequence */ + id = get_aux_id(kbdc); + if (id != PSM_INTELLI_ID) + return FALSE; + + sc->hw.hwid = id; + sc->hw.buttons = 3; + + static unsigned char rate0[] = { 200, 100, 80, }; + static unsigned char rate1[] = { 200, 200, 80, }; /* the special sequence to enable the extra buttons and the roller. */ for (i = 0; i < sizeof(rate1)/sizeof(rate1[0]); ++i) { >Release-Note: >Audit-Trail: >Unformatted: