1. 01 Dec, 2015 1 commit
    • Ioan-Adrian Ratiu's avatar
      HID: usbhid: fix recursive deadlock · e470127e
      Ioan-Adrian Ratiu authored
      The critical section protected by usbhid->lock in hid_ctrl() is too
      big and because of this it causes a recursive deadlock. "Too big" means
      the case statement and the call to hid_input_report() do not need to be
      protected by the spinlock (no URB operations are done inside them).
      
      The deadlock happens because in certain rare cases drivers try to grab
      the lock while handling the ctrl irq which grabs the lock before them
      as described above. For example newer wacom tablets like 056a:033c try
      to reschedule proximity reads from wacom_intuos_schedule_prox_event()
      calling hid_hw_request() -> usbhid_request() -> usbhid_submit_report()
      which tries to grab the usbhid lock already held by hid_ctrl().
      
      There are two ways to get out of this deadlock:
          1. Make the drivers work "around" the ctrl critical region, in the
          wacom case for ex. by delaying the scheduling of the proximity read
          request itself to a workqueue.
          2. Shrink the critical region so the usbhid lock protects only the
          instructions which modify usbhid state, calling hid_input_report()
          with the spinlock unlocked, allowing the device driver to grab the
          lock first, finish and then grab the lock afterwards in hid_ctrl().
      
      This patch implements the 2nd solution.
      Signed-off-by: default avatarIoan-Adrian Ratiu <adi@adirat.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      e470127e
  2. 26 Nov, 2015 1 commit
    • Rasmus Villemoes's avatar
      HID: debug: improve hid_debug_event() · 92529623
      Rasmus Villemoes authored
      The code in hid_debug_event() causes horrible code generation. First,
      we do a strlen() call for every byte we copy (we're doing a store to
      global memory, so gcc has no way of proving that strlen(buf) doesn't
      change). Second, since both i, list->tail and HID_DEBUG_BUFSIZE have
      signed type, the modulo computation has to take into account the
      possibility that list->tail+i is negative, so it's not just a simple
      and.
      
      Fix the former by simply not doing strlen() at all (we have to load
      buf[i] anyway, so testing it is almost free) and the latter by
      changing i to unsigned. This cuts 29% (69 bytes) of the size of the
      function.
      Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      92529623
  3. 23 Nov, 2015 1 commit
  4. 20 Nov, 2015 2 commits
  5. 19 Nov, 2015 3 commits
    • Andy Lutomirski's avatar
      HID: Make report_descriptor available for all devices · 54f32fd5
      Andy Lutomirski authored
      Currently the sysfs report_descriptor attribute is only available if the device
      is claimed.  We have the descriptor before we even create the device node, so
      just instantiate report_descriptor statically.
      Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      54f32fd5
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid · 319645ca
      Linus Torvalds authored
      Pull HID fixes from Jiri Kosina:
       "Two functional fixes for wacom HID driver from Ping Cheng and Jiri
        Kosina"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
        HID: wacom: fixup quirks setup for WACOM_DEVICETYPE_PAD
        HID: wacom: Add outbounding area for DTU1141
      319645ca
    • Linus Torvalds's avatar
      Merge tag 'mmc-v4.4-rc1' of git://git.linaro.org/people/ulf.hansson/mmc · 1282ac40
      Linus Torvalds authored
      Pull MMC fixes from Ulf Hansson:
       "Here are some mmc fixes intended for v4.4 rc2.  It's based on a commit
        prior rc1 as I wanted to get them a bit more tested in next before
        sending you the pull request.
      
        MMC core:
         - Improve reliability when selecting HS200 mode
         - Improve reliability when selecting HS400 mode
         - mmc: remove bondage between REQ_META and reliable write
      
        MMC host:
         - pxamci: Fix read-only gpio detection polarity
         - mtk-sd: Preinitialize delay_phase to fix the case when delay is zero
         - android-goldfish: Fix build dependency by adding HAS_DMA
         - dw_mmc: Remove Seungwon Jeon from MAINTAINERS"
      
      * tag 'mmc-v4.4-rc1' of git://git.linaro.org/people/ulf.hansson/mmc:
        mmc: remove bondage between REQ_META and reliable write
        mmc: MMC_GOLDFISH should depend on HAS_DMA
        mmc: mediatek: Preinitialize delay_phase in get_best_delay()
        MAINTAINERS: mmc: Remove Seungwon Jeon from dw_mmc
        mmc: mmc: Improve reliability of mmc_select_hs400()
        mmc: mmc: Move mmc_switch_status()
        mmc: mmc: Fix HS setting in mmc_select_hs400()
        mmc: mmc: Improve reliability of mmc_select_hs200()
        mmc: pxamci: fix read-only gpio detection polarity
      1282ac40
  6. 18 Nov, 2015 2 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 34258a32
      Linus Torvalds authored
      Pull s390 fixes from Martin Schwidefsky:
       "Assorted bug fixes, the mlock2 system call gets added, and one
        improvement.  The boot from dasd devices is now possible from a wider
        range of devices"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390: remove SALIPL loader
        s390: wire up mlock2 system call
        s390: remove g5 elf platform support
        s390: avoid cache aliasing under z/VM and KVM
        s390/sclp: _sclp_wait_int(): retain full PSW mask
        s390/zcrypt: Fix initialisation when zcrypt is built-in
        s390/zcrypt: Fix kernel crash on systems without AP bus support
        s390: add support for ipl devices in subchannel sets > 0
        s390/ipl: fix out of bounds access in scpdata_write
        s390/pci_dma: improve debugging of errors during dma map
        s390/pci_dma: handle dma table failures
        s390/pci_dma: unify label of invalid translation table entries
        s390/syscalls: remove system call number calculation
        s390/cio: simplify css_generate_pgid
        s390/diag: add a s390 prefix to the diagnose trace point
        s390/head: fix error message on unsupported hardware
      34258a32
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-linus-v4.4-rc2' of... · 0d77a123
      Linus Torvalds authored
      Merge tag 'hwmon-for-linus-v4.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull hwmon fixes from Guenter Roeck:
       "Fix build issues in scpi and ina2xx drivers, update scpi driver to
        support recent firmware, and fix an uninitialized variable warning in
        applesmc driver"
      
      * tag 'hwmon-for-linus-v4.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (scpi) skip unsupported sensors properly
        hwmon: (scpi) add thermal-of dependency
        hwmon : (applesmc) Fix uninitialized variables warnings
        hwmon: (ina2xx) Fix build issue by selecting REGMAP_I2C
      0d77a123
  7. 17 Nov, 2015 22 commits
  8. 16 Nov, 2015 8 commits