Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 944663 Details for
Bug 1149509
[PATCH] Apply quirk for elan touchscreens
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
HID-usbhid-add-always-poll-quirk
0001-HID-usbhid-add-always-poll-quirk.patch (text/plain), 3.50 KB, created by
Adel Gadllah
on 2014-10-07 16:33:33 UTC
(
hide
)
Description:
HID-usbhid-add-always-poll-quirk
Filename:
MIME Type:
Creator:
Adel Gadllah
Created:
2014-10-07 16:33:33 UTC
Size:
3.50 KB
patch
obsolete
>From 714a5a06a46cf0722ed7e4efcd21e3a51f5de452 Mon Sep 17 00:00:00 2001 >From: Johan Hovold <johan@kernel.org> >Date: Mon, 6 Oct 2014 15:27:21 +0200 >Subject: [PATCH 1/3] HID: usbhid: add always-poll quirk > >Add quirk to make sure that a device is always polled for input events >even if it hasn't been opened. > >This is needed for devices that disconnects from the bus unless the >interrupt endpoint has been polled at least once or when not responding >to an input event (e.g. after having shut down X). > >Signed-off-by: Johan Hovold <johan@kernel.org> >Signed-off-by: Jiri Kosina <jkosina@suse.cz> >Signed-off-by: Oliver Neukum <oneukum@suse.de> >--- > drivers/hid/usbhid/hid-core.c | 26 +++++++++++++++++++++++--- > include/linux/hid.h | 1 + > 2 files changed, 24 insertions(+), 3 deletions(-) > >diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c >index 7b88f4c..d8b6976 100644 >--- a/drivers/hid/usbhid/hid-core.c >+++ b/drivers/hid/usbhid/hid-core.c >@@ -82,7 +82,7 @@ static int hid_start_in(struct hid_device *hid) > struct usbhid_device *usbhid = hid->driver_data; > > spin_lock_irqsave(&usbhid->lock, flags); >- if (hid->open > 0 && >+ if ((hid->open > 0 || hid->quirks & HID_QUIRK_ALWAYS_POLL) && > !test_bit(HID_DISCONNECTED, &usbhid->iofl) && > !test_bit(HID_SUSPENDED, &usbhid->iofl) && > !test_and_set_bit(HID_IN_RUNNING, &usbhid->iofl)) { >@@ -292,6 +292,8 @@ static void hid_irq_in(struct urb *urb) > case 0: /* success */ > usbhid_mark_busy(usbhid); > usbhid->retry_delay = 0; >+ if ((hid->quirks & HID_QUIRK_ALWAYS_POLL) && !hid->open) >+ break; > hid_input_report(urb->context, HID_INPUT_REPORT, > urb->transfer_buffer, > urb->actual_length, 1); >@@ -734,8 +736,10 @@ void usbhid_close(struct hid_device *hid) > if (!--hid->open) { > spin_unlock_irq(&usbhid->lock); > hid_cancel_delayed_stuff(usbhid); >- usb_kill_urb(usbhid->urbin); >- usbhid->intf->needs_remote_wakeup = 0; >+ if (!(hid->quirks & HID_QUIRK_ALWAYS_POLL)) { >+ usb_kill_urb(usbhid->urbin); >+ usbhid->intf->needs_remote_wakeup = 0; >+ } > } else { > spin_unlock_irq(&usbhid->lock); > } >@@ -1133,6 +1137,19 @@ static int usbhid_start(struct hid_device *hid) > > set_bit(HID_STARTED, &usbhid->iofl); > >+ if (hid->quirks & HID_QUIRK_ALWAYS_POLL) { >+ ret = usb_autopm_get_interface(usbhid->intf); >+ if (ret) >+ goto fail; >+ usbhid->intf->needs_remote_wakeup = 1; >+ ret = hid_start_in(hid); >+ if (ret) { >+ dev_err(&hid->dev, >+ "failed to start in urb: %d\n", ret); >+ } >+ usb_autopm_put_interface(usbhid->intf); >+ } >+ > /* Some keyboards don't work until their LEDs have been set. > * Since BIOSes do set the LEDs, it must be safe for any device > * that supports the keyboard boot protocol. >@@ -1165,6 +1182,9 @@ static void usbhid_stop(struct hid_device *hid) > if (WARN_ON(!usbhid)) > return; > >+ if (hid->quirks & HID_QUIRK_ALWAYS_POLL) >+ usbhid->intf->needs_remote_wakeup = 0; >+ > clear_bit(HID_STARTED, &usbhid->iofl); > spin_lock_irq(&usbhid->lock); /* Sync with error and led handlers */ > set_bit(HID_DISCONNECTED, &usbhid->iofl); >diff --git a/include/linux/hid.h b/include/linux/hid.h >index 77632cf..3b84cc7 100644 >--- a/include/linux/hid.h >+++ b/include/linux/hid.h >@@ -284,6 +284,7 @@ struct hid_item { > #define HID_QUIRK_BADPAD 0x00000020 > #define HID_QUIRK_MULTI_INPUT 0x00000040 > #define HID_QUIRK_HIDINPUT_FORCE 0x00000080 >+#define HID_QUIRK_ALWAYS_POLL 0x00000100 > #define HID_QUIRK_NO_EMPTY_INPUT 0x00000100 > #define HID_QUIRK_NO_INIT_INPUT_REPORTS 0x00000200 > #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 >-- >1.9.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1149509
:
944048
|
944049
|
944050
|
944268
|
944269
|
944270
| 944663 |
944664
|
944665
|
944666
|
944669