1. 02 9月, 2013 3 次提交
  2. 27 8月, 2013 1 次提交
  3. 26 8月, 2013 3 次提交
  4. 09 8月, 2013 1 次提交
  5. 05 8月, 2013 2 次提交
  6. 01 8月, 2013 1 次提交
    • P
      HID: logitech-dj: Fix non-atomic kmalloc in logi_dj_ll_input_event() · ce737368
      Peter Hurley 提交于
      The ll_driver's .hidinput_input_event() method is called from
      atomic context [1]. Use GFP_ATOMIC for allocation of the
      synthesized hid report.
      
      BUG: sleeping function called from invalid context at /home/peter/src/kernels/next/mm/slub.c:941
      in_atomic(): 1, irqs_disabled(): 1, pid: 2095, name: Xorg
      INFO: lockdep is turned off.
      irq event stamp: 1502178
      hardirqs last  enabled at (1502177): [<ffffffff81785e55>] _raw_spin_unlock_irqrestore+0x65/0x80
      hardirqs last disabled at (1502178): [<ffffffff8178632a>] common_interrupt+0x6a/0x6f
      softirqs last  enabled at (1501802): [<ffffffff81051ed3>] __do_softirq+0x183/0x420
      softirqs last disabled at (1501799): [<ffffffff81052315>] irq_exit+0xb5/0xc0
      CPU: 3 PID: 2095 Comm: Xorg Not tainted 3.11-next-20130725-xeon+lockdep #20130725
      Hardware name: Dell Inc. Precision WorkStation T5400  /0RW203, BIOS A11 04/30/2012
       ffffffff81a662e0 ffff8802adcf9ca8 ffffffff8177c330 0000000000000000
       ffff8802a76d2440 ffff8802adcf9cd8 ffffffff810867d0 ffff8802a7ac8000
       0000000000000010 00000000ffffffff 00000000000000d0 ffff8802adcf9d38
      Call Trace:
       [<ffffffff8177c330>] dump_stack+0x4f/0x84
       [<ffffffff810867d0>] __might_sleep+0x140/0x1f0
       [<ffffffff811ad93b>] __kmalloc+0x6b/0x2e0
       [<ffffffffa026cb08>] ? hid_alloc_report_buf+0x28/0x30 [hid]
       [<ffffffffa026cb08>] hid_alloc_report_buf+0x28/0x30 [hid]
       [<ffffffffa00700b0>] logi_dj_ll_input_event+0xb0/0x1b0 [hid_logitech_dj]
       [<ffffffff815a559e>] input_handle_event+0x8e/0x540
       [<ffffffff815a5aad>] ? input_inject_event+0x5d/0x220
       [<ffffffff815a5c10>] input_inject_event+0x1c0/0x220
       [<ffffffff815a5a94>] ? input_inject_event+0x44/0x220
       [<ffffffff81181660>] ? might_fault+0xa0/0xb0
       [<ffffffff81181617>] ? might_fault+0x57/0xb0
       [<ffffffff815a909e>] evdev_write+0xde/0x160
       [<ffffffff811c0ad8>] vfs_write+0xc8/0x1f0
       [<ffffffff811c0fe5>] SyS_write+0x55/0xa0
       [<ffffffff8178e682>] system_call_fastpath+0x16/0x1b
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      ce737368
  7. 29 7月, 2013 1 次提交
  8. 23 7月, 2013 1 次提交
  9. 22 7月, 2013 1 次提交
    • J
      HID: fix data access in implement() · 27ce4050
      Jiri Kosina 提交于
      implement() is setting bytes in LE data stream. In case the data is not
      aligned to 64bits, it reads past the allocated buffer. It doesn't really
      change any value there (it's properly bitmasked), but in case that this
      read past the boundary hits a page boundary, pagefault happens when
      accessing 64bits of 'x' in implement(), and kernel oopses.
      
      This happens much more often when numbered reports are in use, as the
      initial 8bit skip in the buffer makes the whole process work on values
      which are not aligned to 64bits.
      
      This problem dates back to attempts in 2005 and 2006 to make implement()
      and extract() as generic as possible, and even back then the problem
      was realized by Adam Kroperlin, but falsely assumed to be impossible
      to cause any harm:
      
        http://www.mail-archive.com/linux-usb-devel@lists.sourceforge.net/msg47690.html
      
      I have made several attempts at fixing it "on the spot" directly in
      implement(), but the results were horrible; the special casing for processing
      last 64bit chunk and switching to different math makes it unreadable mess.
      
      I therefore took a path to allocate a few bytes more which will never make
      it into final report, but are there as a cushion for all the 64bit math
      operations happening in implement() and extract().
      
      All callers of hid_output_report() are converted at the same time to allocate
      the buffer by newly introduced hid_alloc_report_buf() helper.
      
      Bruno noticed that the whole raw_size test can be dropped as well, as
      hid_alloc_report_buf() makes sure that the buffer is always of a proper
      size.
      Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Acked-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      27ce4050
  10. 15 7月, 2013 1 次提交
  11. 13 7月, 2013 1 次提交
  12. 04 7月, 2013 3 次提交
    • P
      HID: wacom: Intuos4 battery charging changes · 9d157624
      Przemo Firszt 提交于
      Intuos4 WL is separately reporting power supply and battery
      charging status - now hid-wacom is using that information.
      Previously hid-wacom was wrongly treating "battery charging" bit
      as "power supply connected". Now it should report battery charging,
      battery discharging, battery full and power supply status.
      
      Intuos4 WL sends reports when is in use (obvious) and when unplugging
      power supply. If means that if the device is being charged, but it's not
      being used it will never report "battery full". The same problem happens
      after the device has been connected, but it's not in use - the
      battery/ac status will be incorrect. Currently there is no mechanism to
      ask the device to send a report containing battery/ac status.
      Signed-off-by: NPrzemo Firszt <przemo@firszt.eu>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      9d157624
    • A
      HID: i2c-hid: support sending HID output reports using the output register · 811adb96
      Andrew Duggan 提交于
      The current i2c hid driver does not support sending HID output reports using
      the output register for devices which support receiving reports through this
      method. This patch determines which method to use to send output reports based
       on the value of wMaxOutputLength in the device's HID descriptor.
      Signed-off-by: NAndrew Duggan <aduggan@synaptics.com>
      Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      811adb96
    • B
      HID: kye: Add report fixup for Genius Gila Gaming mouse · 3685c18e
      Benjamin Tissoires 提交于
      Genius Gila Gaming Mouse presents an obviously wrong report descriptor.
      the Consumer control (report ID 3) is the following:
      0x05, 0x0c,                    // Usage Page (Consumer Devices)       105
      0x09, 0x01,                    // Usage (Consumer Control)            107
      0xa1, 0x01,                    // Collection (Application)            109
      0x85, 0x03,                    //   Report ID (3)                     111
      0x19, 0x00,                    //   Usage Minimum (0)                 113
      0x2a, 0xff, 0x7f,              //   Usage Maximum (32767)             115
      0x15, 0x00,                    //   Logical Minimum (0)               118
      0x26, 0xff, 0x7f,              //   Logical Maximum (32767)           120
      0x75, 0x10,                    //   Report Size (16)                  123
      0x95, 0x03,                    //   Report Count (3)                  125
      0x81, 0x00,                    //   Input (Data,Arr,Abs)              127
      0x75, 0x08,                    //   Report Size (8)                   129
      0x95, 0x01,                    //   Report Count (1)                  131
      0x81, 0x01,                    //   Input (Cnst,Arr,Abs)              133
      0xc0,                          // End Collection                      135
      
      So the first input whithin this report has a count of 3 but a usage range
      of 32768. So this value is obviously wrong as it should not be greater than
      the report count.
      
      Fixes:
      https://bugzilla.redhat.com/show_bug.cgi?id=959721Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      3685c18e
  13. 27 6月, 2013 1 次提交
    • D
      HID: wiimote: support Nintendo Wii U Pro Controller · b8e0fe31
      David Herrmann 提交于
      The Wii U Pro Controller is a new Nintendo remote device that looks very
      similar to the XBox controller. It has nearly the same features and uses
      the same protocol as the Wii Remote.
      
      We add a new wiimote extension device so the Pro Controller is properly
      detected and supported.
      
      The device reports MP support, which is odd and I couldn't get it working,
      yet. Hence, we disable MP registers for now. Further investigation is
      needed to see what extra capabilities are provided.
      
      There are some other unknown bits in the extension reports that I couldn't
      figure out what they do. You can use hidraw to access these if you're
      interested.
      
      We might want to hook up the "charging" and "USB" bits to the battery
      device so user-space can query whether it is currently charged via USB.
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      b8e0fe31
  14. 20 6月, 2013 2 次提交
  15. 18 6月, 2013 2 次提交
  16. 13 6月, 2013 1 次提交
  17. 12 6月, 2013 1 次提交
  18. 03 6月, 2013 14 次提交