summaryrefslogtreecommitdiffstats
path: root/drivers/hid (follow)
Commit message (Collapse)AuthorAgeFilesLines
* USB: add reset_resume methodAlan Stern2007-07-131-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <stern@rowland.harvard.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz> CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: add USB-Persist facilityAlan Stern2007-07-131-1/+1
| | | | | | | | | | | | | | | | | 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 <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge branches 'debug-module-param' and 'upstream' into for-linusJiri Kosina2007-07-095-79/+280
|\
| * HID: handle cases of volume knobs generating relative valuesJiri Kosina2007-07-091-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are some devices (for example Dell Multimedia Keyboard SK-8135) that have a volume control knob which generates relative events instead of absolute. hid-input maps them to ABS_VOLUME. HUT pages don't restrict volume to absolute values. Adding REL_VOLUME doesn't seem feasible, nothing knows how to handle it. This patch translates relative ABS_VOLUME events into appropriate number of series of VOLUME_UP or VOLUME_DOWN events respectively, so that userspace sees the correct values in the end. kernel.org bugzilla 5233 Reported-by: Jochen Eisinger <jochen@penguin-breeder.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * HID: Logitech keyboard 0xc311 needs reset leds quirkJiri Kosina2007-07-091-0/+2
| | | | | | | | | | | | | | The keyboard 0x046d/0xc311 needs reset leds quirk Tested-by: Antonino Ingargiola <tritemio@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * HID: support for logitech cordless desktop LX500 special mappingRyo Dairiki2007-07-092-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This keyboard has wireless mouse which has left, middle, right buttons and 2-dimensional scrolling wheel. Unfornetuly, this wheel reports side scrolling events and 11 or 12 button events at the same time. I've wrote a patch to fix this mapping. I'm not sure if this mapping is proper for buttons, because , for example, there is no entry for "burn cd" in input.h. The patch also supress 11 and 12 button events from mouse when you scroll the wheel left and right. With this patch, only side scrolling events are reported. (This mouse has only 4 buttons and 2D wheel. There is no such buttons like 11 and 12.) Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * HID: fix autocentering of PID devicesDiogo Kastrup2007-07-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | When setting the autocentering of PID devices, PID_DIRECTION_ENABLE is not being explicitely set to 1. This results in autocentering working only on the vertical axis when this field is preset to 0. Fix that by setting it explicitely to 1 when preparing the set_effect report for autocentering spring effect. Signed-off-by: Diogo Kastrup <dk@bighost.com.br> Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * HID: separate quirks for report descriptor fixupJiri Kosina2007-07-092-91/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <jkosina@suse.cz>
| * HID: Add NOGET quirk for all NCR devicesJiri Kosina2007-07-091-0/+10
| | | | | | | | | | | | | | | | | | | | Devices manufactured by NCR have userspace hiddev-based drivers, which do all the necessary device querying by themselves. The devices must not be queried directly by the generic HID driver, as reported by NCR engineers. Cc: Petr Ostadal <postadal@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * HID: support for Petalynx Maxter remote controlJiri Kosina2007-07-093-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <jkosina@suse.cz>
| * HID: fix mismatch between hid-input HUT find/search mapping and the HUTHans de Goede2007-07-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When comparing usb vs ps2 / testing the keycodes generated for the easy access keys on my trust (microsoft compatible) keyboard. I noticed the search key generated the keycode for find when connected through USB. This lead me to check the consumer page mappings in hid-input.c . And it turns out the the mapping for ID 0x221 deviates from the HUT standard document: http://www.usb.org/developers/devclass_docs/Hut1_12.pdf Currently it is incorrectly mapped to find, whereas it should be mapped to search. I also added missing bindings for ID 0x21f, the real find and for 0x222, goto. Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * HID: support for Gameron dual psx adaptorJulien Eyries2007-07-091-0/+4
| | | | | | | | | | | | | | | | | | This patch provides support for the Gameron dual psx adaptor. The modification is to add the quirk HID_QUIRK_MULTI_INPUT for this specific USB device. Signed-off-by: Julien Eyries <jeyries@yahoo.fr> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * USB HID: avoid flush_scheduled_work()Alan Stern2007-07-091-1/+1
| | | | | | | | | | | | | | | | 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 <stern@rowland.harvard.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * HID: Use menuconfig objectsJan Engelhardt2007-07-091-3/+6
| | | | | | | | | | | | | | | | | | Make a "menuconfig" out of the Kconfig objects "menu, ..., endmenu", so that the user can disable all the options in that menu at once instead of having to disable each option separately. Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * HID: force hid-input for Microsoft SideWinder GameVoice deviceJiri Kosina2007-07-092-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Microsoft SideWinder GameVoice driver is a trivial device with a few buttons (0x09 HID usage) and an audio connector, which just forwards the audio input into oridinary sound card present in the computer. Despite this fact, the only interface of this device reports itself as a Telephony/Headset type of HID device. This is apparently incorrect - the device itself doesn't provide any audio/telephony functionality. This is achieved in userland application which only needs to receive the button events from the HID driver. This patch establishes a new quirk which forces hid-input to claim a device it will otherwise leave untouched. Reported-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * HID: input mapping for Chicony KU-0418 tactical padJiri Kosina2007-07-091-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | Chicony KU-0418 (aka Saitek PZ08AU gaming keyboard) has a separate "tactical pad" with 11 non-functional buttons - they generate usage codes from 0xff00 (MSVENDOR) usage page. Special case handling for this keyboard added, so no later clash with MSVENDOR mappings is going to occur. Pointed out in bugzilla #7352 Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | HID: make debugging output runtime-configurableJiri Kosina2007-07-0911-102/+107
|/ | | | | | | | | | | | | 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 <jkosina@suse.cz>
* USB HID: hiddev - fix race between hiddev_send_event() and hiddev_release()Jiri Kosina2007-05-101-0/+14
| | | | | | | | There is a small race window in which hiddev_release() could corrupt the list that is being processed for new event in hiddev_send_event(). Synchronize the operations over this list. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: add hooks for getkeycode() and setkeycode() methodsMarvin Raaijmakers2007-05-091-0/+85
| | | | | | | | Provide hooks for getkeycode() and setkeycode() methods to input_dev. Signed-off-by: Marvin Raaijmakers <marvin.raaijmakers@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: switch to using input_dev->dev.parentDmitry Torokhov2007-05-098-20/+23
| | | | | | | | | 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 <dtor@mail.ru> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* USB HID: Logitech wheel 0x046d/0xc294 needs HID_QUIRK_NOGET quirkJan Kratochvil2007-05-091-0/+2
| | | | | | | | | | Logitech wheel (product id 0xc294) doesn't like to be polled for reports, otherwise it slows down initialization of this device to ten seconds. This patch adds HID_QUIRK_NOGET flag for this wheel. Signed-off-by: Jan Kratochvil <honza@jikos.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* USB HID: usb_buffer_free() cleanupDmitry Torokhov2007-05-092-14/+7
| | | | | | | | usb_buffer_free() now handles NULLs so remove unneeded checks form callers. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* USB HID: report descriptor of Cypress USB barcode readers needs fixupJiri Kosina2007-05-092-0/+32
| | | | | | | | | | | | | | 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 <magnade@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* USB HID: update CONFIG_USB_HIDINPUT_POWERBOOK descriptionNoel Kothe2007-05-091-2/+2
| | | | | | | This option is needed on the Apple Intel Laptops too. Signed-off-by: Noel Kothe <noel@debian.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: add input mappings for non-working keys on Logitech S510 remoteCharles Pillar2007-05-091-0/+4
| | | | | | | HID-input mapping for non-working S510 remote control buttons. Signed-off-by: Charles Pillar <pillarama@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* header cleaning: don't include smp_lock.h when not usedRandy Dunlap2007-05-081-1/+0
| | | | | | | | | | | | Remove includes of <linux/smp_lock.h> where it is not used/needed. Suggested by Al Viro. Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc, sparc64, and arm (all 59 defconfigs). Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'for-linus' of ↵Linus Torvalds2007-04-3018-3/+5531
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid * 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid: (21 commits) USB HID: don't warn on idVendor == 0 USB HID: add 'quirks' module parameter USB HID: add support for dynamically-created quirks USB HID: clarify static quirk handling as squirks USB HID: encapsulate quirk handling into hid-quirks.c USB HID: EMS USBII device needs HID_QUIRK_MULTI_INPUT HID: update copyright and authorship macro HID: introduce proper zeroing of unused bits in output reports USB HID: add support for WiseGroup MP-8800 Quad Joypad USB HID: add FF support for Logitech Force 3D Pro Joystick USB HID: numlock quirk for dell W7658 keyboard USB HID: Logitech MX3000 keyboard needs report descriptor quirk USB HID: extend quirk for Logitech S510 keyboard USB HID: usbkbd/usbmouse - handle errors when registering devices USB HID: add QUIRK_HIDDEV for Belkin Flip KVM HID: enable dead keys on a belkin wireless keyboard USB HID: Thustmaster firestorm dual power v1 support USB HID: specify explicit size for hid_blacklist.quirks USB HID: fix retry & reset logic USB HID: consolidate vendor/product ids ...
| * Merge branch 'field-zeroing' into for-linusJiri Kosina2007-04-291-0/+5
| |\
| | * HID: introduce proper zeroing of unused bits in output reportsSimon Budig2007-04-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Simon Budig <simon@budig.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | USB HID: don't warn on idVendor == 0Jiri Kosina2007-04-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out that there are broken devices out there that incorrectly report VID/PID as 0x000, see http://lkml.org/lkml/2007/4/27/496 Therefore we should not confuse users by dumping warnings and stacktraces in such situation. It is not possible to add quirks for such horribly broken devices, but currently that's not needed. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | USB HID: add 'quirks' module parameterPaul Walmsley2007-04-192-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | Add a 'quirks' module parameter for the usbhid module, so users can add or modify quirks at module load time. Signed-off-by: Paul Walmsley <paul@booyaka.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | USB HID: add support for dynamically-created quirksPaul Walmsley2007-04-191-14/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add internal support for dynamically-allocated HID quirks, "dquirks" (for "dynamic quirks"). Includes several functions to add/modify quirks from the list. This code is used by the next patch to implement quirk modification upon module load. Signed-off-by: Paul Walmsley <paul@booyaka.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | USB HID: clarify static quirk handling as squirksPaul Walmsley2007-04-191-6/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename existing quirks handling code that operates over a static array to "squirks" (short for static quirks) to differentiate it from the dynamically-allocated quirks that will be introduced in the next patch. Add an accessor function specifically for static quirks, usbhid_exists_squirk(). Signed-off-by: Paul Walmsley <paul@booyaka.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | USB HID: encapsulate quirk handling into hid-quirks.cPaul Walmsley2007-04-193-446/+487
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the USB_VENDOR* and USB_DEVICE* defines and the hid_blacklist[] array there from hid-core.c. Add hid-quirks.c:usbhid_lookup_any_quirks() to return quirk information to hid-core.c. Convert __u32, __u16 types to u32, u16. Signed-off-by: Paul Walmsley <paul@booyaka.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | USB HID: EMS USBII device needs HID_QUIRK_MULTI_INPUTPaul Zaremba2007-04-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add HID_QUIRK_MULTI_INPUT to the EMS USBII (0x0b43/0003) so the kernel detects both joystick ports properly. Without it you end up with a single joystick node (js0) that combines the two physical port signals. Signed-off-by: Paul Zaremba <pez-gpg@treeofice.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | HID: update copyright and authorship macroJiri Kosina2007-04-162-3/+3
| | | | | | | | | | | | | | | | | | Updates Copyright and DRIVER_AUTHOR in HID and USB HID sources. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | USB HID: add support for WiseGroup MP-8800 Quad JoypadSam Liddicott2007-04-111-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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 <sam@liddicott.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | USB HID: add FF support for Logitech Force 3D Pro JoystickJiri Kosina2007-04-112-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for Logitech Force 3D Pro Joystick (0x046d/0xc286) to hid-lgff driver. Device ID reported by Richard Bolkey <rbolkey@cs.utexas.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | USB HID: numlock quirk for dell W7658 keyboardPete Zaitcev2007-04-111-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <zaitcev@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | USB HID: Logitech MX3000 keyboard needs report descriptor quirkJiri Kosina2007-04-112-12/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <jkosina@suse.cz>
| * | USB HID: extend quirk for Logitech S510 keyboardJiri Kosina2007-04-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <jkosina@suse.cz>
| * | USB HID: usbkbd/usbmouse - handle errors when registering devicesDmitry Torokhov2007-04-112-8/+20
| | | | | | | | | | | | | | | | | | | | | Handle errors when registering input devices in usbkbd/usbmouse. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | USB HID: add QUIRK_HIDDEV for Belkin Flip KVMDaniel P. Engel2007-04-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <dengel@sourceharvest.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | HID: enable dead keys on a belkin wireless keyboardChris Clayton2007-04-111-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Belkin Wireless keyboard, model number F8E849KYBD, USB ID 1020:0006, FCCID: K7SF8E849KYBD emits usages 0x03a-0x03c from Consumer usage page. As of HUT v1.12, these are marked as reserved. If any conflict arises later, the mapping could be made conditional on VID/PID. Signed-off-by: Chris Clayton <chris2553@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | USB HID: Thustmaster firestorm dual power v1 supportRonny Peine2007-04-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for version 1 of Thustmaster firestorm dual power (0x44f/0xb300). Signed-off-by: Ronny Peine <RonnyPeine@gmx.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | USB HID: specify explicit size for hid_blacklist.quirksPaul Walmsley2007-04-111-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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 <paul@booyaka.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | USB HID: fix retry & reset logicAlan Stern2007-04-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <stern@rowland.harvard.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
| * | USB HID: consolidate vendor/product idsJiri Kosina2007-04-111-411/+410
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <jkosina@suse.cz>
| * | USB HID: move usbhid code from drivers/usb/input to drivers/hid/usbhidJiri Kosina2007-04-1115-0/+5165
| |/ | | | | | | | | | | | | | | 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 <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* / HID: Do not discard truncated input reportsAdam Kropelin2007-04-051-1/+1
|/ | | | | | | | | | | | | | | | 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 <akropel1@rochester.rr.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>