DragonFly submit List (threaded) for 2005-11
[Date Prev][
Date Next]
[Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Patch to fix (some? Logitech?) USB mice
A similar patch was submitted several months ago to FreeBSD but has never been
commited that I saw. For those interested in the history the PR is
usb/77604. Basically, this makes my Logitech LX700 mouse function correctly.
In DragonFly without the patch the mouse doesn't work at all. Either in
syscons or X.
The path is /usr/src/sys/bus/usb. Hopefully if there is a reason not to
commit someone will at least explain it. :)
--- hid.c.sav 2005-10-17 08:17:04.000000000 -0500
+++ hid.c 2005-10-17 08:26:01.000000000 -0500
@@ -371,16 +371,23 @@
{
struct hid_data *d;
struct hid_item h;
- int size, id;
+ int hi, lo, size, id;
- h.report_ID = 0;
id = 0;
+ hi = lo = -1;
for (d = hid_start_parse(buf, len, 1<<k); hid_get_item(d, &h); ) {
- if (h.report_ID != 0 && id == 0)
- id = h.report_ID;
+ if (h.kind == k) {
+ if(h.report_ID != 0 && !id)
+ id = h.report_ID;
+ if(h.report_ID == id) {
+ if (lo < 0)
+ lo = h.loc.pos;
+ hi = h.loc.pos + h.loc.size * h.loc.count;
+ }
+ }
}
hid_end_parse(d);
- size = h.loc.pos;
+ size = hi - lo;
if (id != 0) {
size += 8;
*idp = id; /* XXX wrong */
[Date Prev][
Date Next]
[Thread Prev][
Thread Next]
[
Date Index][
Thread Index]