Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Oct 2005 00:05:53 GMT
From:      Sam Lawrance <lawrance@FreeBSD.org>
To:        elekktretterr@exemail.com.au, lawrance@FreeBSD.org, usb@FreeBSD.org
Subject:   Re: usb/85972: Movement of USB mouse in CLI causes freeze
Message-ID:  <200510120005.j9C05r9a092246@freefall.freebsd.org>

index | next in thread | raw e-mail

Synopsis: Movement of USB mouse in CLI causes freeze

State-Changed-From-To: open->feedback
State-Changed-By: lawrance
State-Changed-When: Tue Oct 11 23:54:54 GMT 2005
State-Changed-Why: 
Can you please try this patch (from PR 77604) and let me know if
the problem is fixed?

Apply in src/sys/dev/usb and build kernel:

--- hid.c	Sat Jun  4 18:00:09 2005
+++ hid.c	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 */

http://www.freebsd.org/cgi/query-pr.cgi?pr=85972


home | help

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