From owner-freebsd-usb@FreeBSD.ORG Mon Jul 27 20:00:11 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64FF01065676; Mon, 27 Jul 2009 20:00:11 +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 3F2338FC1D; Mon, 27 Jul 2009 20:00:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6RK0BJa028253; Mon, 27 Jul 2009 20:00:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6RK0Bd4028252; Mon, 27 Jul 2009 20:00:11 GMT (envelope-from gnats) Resent-Date: Mon, 27 Jul 2009 20:00:11 GMT Resent-Message-Id: <200907272000.n6RK0Bd4028252@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@freebsd.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Cc: thompsa@freebsd.org, alfred@freebsd.org, hselasky@c2i.net Resent-Reply-To: FreeBSD-gnats-submit@freebsd.org, Eygene Ryabinkin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1CD2106566C for ; Mon, 27 Jul 2009 19:58:48 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 8411D8FC0C for ; Mon, 27 Jul 2009 19:58:48 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from phoenix.codelabs.ru (ppp85-141-160-233.pppoe.mtu-net.ru [85.141.160.233]) by 0.mx.codelabs.ru with esmtps (TLSv1:CAMELLIA256-SHA:256) id 1MVWLP-000PrN-5c for FreeBSD-gnats-submit@freebsd.org; Mon, 27 Jul 2009 23:58:47 +0400 Message-Id: <20090727195803.573AAB8090@phoenix.codelabs.ru> Date: Mon, 27 Jul 2009 23:58:03 +0400 (MSD) From: Eygene Ryabinkin To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 X-GNATS-Notify: thompsa@freebsd.org, alfred@freebsd.org, hselasky@c2i.net Cc: Subject: usb/137190: [usb][patch] inhibit spurious button releases for some complex mices X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eygene Ryabinkin List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jul 2009 20:00:11 -0000 >Number: 137190 >Category: usb >Synopsis: [usb][patch] inhibit spurious button releases for some complex mices >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 27 20:00:10 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Eygene Ryabinkin >Release: FreeBSD 8.0-BETA2 amd64 >Organization: Code Labs >Environment: System: FreeBSD 8.0-BETA2 amd64 >Description: My Microsoft Wireless Laser Mouse 5000 shows weird behaviour when I do press some button and trying to select the text inside the terminal moving the pointer: looks like extra button press/release events are generated. Running 'xev' I see such events in the utility's output. >How-To-Repeat: Get the mentioned mice and try to select some text in the terminal: you'll likely won't be able to select everything you want. >Fix: The problem is that this mice is "complex": it has other output descriptors whose output also goes to the ums(4) driver. It produces no data that will be consumed by the driver, but due to the logics of the callback function, variable 'buttons' will be different from the initial softc's button state of some button was physically pressed when this "foreign" data comes. The following patch makes ums(4) to be resistant to such callback input. --- 0007-ums-avoid-spurious-button-releases-for-complex-mices.patch begins here --- begin 644 0007-ums-avoid-spurious-button-releases-for-complex-mices.patch M1G)O;2`U,#8S9F1F-F,Y-&4P8C0Q-#4W8V8Y-C!C-F8S86)A9#$R9#@S.30X M($UO;B!397`@,3<@,#`Z,#`Z,#`@,C`P,0I&6=E;F4@4GEA8FEN M:VEN(#QR96$M9F)S9$!C;V1E;&%B"!M M:6-EF5D(&)Y('5M2!Z M97)O(&]U="!B=71T;VX*F5R;R!A="!T:&4@8F5G:6YN:6YG(&]F('1H92!H86YD;&5R"F%N M9"!S;V9T8R!D871A(&ES(&UO9&EF:65D(&EF('1H92!B=71T;VX@2!H96QD('=I;&P@<')O9'5C90IE>'1R82!M M;W5S92!P3H@17EG96YE(%)Y86)I;FMI;B`\"DI"BL)"6EF("@H:6YF;RT^"`K/2!H:61?9V5T7V1A=&$H8G5F+"!L96XL("9I M;F9O+3YS8U]L;V-?>"D["BL)"0EG;W1?;6EN95]D871A*RL["BL)"7T*(`H@ M"0EI9B`H*&EN9F\M/G-C7V9L86=S("8@54U37T9,04=?65]!6$E3*2`F)@HM M"0D@("`@*&ED(#T](&EN9F\M/G-C7VEI9%]Y*2D**PD)("`@("AI9"`]/2!I M;F9O+3YS8U]I:61?>2DI('L*(`D)"61Y(#T@+6AI9%]G971?9&%T82AB=68L M(&QE;BP@)FEN9F\M/G-C7VQO8U]Y*3L**PD)"6=O=%]M:6YE7V1A=&$K*SL* M*PD)?0H@"B`)"6EF("@H:6YF;RT^B`M/2!T96UP.PHK"0D)9V]T7VUI;F5?9&%T82LK.PH@"0E]"B`* M(`D):68@*"AI;F9O+3YS8U]F;&%G"!\?"!D>2!\?"!D>B!\?"!D="!\?"!D=R!\?`HM"0D@("`@*&)U M='1O;G,@(3T@"!\?"!D>2!\?"!D>B!\?"!D="!\?"!D=R!\?`HK M"0D@("`@*&)U='1O;G,@(3T@PH@ M"B`)"0E$4%))3E1&3B@V+"`B>#HE9"!Y.B5D('HZ)60@=#HE9"!W.B5D(&)U M='1O;G,Z,'@E,#AX7&XB+`H@"0D)("`@(&1X+"!D>2P@9'HL(&1T+"!D=RP@ 78G5T=&]NRelease-Note: >Audit-Trail: >Unformatted: