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 central
> unit which plugs into an USB port in the computer. The keyboard works well,
> 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 
now known to work with at least three different manufacturers mice, and so 
far as I have been able to tell doesn't break anything that works without it.  
Maybe someone will eventually commit these patches to the appropriate trees, 
the PR has only been open for about 10 months...

Choose one of the patches based on the release of FreeBSD you are using.  the 
hid.c.patch file is for RELENG_5, hid.c.patch.6 is for RELENG_6 and HEAD. 
Deposit the file in /usr/src/sys/dev/usb and run patch <hid.c.patch[.6] then 
recompile and reinstall your kernel.

-- 
Jonathan Fosburgh
AIX and Storage Administrator
UT MD Anderson Cancer Center
Houston, TX 
--- 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;
-	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 */
--- 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;
-	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 = 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 */

Attachment: pgpcwjnYCM3qs.pgp
Description: PGP signature

Reply via email to