01 Oct, 2012

2 commits

  • Conflicts:
    drivers/hid/usbhid/hid-quirks.c

    Jiri Kosina
     
  • The dev_rdesc member of the hid_device structure is meant to store the original
    report descriptor received from the device, but it is currently passed to any
    report_fixup method before it is copied to the rdesc member. This patch uses a
    temporary buffer to shield dev_rdesc from the side effects of many HID drivers'
    report_fixup implementations.

    usbhid's hid_post_reset checks the report descriptor currently returned by the
    device against a descriptor that may have been modified by a driver's
    report_fixup method. That leaves some devices nonfunctional after a resume, with
    a "reset_resume error 1" reported. This patch checks the new descriptor against
    the unmodified dev_rdesc instead and uses the original, instead of modified,
    report size.

    BugLink: http://bugs.launchpad.net/bugs/1049623
    Signed-off-by: Kevin Daughtridge
    Signed-off-by: Jiri Kosina

    Kevin Daughtridge
     

27 Aug, 2012

2 commits

  • For some reason, we had two IDs for the QUANTA 3001 touchscreen controller,
    one USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3001 and one
    USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN. As this has caused
    confusion, remove USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN
    completely, and fix places where it was used to refer to
    USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3001.

    Signed-off-by: Simon Farnsworth
    Acked-by: Henrik Rydberg
    Signed-off-by: Jiri Kosina

    Simon Farnsworth
     
  • This patch (as1603) adds a NOGET quirk for the Eaton Ellipse MAX UPS
    device. (The USB IDs were already present in hid-ids.h, apparently
    under a different name.)

    Signed-off-by: Alan Stern
    Reported-by: Laurent Bigonville
    CC:
    Signed-off-by: Jiri Kosina

    Alan Stern
     

15 Aug, 2012

1 commit


20 Jul, 2012

6 commits

  • This patch (as1597) fixes some of the error paths in usbhid's suspend
    routine. The driver was not careful to restart everything that might
    have been stopped, in cases where a suspend failed.

    For example, once the HID_SUSPENDED flag is set, an output report
    submission would not restart the corresponding URB queue. If a
    suspend fails, it's therefore necessary to check whether the queues
    need to be restarted.

    Signed-off-by: Alan Stern
    CC: Oliver Neukum
    Signed-off-by: Jiri Kosina

    Alan Stern
     
  • This patch (as1596) improves the queue-restart logic in usbhid by
    checking to see if the device is suspended or a reset is about to
    occur. There's no point submitting an URB if either of those is
    true.

    Signed-off-by: Alan Stern
    CC: Oliver Neukum
    Signed-off-by: Jiri Kosina

    Alan Stern
     
  • This patch (as1595) improves the usbhid driver by using the
    HID_SUSPENDED bitflag to indicate that the device is suspended rather
    than using HID_REPORTED_IDLE, which the patch removes.

    Since HID_SUSPENDED was not being used for anything, and since the
    name "HID_REPORTED_IDLE" doesn't convey much meaning, the end result
    is easier to read and understand.

    Signed-off-by: Alan Stern
    CC: Oliver Neukum
    Signed-off-by: Jiri Kosina

    Alan Stern
     
  • This patch (as1594) simplifies the usbhid driver by inlining a couple
    of routines. As a result of an earlier patch, irq_out_pump_restart()
    and ctrl_pump_restart() are each used in only one place. Since they
    don't really do what their names say, and since they each involve only
    about two lines of actual code, there's no reason to keep them as
    separate functions.

    Signed-off-by: Alan Stern
    CC: Oliver Neukum
    Signed-off-by: Jiri Kosina

    Alan Stern
     
  • This patch (as1593) fixes some logic errors in the usbhid driver
    relating to runtime PM. The driver does not balance its calls to
    usb_autopm_get_interface_async() and usb_autopm_put_interface_async().

    For example, when the control queue is restarted the driver does a
    _get. But the resume won't happen immediately, so the driver leaves
    the queue stopped. When the resume does occur, the queue is restarted
    and a second _get occurs, with no balancing _put.

    The patch fixes the problem by rearranging the logic for restarting
    the queues. All the _get/_put calls and bitflag settings in
    __usbhid_submit_report() are moved into the queue-restart routines. A
    balancing _put call is added for the case where the queue is still
    suspended. A call to irq_out_pump_restart(), which doesn't take all
    the right actions for restarting the irq-OUT queue, is replaced by a
    call to usbhid_restart_out_queue(), which does. Similarly for
    ctrl_pump_restart().

    Finally, new code is added to prevent an autosuspend from happening
    every time an URB is cancelled, and the comments explaining what
    happens when an URB needs to be cancelled are expanded and clarified.

    Signed-off-by: Alan Stern
    CC: Oliver Neukum
    Signed-off-by: Jiri Kosina

    Alan Stern
     
  • This patch (as1592) fixes an obscure problem in the usbhid driver.
    Under some circumstances, a control or interrupt-OUT URB can be
    submitted twice. This will happen if the first submission fails; the
    queue pointers aren't updated, so the next time the queue is restarted
    the same URB will be submitted again.

    The problem is that raw_report gets deallocated during the first
    submission. The second submission will then dereference and try to
    free an already-freed region of memory. The patch fixes the problem
    by setting raw_report to NULL when it is deallocated and checking for
    NULL before dereferencing it.

    Signed-off-by: Alan Stern
    CC: Oliver Neukum
    Signed-off-by: Jiri Kosina

    Alan Stern
     

