usb/137190: [usb][patch] inhibit spurious button releases for some
complex mices
Eygene Ryabinkin
rea-fbsd at codelabs.ru
Mon Jul 27 20:00:11 UTC 2009
>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&<F]M.B!%>6=E;F4 at 4GEA8FEN
M:VEN(#QR96$M9F)S9$!C;V1E;&%B<RYR=3X*1&%T93H at 36]N+"`R-R!*=6P@
M,C`P.2`Q-CHU.#HU."`K,#0P,`I3=6)J96-T.B!;4$%40T@@-R\W72!U;7,Z
M(&%V;VED('-P=7)I;W5S(&)U='1O;B!R96QE87-E<R!F;W(@8V]M<&QE>"!M
M:6-E<PH*4V]M92!M:6-E<R`H36EC<F]S;V9T(%=I<F5L97-S($QA<V5R($UO
M=7-E(#4P,#`@:7,@;VYE(&]F('1H96TI(')E<&]R=`II;G!U="!I=&5M('9I
M82!M=6QT:7!L92!R97!O<G0 at 9&5S8W)I<'1O<G, at 86YD(&YO="!A;&P at 9&%T
M82!I<PIR96-O9VYI>F5D(&)Y('5M<R at T*2!D<FEV97(N("!7:&5N('-U8V@@
M(F9O<F5I9VX at 9&%T82(@8V]M97,@:6X at 86YD('-O;64*;6]U<V4 at 8G5T=&]N
M('=A<R!A;')E861Y('!R97-S960L('1H:7,@=VEL;"!E9F9E8W1I=F5L>2!Z
M97)O(&]U="!B=71T;VX*<W1A=&4Z("=B=71T;VYS)R!A<F4@:6YI=&EA;&EZ
M960@=&\@>F5R;R!A="!T:&4 at 8F5G:6YN:6YG(&]F('1H92!H86YD;&5R"F%N
M9"!S;V9T8R!D871A(&ES(&UO9&EF:65D(&EF('1H92!B=71T;VX@<W1A=&4@
M:6X@<V]F=&,@:7-N)W0@=&AE('-A;64*87,@=&AE(&)U='1O;B!D871A(&9R
M;VT@)V)U='1O;G,G+ at H*06YY('-U8G-E<75E;G0@;6]U<V4@;6]V97,@=VET
M:"!B=71T;VX@<&AY<VEC86QL>2!H96QD('=I;&P@<')O9'5C90IE>'1R82!M
M;W5S92!P<F5S<V5S("AA9V%I;BP@=&AE('-P=7)I;W5S(&]N97,I.B!M;W9E
M(&UA:V5S(&UI8V4@=&\@<V5N9`IT:&4@<&%C:V5T('=I=&@@=&AE(&1A=&$@
M=&AA="!W:6QL(&)E(')E8V]G;FEZ960 at 8GD@=&AE(&1R:79E<CL at 86QL"B)R
M96QE87-E9"(@8G5T=&]N<R!W:6QL(&)E+"!O9B!C;W5R<V4L(")P<F5S<V5D
M(&%G86EN(B!W:&5N('1H:7, at 9&%T80IW:6QL(&)E('!R;V-E<W-E9"X*"D%N
M;W1H97(@=F%R:6%B;&4@=V%S(&EN=')O9'5C960@=&\@9FQA9R!I9B!W92!H
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/2`P.R!I(#P@:6YF;RT^<V-?8G5T=&]N<SL@
M:2LK*2!["B`)"0EI9B`H:60@(3T@:6YF;RT^<V-?:6ED7V)T;EMI72D*0$`@
M+3(W-"PQ,R`K,CDU+#$T($!`('5M<U]I;G1R7V-A;&QB86-K*'-T<G5C="!U
M<V)?>&9E<B`J>&9E<BP@=7-B7V5R<F]R7W0 at 97)R;W(I"B`)"0EI9B`H:&ED
M7V=E=%]D871A*&)U9BP@;&5N+"`F:6YF;RT^<V-?;&]C7V)T;EMI72DI('L*
M(`D)"0EB=71T;VYS('P]("@Q(#P\(%5-4U]"550H:2DI.PH@"0D)?0HK"0D)
M9V]T7VUI;F5?9&%T82LK.PH@"0E]"B`*(`D):68@*"LK:6YF;R`A/2`F<V,M
M/G-C7VEN9F];54U37TE.1D]?34%872D*(`D)"6=O=&\@<F5P96%T.PH@"BT)
M"6EF("AD>"!\?"!D>2!\?"!D>B!\?"!D="!\?"!D=R!\?`HM"0D@("`@*&)U
M='1O;G,@(3T@<V,M/G-C7W-T871U<RYB=71T;VXI*2!["BL)"6EF("AG;W1?
M;6EN95]D871A("8F("AD>"!\?"!D>2!\?"!D>B!\?"!D="!\?"!D=R!\?`HK
M"0D@("`@*&)U='1O;G,@(3T@<V,M/G-C7W-T871U<RYB=71T;VXI*2D@>PH@
M"B`)"0E$4%))3E1&3B at V+"`B>#HE9"!Y.B5D('HZ)60@=#HE9"!W.B5D(&)U
M='1O;G,Z,'@E,#AX7&XB+`H@"0D)("`@(&1X+"!D>2P at 9'HL(&1T+"!D=RP@
78G5T=&]N<RD["BTM(`HQ+C8N,RXQ"@H`
`
end
--- 0007-ums-avoid-spurious-button-releases-for-complex-mices.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-usb
mailing list