[SRU] [B/C/D/Unstable] [PATCH 0/1] Ignore "incomplete report" from Elan touchpanels

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[SRU] [B/C/D/Unstable] [PATCH 0/1] Ignore "incomplete report" from Elan touchpanels

Kai-Heng Feng
BugLink: https://bugs.launchpad.net/bugs/1813733

[Impact]
When using Elan touchpanels, this message keeps getting spurted out:
[  136.138487] i2c_hid i2c-DELL08D6:00: i2c_hid_get_input: incomplete report (14/65535)
This is an error message, so systemd-journald flushes to disk as soon as
the message shows. This prevents the storage enters power saving state,
hurting battery time.

Other than the annoying message, the touchpad itself works fine.

[Fix]
Just warn once to avoid the annoying message.

[Test]
The annoying message stops once the fix applied.

[Regression Potential]
None. The user still gets the warning from dmesg without all the
flooding.

Kai-Heng Feng (1):
  HID: i2c-hid: Ignore input report if there's no data present on Elan
    touchpanels

 drivers/hid/i2c-hid/i2c-hid-core.c | 9 +++++++++
 1 file changed, 9 insertions(+)

--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[B] [PATCH] HID: i2c-hid: Ignore input report if there's no data present on Elan touchpanels

Kai-Heng Feng
BugLink: https://bugs.launchpad.net/bugs/1813733

While using Elan touchpads, the message floods:
[  136.138487] i2c_hid i2c-DELL08D6:00: i2c_hid_get_input: incomplete report (14/65535)

Though the message flood is annoying, the device it self works without
any issue. I suspect that the device in question takes too much time to
pull the IRQ back to high after I2C host has done reading its data.

Since the host receives all useful data, let's ignore the input report
when there's no data.

Signed-off-by: Kai-Heng Feng <[hidden email]>
Signed-off-by: Benjamin Tissoires <[hidden email]>
(backported from commit 1475af255e18f35dc46f8a7acc18354c73d45149 git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-5.1/i2c-hid)
Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 drivers/hid/i2c-hid/i2c-hid.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index b235d2b38f39..95d6e1c1d976 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -49,6 +49,7 @@
 #define I2C_HID_QUIRK_NO_IRQ_AFTER_RESET BIT(1)
 #define I2C_HID_QUIRK_RESEND_REPORT_DESCR BIT(2)
 #define I2C_HID_QUIRK_NO_RUNTIME_PM BIT(3)
+#define I2C_HID_QUIRK_BOGUS_IRQ BIT(4)
 
 /* flags */
 #define I2C_HID_STARTED 0
@@ -180,6 +181,8 @@ static const struct i2c_hid_quirks {
  I2C_HID_QUIRK_NO_RUNTIME_PM },
  { I2C_VENDOR_ID_GOODIX, I2C_DEVICE_ID_GOODIX_01F0,
  I2C_HID_QUIRK_NO_RUNTIME_PM },
+ { USB_VENDOR_ID_ELAN, HID_ANY_ID,
+ I2C_HID_QUIRK_BOGUS_IRQ },
  { 0, 0 }
 };
 
@@ -490,6 +493,12 @@ static void i2c_hid_get_input(struct i2c_hid *ihid)
  return;
  }
 
+ if (ihid->quirks & I2C_HID_QUIRK_BOGUS_IRQ && ret_size == 0xffff) {
+ dev_warn_once(&ihid->client->dev, "%s: IRQ triggered but "
+      "there's no data\n", __func__);
+ return;
+ }
+
  if ((ret_size > size) || (ret_size < 2)) {
  dev_err(&ihid->client->dev, "%s: incomplete report (%d/%d)\n",
  __func__, size, ret_size);
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[C] [PATCH] HID: i2c-hid: Ignore input report if there's no data present on Elan touchpanels

Kai-Heng Feng
In reply to this post by Kai-Heng Feng
BugLink: https://bugs.launchpad.net/bugs/1813733

While using Elan touchpads, the message floods:
[  136.138487] i2c_hid i2c-DELL08D6:00: i2c_hid_get_input: incomplete report (14/65535)

Though the message flood is annoying, the device it self works without
any issue. I suspect that the device in question takes too much time to
pull the IRQ back to high after I2C host has done reading its data.

Since the host receives all useful data, let's ignore the input report
when there's no data.

Signed-off-by: Kai-Heng Feng <[hidden email]>
Signed-off-by: Benjamin Tissoires <[hidden email]>
(backported from commit 1475af255e18f35dc46f8a7acc18354c73d45149 git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-5.1/i2c-hid)
Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 drivers/hid/i2c-hid/i2c-hid.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index 7f0b360c612a..3b748cf1983f 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -48,6 +48,7 @@
 #define I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV BIT(0)
 #define I2C_HID_QUIRK_NO_IRQ_AFTER_RESET BIT(1)
 #define I2C_HID_QUIRK_NO_RUNTIME_PM BIT(2)
+#define I2C_HID_QUIRK_BOGUS_IRQ BIT(4)
 
 /* flags */
 #define I2C_HID_STARTED 0
@@ -175,6 +176,8 @@ static const struct i2c_hid_quirks {
  I2C_HID_QUIRK_NO_RUNTIME_PM },
  { I2C_VENDOR_ID_GOODIX, I2C_DEVICE_ID_GOODIX_01F0,
  I2C_HID_QUIRK_NO_RUNTIME_PM },
+ { USB_VENDOR_ID_ELAN, HID_ANY_ID,
+ I2C_HID_QUIRK_BOGUS_IRQ },
  { 0, 0 }
 };
 
