diff mbox

USB: quirks: Fix another ELAN touchscreen

Message ID 1448165164-11398-1-git-send-email-adrienverge@gmail.com (mailing list archive)
State New, archived
Delegated to: Jiri Kosina
Headers show

Commit Message

Adrien Vergé Nov. 22, 2015, 4:06 a.m. UTC
Like other buggy models that had their fixes [1], the touchscreen with
id 04f3:21b8 from ELAN Microelectronics needs the device-qualifier
quirk. Otherwise, it fails to respond, blocks the boot for a random
amount of time and pollutes dmesg with:

[ 2887.373196] usb 1-5: new full-speed USB device number 41 using xhci_hcd
[ 2889.502000] usb 1-5: unable to read config index 0 descriptor/start: -71
[ 2889.502005] usb 1-5: can't read configurations, error -71
[ 2889.654571] usb 1-5: new full-speed USB device number 42 using xhci_hcd
[ 2891.783438] usb 1-5: unable to read config index 0 descriptor/start: -71
[ 2891.783443] usb 1-5: can't read configurations, error -71

[1]: See commits c68929f, 876af5d, d749947, a32c99e and dc703ec.

Tested-by: Adrien Vergé <adrienverge@gmail.com>
---
 drivers/hid/hid-ids.h           | 1 +
 drivers/hid/usbhid/hid-quirks.c | 1 +
 drivers/usb/core/quirks.c       | 3 +++
 3 files changed, 5 insertions(+)

Comments

Jiri Kosina Nov. 23, 2015, 2:52 p.m. UTC | #1
On Sat, 21 Nov 2015, Adrien Vergé wrote:

> Like other buggy models that had their fixes [1], the touchscreen with
> id 04f3:21b8 from ELAN Microelectronics needs the device-qualifier
> quirk. Otherwise, it fails to respond, blocks the boot for a random
> amount of time and pollutes dmesg with:
> 
> [ 2887.373196] usb 1-5: new full-speed USB device number 41 using xhci_hcd
> [ 2889.502000] usb 1-5: unable to read config index 0 descriptor/start: -71
> [ 2889.502005] usb 1-5: can't read configurations, error -71
> [ 2889.654571] usb 1-5: new full-speed USB device number 42 using xhci_hcd
> [ 2891.783438] usb 1-5: unable to read config index 0 descriptor/start: -71
> [ 2891.783443] usb 1-5: can't read configurations, error -71

The drivers/hid part is

	Acked-by: Jiri Kosina <jkosina@suse.cz>

Makes one wonder however whether we shouldn't be applying ALWAYS_POLL to 
all ELAN devices by default anyway.

> [1]: See commits c68929f, 876af5d, d749947, a32c99e and dc703ec.
> 
> Tested-by: Adrien Vergé <adrienverge@gmail.com>

You need signoff here as well so that the patch can be applied.

Thanks,
Adrien Vergé Nov. 23, 2015, 5:37 p.m. UTC | #2
2015-11-23 15:52 GMT+01:00 Jiri Kosina <jikos@kernel.org>:

> The drivers/hid part is
>
>         Acked-by: Jiri Kosina <jkosina@suse.cz>

Thanks.

> Makes one wonder however whether we shouldn't be applying ALWAYS_POLL to
> all ELAN devices by default anyway.

True! But I don't want to risk breaking anything on other models in this patch.

I'll submit a v2 with appropriate signed-off-by and acked-by.
--
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
Oliver Neukum Nov. 24, 2015, 7:29 a.m. UTC | #3
On Mon, 2015-11-23 at 18:37 +0100, Adrien Vergé wrote:
> > Makes one wonder however whether we shouldn't be applying
> ALWAYS_POLL to
> > all ELAN devices by default anyway.
> 
> True! But I don't want to risk breaking anything on other models in
> this patch.

ALWAYS_POLL just extends an existing behavior. The chances
of breaking anything are slim. I'd go for the approach
based on the vendor ID.

	Regards
		Oliver


--
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
Adrien Vergé Nov. 24, 2015, 1:49 p.m. UTC | #4
This is the third version of a patchset which originally aimed to fix a buggy
touchscreen from ELAN Microelectronics.

Thanks to feedback from Jiri Kosina and Oliver Neukum, the ALWAYS_POLL quirk is
now applied to all ELAN devices by default.

