14 Oct, 2007

4 commits

  • Jiri Kosina
     
  • hidraw is an interface that is going to obsolete hiddev one
    day.

    Many userland applications are using libusb instead of using
    kernel-provided hiddev interface. This is caused by various
    reasons - the HID parser in kernel doesn't handle all the
    HID hardware on the planet properly, some devices might require
    its own specific quirks/drivers, etc.

    hiddev interface tries to do its best to parse all the received
    reports properly, and presents only parsed usages into userspace.
    This is however often not enough, and that's the reason why
    many userland applications just don't use hiddev at all, and
    rather use libusb to read raw USB events and process them on
    their own.

    Another drawback of hiddev is that it is USB-specific.

    hidraw interface provides userspace readers with really raw HID
    reports, no matter what the low-level transport layer is (USB/BT),
    and gives the userland applications all the freedom to process
    the HID reports in a way they wish to.

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • Add hook in usbhid for write() callback from hidraw. Sends the
    report to the device through control pipe.

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • Autosuspend for USB HID devices remains problematic as far as mice
    and keyboards are concerned. While I am working on a grand solution,
    here's a minimalist patch that works for those devices not continously
    in use.

    Signed-off-by: Oliver Neukum
    Signed-off-by: Jiri Kosina

    Oliver Neukum
     

02 Aug, 2007

3 commits


13 Jul, 2007

2 commits

  • This patch (as918) introduces a new USB driver method: reset_resume.
    It is called when a device needs to be reset as part of a resume
    procedure (whether because of a device quirk or because of the
    USB-Persist facility), thereby taking over a role formerly assigned to
    the post_reset method. As a consequence, post_reset no longer needs
    an argument indicating whether it is being called as part of a
    reset-resume. This separation of functions makes the code clearer.

    In addition, the pre_reset and post_reset method return types are
    changed; they now must return an error code. The return value is
    unused at present, but at some later time we may unbind drivers and
    re-probe if they encounter an error during reset handling.

    The existing pre_reset and post_reset methods in the usbhid,
    usb-storage, and hub drivers are updated to match the new
    requirements. For usbhid the post_reset routine is also used for
    reset_resume (duplicate method pointers); for the other drivers a new
    reset_resume routine is added. The change to hub.c looks bigger than
    it really is, because mark_children_for_reset_resume() gets moved down
    next to the new hub_reset_resume() routine.

    A minor change to usb-storage makes the usb_stor_report_bus_reset()
    routine acquire the host lock instead of requiring the caller to hold
    it already.

    Signed-off-by: Alan Stern
    Signed-off-by: Jiri Kosina
    CC: Matthew Dharm
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This patch (as886) adds the controversial USB-persist facility,
    allowing USB devices to persist across a power loss during system
    suspend.

    The facility is controlled by a new Kconfig option (with appropriate
    warnings about the potential dangers); when the option is off the
    behavior will remain the same as it is now. But when the option is
    on, people will be able to use suspend-to-disk and keep their USB
    filesystems intact -- something particularly valuable for small
    machines where the root filesystem is on a USB device!

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

09 Jul, 2007

5 commits

  • Jiri Kosina
     
  • Lately there have been quite a lot of bug reports against broken devices
    which require us to fix their report descriptor in the runtime, before it
    is passed to the HID parser. Those devices have eaten quite an amount of
    our quirks space, which isn't particularly necessary - the quirks are not
    needed after the report descriptor is parsed, and they just consume bits.

    Therefore this patch separates the quirks for report descriptor fixup, and
    moves their handling into separate code. The quirks are then forgotten as
    soon as the report descriptor has been parsed.

    Module parameter 'rdesc_quirks' is introduced to be able to modify these
    quirks in runtime in a similar way to 'quirks' parameter for ordinary HID
    quirks.

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • Petalynx Maxter remote control [1] 0x18b1/0x0037 emits 0xfa and 0xfc from
    consumer page (reserved in HUT 1.12) for back and more keys. It also emits
    a few usages from LOGIVENDOR page, which need adding.

    Also, this device has broken report descriptor - the reported maximum is too
    low - it doesn't contain the range for 'back' and 'more' keys, so we need to
    bump it up before the report descriptor is being parsed.

    Besides all this, it also requires NOGET quirk.

    This patch does so.

    [1] http://www.elmak.pl/index.php?option=com_phpshop&page=shop.browse&category_id=14&ext=opis&lang=en

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • This patch (as914) replaces a call to flush_scheduled_work() with
    cancel_work_sync(), in order to help avoid potential deadlocks.

    Signed-off-by: Alan Stern
    Signed-off-by: Jiri Kosina

    Alan Stern
     
  • There have been many reports recently about broken HID devices, the
    diagnosis of which required users to recompile their kernels in order
    to be able to provide debugging output needed for coding a quirk for
    a particular device.

    This patch makes CONFIG_HID_DEBUG default y if !EMBEDDED and makes it
    possible to control debugging output produced by HID code by supplying
    'debug=1' module parameter.

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     