09 Jul, 2012

1 commit


25 Jun, 2012

1 commit

  • The generic HID driver is obviously not a special driver, so move it
    outside of the special drivers menu. Explain the usage and make the
    default follow the HID setting. This should simplify migration from
    older kernels. While at it, remove the redundant HID_SUPPORT option
    and modify the HID and USB_HID entries to better explain the bus
    structure.

    Reported-by: Jan Beulich
    Signed-off-by: Henrik Rydberg
    Signed-off-by: Jiri Kosina

    Henrik Rydberg
     

23 May, 2012

1 commit

  • Pull HID subsystem updates from Jiri Kosina:
    "Apart from various driver updates and added support for a number of
    new devices (mostly multitouch ones, but not limited to), there is one
    change that is worth pointing out explicitly: creation of HID device
    groups and proper autoloading of hid-multitouch, implemented by Henrik
    Rydberg."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (50 commits)
    HID: wacom: fix build breakage without CONFIG_LEDS_CLASS
    HID: waltop: Extend barrel button fix
    HID: hyperv: Set the hid drvdata correctly
    HID: wacom: Unify speed setting
    HID: wacom: Add speed setting for Intuos4 WL
    HID: wacom: Move Graphire raport header check.
    HID: uclogic: Add support for UC-Logic TWHL850
    HID: explain the signed/unsigned handling in hid_add_field()
    HID: handle logical min/max signedness properly in parser
    HID: logitech: read all 32 bits of report type bitfield
    HID: wacom: Add LED selector control for Wacom Intuos4 WL
    HID: hid-multitouch: fix wrong protocol detection
    HID: wiimote: Fix IR data parser
    HID: wacom: Add tilt reporting for Intuos4 WL
    HID: multitouch: MT interface matching for Baanto
    HID: hid-multitouch: Only match MT interfaces
    HID: Create a common generic driver
    HID: hid-multitouch: Switch to device groups
    HID: Create a generic device group
    HID: Allow bus wildcard matching
    ...

    Linus Torvalds
     

22 May, 2012

2 commits


02 May, 2012

2 commits

  • dbg() was a very old USB-specific macro that should no longer
    be used. This patch removes it from being used in the driver
    and uses dev_dbg() instead.

    CC: Jiri Kosina
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • On some HCDs usb_unlink_urb() can directly call the
    completion handler. That limits the spinlocks that can
    be taken in the handler to locks not held while calling
    usb_unlink_urb()
    To prevent a race with resubmission, this patch exposes
    usbcore's infrastructure for blocking submission, uses it
    and so drops the lock without causing a race in usbhid.

    Signed-off-by: Oliver Neukum
    Acked-by: Jiri Kosina
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     

01 May, 2012

2 commits

  • Move the hid drivers of the bus drivers to a common generic hid
    driver, and make it a proper module. This ought to simplify device
    handling moving forward.

    Cc: Gustavo Padovan
    Signed-off-by: Henrik Rydberg
    Signed-off-by: Jiri Kosina

    Henrik Rydberg
     
  • Devices that do not have a special driver are handled by the generic
    driver. This patch does the same thing using device groups; Instead of
    forcing a particular driver, the appropriate driver is picked up by
    udev. As a consequence, one can now move a device from generic to
    specific handling by a simple rebind. By adding a new device id to the
    generic driver, the same thing can be done in reverse.

    Signed-off-by: Henrik Rydberg
    Acked-by: Benjamin Tissoires
    Signed-off-by: Jiri Kosina

    Henrik Rydberg
     