Adrien Vergé (2):
  USB: quirks: Fix another ELAN touchscreen
  USB: quirks: Apply ALWAYS_POLL to all ELAN devices

 drivers/hid/hid-ids.h           |  5 -----
 drivers/hid/usbhid/hid-quirks.c | 43 +++++++++++++++++++++++++++--------------
 drivers/usb/core/quirks.c       |  3 +++
 3 files changed, 32 insertions(+), 19 deletions(-)
Adrien Vergé Nov. 24, 2015, 3:02 p.m. UTC | #5
This is the fourth version of a patchset which originally aimed to fix a buggy
touchscreen from ELAN Microelectronics.

Changes since v3:
- Use HID_ANY_ID to define a vendor-ID-global quirk, as suggested by
  Benjamin Tissoires.

Changes since v2:
- Apply ALWAYS_POLL quirk to all ELAN devices by default, as suggested by
  Jiri Kosina and Oliver Neukum.

Adrien Vergé (2):
  USB: quirks: Fix another ELAN touchscreen
  USB: quirks: Apply ALWAYS_POLL to all ELAN devices

 drivers/hid/hid-ids.h           | 5 -----
 drivers/hid/usbhid/hid-quirks.c | 9 +++------
 drivers/usb/core/quirks.c       | 3 +++
 3 files changed, 6 insertions(+), 11 deletions(-)
Adrien Vergé Dec. 1, 2015, 6:56 p.m. UTC | #6
This is the fifth version of a patchset which originally aimed to fix a buggy
touchscreen from ELAN Microelectronics.

Changes since v4:
- Cast HID_ANY_ID to an __u16 so to keep gcc happy on AVR32 arch.

Changes since v3:
- Use HID_ANY_ID to define a vendor-ID-global quirk, as suggested by
  Benjamin Tissoires.

Changes since v2:
- Apply ALWAYS_POLL quirk to all ELAN devices by default, as suggested by
  Jiri Kosina and Oliver Neukum.

Adrien Vergé (2):
  USB: quirks: Fix another ELAN touchscreen
  USB: quirks: Apply ALWAYS_POLL to all ELAN devices

 drivers/hid/hid-ids.h           | 5 -----
 drivers/hid/usbhid/hid-quirks.c | 9 +++------
 drivers/usb/core/quirks.c       | 3 +++
 3 files changed, 6 insertions(+), 11 deletions(-)
diff mbox

Patch

diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index ac1feea..6b68408 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -321,6 +321,7 @@ 
 #define USB_DEVICE_ID_ELAN_TOUCHSCREEN_0103	0x0103
 #define USB_DEVICE_ID_ELAN_TOUCHSCREEN_010c	0x010c
 #define USB_DEVICE_ID_ELAN_TOUCHSCREEN_016F	0x016f
+#define USB_DEVICE_ID_ELAN_TOUCHSCREEN_21B8	0x21b8
 
 #define USB_VENDOR_ID_ELECOM		0x056e
 #define USB_DEVICE_ID_ELECOM_BM084	0x0061
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index 94bb137..7a45942 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -77,6 +77,7 @@  static const struct hid_blacklist {
 	{ USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ELAN_TOUCHSCREEN_0103, HID_QUIRK_ALWAYS_POLL },
 	{ USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ELAN_TOUCHSCREEN_010c, HID_QUIRK_ALWAYS_POLL },
 	{ USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ELAN_TOUCHSCREEN_016F, HID_QUIRK_ALWAYS_POLL },
+	{ USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ELAN_TOUCHSCREEN_21B8, HID_QUIRK_ALWAYS_POLL },
 	{ USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET },
 	{ USB_VENDOR_ID_FORMOSA, USB_DEVICE_ID_FORMOSA_IR_RECEIVER, HID_QUIRK_NO_INIT_REPORTS },
 	{ USB_VENDOR_ID_FREESCALE, USB_DEVICE_ID_FREESCALE_MX28, HID_QUIRK_NOGET },
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index f5a3819..fcd6ac0 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -125,6 +125,9 @@  static const struct usb_device_id usb_quirk_list[] = {
 	{ USB_DEVICE(0x04f3, 0x016f), .driver_info =
 			USB_QUIRK_DEVICE_QUALIFIER },
 
+	{ USB_DEVICE(0x04f3, 0x21b8), .driver_info =
+			USB_QUIRK_DEVICE_QUALIFIER },
+
 	/* Roland SC-8820 */
 	{ USB_DEVICE(0x0582, 0x0007), .driver_info = USB_QUIRK_RESET_RESUME },