Date: Mon, 9 Aug 2004 19:40:37 GMT From: Anish Mistry <mistry.7@osu.edu> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/63837: [USB/patch] hid_is_collection() only looks for the first item Message-ID: <200408091940.i79JebLp047131@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/63837; it has been noted by GNATS. From: Anish Mistry <mistry.7@osu.edu> To: freebsd-gnats-submit@FreeBSD.org, nivit@email.it Cc: Subject: Re: kern/63837: [USB/patch] hid_is_collection() only looks for the first item Date: Mon, 9 Aug 2004 15:35:13 -0400 --Boundary-00=_xH9FBa1n9dLuPwp Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The attached patch is a bit cleaner and closer with the NetBSD code. This= =20 really should be commit before the 5-STABLE branch because it'll fix a bunc= h=20 of non-working combo usb mice. Probably is a good canidate for MFCing to=20 4-STABLE. =2D --=20 Anish Mistry =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBF9H4xqA5ziudZT0RAvc3AKCx5JyRxCP5ZDeZFVp7FMqnVXo8tACfdqk6 U+4IFfL85qsxDqunNV5JfLs=3D =3DRCpN =2D----END PGP SIGNATURE----- --Boundary-00=_xH9FBa1n9dLuPwp Content-Type: text/x-diff; charset="us-ascii"; name="hid-race.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="hid-race.patch" --- /sys/dev/usb/hid.c.orig Sun Jun 20 17:20:03 2004 +++ /sys/dev/usb/hid.c Tue Jun 29 00:51:39 2004 @@ -373,9 +373,10 @@ struct hid_item h; int size, id; + h.report_ID = 0; id = 0; for (d = hid_start_parse(buf, len, 1<<k); hid_get_item(d, &h); ) - if (h.report_ID != 0) + if (h.report_ID != 0 && !id) id = h.report_ID; hid_end_parse(d); size = h.loc.pos; --Boundary-00=_xH9FBa1n9dLuPwp--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408091940.i79JebLp047131>