[PATCH] Logitech USB Receiver mouse workaround patch
Morten Johansen
morten at oslonett.no
Sat Mar 11 11:45:08 UTC 2006
Nenad Kljajic wrote:
> There is some problem with hid_report_size() function
> and Logitech USB receiver in /usr/src/sys/dev/usb/ums.c.
> The returned value is 14 but it should be 8.
> This results in subsamling mouse data and jerky cursor movement.
>
> I have tested this workaround patch for
> Logitech® Cordless Desktop® MX™ 3100
> and it works fine now.
>
Can you try the attached patch to hid.c instead the workaround?
There is also an open PR usb/77604 on this.
-------------- next part --------------
--- hid.c Sat Jun 4 18:00:09 2005
+++ hid.c.mj Tue Feb 22 02:32:55 2005
@@ -371,14 +371,22 @@
{
struct hid_data *d;
struct hid_item h;
- int size, id;
+ int hi, lo, size, id;
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)
- 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 */
More information about the freebsd-usb
mailing list