09 May, 2007

3 commits

  • In preparation for struct class_device -> struct device input
    core conversion switch to using input_dev->dev.parent when
    specifying device position in sysfs tree.

    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Jiri Kosina

    Dmitry Torokhov
     
  • usb_buffer_free() now handles NULLs so remove unneeded checks
    form callers.

    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Jiri Kosina

    Dmitry Torokhov
     
  • Certain versions of Cypress USB barcode readers (this problem is known to
    happen at least with PIDs 0xde61 and 0xde64) have report descriptor which
    has swapped usage min and usage max tag. This results in HID parser failing
    for report descriptor of these devices, as it (wrongly) requires allocating
    more usages than HID_MAX_USAGES.

    Solve this by walking through the report descriptor for such devices, and swap
    the usage min and usage max items (and their values) to be in proper order.

    Reported-by: Bret Towe
    Signed-off-by: Jiri Kosina

    Jiri Kosina
     

19 Apr, 2007

2 commits


18 Apr, 2007

1 commit


16 Apr, 2007

1 commit


11 Apr, 2007

9 commits

  • This adds support for WiseGroup Quad Joypad (0x0925/0x8800). The
    same quirks as for Dual Joypad (0x0925/0x8866) are needed.

    Signed-off-by: Sam Liddicott
    Signed-off-by: Jiri Kosina

    Sam Liddicott
     
  • On Dell W7658 keyboard, when BIOS sets NumLock LED on, it survives the
    takeover by kernel and thus confuses users.

    Eating of an increasibly scarce quirk bit is unfortunate. We do it for safety,
    given the history of nervous input devices which crash if anything unusual
    happens.

    Signed-off-by: Pete Zaitcev
    Signed-off-by: Jiri Kosina

    Pete Zaitcev
     
  • Logitech MX3000 contains report descriptor which doesn't cover usages
    above 0x28c, but emits such usages. Report descriptor needs fixing
    in the very same way as with receivers shipped with S510 keyboards.

    This patch also adds a few mappings for multimedia keys that S510 didn't
    emit.

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • Logitech S510 keyboard is shipped with USB receivers with various product
    ids, all need their report descriptor to be fixed. This adds PID 0xc50c.

    Reported by Christophe Colombier in kernel.org bugzilla #7352

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • Add HID_QUIRK_HIDDEV for the Belkin Flip USB KVM, which provides for software
    control of switching via a HID class interface. It overloads three HID LED
    usages, two of which aren't mapped in the ev_dev input subsection, and which it
    doesn't make sense to map. In order to force the creation of a hiddev device
    for controlling the Flip, this quirk flag is needed.

    Signed-off-by: Daniel P. Engel
    Signed-off-by: Jiri Kosina

    Daniel P. Engel
     
  • Explicitly specify the size of the hid_blacklist quirks member, to guard
    against surprises on architectures where unsigned ints aren't 32 bits long.

    Signed-off-by: Paul Walmsley
    Signed-off-by: Jiri Kosina

    Paul Walmsley
     
  • The USB HID driver fails to reset its error-retry timeout when there
    has been a long time interval between I/O errors with no successful URB
    completions in the meantime. As a result, the very next error would
    trigger an immediate reset, even if it was a chance event occurring
    long after the previous error.

    More USB keyboards and mice than one might expect end up getting I/O
    errors. Almost always this results from hardware problems of one sort of
    another. For example, people attach the device to a USB extension cable,
    which degrades the signal. Or they simply have poor quality cables to
    begin with. Or they use a KVM switch which doesn't handle USB messages
    correctly. Etc...

    There have been reports from several users in which these I/O
    errors would occur more or less randomly, at intervals ranging from
    seconds to minutes. The error-handling code in hid-core.c was originally
    meant for situations where a single outage would persist for a few hundred
    ms (electromagnetic interference, for example). It didn't work right when
    these more sporadic errors occurred, because of a flaw in the logic
    which this patch fixes.

    This patch (as873) fixes that oversight.

    Signed-off-by: Alan Stern
    Signed-off-by: Jiri Kosina

    Alan Stern
     
  • The vendor/product IDs for the purposes of hid_blacklist got
    scathered around the hid-core.c in a rather random way over the
    time.

    Move all the related definitions at the beginning of the file,
    and make them sorted again. Sort also hid_blacklist properly.

    Signed-off-by: Jiri Kosina

    Jiri Kosina
     
  • Separate usbhid code into dedicated drivers/hid/usbhid directory as
    discussed previously with Greg, so that it eases maintaineance process.

    Signed-off-by: Jiri Kosina
    Signed-off-by: Greg Kroah-Hartman

    Jiri Kosina