Re: [PATCH] HID: driver for BTC "Emprex 3009URF III Vista MCE Remote" quirky remote

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 18 Mar 2010, Jiri Kosina wrote:

> > I have compiled kernel 2.6.33.1 with hid_debug set to 2.
> > Below is the output of the appropriate device (the remote presents
> > itself as two separate event devices) when pressing some of the
> > buttons in question.
> > 
> > I have attached the output of
> > /sys/kernel/debug/hid/0003:046E:5578.0004/rdesc as a text file since
> > it is so long, but here is the output of
> > /sys/kernel/debug/hid/0003:046E:5578.0004/events (one report for each
> > button pressed).
> > 
> > report (size 7) (numbered)
> > 
> > 
> > 
> > report (size 7) (numbered)
> > 
> > 
> > 
> > report (size 7) (numbered)
> > 
> > 
> > 
> 
> Hmm, this is very odd output. Do you by any chance have messages such as
> 
>         undefined report_id <NUMBER> received
> 
> appearing in your 'dmesg' output when you are pressing the keys?

Does applying the patch below give reasonable output in 'events' debugfs 
file please?



diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 368fbb0..c49aaa2 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1096,20 +1096,11 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i
 		goto nomem;
 	}
 
-	snprintf(buf, HID_DEBUG_BUFSIZE - 1,
-			"\nreport (size %u) (%snumbered)\n", size, report_enum->numbered ? "" : "un");
-	hid_debug_event(hid, buf);
-
-	report = hid_get_report(report_enum, data);
-	if (!report) {
-		kfree(buf);
-		return -1;
-	}
-
 	/* dump the report */
 	snprintf(buf, HID_DEBUG_BUFSIZE - 1,
-			"report %d (size %u) = ", report->id, size);
+			"\nreport (size %u) (%snumbered) = ", size, report_enum->numbered ? "" : "un");
 	hid_debug_event(hid, buf);
+
 	for (i = 0; i < size; i++) {
 		snprintf(buf, HID_DEBUG_BUFSIZE - 1,
 				" %02x", data[i]);
@@ -1117,6 +1108,13 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i
 	}
 	hid_debug_event(hid, "\n");
 
+	report = hid_get_report(report_enum, data);
+
+	if (!report) {
+		kfree(buf);
+		return -1;
+	}
+
 	kfree(buf);
 
 nomem:
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux