05 Apr, 2007

1 commit

  • Truncated reports should not be discarded since it prevents buggy
    devices from communicating with userspace.

    Prior to the regession introduced in 2.6.20, a shorter-than-expected
    report in hid_input_report() was passed thru after having the missing
    bytes cleared. This behavior was established over a few patches in the
    2.6.early-teens days, including commit
    cd6104572bca9e4afe0dcdb8ecd65ef90b01297b.

    This patch restores the previous behavior and fixes the regression.

    Signed-off-by: Adam Kropelin
    Signed-off-by: Jiri Kosina

    Adam Kropelin
     

16 Mar, 2007

1 commit


15 Mar, 2007

1 commit


12 Mar, 2007

2 commits

  • 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: Jiri Kosina

    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: Mariusz Kozlowski
    Signed-off-by: Jiri Kosina

    Jiri Kosina
     

01 Mar, 2007

5 commits

  • Dongle shipped with Logitech DiNovo Edge (0x046d/0xc714) behaves in a weird
    non-standard way - it contains multiple reports with the same usage, which
    results in remapping of GenericDesktop.X and GenericDesktop.Y usages to
    GenericDesktop.Z and GenericDesktop.RX respectively, thus rendering the
    touchwheel unusable.

    The commit 35068976916fdef82d6e69ef1f8c9a1c47732759 solved this
    in a way that it didn't remap certain usages. This however breaks
    (at least) middle button of Logic3 / SpectraVideo (0x1267/0x0210),
    which in contrary requires the remapping.

    To make both of the harware work, allow remapping of these usages again,
    and introduce a quirk for Logitech DiNovo Edge "touchwheel" instead - we
    disable remapping for key, abs and rel events only for this hardware.

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • This patch makes extra keys (F1-F12 in special mode, zooming, rotate, shuffle)
    on Logitech S510 keyboard work.

    Logitech S510 keyboard sends in report no. 3 keys which are far above the
    logical maximum described in descriptor for given report.

    This patch introduces a HID quirk for this wireless USB receiver/keyboard
    in order to fix the report descriptor before it's being parsed - the logical
    maximum and the number of usages is bumped up to 0x104d). The values are in the
    "Reserved" area of consumer HUT, so HID_MAX_USAGE had to be changed too.

    In addition to proper extracting of the values from report descriptor, proper
    HID-input mapping is introduced for them.

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • Freeing of device->collection is properly done in hid_free_device() (as
    this function is supposed to free all the device resources and could be
    called from transport specific code, e.g. usb_hid_configure()).

    Remove all kfree() calls preceeding the hid_free_device() call.

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • Every file should include the headers containing the prototypes for
    it's global functions.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Jiri Kosina

    Adrian Bunk
     
  • d4ae650a904612ffb7edd3f28b69b022988d2466 introduced zeroing of the
    last field byte in output reports in order to make sure the unused
    bits are set to 0. This is done in a wrong way, resulting in a
    wrong bits being zeroed out (not properly shifted by the field offset
    in the report). Fix this.

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     

15 Feb, 2007

1 commit

  • 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: Tim Schmielau
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     

05 Feb, 2007

4 commits

  • CONFIG_INPUT_DEBUG is non-existent option, so remove anything depending
    on it.

    Also, as we have new CONFIG_HID_DEBUG, this should be used on places
    where ifdef DEBUG was used before.

    Suggested by Adrian Bunk.

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • hidinput_{open,close}() functions do not belong to usbhid, but
    to the generic HID layer. Move them, and fix hooks in struct
    hid_device, so that now the callbacks are done to transport-specific
    _open() functions, but not input_open() functions.

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • hid-debug.h contains a lot of code, and should not therefore
    be a header.

    This patch moves the code to generic hid layer as .c source, and
    introduces CONFIG_HID_DEBUG to conditionally compile it, instead
    of playing with #define DEBUG and including hid-debug.h.

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • Add new quirk HID_QUIRK_SKIP_OUTPUT_REPORTS to skip output reports
    when enumerating reports on a hid-input device. Add this quirk and
    HID_QUIRK_MULTI_INPUT to 0810:0001.

    PantherLord Twin USB Joystick, 0810:0001 has separate input reports
    for 2 distinct game controllers in the same interface, so it needs
    HID_QUIRK_MULTI_INPUT. However, the device also contains one output
    report per controller which is used to control the force feedback
    function, and we do not want those to appear as separate input
    devices as well. The simplest approach seems to be to add a quirk to
    skip output reports on 0810:0001, and allow the force feedback
    driver to handle those.

    Signed-off-by: Anssi Hannula
    Signed-off-by: Jiri Kosina

    Anssi Hannula
     

30 Jan, 2007

