- 16 3月, 2009 1 次提交
-
-
由 Jonathan Corbet 提交于
Most fasync implementations do something like: return fasync_helper(...); But fasync_helper() will return a positive value at times - a feature used in at least one place. Thus, a number of other drivers do: err = fasync_helper(...); if (err < 0) return err; return 0; In the interests of consistency and more concise code, it makes sense to map positive return values onto zero where ->fasync() is called. Cc: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: NJonathan Corbet <corbet@lwn.net>
-
- 11 3月, 2009 2 次提交
-
-
由 Johannes Weiner 提交于
DECLARE_WAITQUEUE doesn't initialize the wait descriptor's task_list to 'empty' but to zero. prepare_to_wait() will not enqueue the descriptor to the waitqueue and finish_wait() will do list_del_init() on a list head that contains NULL pointers, which oopses. This was introduced by 07903407 "HID: hiddev cleanup -- handle all error conditions properly". The prior code used an unconditional add_to_waitqueue() which didn't care about the wait descriptor's list head and enqueued the thing unconditionally. The new code uses prepare_to_wait() which DOES check the prior list state, so use DEFINE_WAIT instead. Signed-off-by: NJohannes Weiner <hannes@cmpxchg.org> Cc: Oliver Neukum <oliver@neukum.name> Cc: Jiri Kosina <jkosina@suse.cz> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Johannes Weiner 提交于
If hiddev_open() fails, it wrongly frees the shared hiddev structure kept in hiddev_table instead of the hiddev_list structure allocated for the opened file descriptor. Existing references to this structure will then accessed free memory. This was introduced by 07903407 "HID: hiddev cleanup -- handle all error conditions properly". Signed-off-by: NJohannes Weiner <hannes@cmpxchg.org> Cc: Oliver Neukum <oliver@neukum.name> Cc: Jiri Kosina <jkosina@suse.cz> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 17 2月, 2009 3 次提交
-
-
由 Anssi Hannula 提交于
The devices handled by hid-tmff and hid-zpff were added in the hid_ignore_list[] instead of hid_blacklist[] in hid-core.c, thus disabling them completely. hid_ignore_list[] causes hid layer to skip the device, while hid_blacklist[] indicates there is a specific driver in hid bus. Re-enable the devices by moving them to the correct list. Signed-off-by: NAnssi Hannula <anssi.hannula@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Dan Carpenter 提交于
We can't return immediately because lock_kernel() is held. Signed-off-by: NDan Carpenter <error27@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Michael Tokarev 提交于
For quite some time users with various UPSes from Powercom were forced to play magic with bind/unbind in /sys in order to be able to see the UPSes. The beasts does not work as HID devices, even if claims to do so. cypress_m8 driver works with the devices instead, creating a normal serial port with which normal UPS controlling software works. The manufacturer confirmed the upcoming models with proper HID support will have different device IDs. In any way, it's wrong to have two completely different modules for one device in kernel. Blacklist the device in HID (add it to hid_ignore_list) to stop this mess, finally. Signed-off-By: NMichael Tokarev <mjt@tls.msk.ru> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 29 1月, 2009 4 次提交
-
-
由 Jiri Kosina 提交于
Many people get it wrong and add device IDs into hid_blacklist instead of hid_ignore_list. Let's put a little comment in place. Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jarod Wilson 提交于
hid_ignore_list additions for the Antec-branded SoundGraph iMon VFD and LCD devices (0x15c2:0x0044 and 0x0045). These devices are driven by lirc. Signed-off-by: NJarod Wilson <jarod@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Oliver Neukum 提交于
The logic for testing for disconnection is reversed in an ioctl leading to false reports of disconnection. Signed-off-by: NOliver Neukum <oneukum@suse.de> Tested-by: NFolkert van Heusden <folkert@vanheusden.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Kosina 提交于
Report descriptor fixup for MS 1028 receiver changes also values for Keyboard and Consumer, which incorrectly trims the range, causing correct events being thrown away before passing to userspace. We need to keep the GenDesk usage fixup though, as it reports totally bogus values about axis. Reported-by: NLucas Gadani <lgadani@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 08 1月, 2009 2 次提交
-
-
由 Jiri Kosina 提交于
Commit 07903407 ("HID: hiddev cleanup -- handle all error conditions properly") by mistake removed proper initialization of hid->hiddev pointer in hiddev_connect() in case usb_register_dev() succeeds for the hiddev node. Put it properly back in place. Reported-and-tested-by: NGabriel C <nix.or.die@googlemail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Alan Stern 提交于
This patch (as1161) changes the interface to usb_lock_device_for_reset(). The existing interface is apparently not very clear, judging from the fact that several of its callers don't use it correctly. The new interface always returns 0 for success and it always requires the caller to unlock the device afterward. The new routine will not return immediately if it is called while the driver's probe method is running. Instead it will wait until the probe is over and the device has been unlocked. This shouldn't cause any problems; I don't know of any cases where drivers call usb_lock_device_for_reset() during probe. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Cc: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 04 1月, 2009 21 次提交
-
-
由 Jiri Kosina 提交于
sony_set_operational() only propagates return value from usb_control_msg(), which returns negative on error and number of transferred bytes otherwise. Reported-by: NMarcin Tolysz <tolysz@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Oliver Neukum 提交于
The hidraw subsystem has a bug that prevents the close syscall from ever reaching the low level driver, leading to a resource leak. Fix by replacing postdecrement with predecrement. Signed-off-by: NOliver Neukum <oneukum@suse.de> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Matt Helsley 提交于
The Genius PenSketch 12x9 tablet has a puck (labeled a "Tablet Mouse") in addition to a pen. Without registering a quirk the tablet appears to be a single input device that reports the wrong axis information in /proc/bus/input/devices, and sends incorrect events (e.g. ABS_Z instead of ABS_Y). This information confuses the X evdev driver and makes the device impossible to use. The quirk fixes events and splits the device into multiple input event devices so that at least the puck is useful. Signed-off-by: NMatt Helsley <matt.helsley@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Alexey Klimov 提交于
This device is already handled by radio-si470x driver, and we therefore want usbhid to ignore it. Patch places usb ids of that device in ignore section of hid-core.c Signed-off-by: NAlexey Klimov <klimov.linux@gmail.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Kosina 提交于
Make default setting for TopSpeed driver compliant with the defaults of the other specialized HID drivers. Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Lev Babiev 提交于
I recently picked up a Cyberlink branded remote control produced by TopSeed Tech Corp. Alas, it appears that this device is using non-standard mappings for some of it's keys (Usage page 0xffbc). Signed-off-by: NLev Babiev <harley@hosers.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Parag Warudkar 提交于
The usbmouse and usbkbd modules are not supposed to be used with regular USB mice and keyboards. Make them depend on EMBEDDED to prevent them from being built and loaded on non-EMBEDDED configs. Signed-off-by: NParag Warudkar <parag.lkml@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Oliver Neukum 提交于
This is a cleanup of hiddev and fixes the following issues: - thread safety by locking in read & ioctl, introducing a per device mutex - race between ioctl and disconnect, introducing a flag and locking in form of a per low level device mutex - race between open and other methods, making sure only successfully opened devices are put on the list, changing order of events - range checking both upper and lower limits of the minor range - make sure further calls to open fail for unplugged devices even if the device still has opened files - error checking for low level open - possible loss of wakeup events, using standard waiting macros - race in initialisation by moving registration after full initialisation Signed-off-by: NOliver Neukum <oneukum@suse.de> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Lukasz Lubojanski 提交于
I have implemented Force Feedback driver for another "GreeAsia" based device (0e8f:0012 "GreenAsia Inc. USB Joystick"). The functionality was tested with MANTA Warior MM816 and SpeedLink Strike2 SL-6635 and fftest software - everything seems to work right. Signed-off-by: NLukasz Lubojanski <lukasz@lubojanski.info> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 David Brownell 提交于
Fix the obnoxious "default y" for all the "special" HID code, which forces folk with EMBEDDED defined to manually override that inappropriate default for almost 20 choices. The general policy is against "default y"; it should apply here too. Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Kosina 提交于
We need to properly set parent of the hidraw device (which is the corresponding physical device itself) in order to hidraw devices not end up under virtual device tree. Reported-by: NKay Sievers <kay.sievers@vrfy.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Slaby 提交于
Allow adding new devices to the hid drivers on the fly without a need of kernel recompilation. Now, one can test a driver e.g. by: echo 0003:045E:00F0.0003 > ../generic-usb/unbind echo 0003 045E 00F0 > new_id from some driver subdir. Signed-off-by: NJiri Slaby <jirislaby@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Slaby 提交于
We might sleep, so no problem to use GFP_KERNEL. While at it bring the function to coding style. Signed-off-by: NJiri Slaby <jirislaby@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Slaby 提交于
Use usb_endpoint_xfer_int() instead of direct use of constants. Signed-off-by: NJiri Slaby <jirislaby@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Slaby 提交于
Move usbhid specific flags from global hid.h into local usbhid.h. Signed-off-by: NJiri Slaby <jirislaby@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Rafi Rubin 提交于
Added quirks for the N-Trig digitizer. Signed-off-by: NRafi Rubin <rafi@seas.upenn.edu> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Kosina 提交于
The hiddev interface provides ioctl() calls which can be used to obtain phys and raw name of the underlying device. Add the corresponding support also into hidraw. Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Kay Sievers 提交于
This patch is part of a larger patch series which will remove the "char bus_id[20]" name string from struct device. The device name is managed in the kobject anyway, and without any size limitation, and just needlessly copied into "struct device". To set and read the device name dev_name(dev) and dev_set_name(dev) must be used. If your code uses static kobjects, which it shouldn't do, "const char *init_name" can be used to statically provide the name the registered device should have. At registration time, the init_name field is cleared, to enforce the use of dev_name(dev) to access the device name at a later time. We need to get rid of all occurrences of bus_id in the entire tree to be able to enable the new interface. Please apply this patch, and possibly convert any remaining remaining occurrences of bus_id. We want to submit a patch to -next, which will remove bus_id from "struct device", to find the remaining pieces to convert, and finally switch over to the new api, which will remove the 20 bytes array and does no longer have a size limitation. CC: Jiri Kosina <jkosina@suse.cz> Acked-by: NGreg Kroah-Hartman <gregkh@suse.de> Signed-off-by: NKay Sievers <kay.sievers@vrfy.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Alan Stern 提交于
This patch (as1146c) makes usbhid automatically call usbhid_set_leds() for any device that supports the keyboard boot protocol. In theory this should be perfectly safe. BIOSes send the LED output report as part of their normal device initialization, so any keyboard device supporting the boot protocol has to be able to handle it. As a side effect, the hid-dell and hid-bright drivers are no longer needed, and the Logitech keyboard driver can be removed from hid-lg. CC: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Kosina 提交于
When computing the maximal buffer size needed, we must take into account that not only input reports can be numbered. Pointed out in bugzilla #10467 Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Kosina 提交于
The mouse interface on unibody macbooks is going to be handled by bcm59743 driver in 2.6.29. Reported-by: NHenrik Rydberg <rydberg@euromail.se> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 28 11月, 2008 1 次提交
-
-
由 Jan Scholz 提交于
While parsing 'hid_blacklist' in the apple alu wireless keyboard is not found. This happens because in the blacklist it is declared with HID_USB_DEVICE although the keyboards are really bluetooth devices. The same holds for 'apple_devices' list. This patch fixes it by changing HID_USB_DEVICE to HID_BLUETOOTH_DEVICE in those two lists. Signed-off-by: NJan Scholz <Scholz@fias.uni-frankfurt.de> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 23 11月, 2008 1 次提交
-
-
由 Jiri Slaby 提交于
It causes recursive locking warning and is unneeded after introduction of STARTED flag. * Resume vs. stop is effectively solved by DISCONNECT flag. * No problem in suspend vs. start -- urb is submitted even after open which is possible after connect which is called after start. * Resume vs. start solved by STARTED flag. * Suspend vs. stop -- no problem in killing urb and timer twice. Reported-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NJiri Slaby <jirislaby@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 20 11月, 2008 2 次提交
-
-
由 Jiri Kosina 提交于
0x0810/0x0002 needs the very same handling as 0x0001. Reported-by: NSteve Conklin <sconklin@canonical.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Kosina 提交于
In commit a96d6ef3, the mouse interfaces on the unibody macbooks were put into hid mouse ignore list. This was a little bit too premature though, as the corresponding bcm5974 changes are scheduled for 2.6.29. Remove these devices from the ignore list for now, in order to provide at least basic functionality with the HID driver. Will be reintroduced in 2.6.29 Reported-by: NHenrik Rydberg <rydberg@euromail.se> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 17 11月, 2008 1 次提交
-
-
由 Jiri Kosina 提交于
Fix misplaced quirk entries for devices driven by hid-pl driver. The devices shouls be only blacklisted by generic HID driver, not completely ignored. Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 14 11月, 2008 1 次提交
-
-
由 Jiri Slaby 提交于
Some devices have no input interrupt endpoint. These won't be handled by usbhid, but currently they are not refused and reside on hid bus. Perform this checking earlier so that we refuse to control such a device early enough (and not pass it to the hid bus at all). Signed-off-by: NJiri Slaby <jirislaby@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 13 11月, 2008 1 次提交
-
-
由 Alexey Klimov 提交于
This patch fixes radio-mr800 hidqurks. Removes it from blacklist entry and places it in ignore entry in hid/hid-core.c Signed-off-by: NAlexey Klimov <klimov.linux@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-