1. 12 Mar, 2007 2 commits
    • Jiri Kosina's avatar
      HID: zeroing of bytes in output fields is bogus · d108d4fe
      Jiri Kosina authored
      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: default avatarJiri Kosina <jkosina@suse.cz>
      d108d4fe
    • Jiri Kosina's avatar
      HID: allocate hid_parser in a proper way · 47a80edb
      Jiri Kosina authored
      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: default avatarMariusz Kozlowski <m.kozlowski@tuxland.pl>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      47a80edb
  2. 10 Mar, 2007 38 commits