From owner-freebsd-hardware@FreeBSD.ORG Fri Feb 1 09:38:08 2008 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 263B516A420; Fri, 1 Feb 2008 09:38:08 +0000 (UTC) (envelope-from vojtech@suse.cz) Received: from mail.suse.cz (styx.suse.cz [82.119.242.94]) by mx1.freebsd.org (Postfix) with ESMTP id D5E0613C447; Fri, 1 Feb 2008 09:38:07 +0000 (UTC) (envelope-from vojtech@suse.cz) Received: from shadow.suse.cz (shadow.suse.cz [10.20.1.183]) (Authenticated sender: vojtech) by mail.suse.cz (Postfix) with ESMTP id AA150628085; Fri, 1 Feb 2008 10:38:06 +0100 (CET) Received: by shadow.suse.cz (Postfix, from userid 10002) id 8D6F8C5408A; Fri, 1 Feb 2008 10:38:06 +0100 (CET) Date: Fri, 1 Feb 2008 10:38:06 +0100 From: Vojtech Pavlik To: Andriy Gapon Message-ID: <20080201093806.GA4632@suse.cz> References: <4799D78F.6000405@icyb.net.ua> <47A097FA.3090303@icyb.net.ua> <20080130164508.GC6257@suse.cz> <47A2E7E5.1040307@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <47A2E7E5.1040307@icyb.net.ua> X-Bounce-Cookie: It's a lemon tree, dear Watson! User-Agent: Mutt/1.5.16 (2007-06-09) Cc: mikeh@freebsd.org, freebsd-stable@freebsd.org, freebsd-hardware@freebsd.org Subject: Re: mouse problems [A4 Tech OP-3D] X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Feb 2008 09:38:08 -0000 On Fri, Feb 01, 2008 at 11:35:33AM +0200, Andriy Gapon wrote: > on 30/01/2008 18:45 Vojtech Pavlik said the following: > > On Wed, Jan 30, 2008 at 05:30:02PM +0200, Andriy Gapon wrote: > [snip] > >> I see that Linux driver and FreeBSD driver are (mostly) equivalent in > >> "IntelliMouse Explorer" detection. I wonder if Linux handles this mouse > >> well, and if yes, then how. > > > > I don't know, honestly, I never tried this specific mouse. A4-Tech is > > infamous of producing mice with all kinds of strange quirks and bugs. > > But not this time :) > I tried to boot Knoppix live CD and it recognized the mouse as having > ImExPS/2 protocol which the same as I found by try-and-error. > > I compared FreeBSD and Linux sources more thoroughly and found the > following: > http://lxr.linux.no/linux+v2.6.24/drivers/input/mouse/psmouse-base.c#L464 > static int im_explorer_detect(struct psmouse *psmouse, int set_properties) > { > struct ps2dev *ps2dev = &psmouse->ps2dev; > unsigned char param[2]; > > intellimouse_detect(psmouse, 0); > > I.e., first thing the explorer probe does is massaging a mouse with > IntelliMouse magic commands. > > I did the same in FreeBSD psm.c, i.e., added a call to > enable_msintelli() at the very start of enable_msexplorer(). And voilą - > everything is perfect, correct ID is returned, probing succeeds, the > mouse works great. > > I think that this change is quite safe to make in FreeBSD, because with > Linux user-base we can be 99% percent sure that this change won't break > anything. It is even correct: A mouse isn't required to be able to jump straight into the Explorer mode, it is supposed to always go through the IntelliMouse mode. -- Vojtech Pavlik Director SuSE Labs