27 Apr, 2012

1 commit

  • Everytime a HID device is opened, a new hiddev_list is allocated with
    kzalloc. This requires 64KB of physically contiguous memory, which could
    easily push a heavily loaded system over the edge.

    Allocating the same amount of memory with vmalloc shouldn't be nearly as
    demanding, so let's do that instead. The memory isn't used for DMA and
    doesn't look particularly performance sensitive, so this should be safe.

    Signed-off-by: Havard Skinnemoen
    Signed-off-by: Jiri Kosina

    Havard Skinnemoen
     

26 Apr, 2012

1 commit


04 Apr, 2012

1 commit

  • When a USB device reset occurs, usbcore will refetch the device and configuration
    descriptors and compare them with those retrieved before the reset to ensure
    that they have not changed. For USB HID devices, this implicitly includes the
    HID class descriptor (as this is fetched with the configuration descriptor).
    However, the HID report descriptor is not checked again.

    Whilst a change in the size of the HID report descriptor will be detected (as
    this is held in the class descriptor), content changes to the report descriptor
    which do not result in a change in its size will be missed. If a firmware update
    were applied to a USB HID device which resulted in such a change to the report
    descriptor after device reset, then this would not be picked up by usbhid.

    This patch fixes this issue by allowing usbhid to check the contents of the
    report descriptor after the device reset, and trigger a rebind of the device
    if there is a mismatch.

    Reviewed-by: Toby Gray
    Signed-off-by: Simon Haggett
    Signed-off-by: Jiri Kosina

    Simon Haggett
     

30 Mar, 2012

1 commit

  • In case IO cannot be started because there is a lack of bandwidth
    on the bus, it makes no sense to reset the device. If IO is requested
    because the device is opened, user space should be notified with
    an error right away. If the lack of bandwidth arises later, for
    example after resume, there's no other choice but to retry in the
    hope that bandwidth will be freed.

    Signed-off-by: Oliver Neukum
    Signed-off-by: Jiri Kosina

    Oliver Neukum
     

28 Mar, 2012

1 commit


20 Mar, 2012

2 commits


06 Mar, 2012

1 commit


28 Feb, 2012

2 commits


21 Feb, 2012

1 commit


02 Feb, 2012

