* [PATCH] HID: wacom: Remove raport header check.
@ 2012-05-14 16:13 Przemo Firszt
2012-05-14 20:21 ` Ping Cheng
0 siblings, 1 reply; 3+ messages in thread
From: Przemo Firszt @ 2012-05-14 16:13 UTC (permalink / raw)
To: pinglinux, jkosina
Cc: linuxwacom-devel, linux-input, linux-kernel, Przemo Firszt
That check was valid when hid-wacom was only supporting Wacom Graphire, as the
device raports always start with 0x03. Intuos4 WL high-speed raports
begin with 0x04, so the check would be filtering out valid reports.
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
---
drivers/hid/hid-wacom.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c
index 29372ed..324ea74 100644
--- a/drivers/hid/hid-wacom.c
+++ b/drivers/hid/hid-wacom.c
@@ -578,10 +578,6 @@ static int wacom_raw_event(struct hid_device *hdev, struct hid_report *report,
hidinput = list_entry(hdev->inputs.next, struct hid_input, list);
input = hidinput->input;
- /* Check if this is a tablet report */
- if (data[0] != 0x03)
- return 0;
-
switch (hdev->product) {
case USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH:
return wacom_gr_parse_report(hdev, wdata, input, data);
--
1.7.10.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] HID: wacom: Remove raport header check.
2012-05-14 16:13 [PATCH] HID: wacom: Remove raport header check Przemo Firszt
@ 2012-05-14 20:21 ` Ping Cheng
2012-05-15 18:30 ` Przemo Firszt
0 siblings, 1 reply; 3+ messages in thread
From: Ping Cheng @ 2012-05-14 20:21 UTC (permalink / raw)
To: Przemo Firszt; +Cc: jkosina, linux-input
On Mon, May 14, 2012 at 9:13 AM, Przemo Firszt <przemo@firszt.eu> wrote:
> That check was valid when hid-wacom was only supporting Wacom Graphire, as the
> device raports always start with 0x03. Intuos4 WL high-speed raports
> begin with 0x04, so the check would be filtering out valid reports.
I assume the if-statement was added on purpose. It was most likely
used to filter noises for Graphire.
Should we change to
if (data[0] != 0x03 || (data[0] != 0x04 &&
hdev->product == USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH)) {
hid_err(hdev, "Unknown report: %d,%d size:%d\n",
data[0], data[1], size);
return 0;
}
and remove default case for I4?
Or, remove the if-statement as you suggested and add a default case
for Graphire to post hid_err and exit when data[0] != 3.
Either way works for me.
Ping
>
> Signed-off-by: Przemo Firszt <przemo@firszt.eu>
> ---
> drivers/hid/hid-wacom.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c
> index 29372ed..324ea74 100644
> --- a/drivers/hid/hid-wacom.c
> +++ b/drivers/hid/hid-wacom.c
> @@ -578,10 +578,6 @@ static int wacom_raw_event(struct hid_device *hdev, struct hid_report *report,
> hidinput = list_entry(hdev->inputs.next, struct hid_input, list);
> input = hidinput->input;
>
> - /* Check if this is a tablet report */
> - if (data[0] != 0x03)
> - return 0;
> -
> switch (hdev->product) {
> case USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH:
> return wacom_gr_parse_report(hdev, wdata, input, data);
> --
> 1.7.10.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] HID: wacom: Remove raport header check.
2012-05-14 20:21 ` Ping Cheng
@ 2012-05-15 18:30 ` Przemo Firszt
0 siblings, 0 replies; 3+ messages in thread
From: Przemo Firszt @ 2012-05-15 18:30 UTC (permalink / raw)
To: Ping Cheng; +Cc: jkosina, linux-input, linuxwacom-devel
Dnia 2012-05-14, pon o godzinie 13:21 -0700, Ping Cheng pisze:
> On Mon, May 14, 2012 at 9:13 AM, Przemo Firszt <przemo@firszt.eu> wrote:
> > That check was valid when hid-wacom was only supporting Wacom Graphire, as the
> > device raports always start with 0x03. Intuos4 WL high-speed raports
> > begin with 0x04, so the check would be filtering out valid reports.
>
> I assume the if-statement was added on purpose. It was most likely
> used to filter noises for Graphire.
>
> Should we change to
>
> if (data[0] != 0x03 || (data[0] != 0x04 &&
> hdev->product == USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH)) {
>
> hid_err(hdev, "Unknown report: %d,%d size:%d\n",
> data[0], data[1], size);
> return 0;
> }
>
> and remove default case for I4?
>
> Or, remove the if-statement as you suggested and add a default case
> for Graphire to post hid_err and exit when data[0] != 3.
>
> Either way works for me.
Hi Ping,
Thanks for the comment. I'll go with the second option and I hope we
won't be generating too much noise in the logs :-)
Patches (there are 2 more for speed setting through sysfs for I4 WL) on
the way...
--
Regards,
Przemo Firszt <przemo@firszt.eu>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-15 18:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-14 16:13 [PATCH] HID: wacom: Remove raport header check Przemo Firszt
2012-05-14 20:21 ` Ping Cheng
2012-05-15 18:30 ` Przemo Firszt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).