All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] HID: wacom: fix Bamboo ONE oops
@ 2016-03-25 14:26 Benjamin Tissoires
  2016-03-28 16:56 ` Ping Cheng
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Tissoires @ 2016-03-25 14:26 UTC (permalink / raw)
  To: Jiri Kosina, Ping Cheng, Jason Gerecke, linux-input; +Cc: linux-kernel

Looks like recent changes in the Wacom driver made the Bamboo ONE crashes.
The tablet behaves as if it was a regular Bamboo device with pen, touch
and pad, but there is no physical pad connected to it.
The weird part is that the pad is still sending events and given that
there is no input node connected to it, we get  anull pointer exception.

Link: https://bugzilla.redhat.com/show_bug.cgi?id=1317116

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
Hi Jiri,

This fixes the oopses we saw on the Bamboo ONE.
The fedora user is fine, and it appears the sourceforge user too, as the
problems were due to misconfigurations on his end.

Cheers,
Benjamin

 drivers/hid/wacom_wac.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index bd198bb..02c4efe 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -2426,6 +2426,17 @@ void wacom_setup_device_quirks(struct wacom *wacom)
 	}
 
 	/*
+	 * Hack for the Bamboo One:
+	 * the device presents a PAD/Touch interface as most Bamboos and even
+	 * sends ghosts PAD data on it. However, later, we must disable this
+	 * ghost interface, and we can not detect it unless we set it here
+	 * to WACOM_DEVICETYPE_PAD or WACOM_DEVICETYPE_TOUCH.
+	 */
+	if (features->type == BAMBOO_PEN &&
+	    features->pktlen == WACOM_PKGLEN_BBTOUCH3)
+		features->device_type |= WACOM_DEVICETYPE_PAD;
+
+	/*
 	 * Raw Wacom-mode pen and touch events both come from interface
 	 * 0, whose HID descriptor has an application usage of 0xFF0D
 	 * (i.e., WACOM_VENDORDEFINED_PEN). We route pen packets back
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] HID: wacom: fix Bamboo ONE oops
  2016-03-25 14:26 [PATCH] HID: wacom: fix Bamboo ONE oops Benjamin Tissoires
@ 2016-03-28 16:56 ` Ping Cheng
  2016-03-29 13:44   ` Jiri Kosina
  0 siblings, 1 reply; 3+ messages in thread
From: Ping Cheng @ 2016-03-28 16:56 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: Jiri Kosina, Jason Gerecke, linux-input, linux-kernel

On Fri, Mar 25, 2016 at 7:26 AM, Benjamin Tissoires
<benjamin.tissoires@redhat.com> wrote:
>
> Looks like recent changes in the Wacom driver made the Bamboo ONE crashes.
> The tablet behaves as if it was a regular Bamboo device with pen, touch
> and pad, but there is no physical pad connected to it.
> The weird part is that the pad is still sending events and given that
> there is no input node connected to it, we get  anull pointer exception.
>
> Link: https://bugzilla.redhat.com/show_bug.cgi?id=1317116
>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Acked-by: Ping Cheng <pingc@wacom.com>

Thank you Benjamin for the fix.

> ---
> Hi Jiri,

As Benjamin mentioned, both users tested the patch. Since their
testing was on kernel 4.4, we need to backport the patch to 4.4. Do
you need us to make a patch for 4.4 or will you take care of stable as
well?

Thanks,

Ping

>
> This fixes the oopses we saw on the Bamboo ONE.
> The fedora user is fine, and it appears the sourceforge user too, as the
> problems were due to misconfigurations on his end.
>
> Cheers,
> Benjamin
>
>  drivers/hid/wacom_wac.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
> index bd198bb..02c4efe 100644
> --- a/drivers/hid/wacom_wac.c
> +++ b/drivers/hid/wacom_wac.c
> @@ -2426,6 +2426,17 @@ void wacom_setup_device_quirks(struct wacom *wacom)
>         }
>
>         /*
> +        * Hack for the Bamboo One:
> +        * the device presents a PAD/Touch interface as most Bamboos and even
> +        * sends ghosts PAD data on it. However, later, we must disable this
> +        * ghost interface, and we can not detect it unless we set it here
> +        * to WACOM_DEVICETYPE_PAD or WACOM_DEVICETYPE_TOUCH.
> +        */
> +       if (features->type == BAMBOO_PEN &&
> +           features->pktlen == WACOM_PKGLEN_BBTOUCH3)
> +               features->device_type |= WACOM_DEVICETYPE_PAD;
> +
> +       /*
>          * Raw Wacom-mode pen and touch events both come from interface
>          * 0, whose HID descriptor has an application usage of 0xFF0D
>          * (i.e., WACOM_VENDORDEFINED_PEN). We route pen packets back
> --
> 2.5.0
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] HID: wacom: fix Bamboo ONE oops
  2016-03-28 16:56 ` Ping Cheng
@ 2016-03-29 13:44   ` Jiri Kosina
  0 siblings, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2016-03-29 13:44 UTC (permalink / raw)
  To: Ping Cheng; +Cc: Benjamin Tissoires, Jason Gerecke, linux-input, linux-kernel

On Mon, 28 Mar 2016, Ping Cheng wrote:

> > Looks like recent changes in the Wacom driver made the Bamboo ONE crashes.
> > The tablet behaves as if it was a regular Bamboo device with pen, touch
> > and pad, but there is no physical pad connected to it.
> > The weird part is that the pad is still sending events and given that
> > there is no input node connected to it, we get  anull pointer exception.
> >
> > Link: https://bugzilla.redhat.com/show_bug.cgi?id=1317116
> >
> > Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> 
> Acked-by: Ping Cheng <pingc@wacom.com>
> 
> Thank you Benjamin for the fix.

Queued for 4.6-rc, thanks.

> As Benjamin mentioned, both users tested the patch. Since their
> testing was on kernel 4.4, we need to backport the patch to 4.4. Do
> you need us to make a patch for 4.4 or will you take care of stable as
> well?

I've added -stable tag to the patch.

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-29 13:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-25 14:26 [PATCH] HID: wacom: fix Bamboo ONE oops Benjamin Tissoires
2016-03-28 16:56 ` Ping Cheng
2016-03-29 13:44   ` Jiri Kosina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.