1 commit

  • There is no reason to hold hiddev->existancelock before
    calling usb_deregister_dev, so move it out of the lock.

    The patch fixes the lockdep warning below.

    [ 5733.386271] ======================================================
    [ 5733.386274] [ INFO: possible circular locking dependency detected ]
    [ 5733.386278] 3.2.0-custom-next-20120111+ #1 Not tainted
    [ 5733.386281] -------------------------------------------------------
    [ 5733.386284] khubd/186 is trying to acquire lock:
    [ 5733.386288] (minor_rwsem){++++.+}, at: [] usb_deregister_dev+0x37/0x9e [usbcore]
    [ 5733.386311]
    [ 5733.386312] but task is already holding lock:
    [ 5733.386315] (&hiddev->existancelock){+.+...}, at: [] hiddev_disconnect+0x26/0x87 [usbhid]
    [ 5733.386328]
    [ 5733.386329] which lock already depends on the new lock.
    [ 5733.386330]
    [ 5733.386333]
    [ 5733.386334] the existing dependency chain (in reverse order) is:
    [ 5733.386336]
    [ 5733.386337] -> #1 (&hiddev->existancelock){+.+...}:
    [ 5733.386346] [] lock_acquire+0xcb/0x10e
    [ 5733.386357] [] __mutex_lock_common+0x60/0x465
    [ 5733.386366] [] mutex_lock_nested+0x36/0x3b
    [ 5733.386371] [] hiddev_open+0x113/0x193 [usbhid]
    [ 5733.386378] [] usb_open+0x66/0xc2 [usbcore]
    [ 5733.386390] [] chrdev_open+0x12b/0x154
    [ 5733.386402] [] __dentry_open.isra.16+0x20b/0x355
    [ 5733.386408] [] nameidata_to_filp+0x43/0x4a
    [ 5733.386413] [] do_last+0x536/0x570
    [ 5733.386419] [] path_openat+0xce/0x301
    [ 5733.386423] [] do_filp_open+0x33/0x81
    [ 5733.386427] [] do_sys_open+0x6a/0xfc
    [ 5733.386431] [] sys_open+0x1c/0x1e
    [ 5733.386434] [] system_call_fastpath+0x16/0x1b
    [ 5733.386441]
    [ 5733.386441] -> #0 (minor_rwsem){++++.+}:
    [ 5733.386448] [] __lock_acquire+0xa80/0xd74
    [ 5733.386454] [] lock_acquire+0xcb/0x10e
    [ 5733.386458] [] down_write+0x44/0x77
    [ 5733.386464] [] usb_deregister_dev+0x37/0x9e [usbcore]
    [ 5733.386475] [] hiddev_disconnect+0x3c/0x87 [usbhid]
    [ 5733.386483] [] hid_disconnect+0x3f/0x54
    [ 5733.386491] [] hid_device_remove+0x4e/0x7a
    [ 5733.386496] [] __device_release_driver+0x81/0xcd
    [ 5733.386502] [] device_release_driver+0x20/0x2d
    [ 5733.386507] [] bus_remove_device+0x114/0x128
    [ 5733.386512] [] device_del+0x131/0x183
    [ 5733.386519] [] hid_destroy_device+0x1e/0x3d
    [ 5733.386525] [] usbhid_disconnect+0x36/0x42 [usbhid]
    [ 5733.386530] [] usb_unbind_interface+0x57/0x11f [usbcore]
    [ 5733.386542] [] __device_release_driver+0x81/0xcd
    [ 5733.386547] [] device_release_driver+0x20/0x2d
    [ 5733.386552] [] bus_remove_device+0x114/0x128
    [ 5733.386557] [] device_del+0x131/0x183
    [ 5733.386562] [] usb_disable_device+0xa8/0x1d8 [usbcore]
    [ 5733.386573] [] usb_disconnect+0xab/0x11f [usbcore]
    [ 5733.386583] [] hub_thread+0x73b/0x1157 [usbcore]
    [ 5733.386593] [] kthread+0x95/0x9d
    [ 5733.386601] [] kernel_thread_helper+0x4/0x10
    [ 5733.386607]
    [ 5733.386608] other info that might help us debug this:
    [ 5733.386609]
    [ 5733.386612] Possible unsafe locking scenario:
    [ 5733.386613]
    [ 5733.386615] CPU0 CPU1
    [ 5733.386618] ---- ----
    [ 5733.386620] lock(&hiddev->existancelock);
    [ 5733.386625] lock(minor_rwsem);
    [ 5733.386630] lock(&hiddev->existancelock);
    [ 5733.386635] lock(minor_rwsem);
    [ 5733.386639]
    [ 5733.386640] *** DEADLOCK ***
    [ 5733.386641]
    [ 5733.386644] 6 locks held by khubd/186:
    [ 5733.386646] #0: (&__lockdep_no_validate__){......}, at: [] hub_thread+0x14a/0x1157 [usbcore]
    [ 5733.386661] #1: (&__lockdep_no_validate__){......}, at: [] usb_disconnect+0x50/0x11f [usbcore]
    [ 5733.386677] #2: (hcd->bandwidth_mutex){+.+.+.}, at: [] usb_disconnect+0xa1/0x11f [usbcore]
    [ 5733.386693] #3: (&__lockdep_no_validate__){......}, at: [] device_release_driver+0x18/0x2d
    [ 5733.386704] #4: (&__lockdep_no_validate__){......}, at: [] device_release_driver+0x18/0x2d
    [ 5733.386714] #5: (&hiddev->existancelock){+.+...}, at: [] hiddev_disconnect+0x26/0x87 [usbhid]
    [ 5733.386727]
    [ 5733.386727] stack backtrace:
    [ 5733.386731] Pid: 186, comm: khubd Not tainted 3.2.0-custom-next-20120111+ #1
    [ 5733.386734] Call Trace:
    [ 5733.386741] [] ? up+0x34/0x3b
    [ 5733.386747] [] print_circular_bug+0x1f8/0x209
    [ 5733.386752] [] __lock_acquire+0xa80/0xd74
    [ 5733.386756] [] ? trace_hardirqs_on_caller+0x15d/0x1a3
    [ 5733.386763] [] ? vprintk+0x3f4/0x419
    [ 5733.386774] [] ? usb_deregister_dev+0x37/0x9e [usbcore]
    [ 5733.386779] [] lock_acquire+0xcb/0x10e
    [ 5733.386789] [] ? usb_deregister_dev+0x37/0x9e [usbcore]
    [ 5733.386797] [] down_write+0x44/0x77
    [ 5733.386807] [] ? usb_deregister_dev+0x37/0x9e [usbcore]
    [ 5733.386818] [] usb_deregister_dev+0x37/0x9e [usbcore]
    [ 5733.386825] [] hiddev_disconnect+0x3c/0x87 [usbhid]
    [ 5733.386830] [] hid_disconnect+0x3f/0x54
    [ 5733.386834] [] hid_device_remove+0x4e/0x7a
    [ 5733.386839] [] __device_release_driver+0x81/0xcd
    [ 5733.386844] [] device_release_driver+0x20/0x2d
    [ 5733.386848] [] bus_remove_device+0x114/0x128
    [ 5733.386854] [] device_del+0x131/0x183
    [ 5733.386859] [] hid_destroy_device+0x1e/0x3d
    [ 5733.386865] [] usbhid_disconnect+0x36/0x42 [usbhid]
    [ 5733.386876] [] usb_unbind_interface+0x57/0x11f [usbcore]
    [ 5733.386882] [] __device_release_driver+0x81/0xcd
    [ 5733.386886] [] device_release_driver+0x20/0x2d
    [ 5733.386890] [] bus_remove_device+0x114/0x128
    [ 5733.386895] [] device_del+0x131/0x183
    [ 5733.386905] [] usb_disable_device+0xa8/0x1d8 [usbcore]
    [ 5733.386916] [] usb_disconnect+0xab/0x11f [usbcore]
    [ 5733.386921] [] ? __mutex_unlock_slowpath+0x130/0x141
    [ 5733.386929] [] hub_thread+0x73b/0x1157 [usbcore]
    [ 5733.386935] [] ? finish_task_switch+0x78/0x150
    [ 5733.386941] [] ? __init_waitqueue_head+0x4c/0x4c
    [ 5733.386950] [] ? usb_remote_wakeup+0x56/0x56 [usbcore]
    [ 5733.386955] [] kthread+0x95/0x9d
    [ 5733.386961] [] kernel_thread_helper+0x4/0x10
    [ 5733.386966] [] ? retint_restore_args+0x13/0x13
    [ 5733.386970] [] ? __init_kthread_worker+0x55/0x55
    [ 5733.386974] [] ? gs_change+0x13/0x13

    Signed-off-by: Ming Lei
    Signed-off-by: Jiri Kosina

    Ming Lei
     