@@ -485,6 +488,12 @@ static void i2c_hid_get_input(struct i2c_hid *ihid)
  return;
  }
 
+ if (ihid->quirks & I2C_HID_QUIRK_BOGUS_IRQ && ret_size == 0xffff) {
+ dev_warn_once(&ihid->client->dev, "%s: IRQ triggered but "
+      "there's no data\n", __func__);
+ return;
+ }
+
  if ((ret_size > size) || (ret_size < 2)) {
  dev_err(&ihid->client->dev, "%s: incomplete report (%d/%d)\n",
  __func__, size, ret_size);
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[D] [PATCH] HID: i2c-hid: Ignore input report if there's no data present on Elan touchpanels

Kai-Heng Feng
In reply to this post by Kai-Heng Feng
BugLink: https://bugs.launchpad.net/bugs/1813733

While using Elan touchpads, the message floods:
[  136.138487] i2c_hid i2c-DELL08D6:00: i2c_hid_get_input: incomplete report (14/65535)

Though the message flood is annoying, the device it self works without
any issue. I suspect that the device in question takes too much time to
pull the IRQ back to high after I2C host has done reading its data.

Since the host receives all useful data, let's ignore the input report
when there's no data.

Signed-off-by: Kai-Heng Feng <[hidden email]>
Signed-off-by: Benjamin Tissoires <[hidden email]>
(backported from commit 1475af255e18f35dc46f8a7acc18354c73d45149 git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-5.1/i2c-hid)
Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 drivers/hid/i2c-hid/i2c-hid.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index ec5be00193da..c1cd97d03f0d 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -49,6 +49,7 @@
 #define I2C_HID_QUIRK_NO_IRQ_AFTER_RESET BIT(1)
 #define I2C_HID_QUIRK_NO_RUNTIME_PM BIT(2)
 #define I2C_HID_QUIRK_DELAY_AFTER_SLEEP BIT(3)
+#define I2C_HID_QUIRK_BOGUS_IRQ BIT(4)
 
 /* flags */
 #define I2C_HID_STARTED 0
@@ -180,6 +181,8 @@ static const struct i2c_hid_quirks {
  I2C_HID_QUIRK_NO_RUNTIME_PM },
  { I2C_VENDOR_ID_GOODIX, I2C_DEVICE_ID_GOODIX_01F0,
  I2C_HID_QUIRK_NO_RUNTIME_PM },
+ { USB_VENDOR_ID_ELAN, HID_ANY_ID,
+ I2C_HID_QUIRK_BOGUS_IRQ },
  { 0, 0 }
 };
 
@@ -504,6 +507,12 @@ static void i2c_hid_get_input(struct i2c_hid *ihid)
  return;
  }
 
