2018-08-21 08:56:44

by AceLan Kao

[permalink] [raw]
Subject: [PATCH] HID: i2c-hid: Fix flooded incomplete report after S3 on Rayd touchscreen

The incomplete report flooded after S3 and touchscreen becomes
malfunctioned.
[ 1367.646244] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/18785)
[ 1367.649471] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/28743)
[ 1367.651092] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/26757)
[ 1367.652658] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/52280)
[ 1367.654287] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/56059)

Adding device ID, 04F3:30CC, to the quirk to re-send report description
after resume.

Cc: [email protected]
Signed-off-by: AceLan Kao <[email protected]>
---
drivers/hid/hid-ids.h | 1 +
drivers/hid/i2c-hid/i2c-hid.c | 2 ++
2 files changed, 3 insertions(+)

diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index c7981ddd8776..e80bcd71fe1e 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -528,6 +528,7 @@

#define I2C_VENDOR_ID_RAYD 0x2386
#define I2C_PRODUCT_ID_RAYD_3118 0x3118
+#define I2C_PRODUCT_ID_RAYD_4B33 0x4B33

#define USB_VENDOR_ID_HANWANG 0x0b57
#define USB_DEVICE_ID_HANWANG_TABLET_FIRST 0x5000
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index eae0cb3ddec6..5fd1159fc095 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -174,6 +174,8 @@ static const struct i2c_hid_quirks {
I2C_HID_QUIRK_RESEND_REPORT_DESCR },
{ USB_VENDOR_ID_SIS_TOUCH, USB_DEVICE_ID_SIS10FB_TOUCH,
I2C_HID_QUIRK_RESEND_REPORT_DESCR },
+ { I2C_VENDOR_ID_RAYD, I2C_PRODUCT_ID_RAYD_4B33,
+ I2C_HID_QUIRK_RESEND_REPORT_DESCR },
{ 0, 0 }
};

--
2.17.1



2018-08-27 12:32:49

by Benjamin Tissoires

[permalink] [raw]
Subject: Re: [PATCH] HID: i2c-hid: Fix flooded incomplete report after S3 on Rayd touchscreen

On Tue, Aug 21, 2018 at 10:55 AM AceLan Kao <[email protected]> wrote:
>
> The incomplete report flooded after S3 and touchscreen becomes
> malfunctioned.
> [ 1367.646244] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/18785)
> [ 1367.649471] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/28743)
> [ 1367.651092] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/26757)
> [ 1367.652658] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/52280)
> [ 1367.654287] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/56059)
>
> Adding device ID, 04F3:30CC, to the quirk to re-send report description
> after resume.
>
> Cc: [email protected]
> Signed-off-by: AceLan Kao <[email protected]>

Looks good:
Reviewed-by: Benjamin Tissoires <[email protected]>

Cheers,
Benjamin

> ---
> drivers/hid/hid-ids.h | 1 +
> drivers/hid/i2c-hid/i2c-hid.c | 2 ++
> 2 files changed, 3 insertions(+)
>
> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> index c7981ddd8776..e80bcd71fe1e 100644
> --- a/drivers/hid/hid-ids.h
> +++ b/drivers/hid/hid-ids.h
> @@ -528,6 +528,7 @@
>
> #define I2C_VENDOR_ID_RAYD 0x2386
> #define I2C_PRODUCT_ID_RAYD_3118 0x3118
> +#define I2C_PRODUCT_ID_RAYD_4B33 0x4B33
>
> #define USB_VENDOR_ID_HANWANG 0x0b57
> #define USB_DEVICE_ID_HANWANG_TABLET_FIRST 0x5000
> diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
> index eae0cb3ddec6..5fd1159fc095 100644
> --- a/drivers/hid/i2c-hid/i2c-hid.c
> +++ b/drivers/hid/i2c-hid/i2c-hid.c
> @@ -174,6 +174,8 @@ static const struct i2c_hid_quirks {
> I2C_HID_QUIRK_RESEND_REPORT_DESCR },
> { USB_VENDOR_ID_SIS_TOUCH, USB_DEVICE_ID_SIS10FB_TOUCH,
> I2C_HID_QUIRK_RESEND_REPORT_DESCR },
> + { I2C_VENDOR_ID_RAYD, I2C_PRODUCT_ID_RAYD_4B33,
> + I2C_HID_QUIRK_RESEND_REPORT_DESCR },
> { 0, 0 }
> };
>
> --
> 2.17.1
>

2018-08-28 11:48:12

by Jiri Kosina

[permalink] [raw]
Subject: Re: [PATCH] HID: i2c-hid: Fix flooded incomplete report after S3 on Rayd touchscreen

On Tue, 21 Aug 2018, AceLan Kao wrote:

> The incomplete report flooded after S3 and touchscreen becomes
> malfunctioned.
> [ 1367.646244] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/18785)
> [ 1367.649471] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/28743)
> [ 1367.651092] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/26757)
> [ 1367.652658] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/52280)
> [ 1367.654287] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/56059)
>
> Adding device ID, 04F3:30CC, to the quirk to re-send report description
> after resume.
>
> Cc: [email protected]
> Signed-off-by: AceLan Kao <[email protected]>

Applied, thanks.

--
Jiri Kosina
SUSE Labs


2018-08-28 12:40:54

by Benjamin Tissoires

[permalink] [raw]
Subject: Re: [PATCH] HID: i2c-hid: Fix flooded incomplete report after S3 on Rayd touchscreen

On Tue, Aug 28, 2018 at 1:46 PM Jiri Kosina <[email protected]> wrote:
>
> On Tue, 21 Aug 2018, AceLan Kao wrote:
>
> > The incomplete report flooded after S3 and touchscreen becomes
> > malfunctioned.
> > [ 1367.646244] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/18785)
> > [ 1367.649471] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/28743)
> > [ 1367.651092] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/26757)
> > [ 1367.652658] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/52280)
> > [ 1367.654287] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/56059)
> >
> > Adding device ID, 04F3:30CC, to the quirk to re-send report description
> > after resume.
> >
> > Cc: [email protected]
> > Signed-off-by: AceLan Kao <[email protected]>
>
> Applied, thanks.

Just a quick note Jiri. Hans pointed me this morning to
https://bugzilla.redhat.com/show_bug.cgi?id=1622695

And I think we should apply the quirk unconditionally as it should be
safe to retrieve the HID descriptor at all times. I am planning on
working on that tomorrow or Thursday when I have access to the XPS
with i2c_hid devices attached to it.

Cheers,
Benjamin

>
> --
> Jiri Kosina
> SUSE Labs
>