11 Jan, 2012

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (68 commits)
    hid-input/battery: add FEATURE quirk
    hid-input/battery: remove battery_val
    hid-input/battery: power-supply type really *is* a battery
    hid-input/battery: make the battery setup common for INPUTs and FEATUREs
    hid-input/battery: deal with both FEATURE and INPUT report batteries
    hid-input/battery: add quirks for battery
    hid-input/battery: remove apparently redundant kmalloc
    hid-input: add support for HID devices reporting Battery Strength
    HID: hid-multitouch: add support 9 new Xiroku devices
    HID: multitouch: add support for 3M 32"
    HID: multitouch: add support of Atmel multitouch panels
    HID: usbhid: defer LED setting to a workqueue
    HID: usbhid: hid-core: submit queued urbs before suspend
    HID: usbhid: remove LED_ON
    HID: emsff: use symbolic name instead of hardcoded PID constant
    HID: Enable HID_QUIRK_MULTI_INPUT for Trio Linker Plus II
    HID: Kconfig: fix syntax
    HID: introduce proper dependency of HID_BATTERY on POWER_SUPPLY
    HID: multitouch: support PixArt optical touch screen
    HID: make parser more verbose about parsing errors by default
    ...

    Fix up rename/delete conflict in drivers/hid/hid-hyperv.c (removed in
    staging, moved in this branch) and similarly for the rules for same file
    in drivers/staging/hv/{Kconfig,Makefile}.

    Linus Torvalds
     

09 Jan, 2012

