Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Mar 2006 12:45:03 +0100
From:      Morten Johansen <morten@oslonett.no>
To:        Nenad Kljajic <nenad.k@yubc.net>
Cc:        freebsd-usb@freebsd.org
Subject:   [PATCH] Logitech USB Receiver mouse workaround patch
Message-ID:  <4412B83F.1080100@oslonett.no>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------000707040307060709070702
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 8bit

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.


--------------000707040307060709070702
Content-Type: text/plain;
 name="hid.c.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="hid.c.patch"

--- 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 */

--------------000707040307060709070702--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4412B83F.1080100>