Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1564045

Re: [PATCH 4/4] HID: wacom: do not shout an error on LED control

From Jason Gerecke <killertofu@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 4/4] HID: wacom: do not shout an error on LED control
Date 2017-01-21 03:40 +0100
Message-ID <t1TKV-6SF-1@gated-at.bofh.it> (permalink)
References <t1Jiy-vy-9@gated-at.bofh.it> <t1Jiy-vy-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


I'm not super comfortable with hiding this error. If the tablet reacts
appropriately, I wouldn't think we'd get an EPIPE. Although its not
fatal, it still might be a symptom of something deeper...

Jason
---
Now instead of four in the eights place /
you’ve got three, ‘Cause you added one  /
(That is to say, eight) to the two,     /
But you can’t take seven from three,    /
So you look at the sixty-fours....



On Fri, Jan 20, 2017 at 7:20 AM, Benjamin Tissoires
<benjamin.tissoires@redhat.com> wrote:
> At plug, the tablet seems to output a -EPIPE when first accessing the
> LED. The weird part is that the command is taken into account by the
> tablet, but we shout an error in the dmesg.
>
> Cut off the error so that users are happier.
>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> ---
>  drivers/hid/wacom_sys.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
> index 6acb422..6acf3a3 100644
> --- a/drivers/hid/wacom_sys.c
> +++ b/drivers/hid/wacom_sys.c
> @@ -803,8 +803,12 @@ static int wacom_led_control(struct wacom *wacom)
>                 buf[4] = wacom->led.img_lum;
>         }
>
> -       retval = wacom_set_report(wacom->hdev, HID_FEATURE_REPORT, buf, buf_size,
> -                                 WAC_CMD_RETRIES);
> +       /*
> +        * we do not use wacom_set_report because -EPIPE happens but is
> +        * not fatal, so do not shout something at the user.
> +        */
> +       retval = hid_hw_raw_request(wacom->hdev, buf[0], buf, buf_size,
> +                                   HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
>         kfree(buf);
>
>         return retval;
> --
> 2.9.3
>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] HID: wacom: fixes for next Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2017-01-20 16:30 +0100
  [PATCH 3/4] HID: wacom: do not attempt to switch mode while in probe Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2017-01-20 16:30 +0100
  [PATCH 4/4] HID: wacom: do not shout an error on LED control Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2017-01-20 16:30 +0100
    Re: [PATCH 4/4] HID: wacom: do not shout an error on LED control Jason Gerecke <killertofu@gmail.com> - 2017-01-21 03:40 +0100
  [PATCH 1/4] HID: wacom: release the resources before leaving despite devm Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2017-01-20 16:30 +0100
  Re: [PATCH 0/4] HID: wacom: fixes for next Jason Gerecke <killertofu@gmail.com> - 2017-01-21 03:40 +0100
    Re: [PATCH 0/4] HID: wacom: fixes for next Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2017-01-23 09:10 +0100
      Re: [PATCH 0/4] HID: wacom: fixes for next Jiri Kosina <jikos@kernel.org> - 2017-01-23 11:10 +0100

csiph-web