1 commit

  • * 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (165 commits)
    reiserfs: Properly display mount options in /proc/mounts
    vfs: prevent remount read-only if pending removes
    vfs: count unlinked inodes
    vfs: protect remounting superblock read-only
    vfs: keep list of mounts for each superblock
    vfs: switch ->show_options() to struct dentry *
    vfs: switch ->show_path() to struct dentry *
    vfs: switch ->show_devname() to struct dentry *
    vfs: switch ->show_stats to struct dentry *
    switch security_path_chmod() to struct path *
    vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb
    vfs: trim includes a bit
    switch mnt_namespace ->root to struct mount
    vfs: take /proc/*/mounts and friends to fs/proc_namespace.c
    vfs: opencode mntget() mnt_set_mountpoint()
    vfs: spread struct mount - remaining argument of next_mnt()
    vfs: move fsnotify junk to struct mount
    vfs: move mnt_devname
    vfs: move mnt_list to struct mount
    vfs: switch pnode.h macros to struct mount *
    ...

    Linus Torvalds
     

05 Jan, 2012

1 commit


04 Jan, 2012

1 commit


21 Dec, 2011

4 commits

  • Defer LED setting action to a workqueue.
    This is more likely to send all LED change events in a single URB.

    Signed-off-by: Daniel Kurtz
    Acked-by: Oliver Neukum
    Signed-off-by: Jiri Kosina

    Daniel Kurtz
     
  • If any userspace program has opened a keyboard device, the input core
    de-activates the keyboard's LEDs upon suspend(). It does this by sending
    individual EV_LED[LED_X]=0 events to the underlying device driver by
    directly calling the driver's registered event() handler.

    The usb-hid driver event() handler processes each request by immediately
    attempting to submit a CTRL URB to turn off the LED. USB URB submission
    is asynchronous. First the URB is added to the head of the ctrl queue.
    Then, if the CTRL_RUNNING flag is false, the URB is submitted immediately
    (and CTRL_RUNNING is set). If the CTRL_RUNNING flag was already true,
    then the newly queued URB is submitted in the ctrl completion handler when
    all previously submitted URBs have completed. When all queued URBs have
    been submitted, the completion handler clears the CTRL_RUNNING flag.

    In the 2-LED suspend case, at input suspend(), 2 LED event CTRL URBs get
    queued, with only the first actually submitted. Soon after input
    suspend() handler finishes, the usb-hid suspend() handler gets called.
    Since this is NOT a PM_EVENT_AUTO suspend, the handler sets
    REPORTED_IDLE, then waits for io to complete.

    Unfortunately, this usually happens while the first LED request is
    actually still being processed. Thus when the completion handler tries
    to submit the second LED request it fails, since REPORTED_IDLE is
    already set! This REPORTED_IDLE check failure causes the completion
    handler to complete, however without clearing the CTRL_RUNNING flag.
    This, in turn, means that the suspend() handler's wait_io() condition
    is never satisfied, and instead it times out after 10 seconds, aborting
    the original system suspend.

    This patch changes the behavior to the following:
    (1) allow completion handler to finish submitting all queued URBs, even if
    REPORTED_IDLE is set. This guarantees that all URBs queued before the
    hid-core suspend() call will be submitted before the system is
    suspended.
    (2) if REPORTED_IDLE is set and the URB queue is empty, queue, but
    don't submit, new URB submission requests. These queued requests get
    submitted when resume() flushes the URB queue. This is similar to the
    existing behavior, however, any requests that arrive while the queue is
    not yet empty will still get submitted before suspend.
    (3) set the RUNNING flag when flushing the URB queue in resume().
    This keeps URBs that were queued in (2) from colliding with any new
    URBs that are being submitted during the resume process. The new URB
    submission requests upon resume get properly queued behind the ones
    being flushed instead of the current situation where they collide,
    causing memory corruption and oopses.

    Signed-off-by: Daniel Kurtz
    Acked-by: Oliver Neukum
    Signed-off-by: Jiri Kosina

    Daniel Kurtz
     
  • LED_ON was defined in the original version of the hid-core autosuspend patch.
    However, during review, the setting and clearing of it was redone
    using ledcount. The test was left in accidentally.

    Signed-off-by: Daniel Kurtz
    Acked-by: Oliver Neukum
    Signed-off-by: Jiri Kosina

    Daniel Kurtz
     
  • Add quirk for the Trio Linker Plus II - the adapter supports several
    controllers simultaneously, generating a new HID entry for each connected
    device.

    Signed-off-by: Ignaz Forster
    Signed-off-by: Jiri Kosina

    Ignaz Forster