Date: Thu, 5 Jun 2008 12:27:11 GMT From: Marcin Kucharczyk <marcinkk@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/124299: Some mice from A4Tech are not properly recognized and initialized Message-ID: <200806051227.m55CRBsO006117@www.freebsd.org> Resent-Message-ID: <200806051230.m55CU285036079@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806051227.m55CRBsO006117>