+ if (ihid->quirks & I2C_HID_QUIRK_BOGUS_IRQ && ret_size == 0xffff) {
+ dev_warn_once(&ihid->client->dev, "%s: IRQ triggered but "
+      "there's no data\n", __func__);
+ return;
+ }
+
  if ((ret_size > size) || (ret_size < 2)) {
  dev_err(&ihid->client->dev, "%s: incomplete report (%d/%d)\n",
  __func__, size, ret_size);
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[Unstable] [PATCH 1/1] HID: i2c-hid: Ignore input report if there's no data present on Elan touchpanels

Kai-Heng Feng
In reply to this post by Kai-Heng Feng
BugLink: https://bugs.launchpad.net/bugs/1813733

While using Elan touchpads, the message floods:
[  136.138487] i2c_hid i2c-DELL08D6:00: i2c_hid_get_input: incomplete report (14/65535)

Though the message flood is annoying, the device it self works without
any issue. I suspect that the device in question takes too much time to
pull the IRQ back to high after I2C host has done reading its data.

Since the host receives all useful data, let's ignore the input report
when there's no data.

Signed-off-by: Kai-Heng Feng <[hidden email]>
Signed-off-by: Benjamin Tissoires <[hidden email]>
(backported from commit 1475af255e18f35dc46f8a7acc18354c73d45149 git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-5.1/i2c-hid)
Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 drivers/hid/i2c-hid/i2c-hid-core.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c
index c5edfa966343..90164fed08d3 100644
--- a/drivers/hid/i2c-hid/i2c-hid-core.c
+++ b/drivers/hid/i2c-hid/i2c-hid-core.c
@@ -50,6 +50,7 @@
 #define I2C_HID_QUIRK_NO_IRQ_AFTER_RESET BIT(1)
 #define I2C_HID_QUIRK_NO_RUNTIME_PM BIT(2)
 #define I2C_HID_QUIRK_DELAY_AFTER_SLEEP BIT(3)
+#define I2C_HID_QUIRK_BOGUS_IRQ BIT(4)
 
 /* flags */
 #define I2C_HID_STARTED 0
@@ -181,6 +182,8 @@ static const struct i2c_hid_quirks {
  I2C_HID_QUIRK_NO_RUNTIME_PM },
  { I2C_VENDOR_ID_GOODIX, I2C_DEVICE_ID_GOODIX_01F0,
  I2C_HID_QUIRK_NO_RUNTIME_PM },
+ { USB_VENDOR_ID_ELAN, HID_ANY_ID,
+ I2C_HID_QUIRK_BOGUS_IRQ },
  { 0, 0 }
 };
 
@@ -505,6 +508,12 @@ static void i2c_hid_get_input(struct i2c_hid *ihid)
  return;
  }
 
+ if (ihid->quirks & I2C_HID_QUIRK_BOGUS_IRQ && ret_size == 0xffff) {
+ dev_warn_once(&ihid->client->dev, "%s: IRQ triggered but "
+      "there's no data\n", __func__);
+ return;
+ }
+
  if ((ret_size > size) || (ret_size < 2)) {
  dev_err(&ihid->client->dev, "%s: incomplete report (%d/%d)\n",
  __func__, size, ret_size);
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: [SRU] [B/C/D/Unstable] [PATCH 0/1] Ignore "incomplete report" from Elan touchpanels

Stefan Bader-2
In reply to this post by Kai-Heng Feng
On 29.01.19 09:44, Kai-Heng Feng wrote:

> BugLink: https://bugs.launchpad.net/bugs/1813733
>
> [Impact]
> When using Elan touchpanels, this message keeps getting spurted out:
> [  136.138487] i2c_hid i2c-DELL08D6:00: i2c_hid_get_input: incomplete report (14/65535)
> This is an error message, so systemd-journald flushes to disk as soon as
> the message shows. This prevents the storage enters power saving state,
> hurting battery time.
>
> Other than the annoying message, the touchpad itself works fine.
>
> [Fix]
> Just warn once to avoid the annoying message.
>
> [Test]
> The annoying message stops once the fix applied.
>
> [Regression Potential]
> None. The user still gets the warning from dmesg without all the
> flooding.
>
> Kai-Heng Feng (1):
>   HID: i2c-hid: Ignore input report if there's no data present on Elan
>     touchpanels
>
>  drivers/hid/i2c-hid/i2c-hid-core.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
Is this just bad memory of mine or has this incomplete report thing seen
multiple fixes and fixes on top of those fixes? And if so, are we done now?

-Stefan



--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [SRU] [B/C/D/Unstable] [PATCH 0/1] Ignore "incomplete report" from Elan touchpanels

Kai-Heng Feng


> On Jan 30, 2019, at 10:26 PM, Stefan Bader <[hidden email]> wrote:
>
> On 29.01.19 09:44, Kai-Heng Feng wrote:
>> BugLink: https://bugs.launchpad.net/bugs/1813733
>>
>> [Impact]
>> When using Elan touchpanels, this message keeps getting spurted out:
>> [  136.138487] i2c_hid i2c-DELL08D6:00: i2c_hid_get_input: incomplete report (14/65535)
>> This is an error message, so systemd-journald flushes to disk as soon as
>> the message shows. This prevents the storage enters power saving state,
>> hurting battery time.
>>
>> Other than the annoying message, the touchpad itself works fine.
>>
>> [Fix]
>> Just warn once to avoid the annoying message.
>>
>> [Test]
>> The annoying message stops once the fix applied.
>>
>> [Regression Potential]
>> None. The user still gets the warning from dmesg without all the
>> flooding.
>>
>> Kai-Heng Feng (1):
>>  HID: i2c-hid: Ignore input report if there's no data present on Elan
>>    touchpanels
>>
>> drivers/hid/i2c-hid/i2c-hid-core.c | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
> Is this just bad memory of mine or has this incomplete report thing seen
> multiple fixes and fixes on top of those fixes? And if so, are we done now?

Different touchpanel has its own quirky behavior.
For now, the fixes piled up are separate, they do not depend on each other.

For this particular issue - "incomplete report (14/65535)” when _using_ Elan
touchpad, yes, this is done.

Kai-Heng

>
> -Stefan


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK / APPLIED[D/Unstable]: [SRU] [B/C/D/Unstable] [PATCH 0/1] Ignore "incomplete report" from Elan touchpanels

Seth Forshee
In reply to this post by Kai-Heng Feng
On Tue, Jan 29, 2019 at 04:44:29PM +0800, Kai-Heng Feng wrote:

> BugLink: https://bugs.launchpad.net/bugs/1813733
>
> [Impact]
> When using Elan touchpanels, this message keeps getting spurted out:
> [  136.138487] i2c_hid i2c-DELL08D6:00: i2c_hid_get_input: incomplete report (14/65535)
> This is an error message, so systemd-journald flushes to disk as soon as
> the message shows. This prevents the storage enters power saving state,
> hurting battery time.
>
> Other than the annoying message, the touchpad itself works fine.
>
> [Fix]
> Just warn once to avoid the annoying message.
>
> [Test]
> The annoying message stops once the fix applied.
>
> [Regression Potential]
> None. The user still gets the warning from dmesg without all the
> flooding.

Acked-by: Seth Forshee <[hidden email]>

Applied to disco/master-next and unstable/master, thanks!

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU] [B/C] [PATCH 0/1] Ignore "incomplete report" from Elan touchpanels

