1. 09 5月, 2007 1 次提交
  2. 16 4月, 2007 1 次提交
  3. 11 4月, 2007 1 次提交
    • S
      HID: introduce proper zeroing of unused bits in output reports · 46386b58
      Simon Budig 提交于
      Some HID devices are looking on the unused bits in the HID reports they
      receive. This is violating the specification, but we want to make those
      devices work. Well-behaving devices are unaffected, as they don't care
      about the unused bits.
      
      If bitsused % 8 is 0 all bits in data[] get used and we don't need to
      clear anything. Otherwise (bitsused % 8) bits of the last byte get used.
      By shifting 1 for (bitsused % 8) bits and subtracting 1 we create a mask
      consisting of (bitsused % 8) ones and remaining zeroes. By ANDing we
      clear the upper unused bits.
      Signed-off-by: NSimon Budig <simon@budig.de>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      46386b58
  4. 05 4月, 2007 1 次提交
  5. 15 3月, 2007 1 次提交
  6. 12 3月, 2007 2 次提交
    • J
      HID: zeroing of bytes in output fields is bogus · d108d4fe
      Jiri Kosina 提交于
      This patch removes bogus zeroing of unused bits in output reports,
      introduced in Simon's patch in commit d4ae650a.
      According to the specification, any sane device should not care
      about values of unused bits.
      
      What is worse, the zeroing is done in a way which is broken and
      might clear certain bits in output reports which are actually
      _used_ - a device that has multiple fields with one value of
      the size 1 bit each might serve as an example of why this is
      bogus - the second call of hid_output_report() would clear the
      first bit of report, which has already been set up previously.
      
      This patch will break LEDs on SpaceNavigator, because this device
      is broken and takes into account the bits which it shouldn't touch.
      The quirk for this particular device will be provided in a separate
      patch.
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      d108d4fe
    • J
      HID: allocate hid_parser in a proper way · 47a80edb
      Jiri Kosina 提交于
      hid_parser is non-trivially large structure, so it should be allocated
      using vmalloc() to avoid unsuccessful allocations when memory fragmentation
      is too high.
      This structue has a very short life, it's destroyed as soon as the report
      descriptor has been completely parsed.
      
      This should be considered a temporary solution, until the hid_parser is
      rewritten to consume less memory during report descriptor parsing.
      Acked-by: NMariusz Kozlowski <m.kozlowski@tuxland.pl>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      47a80edb
  7. 01 3月, 2007 2 次提交
  8. 15 2月, 2007 1 次提交
    • T
      [PATCH] remove many unneeded #includes of sched.h · cd354f1a
      Tim Schmielau 提交于
      After Al Viro (finally) succeeded in removing the sched.h #include in module.h
      recently, it makes sense again to remove other superfluous sched.h includes.
      There are quite a lot of files which include it but don't actually need
      anything defined in there.  Presumably these includes were once needed for
      macros that used to live in sched.h, but moved to other header files in the
      course of cleaning it up.
      
      To ease the pain, this time I did not fiddle with any header files and only
      removed #includes from .c-files, which tend to cause less trouble.
      
      Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
      arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
      allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
      configs in arch/arm/configs on arm.  I also checked that no new warnings were
      introduced by the patch (actually, some warnings are removed that were emitted
      by unnecessarily included header files).
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd354f1a
  9. 05 2月, 2007 2 次提交
  10. 26 1月, 2007 1 次提交
  11. 22 1月, 2007 2 次提交
    • J
      HID: compilation fix when DEBUG_DATA is defined · e54dea69
      Jiri Kosina 提交于
      hid/hid-core.c references 'len' variable when DEBUG_DATA is defined,
      but the actual name of the variable is 'size'. Fix it.
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      e54dea69
    • S
      HID: proper LED-mapping for SpaceNavigator · d4ae650a
      Simon Budig 提交于
      This change introduces a mapping for LED indicators between the HID
      specification and the Linux input subsystem. The previous code properly
      mapped the LEDs relevant for Keyboards, but garbeled the remaining ones.
      With this change all LED enums from the input system get mapped to more
      or less equivalent LED numbers from the HID specification.
      
      This patch also ensures that the unused bits in a HID report to the
      device are zeroed out. This makes the 3Dconnexion SpaceNavigator fully
      usable with the linux input system.
      Signed-off-by: NSimon Budig <simon@budig.de>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      d4ae650a
  12. 09 1月, 2007 1 次提交
  13. 08 1月, 2007 2 次提交
  14. 09 12月, 2006 4 次提交