1 commit

  • The apple powerbook people are used to switch the pb_fnmode
    setting at runtime through writing to sysfs, altering the
    module parameter value. This was broken for them in 2.6.20-rc1
    when generic HID layer was introduced, as the pb_fnmode flag
    was made per-hiddevice, instead of global variable.

    This patch moves the pb_fnmode module parameter from usbhid module
    to hid module, but apart from that retains backward compatibility
    with respect to changing the mode through sysfs.

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     

26 Jan, 2007

2 commits


22 Jan, 2007

3 commits

  • There is no reason for generic hid-input.c to include usb-specific
    input.h.

    As a sideeffect, this also fixes warning of redefinition of dbg()
    macro, when hid-input.c is compiled with DEBUG (as there is a clash
    between dbg() from hid.h and usb/input.h).

    Signed-off-by: Jiri Kosina

    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: Jiri Kosina

    Jiri Kosina
     
  • 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: Simon Budig
    Signed-off-by: Jiri Kosina

    Simon Budig
     

09 Jan, 2007

1 commit

  • DRIVER_DESC macro is wrong in drivers/hid/hid-core.c. Its value
    is legacy from original usb+hid code and clashes with current
    usbhid implementation. Fix it.

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     

08 Jan, 2007

3 commits


04 Jan, 2007

2 commits


14 Dec, 2006

1 commit

  • On USB keyboards lots of hot/internet keys are not working. This patch
    adds support for a number of keys from the USB HID Usage Table
    (http://www.usb.org/developers/devclass_docs/Hut1_12.pdf).

    It also adds several new key codes. Most of them are used on real world
    keyboards I know. I added some others (KEY_+ EDITOR, GRAPHICSEDITOR, DATABASE,
    NEWS, VOICEMAIL, VIDEOPHONE) to avoid "holes".

    I also added KEY_ZOOMRESET as it is possible to have a inet keyboard and a
    remote control in parallel and it makes sense to have them behave differently.

    Signed-off-by: Florian Festi
    Signed-off-by: Jiri Kosina

    Florian Festi
     

09 Dec, 2006

7 commits

  • This modifies Makefiles and Kconfigs to properly reflect the creation of
    generic HID layer.

    It also removes the dependency of BROKEN, which was introduced by the
    first patch in series (see the comment). Also updates credits.

    Signed-off-by: Jiri Kosina
    Signed-off-by: Marcel Holtmann
    Cc: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Jiri Kosina
     
  • pb_fnmode parameter has to be passed to usbhid, both for compatibility reasons
    and also because it logically belongs there.

    Also removes empty hid-input.c file in drivers/usb/input.

    Signed-off-by: Jiri Kosina
    Signed-off-by: Marcel Holtmann
    Cc: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Jiri Kosina
     
  • hid_input_report() was needlessly USB-specific in USB HID. This patch
    makes the function independent of HID implementation and fixes all
    the current users. Bluetooth patches comply with this prototype.

    Signed-off-by: Jiri Kosina
    Signed-off-by: Marcel Holtmann
    Cc: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Jiri Kosina
     
  • - hiddev is USB-only (agreed with Marcel Holtmann that Bluetooth currently
    doesn't need it, and future planned interface (rawhid) will be more flexible
    and usable)
    - both HID and USB-hid can be now compiled as modules (wasn't possible before
    hiddev was fully separated from generic HID layer)

    Signed-off-by: Jiri Kosina
    Signed-off-by: Marcel Holtmann
    Cc: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Jiri Kosina
     
  • - 'dev' in struct hid_device changed from struct usb_device to
    struct device and fixed all the users
    - renamed functions which are part of USB HID API from 'hid_*' to
    'usbhid_*'
    - force feedback initialization moved from common part into USB-specific
    driver
    - added usbhid.h header for USB HID API users
    - removed USB-specific fields from struct hid_device and moved them
    to new usbhid_device, which is pointed to by hid_device->driver_data
    - fixed all USB users to use this new structure

    Signed-off-by: Jiri Kosina
    Signed-off-by: Marcel Holtmann
    Cc: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Jiri Kosina
     
  • - fixed generic API (added neccessary EXPORT_SYMBOL, fixed hid.h to provide correct
    prototypes)
    - extended hid_device with open/close/event function pointers to driver-specific
    functions
    - added driver specific driver_data to hid_device

    Signed-off-by: Jiri Kosina
    Signed-off-by: Marcel Holtmann
    Cc: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Jiri Kosina
     
  • The "big main" split of USB HID code into generic HID code and
    USB-transport specific HID handling.

    Signed-off-by: Jiri Kosina
    Signed-off-by: Marcel Holtmann
    Cc: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Jiri Kosina