1. 14 1月, 2019 1 次提交
  2. 10 1月, 2019 1 次提交
  3. 03 1月, 2019 2 次提交
  4. 20 12月, 2018 1 次提交
  5. 19 12月, 2018 1 次提交
  6. 17 12月, 2018 2 次提交
  7. 14 12月, 2018 1 次提交
  8. 07 12月, 2018 8 次提交
  9. 30 11月, 2018 3 次提交
    • H
      HID: asus: Add support for the ASUS FX503VD laptop · 2340bad5
      Hans de Goede 提交于
      The ASUS FX503VD laptop uses an USB keyboard with several hotkeys
      which use the Asus Vendor specific UsagePage.
      
      This uses two usage-codes within the page which have not been seen
      before, 0x7c for its mic-mute hotkey and 0x99 for Fn+F5 which has
      a "fan" symbol as hotkey symbol on the keyb. we map this to KEY_PROG4
      (PROG1-PROG3 are already used).
      
      This commit adds the mappings for the 2 new usage codes and the USB-ids
      for this keyboard to the hid-asus driver.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      2340bad5
    • H
      HID: asus: Add event handler to catch unmapped Asus Vendor UsagePage codes · e98e3809
      Hans de Goede 提交于
      Various Asus devices generate HID events using the Asus Vendor specific
      UsagePage 0xff31 and hid-asus will map these in its input_mapping for all
      devices to which it binds (independent of any quirks).
      
      Add an event callback which check for unmapped (because sofar unknown)
      usages within the Asus Vendor UsagePage and log a warning for these.
      
      The purpose of this patch is to help debugging / find such unmapped codes
      and add them to the asus_input_mapping() function.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      e98e3809
    • H
      HID: ite: Add USB id match for another ITE based keyboard rfkill key quirk · 40502074
      Hans de Goede 提交于
      The 258a:6a88 keyboard-dock shipped with the Prowise PT301 tablet is
      likely another ITE based design. The controller die is directly bonded
      to the PCB with a blob of black glue on top so there are no markings and
      the 258a vendor-id used is unknown anywhere. But the keyboard has the
      exact same hotkeys mapped to Fn+F1 - F10 as the other ITE8595 keyboard
      I have *and* it has the same quirky behavior wrt the rfkill hotkey.
      
      Either way as said this keyboard has the same quirk for its rfkill /
      airplane mode hotkey as the ITE 8595 chip, it only sends a single release
      event when pressed and released, it never sends a press event.
      
      This commit adds the 258a:6a88 USB id to the hid-ite id-table, fixing
      the rfkill key not working on this keyboard.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      40502074
  10. 22 11月, 2018 6 次提交
  11. 21 11月, 2018 1 次提交
  12. 20 11月, 2018 1 次提交
  13. 19 11月, 2018 5 次提交
    • K
      HID: i2c-hid: Disable runtime PM for LG touchscreen · 86c31524
      Kai-Heng Feng 提交于
      LG touchscreen (1fd2:8001) stops working after reboot:
      [ 4.859153] i2c_hid i2c-SAPS2101:00: i2c_hid_get_input: incomplete report (64/66)
      [ 4.936070] i2c_hid i2c-SAPS2101:00: i2c_hid_get_input: incomplete report (64/66)
      [ 9.948224] i2c_hid i2c-SAPS2101:00: failed to reset device.
      
      The device in question stops working after receives SLEEP, ON, SLEEP
      commands in a short period. The scenario is like this:
      - Once the desktop session closes, it also closed the hid device, so the
      device gets runtime suspended and receives a SLEEP command.
      - Before calling shutdown callback, it gets runtime resumed and received
      an ON command.
      - In the shutdown callback, it receives another SLEEP command.
      
      I failed to find a reliable interval between ON/SLEEP commands that can
      make it work, so let's simply disable runtime PM for the device.
      Signed-off-by: NKai-Heng Feng <kai.heng.feng@canonical.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      86c31524
    • K
      HID: multitouch: Add pointstick support for Cirque Touchpad · 12d43aac
      Kai-Heng Feng 提交于
      Cirque Touchpad/Pointstick combo is similar to Alps devices, it requires
      MT_CLS_WIN_8_DUAL to expose its pointstick as a mouse.
      Signed-off-by: NKai-Heng Feng <kai.heng.feng@canonical.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      12d43aac
    • R
      HID: steam: remove input device when a hid client is running. · 385a4886
      Rodrigo Rivas Costa 提交于
      Previously, when a HID client such as the Steam Client was running, this
      driver disabled its input device to avoid doubling the input events.
      
      While it worked mostly fine, some games got confused by the idle gamepad,
      and switched to two player mode, or asked the user to choose which gamepad
      to use. Other games just crashed, probably a bug in Unity [1].
      
      With this commit, when a HID client starts, the input device is removed;
      when the HID client ends the input device is recreated.
      
      [1]: https://github.com/ValveSoftware/steam-for-linux/issues/5645Signed-off-by: NRodrigo Rivas Costa <rodrigorivascosta@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      385a4886
    • D
      Revert "HID: uhid: use strlcpy() instead of strncpy()" · 4d26d1d1
      David Herrmann 提交于
      This reverts commit 336fd4f5.
      
      Please note that `strlcpy()` does *NOT* do what you think it does.
      strlcpy() *ALWAYS* reads the full input string, regardless of the
      'length' parameter. That is, if the input is not zero-terminated,
      strlcpy() will *READ* beyond input boundaries. It does this, because it
      always returns the size it *would* copy if the target was big enough,
      not the truncated size it actually copied.
      
      The original code was perfectly fine. The hid device is
      zero-initialized and the strncpy() functions copied up to n-1
      characters. The result is always zero-terminated this way.
      
      This is the third time someone tried to replace strncpy with strlcpy in
      this function, and gets it wrong. I now added a comment that should at
      least make people reconsider.
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      4d26d1d1
    • E
      HID: uhid: forbid UHID_CREATE under KERNEL_DS or elevated privileges · 8c01db76
      Eric Biggers 提交于
      When a UHID_CREATE command is written to the uhid char device, a
      copy_from_user() is done from a user pointer embedded in the command.
      When the address limit is KERNEL_DS, e.g. as is the case during
      sys_sendfile(), this can read from kernel memory.  Alternatively,
      information can be leaked from a setuid binary that is tricked to write
      to the file descriptor.  Therefore, forbid UHID_CREATE in these cases.
      
      No other commands in uhid_char_write() are affected by this bug and
      UHID_CREATE is marked as "obsolete", so apply the restriction to
      UHID_CREATE only rather than to uhid_char_write() entirely.
      
      Thanks to Dmitry Vyukov for adding uhid definitions to syzkaller and to
      Jann Horn for commit 9da3f2b7 ("x86/fault: BUG() when uaccess
      helpers fault on kernel addresses"), allowing this bug to be found.
      
      Reported-by: syzbot+72473edc9bf4eb1c6556@syzkaller.appspotmail.com
      Fixes: d365c6cf ("HID: uhid: add UHID_CREATE and UHID_DESTROY events")
      Cc: <stable@vger.kernel.org> # v3.6+
      Cc: Jann Horn <jannh@google.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Signed-off-by: NEric Biggers <ebiggers@google.com>
      Reviewed-by: NJann Horn <jannh@google.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      8c01db76
  14. 16 11月, 2018 2 次提交
  15. 12 11月, 2018 2 次提交
  16. 08 11月, 2018 1 次提交
  17. 06 11月, 2018 1 次提交
    • A
      HID: asus: fix build warning wiht CONFIG_ASUS_WMI disabled · 3fc202e8
      Arnd Bergmann 提交于
      asus_wmi_evaluate_method() is an empty dummy function when CONFIG_ASUS_WMI
      is disabled, or not reachable from a built-in device driver. This leads to
      a theoretical evaluation of an uninitialized variable that the compiler
      complains about, failing to check that the hardcoded return value makes
      this an unreachable code path:
      
      In file included from include/linux/printk.h:336,
                       from include/linux/kernel.h:14,
                       from include/linux/list.h:9,
                       from include/linux/dmi.h:5,
                       from drivers/hid/hid-asus.c:29:
      drivers/hid/hid-asus.c: In function 'asus_input_configured':
      include/linux/dynamic_debug.h:135:3: error: 'value' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         __dynamic_dev_dbg(&descriptor, dev, fmt, \
         ^~~~~~~~~~~~~~~~~
      drivers/hid/hid-asus.c:359:6: note: 'value' was declared here
        u32 value;
            ^~~~~
      
      With an extra IS_ENABLED() check, the warning goes away.
      
      Fixes: 3b692c55 ("HID: asus: only support backlight when it's not driven by WMI")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      3fc202e8
  18. 31 10月, 2018 1 次提交
    • D
      HID: asus: only support backlight when it's not driven by WMI · 3b692c55
      Daniel Drake 提交于
      The Asus GL502VSK has the same 0B05:1837 keyboard as we've seen in
      several Republic of Gamers laptops.
      
      However, in this model, the keybard backlight control exposed by hid-asus
      has no effect on the keyboard backlight. Instead, the keyboard
      backlight is correctly driven by asus-wmi.
      
      With two keyboard backlight devices available (and only the acer-wmi
      one working), GNOME is picking the wrong one to drive in the UI.
      
      Avoid this problem by not creating the backlight interface when we
      detect a WMI-driven keyboard backlight.
      
      We have also tested Asus GL702VMK which does have the hid-asus
      backlight present, and it still works fine with this patch (WMI method
      call returns UNSUPPORTED_METHOD).
      
      A direct "depends on ASUS_WMI" is intentionally avoided so that HID_ASUS
      users who have ASUS_WMI=n will not quietly lose their HID_ASUS driver on
      a kernel upgrade.
      Signed-off-by: NDaniel Drake <drake@endlessm.com>
      Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      3b692c55