1. 23 2月, 2015 2 次提交
  2. 19 2月, 2015 1 次提交
    • A
      HID: sony: Fix a WARNING shown when rmmod-ing the driver · 6c40065f
      Antonio Ospite 提交于
      ida_destroy() must be called _after_ all the devices have been
      unregistered; otherwise, when calling "rmmod hid_sony" with devices
      still plugged in, the following warning would show up because of calls
      to ida_simple_remove() on a destroyed ID allocator:
      
      ------------[ cut here ]------------
      WARNING: CPU: 0 PID: 5509 at lib/idr.c:1052 ida_simple_remove+0x26/0x50()
      ida_remove called for id=0 which is not allocated.
      Modules linked in: ...
      CPU: 0 PID: 5509 Comm: rmmod Not tainted 3.19.0-rc6-ao2 #35
      Hardware name: System manufacturer System Product Name/M2N-MX SE, BIOS 0501    03/20/2008
       0000000000000000 ffffffff8176320d ffffffff815b3a88 ffff880036f7fdd8
       ffffffff8106ce01 0000000000000000 ffffffffa07658e0 0000000000000246
       ffff88005077d8b8 ffff88005077d8d0 ffffffff8106ce7a ffffffff81763260
      Call Trace:
       [<ffffffff815b3a88>] ? dump_stack+0x40/0x50
       [<ffffffff8106ce01>] ? warn_slowpath_common+0x81/0xb0
       [<ffffffff8106ce7a>] ? warn_slowpath_fmt+0x4a/0x50
       [<ffffffff812ccb86>] ? ida_simple_remove+0x26/0x50
       [<ffffffffa0762dc8>] ? sony_remove+0x58/0xe0 [hid_sony]
       [<ffffffffa00fff15>] ? hid_device_remove+0x65/0xd0 [hid]
       [<ffffffff8140425e>] ? __device_release_driver+0x7e/0x100
       [<ffffffff81404c70>] ? driver_detach+0xa0/0xb0
       [<ffffffff81403ee5>] ? bus_remove_driver+0x55/0xe0
       [<ffffffffa01000ff>] ? hid_unregister_driver+0x2f/0xa0 [hid]
       [<ffffffff810e45bf>] ? SyS_delete_module+0x1bf/0x270
       [<ffffffff81014089>] ? do_notify_resume+0x69/0xa0
       [<ffffffff815b952d>] ? system_call_fastpath+0x16/0x1b
      ---[ end trace bc794b3d22c30ede ]---
      Signed-off-by: NAntonio Ospite <ao2@ao2.it>
      Acked-by: NFrank Praznik <frank.praznik@oh.rr.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      6c40065f
  3. 17 2月, 2015 3 次提交
  4. 12 2月, 2015 1 次提交
  5. 29 1月, 2015 3 次提交
  6. 27 1月, 2015 1 次提交
    • J
      HID: pidff: Fix initialisation forMicrosoft Sidewinder FF Pro 2 · afd700d9
      Jim Keir 提交于
      The FF2 driver (usbhid/hid-pidff.c) sends commands to the stick during ff_init.
      However, this is called inside a block where driver_input_lock is locked, so
      the results of these initial commands are discarded. This behavior is the
      "killer", without this nothing else works.
      
      ff_init issues commands using "hid_hw_request". This eventually goes to
      hid_input_report, which returns -EBUSY because driver_input_lock is locked. The
      change is to delay the ff_init call in hid-core.c until after this lock has
      been released.
      
      Calling hid_device_io_start() releases the lock so the device can be
      configured.  We also need to call hid_device_io_stop() on exit for the lock to
      remain locked while ending the init of the drivers.
      
      [ benjamin.tissoires@redhat.com: imrpoved the changelog a lot ]
      Signed-off-by: NJim Keir <jimkeir@oracledbadirect.com>
      Reviewed-by: NBenjamin.tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      afd700d9
  7. 26 1月, 2015 1 次提交
  8. 23 1月, 2015 1 次提交
  9. 22 1月, 2015 1 次提交
  10. 21 1月, 2015 1 次提交
  11. 19 1月, 2015 2 次提交
  12. 12 1月, 2015 5 次提交
  13. 09 1月, 2015 2 次提交
  14. 07 1月, 2015 5 次提交
    • A
      HID: microsoft: add support for Japanese Surface Type Cover 3 · 5e7e9e90
      Alan Wu 提交于
      Based on code for the US Surface Type Cover 3
      from commit be3b1634
      ("HID: add support for MS Surface Pro 3 Type Cover"):
      Signed-off-by: NAlan Wu <alan.c.wu@gmail.com>
      Tested-by: NKarlis Dreizis <karlisdreizis@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      5e7e9e90
    • J
      HID: fixup the conflicting keyboard mappings quirk · 8e7b3410
      Jiri Kosina 提交于
      The ignore check that got added in 6ce901eb ("HID: input: fix confusion
      on conflicting mappings") needs to properly check for VARIABLE reports
      as well (ARRAY reports should be ignored), otherwise legitimate keyboards
      might break.
      
      Cc: <stable@vger.kernel.org>
      Fixes: 6ce901eb ("HID: input: fix confusion on conflicting mappings")
      Reported-by: NFredrik Hallenberg <megahallon@gmail.com>
      Reported-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      8e7b3410
    • R
      HID: apple: fix battery support for the 2009 ANSI wireless keyboard · cbd366be
      Ross Skaliotis 提交于
      Enabled quirks necessary for correct battery capacity reporting. Cleaned up
      surrounding style.
      Signed-off-by: NRoss Skaliotis <rskaliotis@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      cbd366be
    • G
      79bc33bd
    • D
      HID: input: fix confusion on conflicting mappings · 6ce901eb
      David Herrmann 提交于
      On an PC-101/103/104 keyboard (American layout) the 'Enter' key and its
      neighbours look like this:
      
                 +---+ +---+ +-------+
                 | 1 | | 2 | |   5   |
                 +---+ +---+ +-------+
                   +---+ +-----------+
                   | 3 | |     4     |
                   +---+ +-----------+
      
      On a PC-102/105 keyboard (European layout) it looks like this:
      
                 +---+ +---+ +-------+
                 | 1 | | 2 | |       |
                 +---+ +---+ +-+  4  |
                   +---+ +---+ |     |
                   | 3 | | 5 | |     |
                   +---+ +---+ +-----+
      
      (Note that the number of keys is the same, but key '5' is moved down and
       the shape of key '4' is changed. Keys '1' to '3' are exactly the same.)
      
      The keys 1-4 report the same scan-code in HID in both layouts, even though
      the keysym they produce is usually different depending on the XKB-keymap
      used by user-space.
      However, key '5' (US 'backslash'/'pipe') reports 0x31 for the upper layout
      and 0x32 for the lower layout, as defined by the HID spec. This is highly
      confusing as the linux-input API uses a single keycode for both.
      
      So far, this was never a problem as there never has been a keyboard with
      both of those keys present at the same time. It would have to look
      something like this:
      
                 +---+ +---+ +-------+
                 | 1 | | 2 | |  x31  |
                 +---+ +---+ +-------+
                   +---+ +---+ +-----+
                   | 3 | |x32| |  4  |
                   +---+ +---+ +-----+
      
      HID can represent such a keyboard, but the linux-input API cannot.
      Furthermore, any user-space mapping would be confused by this and,
      luckily, no-one ever produced such hardware.
      
      Now, the HID input layer fixed this mess by mapping both 0x31 and 0x32 to
      the same keycode (KEY_BACKSLASH==0x2b). As only one of both physical keys
      is present on a hardware, this works just fine.
      
      Lets introduce hardware-vendors into this:
      ------------------------------------------
      
      Unfortunately, it seems way to expensive to produce a different device for
      American and European layouts. Therefore, hardware-vendors put both keys,
      (0x31 and 0x32) on the same keyboard, but only one of them is hooked up
      to the physical button, the other one is 'dead'.
      This means, they can use the same hardware, with a different button-layout
      and automatically produce the correct HID events for American *and*
      European layouts. This is unproblematic for normal keyboards, as the
      'dead' key will never report any KEY-DOWN events. But RollOver keyboards
      send the whole matrix on each key-event, allowing n-key roll-over mode.
      This means, we get a 0x31 and 0x32 event on each key-press. One of them
      will always be 0, the other reports the real state. As we map both to the
      same keycode, we will get spurious key-events, even though the real
      key-state never changed.
      
      The easiest way would be to blacklist 'dead' keys and never handle those.
      We could simply read the 'country' tag of USB devices and blacklist either
      key according to the layout. But... hardware vendors... want the same
      device for all countries and thus many of them set 'country' to 0 for all
      devices. Meh..
      
      So we have to deal with this properly. As we cannot know which of the keys
      is 'dead', we either need a heuristic and track those keys, or we simply
      make use of our value-tracking for HID fields. We simply ignore HID events
      for absolute data if the data didn't change. As HID tracks events on the
      HID level, we haven't done the keycode translation, yet. Therefore, the
      'dead' key is tracked independently of the real key, therefore, any events
      on it will be ignored.
      
      This patch simply discards any HID events for absolute data if it didn't
      change compared to the last report. We need to ignore relative and
      buffered-byte reports for obvious reasons. But those cannot be affected by
      this bug, so we're fine.
      
      Preferably, we'd do this filtering on the HID-core level. But this might
      break a lot of custom drivers, if they do not follow the HID specs.
      Therefore, we do this late in hid-input just before we inject it into the
      input layer (which does the exact same filtering, but on the keycode
      level).
      
      If this turns out to break some devices, we might have to limit filtering
      to EV_KEY events. But lets try to do the Right Thing first, and properly
      filter any absolute data that didn't change.
      
      This patch is tagged for 'stable' as it fixes a lot of n-key RollOver
      hardware. We might wanna wait with backporting for a while, before we know
      it doesn't break anything else, though.
      
      Cc: <stable@vger.kernel.org>
      Reported-by: NAdam Goode <adam@spicenitz.org>
      Reported-by: NFredrik Hallenberg <megahallon@gmail.com>
      Tested-by: NFredrik Hallenberg <megahallon@gmail.com>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      6ce901eb
  15. 06 1月, 2015 2 次提交
  16. 29 12月, 2014 1 次提交
  17. 22 12月, 2014 3 次提交
  18. 19 12月, 2014 3 次提交
  19. 18 12月, 2014 1 次提交
  20. 17 12月, 2014 1 次提交