Date: Thu, 29 Dec 2005 10:06:16 -0600 From: Jonathan Fosburgh <syjef@mdanderson.org> To: freebsd-questions@freebsd.org Cc: Teilhard Knight <teilhk@crosswinds.net> Subject: Re: USB mice Message-ID: <200512291006.18187.syjef@mdanderson.org> In-Reply-To: <01bd01c60872$faef7990$210110ac@fortunato> References: <01a001c6086d$8c0d57e0$210110ac@fortunato> <43AD197A.50905@gmx.net> <01bd01c60872$faef7990$210110ac@fortunato>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart1161888.G43piizVSd Content-Type: multipart/mixed; boundary="Boundary-01=_5lAtDjp8PbOeDA5" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_5lAtDjp8PbOeDA5 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 24 December 2005 04:15, Teilhard Knight wrote: > > It didn't work. Actually I have a little more than a USB mouse, I have a > wireless mouse and wireless keyboard which are both controlled by a centr= al > unit which plugs into an USB port in the computer. The keyboard works wel= l, > with the option of booting with an USB keyboard, but I cannot make the > mouse work. Any suggestions? > Try one of the attached patches. They are taken from usb/77604. The patch= is=20 now known to work with at least three different manufacturers mice, and so= =20 far as I have been able to tell doesn't break anything that works without i= t. =20 Maybe someone will eventually commit these patches to the appropriate trees= ,=20 the PR has only been open for about 10 months... Choose one of the patches based on the release of FreeBSD you are using. t= he=20 hid.c.patch file is for RELENG_5, hid.c.patch.6 is for RELENG_6 and HEAD.=20 Deposit the file in /usr/src/sys/dev/usb and run patch <hid.c.patch[.6] the= n=20 recompile and reinstall your kernel. =2D-=20 Jonathan Fosburgh AIX and Storage Administrator UT MD Anderson Cancer Center Houston, TX=20 --Boundary-01=_5lAtDjp8PbOeDA5 Content-Type: text/x-diff; charset="iso-8859-1"; 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=_5lAtDjp8PbOeDA5 Content-Type: text/x-diff; charset="iso-8859-1"; 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=_5lAtDjp8PbOeDA5-- --nextPart1161888.G43piizVSd Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDtAl6qUvQmqp7omYRAvtdAJ497XrJAassc4OyOmVNJV7abLacGgCePZKb Sfdb5ky4LdKMhwFHjiPQk5E= =igea -----END PGP SIGNATURE----- --nextPart1161888.G43piizVSd--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200512291006.18187.syjef>