From owner-freebsd-current@FreeBSD.ORG Tue Feb 17 20:20:16 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AEFA106564A; Tue, 17 Feb 2009 20:20:16 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id D568D8FC18; Tue, 17 Feb 2009 20:20:15 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from kobe.laptop (adsl126-61.kln.forthnet.gr [77.49.245.61]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-6) with ESMTP id n1HKK4gQ013125 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 17 Feb 2009 22:20:09 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id n1HKK3kn002147; Tue, 17 Feb 2009 22:20:03 +0200 (EET) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id n1HKK3qD002146; Tue, 17 Feb 2009 22:20:03 +0200 (EET) (envelope-from keramida@freebsd.org) From: Giorgos Keramidas To: Hans Petter Selasky References: <87mycme9wc.fsf@kobe.laptop> <87tz6sdhb1.fsf@kobe.laptop> <87tz6sj2aw.fsf@kobe.laptop> <200902172040.06348.hselasky@freebsd.org> Date: Tue, 17 Feb 2009 22:20:03 +0200 In-Reply-To: <200902172040.06348.hselasky@freebsd.org> (Hans Petter Selasky's message of "Tue, 17 Feb 2009 20:40:05 +0100") Message-ID: <87k57oeryk.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Hellug-MailScanner-ID: n1HKK4gQ013125 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.483, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL -0.08, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@freebsd.org X-Spam-Status: No Cc: freebsd-current@freebsd.org, Andrew Thompson Subject: Re: usb2 moused issue (Microsoft Wireless Optical) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2009 20:20:16 -0000 On Tue, 17 Feb 2009 20:40:05 +0100, Hans Petter Selasky wrote: > On Tuesday 17 February 2009, Giorgos Keramidas wrote: >> On Tue, 17 Feb 2009 20:55:30 +0200, Giorgos Keramidas > wrote: >> > The code of hid_report_size() is similar in old usb and the new usb >> > stack, but I am not sure about all the differences I see. The >> > calculation of `size' is done correctly with old usb code, so I am >> > testing the patch attached below now. It essentially pulls in the >> > hid_report_size() from the old usb code, with the if (h.kind == k) check >> > reversed to remove one spurious indentation level: >> >> No luck with the old usb code for hid_report_size() either. We may be >> looking at the wrong place. I'll build a kernel with a pre-usb2 stack >> and see what ums debugging shows for this mouse. If it used to work >> with size=2 then we might have to look elsewhere for the bug. > > I don't think that will help. Can you try the following. > > XYZ information includes: (64+8-40)/8 = 4 bytes > > Then you need add one PD byte, so size should be 5 bytes. Yep. Before kldloading usb2_quirk.ko this is the X/Y/Z information: kernel: ums_attach:583: X 48/8 kernel: ums_attach:584: Y 56/8 kernel: ums_attach:585: Z 64/8 After kldloading the quirks, I now see: kernel: ugen4.2: at usbus4 kernel: ums0: on usbus4 kernel: ums0: 3 buttons and [XYZ] coordinates kernel: ums_attach:582: sc=0xc662f000 kernel: ums_attach:583: X 16/8 kernel: ums_attach:584: Y 24/8 kernel: ums_attach:585: Z 32/8 kernel: ums_attach:586: T 0/0 kernel: ums_attach:587: W 0/0 kernel: ums_attach:591: B1 8/1 kernel: ums_attach:591: B2 9/1 kernel: ums_attach:591: B3 10/1 kernel: ums_attach:593: size=5, id=0 kernel: Symlink: ums0 -> usb4.2.0.16 and AFAICT the mouse seems to work now. Thanks! :)