Stefan Bader-2
In reply to this post by Kai-Heng Feng
On 29.01.19 09:44, Kai-Heng Feng wrote:

> BugLink: https://bugs.launchpad.net/bugs/1813733
>
> [Impact]
> When using Elan touchpanels, this message keeps getting spurted out:
> [  136.138487] i2c_hid i2c-DELL08D6:00: i2c_hid_get_input: incomplete report (14/65535)
> This is an error message, so systemd-journald flushes to disk as soon as
> the message shows. This prevents the storage enters power saving state,
> hurting battery time.
>
> Other than the annoying message, the touchpad itself works fine.
>
> [Fix]
> Just warn once to avoid the annoying message.
>
> [Test]
> The annoying message stops once the fix applied.
>
> [Regression Potential]
> None. The user still gets the warning from dmesg without all the
> flooding.
>
> Kai-Heng Feng (1):
>   HID: i2c-hid: Ignore input report if there's no data present on Elan
>     touchpanels
>
>  drivers/hid/i2c-hid/i2c-hid-core.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
Acked-by: Stefan Bader <[hidden email]>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

APPLIED(B,C): [SRU] [B/C/D/Unstable] [PATCH 0/1] Ignore "incomplete report" from Elan touchpanels

Khaled Elmously
In reply to this post by Kai-Heng Feng
On 2019-01-29 16:44:29 , Kai-Heng Feng wrote:

> BugLink: https://bugs.launchpad.net/bugs/1813733
>
> [Impact]
> When using Elan touchpanels, this message keeps getting spurted out:
> [  136.138487] i2c_hid i2c-DELL08D6:00: i2c_hid_get_input: incomplete report (14/65535)
> This is an error message, so systemd-journald flushes to disk as soon as
> the message shows. This prevents the storage enters power saving state,
> hurting battery time.
>
> Other than the annoying message, the touchpad itself works fine.
>
> [Fix]
> Just warn once to avoid the annoying message.
>
> [Test]
> The annoying message stops once the fix applied.
>
> [Regression Potential]
> None. The user still gets the warning from dmesg without all the
> flooding.
>
> Kai-Heng Feng (1):
>   HID: i2c-hid: Ignore input report if there's no data present on Elan
>     touchpanels
>
>  drivers/hid/i2c-hid/i2c-hid-core.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> --
> 2.17.1
>
>
> --
> kernel-team mailing list
> [hidden email]
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team