1. 22 7月, 2013 2 次提交
    • N
      HID: hid-logitech-dj: querying_devices was never set · 407a2c2a
      Nestor Lopez Casado 提交于
      Set querying_devices flag to true when we start the enumeration
      process.
      
      This was missing from the original patch. It never produced
      undesirable effects as it is highly improbable to have a second
      enumeration triggered while a first one was still in progress.
      Signed-off-by: NNestor Lopez Casado <nlopezcasad@logitech.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      407a2c2a
    • N
      HID: Revert "Revert "HID: Fix logitech-dj: missing Unifying device issue"" · c63e0e37
      Nestor Lopez Casado 提交于
      This reverts commit 8af6c088.
      
      This patch re-adds the workaround introduced by 59626408
      which was reverted by 8af6c088.
      
      The original patch 596264 was needed to overcome a situation where
      the hid-core would drop incoming reports while probe() was being
      executed.
      
      This issue was solved by c849a614 which added
      hid_device_io_start() and hid_device_io_stop() that enable a specific
      hid driver to opt-in for input reports while its probe() is being
      executed.
      
      Commit a9dd22b7 modified hid-logitech-dj so as to use the
      functionality added to hid-core. Having done that, workaround 596264
      was no longer necessary and was reverted by 8af6c088.
      
      We now encounter a different problem that ends up 'again' thwarting
      the Unifying receiver enumeration. The problem is time and usb controller
      dependent. Ocasionally the reports sent to the usb receiver to start
      the paired devices enumeration fail with -EPIPE and the receiver never
      gets to enumerate the paired devices.
      
      With dcd9006b the problem was "hidden" as the call to the usb
      driver became asynchronous and none was catching the error from the
      failing URB.
      
      As the root cause for this failing SET_REPORT is not understood yet,
      -possibly a race on the usb controller drivers or a problem with the
      Unifying receiver- reintroducing this workaround solves the problem.
      
      Overall what this workaround does is: If an input report from an
      unknown device is received, then a (re)enumeration is performed.
      
      related bug:
      https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1194649Signed-off-by: NNestor Lopez Casado <nlopezcasad@logitech.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      c63e0e37
  2. 07 3月, 2013 1 次提交
  3. 01 3月, 2013 2 次提交
  4. 25 2月, 2013 1 次提交
  5. 22 9月, 2012 1 次提交
    • N
      HID: Fix logitech-dj: missing Unifying device issue · 59626408
      Nestor Lopez Casado 提交于
      This patch fixes an issue introduced after commit 4ea54542
      ("HID: Fix race condition between driver core and ll-driver").
      
      After that commit, hid-core discards any incoming packet that arrives while
      hid driver's probe function is being executed.
      
      This broke the enumeration process of hid-logitech-dj, that must receive
      control packets in-band with the mouse and keyboard packets. Discarding mouse
      or keyboard data at the very begining is usually fine, but it is not the case
      for control packets.
      
      This patch forces a re-enumeration of the paired devices when a packet arrives
      that comes from an unknown device.
      
      Based on a patch originally written by Benjamin Tissoires.
      
      Cc: stable@vger.kernel.org   # v3.2+
      Signed-off-by: NNestor Lopez Casado <nlopezcasad@logitech.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      59626408
  6. 06 9月, 2012 1 次提交
  7. 03 6月, 2012 1 次提交
    • M
      HID: logitech: don't use stack based dj_report structures · d8dc3494
      Marc Dionne 提交于
      On a system with a logitech wireless keyboard/mouse and DMA-API debugging
      enabled, this warning appears at boot:
      
      kernel: WARNING: at lib/dma-debug.c:929 check_for_stack.part.12+0x70/0xa7()
      kernel: Hardware name: MS-7593
      kernel: uhci_hcd 0000:00:1d.1: DMA-API: device driver maps memory fromstack [addr=ffff8801b0079c29]
      
      Make logi_dj_recv_query_paired_devices and logi_dj_recv_switch_to_dj_mode
      use a structure allocated with kzalloc rather than a stack based one.
      Signed-off-by: NMarc Dionne <marc.c.dionne@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      d8dc3494
  8. 11 5月, 2012 1 次提交
    • J
      HID: logitech: read all 32 bits of report type bitfield · 44d27f7d
      Jonathan Nieder 提交于
      On big-endian systems (e.g., Apple PowerBook), trying to use a
      logitech wireless mouse with the Logitech Unifying Receiver does not
      work with v3.2 and later kernels.  The device doesn't show up in
      /dev/input.  Older kernels work fine.
      
      That is because the new hid-logitech-dj driver claims the device.  The
      device arrival notification appears:
      
      	20 00 41 02 00 00 00 00 00 00 00 00 00 00 00
      
      and we read the report_types bitfield (02 00 00 00) to find out what
      kind of device it is.  Unfortunately the driver only reads the first 8
      bits and treats that value as a 32-bit little-endian number, so on a
      powerpc the report type seems to be 0x02000000 and is not recognized.
      
      Even on little-endian machines, connecting a media center remote
      control (report type 00 01 00 00) with this driver loaded would
      presumably fail for the same reason.
      
      Fix both problems by using get_unaligned_le32() to read all four
      bytes, which is a little clearer anyway.  After this change, the
      wireless mouse works on Hugo's PowerBook again.
      
      Based on a patch by Nestor Lopez Casado.
      Addresses http://bugs.debian.org/671292Reported-by: NHugo Osvaldo Barrera <hugo@osvaldobarrera.com.ar>
      Inspired-by: NNestor Lopez Casado <nlopezcasad@logitech.com>
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NNestor Lopez Casado <nlopezcasad@logitech.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      44d27f7d
  9. 01 5月, 2012 1 次提交
  10. 02 2月, 2012 1 次提交
  11. 20 9月, 2011 1 次提交
  12. 15 9月, 2011 1 次提交
    • N
      HID: Add full support for Logitech Unifying receivers · 534a7b8e
      Nestor Lopez Casado 提交于
      With this driver, all the devices paired to a single Unifying
      receiver are exposed to user processes in separated /input/dev
      nodes.
      
      Keyboards with different layouts can be treated differently,
      Multiplayer games on single PC (like home theater PC) can
      differentiate input coming from different kbds paired to the
      same receiver.
      
      Up to now, when Logitech Unifying receivers are connected to a
      Linux based system, a single keyboard and a single mouse are
      presented to the HID Layer, even if the Unifying receiver can
      pair up to six compatible devices. The Unifying receiver by default
      multiplexes all incoming events (from multiple keyboards/mice)
      into these two.
      Signed-off-by: NNestor Lopez Casado <nlopezcasad@logitech.com>
      Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      534a7b8e