1. 05 Oct, 2011 1 commit
  2. 04 Oct, 2011 1 commit
  3. 03 Oct, 2011 1 commit
  4. 07 Sep, 2011 1 commit
  5. 24 Aug, 2011 1 commit
  6. 16 Aug, 2011 1 commit
  7. 15 Aug, 2011 1 commit
  8. 10 Aug, 2011 4 commits
    • Jiri Kosina's avatar
      HID: add MacBookAir4,2 to hid_have_special_driver[] · f6f554f0
      Jiri Kosina authored
      Otherwise the generic driver wouldn't unbind from it and wouldn't
      let hid-apple to automatically take over.
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      f6f554f0
    • Joshua V. Dillon's avatar
      HID: add support for MacBookAir4,2 keyboard. · 5d922baa
      Joshua V. Dillon authored
      Added USB device IDs for MacBookAir4,2 keyboard. Device constants were
      copied from the MacBookAir3,2 constants. The 4,2 device specification is
      reportedly unchanged from the 3,2 predecessor and seems to work well.
      Signed-off-by: default avatarJoshua V Dillon <jvdillon@gmail.com>
      Signed-off-by: default avatarChase Douglas <chase.douglas@canonical.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      5d922baa
    • Jiri Kosina's avatar
      HID: propagate return value correctly in hid_input_report() · 45dc1ac7
      Jiri Kosina authored
      Fix a return value propagation that was omitted in David Herrmann's
      locking fix around hid_input_report().
      Reported-by: default avatarDavid Herrmann <dh.herrmann@googlemail.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      45dc1ac7
    • David Herrmann's avatar
      HID: Fix race condition between driver core and ll-driver · 4ea54542
      David Herrmann authored
      HID low level drivers register new devices with the HID core which then
      adds the devices to the HID bus. The HID bus normally immediately probes
      an appropriate driver which then handles HID input for this device.
      The ll driver now uses the hid_input_report() function to report input
      events for a specific device. However, if the HID bus unloads the driver
      at the same time (for instance via a call to
       /sys/bus/hid/devices/<dev>/unbind) then the hdev->driver pointer may be
      used by hid_input_report() and hid_device_remove() at the same time
      which may cause hdev->driver to point to invalid memory.
      
      This fix adds a semaphore to every hid device which protects
      hdev->driver from asynchronous access. This semaphore is locked during
      driver *_probe and *_remove and also inside hid_input_report(). The
      *_probe and *_remove functions may sleep so the semaphore is good here,
      however, hid_input_report() is in atomic context and hence only uses
      down_trylock(). If it cannot acquire the lock it simply drops the input
      package.
      
      The low-level drivers report input events synchronously so
      hid_input_report() should never be entered twice at the same time on the
      same device. Hence, the lock should always be available. But if the
      driver is currently probed/removed then the lock is not available and
      dropping the package should be safe because this is what would have
      happened if the package arrived some milliseconds earlier/later.
      
      This also fixes another race condition while probing drivers:
      First the *_probe function of the driver is called and only if that
      succeeds, the related input device of hidinput is registered. If the low
      level driver reports input events after the *_probe function returned
      but before the input device is registered, then a NULL pointer
      dereference will occur. (Equivalently on driver remove function).
      This is not possible anymore, since the semaphore lock drops all
      incoming packages until the driver/device is fully initialized.
      Signed-off-by: default avatarDavid Herrmann <dh.herrmann@googlemail.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      4ea54542
  9. 04 Aug, 2011 2 commits
  10. 23 Jul, 2011 27 commits