1. 07 7月, 2016 2 次提交
  2. 23 6月, 2016 4 次提交
  3. 18 6月, 2016 2 次提交
    • J
      HID: led: fix config · 26423b84
      Jiri Kosina 提交于
      The driver port was done carefully not to depend on USB at all, in favor of
      being generic HID driver instead. Therefore there is no need to explicitly
      talk about USB only in the config.
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      26423b84
    • H
      HID: migrate USB LED driver from usb misc to hid · 6c7ad07e
      Heiner Kallweit 提交于
      This patch migrates the USB LED driver to the HID subsystem.
      Supported are Dream Cheeky Webmail Notifier / Friends Alert
      and Riso Kagaku Webmail Notifier.
      
      Benefits:
      - Avoid using USB low-level calls and use the HID subsystem instead
        (as this device provides a USB HID interface)
      - Use standard LED subsystem instead of proprietary sysfs entries,
        this allows e.g. to use the device with features like triggers
      
      Successfully tested with a Dream Cheeky Webmail Notifier and a
      Riso Kagaku Webmail Notifier compatible device.
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      6c7ad07e
  4. 03 5月, 2016 2 次提交
  5. 27 4月, 2016 1 次提交
    • T
      HID: usbhid: quirks for Corsair RGB keyboard & mice (K70R, K95RGB, M65RGB, K70RGB, K65RGB) · 282bf1fe
      Trent Lloyd 提交于
      These devices feature multiple interfaces/endpoints: a legacy BIOS/boot
      interface (endpoint 0x81), as well as 2 corsair-specific keyboard interfaces
      (endpoint 0x82, 0x83 IN/0x03 OUT) and an RGB LED control interface (endpoint
      0x84 IN/0x04 OUT)
      
      Because the extra 3 interfaces are not of subclass USB_INTERFACE_SUBCLASS_BOOT,
      HID_QUIRK_NOGET is not automatically set on them and a 10s timeout per-endpoint
      (30s per device) occurs initialising reports on boot.  We configure
      HID_QUIRK_NO_INIT_REPORTS for these devices.
      
      Additionally the left-side G1-G18 macro keys on the K95RGB generate output on
      the un-opened 0x82/0x83 endpoints which causes the keyboard to stop responding
      waiting for this event to be collected.  We enable HID_QUIRK_ALWAYS_POLL to
      prevent this situation from occurring.
      Signed-off-by: NTrent Lloyd <trent@lloyd.id.au>
      Tested-by: NSUGNIAUX Wilfried <wsu@ppharm2k20.net>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      282bf1fe
  6. 25 4月, 2016 2 次提交
  7. 18 4月, 2016 2 次提交
  8. 13 4月, 2016 1 次提交
  9. 07 4月, 2016 1 次提交
  10. 05 4月, 2016 2 次提交
  11. 04 4月, 2016 4 次提交
  12. 01 4月, 2016 2 次提交
    • Y
      HID: Asus X205TA keyboard driver · eeb01a57
      Yusuke Fujimaki 提交于
      Asus X205TA built-in keyboard contains wrong
      logical maximum value in report descriptor.
      
      0x05, 0x01,  // Usage Page (Generic Desktop)
      0x09, 0x06,  // Usage (Keyboard)
      0xa1, 0x01,  // Collection (Application)
      0x85, 0x01,  // Report ID (1)
      0x05, 0x07,  // Usage Page (Keyboard/Keypad)
      0x19, 0xe0,  // Usage Minimum (224)
      0x29, 0xe7,  // Usage Maximum (231)
      0x15, 0x00,  // Logical Minimum (0)
      0x25, 0x01,  // Logical Maximum (1)
      0x75, 0x01,  // Report Size (1)
      0x95, 0x08,  // Report Count (8)
      0x81, 0x02,  // Input (Data,Array,Abs)
      0x95, 0x01,  // Report Count (1)
      0x75, 0x08,  // Report Size (8)
      0x81, 0x03,  // Input (Const,Var,Abs)
      0x95, 0x05,  // Report Count (5)
      0x75, 0x01,  // Report Size (1)
      0x05, 0x08,  // Usage (LED)
      0x19, 0x01,  // Usage Minimum (1)
      0x29, 0x05,  // Usage Maximum (5)
      0x91, 0x02,  // Output (Data,Var,Abs)
      0x95, 0x01,  // Report Count (1)
      0x75, 0x03,  // Report Size (3)
      0x91, 0x03,  // Output (Const,Var,Abs)
      0x95, 0x06,  // Report Count (6)
      0x75, 0x08,  // Report Size (8)
      0x15, 0x00,  // Logical Minimum (0)
      0x25, 0x65,  // Logical Maximum (101)  * too small *
      0x05, 0x07,  // Usage Page (Keyboard/Keypad)
      0x19, 0x00,  // Usage Minimum (0)
      0x29, 0xdd,  // Usage Maximum (221)
      0x81, 0x00,  // Input(Data,Array,Abs)
      
      In Asus X205TA japanese keyboard model,there are language
      specific keys over usage id 101.
      This patch correct wrong logical maximum in report
      descriptor.
      Signed-off-by: NYusuke Fujimaki <usk.fujimaki@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      eeb01a57
    • G
      HID: multitouch: Synchronize MT frame on reset_resume · 0a0f5b7e
      Gabriele Mazzotta 提交于
      input_mt_get_slot_by_key() requires input_mt_sync_frame() to be called
      at each frame. Do it when releasing the touches, or else we won't get
      a proper slot number after mt_reset_resume().
      Signed-off-by: NGabriele Mazzotta <gabriele.mzt@gmail.com>
      Reviewed-by: NBenson Leung <bleung@chromium.org>
      Reviewed-by: NBenjamin TIssoires <benjamin.tissoires@redhat.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      0a0f5b7e
  13. 29 3月, 2016 2 次提交
  14. 24 3月, 2016 2 次提交
  15. 23 3月, 2016 1 次提交
  16. 19 3月, 2016 1 次提交
  17. 16 3月, 2016 1 次提交
  18. 15 3月, 2016 2 次提交
    • H
      hid: thingm: reorder calls in thingm_probe · 1d1b564f
      Heiner Kallweit 提交于
      When reviewing another thingm patch Benjamin Tissoires pointed out
      the following: "The problem here is that hid_hw_start() is called
      before thingm_version() which allows user space to briefly introduce
      races between thingm_version() and any hidraw requests.
      The mutex will not help here as it is initialized after hid_hw_start()
      and only used for protecting the concurrent access of the rgb."
      
      Avoid this possible issue by calling hid_hw_start() later in the
      probe function.
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      1d1b564f
    • D
      HID: i2c-hid: fix OOB write in i2c_hid_set_or_send_report() · 3b654288
      Dmitry Torokhov 提交于
      Even though hid_hw_* checks that passed in data_len is less than
      HID_MAX_BUFFER_SIZE it is not enough, as i2c-hid does not necessarily
      allocate buffers of HID_MAX_BUFFER_SIZE but rather checks all device
      reports and select largest size. In-kernel users normally just send as much
      data as report needs, so there is no problem, but hidraw users can do
      whatever they please:
      
      BUG: KASAN: slab-out-of-bounds in memcpy+0x34/0x54 at addr ffffffc07135ea80
      Write of size 4101 by task syz-executor/8747
      CPU: 2 PID: 8747 Comm: syz-executor Tainted: G    BU         3.18.0 #37
      Hardware name: Google Tegra210 Smaug Rev 1,3+ (DT)
      Call trace:
      [<ffffffc00020ebcc>] dump_backtrace+0x0/0x258 arch/arm64/kernel/traps.c:83
      [<ffffffc00020ee40>] show_stack+0x1c/0x2c arch/arm64/kernel/traps.c:172
      [<     inline     >] __dump_stack lib/dump_stack.c:15
      [<ffffffc001958114>] dump_stack+0x90/0x140 lib/dump_stack.c:50
      [<     inline     >] print_error_description mm/kasan/report.c:97
      [<     inline     >] kasan_report_error mm/kasan/report.c:278
      [<ffffffc0004597dc>] kasan_report+0x268/0x530 mm/kasan/report.c:305
      [<ffffffc0004592e8>] __asan_storeN+0x20/0x150 mm/kasan/kasan.c:718
      [<ffffffc0004594e0>] memcpy+0x30/0x54 mm/kasan/kasan.c:299
      [<ffffffc001306354>] __i2c_hid_command+0x2b0/0x7b4 drivers/hid/i2c-hid/i2c-hid.c:178
      [<     inline     >] i2c_hid_set_or_send_report drivers/hid/i2c-hid/i2c-hid.c:321
      [<ffffffc0013079a0>] i2c_hid_output_raw_report.isra.2+0x3d4/0x4b8 drivers/hid/i2c-hid/i2c-hid.c:589
      [<ffffffc001307ad8>] i2c_hid_output_report+0x54/0x68 drivers/hid/i2c-hid/i2c-hid.c:602
      [<     inline     >] hid_hw_output_report include/linux/hid.h:1039
      [<ffffffc0012cc7a0>] hidraw_send_report+0x400/0x414 drivers/hid/hidraw.c:154
      [<ffffffc0012cc7f4>] hidraw_write+0x40/0x64 drivers/hid/hidraw.c:177
      [<ffffffc0004681dc>] vfs_write+0x1d4/0x3cc fs/read_write.c:534
      [<     inline     >] SYSC_pwrite64 fs/read_write.c:627
      [<ffffffc000468984>] SyS_pwrite64+0xec/0x144 fs/read_write.c:614
      Object at ffffffc07135ea80, in cache kmalloc-512
      Object allocated with size 268 bytes.
      
      Let's check data length against the buffer size before attempting to copy
      data over.
      
      Cc: stable@vger.kernel.org
      Reported-by: NAlexander Potapenko <glider@google.com>
      Signed-off-by: NDmitry Torokhov <dtor@chromium.org>
      Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      3b654288
  19. 14 3月, 2016 1 次提交
  20. 11 3月, 2016 2 次提交
  21. 10 3月, 2016 2 次提交
  22. 08 3月, 2016 1 次提交