usb/77604: Sluggish Logitch LX700 USB Mouse
Jonathan Fosburgh
jonathan at fosburgh.org
Wed Mar 9 19:30:08 GMT 2005
The following reply was made to PR usb/77604; it has been noted by GNATS.
From: Jonathan Fosburgh <jonathan at fosburgh.org>
To: FreeBSD-gnats-submit at freebsd.org, freebsd-usb at freebsd.org
Cc:
Subject: Re: usb/77604: Sluggish Logitch LX700 USB Mouse
Date: Wed, 9 Mar 2005 13:24:35 -0600
--nextPart1551828.ILC4ddNh2E
Content-Type: multipart/mixed;
boundary="Boundary-01=_+10LCFumADhsQ4T"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--Boundary-01=_+10LCFumADhsQ4T
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Attached is a patch to -CURRENT that fixes this problem. It is based on a=20
patch to 5-STABLE sent to me by Morten Johansen. It is adapted from NetBSD'=
s=20
version of the hid_report_size() function. I am sending both patches, since=
=20
there are slight differences between HEAD and RELENG_5.
=2D-=20
Jonathan Fosburgh
AIX and Storage Administrator
UT MD Anderson Cancer Center
Houston, TX
--Boundary-01=_+10LCFumADhsQ4T
Content-Type: text/x-diff;
charset="utf-8";
name="hid.c.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="hid.c.patch"
=2D-- hid.c.orig Tue Feb 22 01:27:35 2005
+++ hid.c Tue Feb 22 01:38:44 2005
@@ -371,14 +371,22 @@ hid_report_size(void *buf, int len, enum
{
struct hid_data *d;
struct hid_item h;
=2D int size, id;
+ int hi, lo, size, id;
=20
id =3D 0;
+ hi =3D lo =3D -1;
for (d =3D hid_start_parse(buf, len, 1<<k); hid_get_item(d, &h); )
=2D if (h.report_ID !=3D 0)
=2D id =3D h.report_ID;
+ if (h.kind =3D=3D k) {
+ if (h.report_ID !=3D 0 && !id)
+ id =3D h.report_ID;
+ if (h.report_ID =3D=3D id) {
+ if (lo < 0)
+ lo =3D h.loc.pos;
+ hi =3D h.loc.pos + h.loc.size * h.loc.count;
+ }
+ }
hid_end_parse(d);
=2D size =3D h.loc.pos;
+ size =3D hi - lo;
if (id !=3D 0) {
size +=3D 8;
*idp =3D id; /* XXX wrong */
--Boundary-01=_+10LCFumADhsQ4T
Content-Type: text/x-diff;
charset="utf-8";
name="hid.c.patch.6"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="hid.c.patch.6"
=2D-- hid.c.orig Sun Feb 6 06:41:00 2005
+++ hid.c Wed Mar 9 11:31:02 2005
@@ -371,14 +371,23 @@
{
struct hid_data *d;
struct hid_item h;
=2D int size, id;
+ int hi, lo, size, id;
=20
id =3D 0;
+ hi =3D lo =3D -1;
for (d =3D hid_start_parse(buf, len, 1<<k); hid_get_item(d, &h); )
=2D if (h.report_ID !=3D 0 && !id)
=2D id =3D h.report_ID;
+ if (h.kind =3D=3D k) {
+ if (h.report_ID !=3D 0 && !id)
+ id =3D h.report_ID;
+ if (h.report_ID =3D=3D id) {
+ if (lo < 0)
+ lo =3D h.loc.pos;
+ hi =3D h.loc.pos + h.loc.size * h.loc.count;
+ }
+ }
+
hid_end_parse(d);
=2D size =3D h.loc.pos;
+ size =3D hi - lo;
if (id !=3D 0) {
size +=3D 8;
*idp =3D id; /* XXX wrong */
--Boundary-01=_+10LCFumADhsQ4T--
--nextPart1551828.ILC4ddNh2E
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)
iD8DBQBCL02mqUvQmqp7omYRAlcIAKCOHYbmUIGW0FCucjYHgPOuhuhf9wCgzHoP
4k3s9PdK/SKyvjdLzWzlQe8=
=+joQ
-----END PGP SIGNATURE-----
--nextPart1551828.ILC4ddNh2E--
More information about the freebsd-usb
mailing list