- 22 7月, 2008 1 次提交
-
-
由 Ming Lei 提交于
From the current implementation of usb_reset_composite_device function, the iface parameter is no longer useful. This function doesn't do something special for the iface usb_interface,compared with other interfaces in the usb_device. So remove the parameter and fix the related caller. Signed-off-by: NMing Lei <tom.leiming@gmail.com> Acked-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 29 4月, 2008 1 次提交
-
-
由 Al Viro 提交于
usb_control_msg() converts arguments to little-endian itself, doing that in caller means breakage on big-endian boxen. Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 22 4月, 2008 4 次提交
-
-
由 Oliver Neukum 提交于
There is a window: task A task B spin_lock_irq(&usbhid->inlock); /* Sync with error handler */ usb_set_intfdata(intf, NULL); spin_unlock_irq(&usbhid->inlock); usb_kill_urb(usbhid->urbin); usb_kill_urb(usbhid->urbout); usb_kill_urb(usbhid->urbctrl); del_timer_sync(&usbhid->io_retry); cancel_work_sync(&usbhid->reset_work); if (!hid->open++) { res = usb_autopm_get_interface(usbhid->intf); if (res < 0) { hid->open--; return -EIO; } } if (hid_start_in(hid)) if (hid->claimed & HID_CLAIMED_INPUT) hidinput_disconnect(hid); in which an open() to an already disconnected device will submit an URB to an undead device. In case disconnect() was called by an ioctl, this'll oops. Fix by introducing a new flag and checking it in hid_start_in(). Signed-off-by: NOliver Neukum <oneukum@suse.de> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Slaby 提交于
Since only place where this is used is usbhid, move it there. Signed-off-by: NJiri Slaby <jslaby@suse.cz> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Slaby 提交于
Fix these sparse warnings: .../hid/hid-core.c:100:15: warning: incorrect type in assignment (different signedness) .../hid/hid-core.c:100:15: expected signed int [usertype] *value .../hid/hid-core.c:100:15: got unsigned int *<noident> by unsigned -> s32 .../hid/hid-input-quirks.c:336:10: warning: Using plain integer as NULL pointer by 0 -> NULL .../hid/usbhid/hid-core.c:786:46: warning: incorrect type in argument 3 (different signedness) .../hid/usbhid/hid-core.c:786:46: expected int *max .../hid/usbhid/hid-core.c:786:46: got unsigned int *<noident> .../hid/usbhid/hid-core.c:787:47: warning: incorrect type in argument 3 (different signedness) .../hid/usbhid/hid-core.c:787:47: expected int *max .../hid/usbhid/hid-core.c:787:47: got unsigned int *<noident> .../hid/usbhid/hid-core.c:788:48: warning: incorrect type in argument 3 (different signedness) .../hid/usbhid/hid-core.c:788:48: expected int *max .../hid/usbhid/hid-core.c:788:48: got unsigned int *<noident> by int -> unsigned int Signed-off-by: NJiri Slaby <jirislaby@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Pekka Sarnila 提交于
Many vendors highspeed devices give erroneously fullspeed interval value in endpoint descriptor for interrupt endpoints. This quirk fixes up that by recalculating the right value for highspeed device. At the time of hid configuration this quirk calculates which highspeed interval value gives same interval delay as, or next smaller then, what it would be if the original value would be interpreted as fullspeed value. In subsequent urbs that new value is used instead. Forming the 'hid->name' in usb_hid_config() was moved up to accommodate more descriptive printk reporting the fixup. In this patch the quirk is set for one such device: Afatech DVB-T 2 infrared HID-keyboard. It reports value 16 which means 4,069s in highspeed while obviously 16ms was intended. In this case quirk calculates new value to be 8 which gives when interpreted as highspeed value 16ms as wanted. The behavior of the device was verified to be what expected both before and after the patch. Signed-off-by: NPekka Sarnila <sarnila@adit.fi> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 18 3月, 2008 1 次提交
-
-
由 Julia Lawall 提交于
The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) / (d)) but is perhaps more readable. Signed-off-by: NJulia Lawall <julia@diku.dk> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 14 10月, 2007 3 次提交
-
-
由 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: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Kosina 提交于
Add hook in usbhid for write() callback from hidraw. Sends the report to the device through control pipe. Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Oliver Neukum 提交于
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: NOliver Neukum <oneukum@suse.de> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 02 8月, 2007 3 次提交
-
-
由 Jiri Kosina 提交于
We can't call hid_free_buffers() when the underlying usbhid_device has already been freed. Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Kosina 提交于
Add forgotten freeing of usbhid_device structure. Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jesper Juhl 提交于
If, in usb_hid_configure(), we fail to allocate storage for 'usbhid', "if (!(usbhid = kzalloc(sizeof(struct usbhid_device), GFP_KERNEL)))", then we'll jump to the 'fail:' label where we have this code: usb_free_urb(usbhid->urbin); usb_free_urb(usbhid->urbout); usb_free_urb(usbhid->urbctrl); Since we got here because we couldn't allocate storage for 'usbhid', what we have here is a NULL pointer dereference - ouch... This patch solves that little problem by adding a new 'fail_no_usbhid:' label after the problematic calls to usb_free_urb() and jumps to that one instead, in the problem case. Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 13 7月, 2007 2 次提交
-
-
由 Alan Stern 提交于
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: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NJiri Kosina <jkosina@suse.cz> CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 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: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 09 7月, 2007 4 次提交
-
-
由 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: NJiri Kosina <jkosina@suse.cz>
-
由 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=enSigned-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Alan Stern 提交于
This patch (as914) replaces a call to flush_scheduled_work() with cancel_work_sync(), in order to help avoid potential deadlocks. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Kosina 提交于
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: NJiri Kosina <jkosina@suse.cz>
-
- 09 5月, 2007 3 次提交
-
-
由 Dmitry Torokhov 提交于
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: NDmitry Torokhov <dtor@mail.ru> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Dmitry Torokhov 提交于
usb_buffer_free() now handles NULLs so remove unneeded checks form callers. Signed-off-by: NDmitry Torokhov <dtor@mail.ru> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Kosina 提交于
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: NBret Towe <magnade@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 19 4月, 2007 2 次提交
-
-
由 Paul Walmsley 提交于
Add a 'quirks' module parameter for the usbhid module, so users can add or modify quirks at module load time. Signed-off-by: NPaul Walmsley <paul@booyaka.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Paul Walmsley 提交于
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: NPaul Walmsley <paul@booyaka.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 18 4月, 2007 1 次提交
-
-
由 Paul Zaremba 提交于
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: NPaul Zaremba <pez-gpg@treeofice.net> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 16 4月, 2007 1 次提交
-
-
由 Jiri Kosina 提交于
Updates Copyright and DRIVER_AUTHOR in HID and USB HID sources. Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 11 4月, 2007 9 次提交
-
-
由 Sam Liddicott 提交于
This adds support for WiseGroup Quad Joypad (0x0925/0x8800). The same quirks as for Dual Joypad (0x0925/0x8866) are needed. Signed-off-by: NSam Liddicott <sam@liddicott.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Pete Zaitcev 提交于
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: NPete Zaitcev <zaitcev@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Kosina 提交于
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: NJiri Kosina <jkosina@suse.cz>
-
由 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: NJiri Kosina <jkosina@suse.cz>
-
由 Daniel P. Engel 提交于
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: NDaniel P. Engel <dengel@sourceharvest.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Paul Walmsley 提交于
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: NPaul Walmsley <paul@booyaka.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Alan Stern 提交于
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: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Kosina 提交于
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: NJiri Kosina <jkosina@suse.cz>
-
由 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: NJiri Kosina <jkosina@suse.cz> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 02 3月, 2007 1 次提交
-
-
由 Robert Marquardt 提交于
Put all Code Mercenaries (VID 0x07c0) IOWarriors (PIDs 0x1500 to 0x15ff) on the HID blacklist. The range of PIDs has been reserved for IOWarriors. Only 5 PIDs are really used yet. Signed-off-by: NRobert Marquardt <marquardt@codemercs.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 01 3月, 2007 4 次提交
-
-
由 Jiri Kosina 提交于
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 35068976 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: NJiri Kosina <jkosina@suse.cz>
-
由 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: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Kosina 提交于
Report descriptor should be output when CONFIG_HID_DEBUG is defined. This also mitigates the need for DEBUG and DEBUG_DATA defines, so let's remove them. Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Julien BLACHE 提交于
The USB vendor and product IDs are not byteswapped appropriately, and thus come out in the wrong endianness when fetched through the evdev using ioctl() on big endian platforms. Signed-off-by: NJulien BLACHE <jb@jblache.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-