- 19 4月, 2010 1 次提交
-
-
由 Bastien Nocera 提交于
Add two quirks to make it possible for usbhid module options to override whether a device is ignored (HID_QUIRK_NO_IGNORE) and whether to connect a hiddev device (HID_QUIRK_HIDDEV_FORCE). Passing HID_QUIRK_NO_IGNORE for your device means that it will not be ignored by the HID layer, even if present in a blacklist. HID_QUIRK_HIDDEV_FORCE will force the creation of a hiddev for that device, making it accessible from user-space. Tested with an Apple IR Receiver, switching it from using appleir to using lirc's macmini driver. Signed-off-by: NBastien Nocera <hadess@hadess.net> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 03 4月, 2010 1 次提交
-
-
由 Alan Stern 提交于
This patch (as1365) enables remote wakeup by default for USB keyboard devices. Keyboards in general are supposed to be wakeup devices, but the correct place to enable it depends on the device's bus; no single approach will work for all keyboard devices. In particular, this covers only USB keyboards (and then only those supporting the boot protocol). Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 17 2月, 2010 1 次提交
-
-
由 Jiri Kosina 提交于
Move the initialization of USB interface pointers from _start() over to _probe() callback, which is where it belongs. This fixes case where interface is NULL when parsing of report descriptor fails. LKML-Reference: <20100213135720.603e5f64@neptune.home> Reported-by: NAlan Stern <stern@rowland.harvard.edu> Tested-by: NBruno Prémont <bonbons@linux-vserver.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 12 2月, 2010 1 次提交
-
-
由 Oliver Neukum 提交于
Some devices do not react to a control request (seen on APC UPS's) resulting in a slow stream of messages, "generic-usb ... control queue full". Therefore request needs a timeout. Cc: stable@kernel.org Signed-off-by: NOliver Neukum <oliver@neukum.org> Signed-off-by: NDavid Fries <david@fries.net> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 03 2月, 2010 2 次提交
-
-
由 Jiri Kosina 提交于
In commit 2da31939 ("Bluetooth: Implement raw output support for HIDP layer"), support for Bluetooth hid_output_raw_report was added, but it pushes the data to the intr socket instead of the ctrl one. This has been fixed by 6bf8268f ("Bluetooth: Use the control channel for raw HID reports") Still, it is necessary to distinguish whether the report in question should be either FEATURE or OUTPUT. For this, we have to extend the generic HID API, so that hid_output_raw_report() callback provides means to specify this value so that it can be passed down to lower level hardware drivers (currently Bluetooth and USB). Based on original patch by Bastien Nocera <hadess@hadess.net> Acked-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Kosina 提交于
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 12 1月, 2010 1 次提交
-
-
由 Márton Németh 提交于
The id_table field of the struct usb_device_id is constant in <linux/usb.h> so it is worth to make the initialization data also constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ disable decl_init,const_decl_init; identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // </smpl> Signed-off-by: NMárton Németh <nm127@freemail.hu> Cc: Julia Lawall <julia@diku.dk> Cc: cocci@diku.dk Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 12 12月, 2009 1 次提交
-
-
由 Alan Stern 提交于
This patch (as1302) removes the auto_pm flag from struct usb_device. The flag's only purpose was to distinguish between autosuspends and external suspends, but that information is now available in the pm_message_t argument passed to suspend methods. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 05 11月, 2009 1 次提交
-
-
由 Jiri Kosina 提交于
NCR devices are terminally broken by design -- they claim themselves to contain proper input applications in their HID report descriptor, but behave very badly if treated in standard way. According to NCR developers, the devices get confused when queried for reports in a standard way, rendering them unusable. NCR is shipping application called "RPSL" that can be used to drive these devices through hiddev, under the assumption that in-kernel driver doesn't perform initial report query. If it does, neither in-kernel nor hiddev-based driver can operate with these devices any more. Introduce a quirk that skips the report query for all NCR devices. The previous NOGET quirk was wrong and had been introduced because I misunderstood the nature of brokenness of these devices. Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 14 10月, 2009 2 次提交
-
-
由 Jiri Kosina 提交于
DRIVER_VERSION has no use whatosoever, it has been set to "2.6" for ages. Remove it. Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Kosina 提交于
Remove unused (in usbhid module) DRIVER_AUTHOR macrco and properly use multiple MODULE_AUTHOR() instances in both modules. Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 17 9月, 2009 1 次提交
-
-
由 Jiri Kosina 提交于
HID core registers input, hidraw and hiddev devices, but leaves unregistering it up to the individual driver, which is not really nice. Let's move all the logic to the core. Reported-by: NMarcel Holtmann <marcel@holtmann.org> Reported-by: NBrian Rogers <brian@xyzw.org> Acked-by: NMarcel Holtmann <marcel@holtmann.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 18 8月, 2009 1 次提交
-
-
由 H Hartley Sweeten 提交于
__usbhid_submit_report() is a local function wrapped by the exported symbol usbhid_submit_report(). As such, it should be static. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Jiri Kosina <jkosina@suse.cz> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 23 7月, 2009 1 次提交
-
-
由 Sergey Senozhatsky 提交于
Avoid double spin_lock_init on usbhid->lock. Signed-off-by: NSergey Senozhatsky <sergey.senozhatsky@mail.by> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 13 7月, 2009 1 次提交
-
-
由 Alexey Dobriyan 提交于
* Remove smp_lock.h from files which don't need it (including some headers!) * Add smp_lock.h to files which do need it * Make smp_lock.h include conditional in hardirq.h It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT This will make hardirq.h inclusion cheaper for every PREEMPT=n config (which includes allmodconfig/allyesconfig, BTW) Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 12 6月, 2009 1 次提交
-
-
由 Jiri Kosina 提交于
It is a little bit inconvenient for people who have some non-standard HID hardware (usually violating the HID specification) to have to recompile kernel with CONFIG_HID_DEBUG to be able to see kernel's perspective of the HID report descriptor and observe the parsed events. Plus the messages are then mixed up inconveniently with the rest of the dmesg stuff. This patch implements /sys/kernel/debug/hid/<device>/rdesc file, which represents the kernel's view of report descriptor (both the raw report descriptor data and parsed contents). With all the device-specific debug data being available through debugfs, there is no need for keeping CONFIG_HID_DEBUG, as the 'debug' parameter to the hid module will now only output only driver-specific debugging options, which has absolutely minimal memory footprint, just a few error messages and one global flag (hid_debug). We use the current set of output formatting functions. The ones that need to be used both for one-shot rdesc seq_file and also for continuous flow of data (individual reports, as being sent by the device) distinguish according to the passed seq_file parameter, and if it is NULL, it still output to kernel ringbuffer, otherwise the corresponding seq_file is used for output. The format of the output is preserved. Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 04 6月, 2009 1 次提交
-
-
由 Jiri Kosina 提交于
No more reinitialization is needed in the post reset hook, remove the FIXME comment. While at it, clean up whitespaces in the immediate surrounding. Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 11 5月, 2009 1 次提交
-
-
由 Zoltan Karcagi 提交于
Device-specific quirks are set up correctly in their respective vendor-specific driver, then get overwritten in usbhid_parse(). This is only issue for device-specific NOGET quirks being set by driver for a few devices out there. Signed-off-by: NZoltan Karcagi <zkr@freemail.hu> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 29 4月, 2009 1 次提交
-
-
由 Oliver Neukum 提交于
This patch switches usbhid_close() from flush_scheduled_work() to canceling the outstanding work. This fixes a possible deadlock due to work taking the mutex usbhid_close() holds. Lockdep reported the problem. Signed-off-by: NOliver Neukum <oliver@neukum.org> -- Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 30 3月, 2009 1 次提交
-
-
由 Jiri Kosina 提交于
When hid quirks were converted to specialized driver, the HID_QUIRK_IGNORE has been moved completely, as the hid_ignore_list[] has been moved into the generic code. However userspace already got used to the possibility that modprobing usbhid with 'quirks=vid:pid:0x4' makes the device ignored by usbhid driver. So keep this quirk flag in place for backwards compatibility. Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 26 3月, 2009 5 次提交
-
-
由 Oliver Neukum 提交于
This fixes a use of flush_scheduled_work() in USB HID's reset logic that can deadlock. Tested-by: NValdis Kletniks <Valdis.Kletnieks@vt.edu> Signed-off-by: NOliver Neukum <oliver@neukum.name> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Kosina 提交于
There is no point of having hid_reset_resume() when CONFIG_PM is not set, and even the corresponding .reset_resume pointer in hid_driver struct is properly ifdefed. Move the definition into the ifdef CONFIG_PM part of the source to avoid drivers/hid/usbhid/hid-core.c:1337: warning: 'hid_reset_resume' defined but not used Reported-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Oliver Neukum 提交于
This patch fixes a bug caused by reset_resume not changing the internal status flags for a device that is resumed via reset_resume. To do so the reset handlers, which correctly assume that a device is awake, can no longer do all the work of reset_resume handling. Signed-off-by: NOliver Neukum <oneukum@suse.de> Tested-by: NLaurent Riffard <laurent.riffard@free.fr> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Kosina 提交于
Fixes this build breakage in case when CONFIG_PM is not set drivers/hid/usbhid/hid-core.c: In function 'hid_suspend': drivers/hid/usbhid/hid-core.c:1220: error: 'struct usb_device' has no member named 'auto_pm' drivers/hid/usbhid/hid-core.c:1245: error: 'struct usb_device' has no member named 'auto_pm' drivers/hid/usbhid/hid-core.c:1258: error: 'struct usb_device' has no member named 'auto_pm' by throwing both the hid_suspend() and hid_resume() away completely in such case, as they won't be used anyway. Reported-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Oliver Neukum 提交于
This uses the USB busy mechanism for aggessive autosuspend of USB HID devices. It autosuspends all opened devices supporting remote wakeup after a timeout unless - output is being done to the device - a key is being held down (remote wakeup isn't triggered upon key release) - LED(s) are lit - hiddev is opened As in the current driver closed devices will be autosuspended even if they don't support remote wakeup. The patch is quite large because output to devices is done in hard interrupt context meaning a lot a queuing and locking had to be touched. The LED stuff has been solved by means of a simple counter. Additions to the generic HID code could be avoided. In addition it now covers hidraw. It contains an embryonic version of an API to let the generic HID code tell the lower levels which capabilities with respect to power management are needed. Signed-off-by: NOliver Neukum <oneukum@suse.de> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 08 1月, 2009 1 次提交
-
-
由 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 4 次提交
-
-
由 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>
-
由 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>
-
- 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>
-
- 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 次提交
-
-
由 Jiri Slaby 提交于
`stop' left out usbhid->urb* pointers and so the next `start' thought it needs to allocate nothing and used the memory pointers previously pointed to. This led to memory corruption and device malfunction. Also don't forget to clear disconnect flag on start which was left set by the previous `stop'. This fixes echo DEVICE > /sys/bus/hid/drivers/DRIVER/unbind echo DEVICE > /sys/bus/hid/drivers/DRIVER/bind failures. Signed-off-by: NJiri Slaby <jirislaby@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 27 10月, 2008 2 次提交
-
-
由 Jiri Slaby 提交于
When suspending, make sure that the timer is not running any more. Signed-off-by: NJiri Slaby <jirislaby@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Slaby 提交于
Usbhid structure is allocated on start invoked only from probe of some driver. When there is no driver, the structure is null and causes null-dereference oopses. Fix it by allocating the structure on probe and disconnect of the device itself. Also make sure we won't race between start and resume or stop and suspend respectively. References: http://bugzilla.kernel.org/show_bug.cgi?id=11827Signed-off-by: NJiri Slaby <jirislaby@gmail.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Andreas Schwab <schwab@suse.de> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 22 10月, 2008 1 次提交
-
-
由 Jiri Slaby 提交于
Add type to the hid structure to distinguish to which device type (now only mouse) we are talking to. Needed for per device type ignore list support. Note: this patch leaves the type as unknown for bluetooth devices, there is not support for this in the hidp code. Signed-off-by: NJiri Slaby <jirislaby@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 18 10月, 2008 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
There were two stragglers that got missed in the last merge of the HID tree that forgot to change the warn() calls to dev_warn(). This patch fixes them up. Acked-by: NJiri Kosina <jkosina@suse.cz> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 15 10月, 2008 3 次提交
-
-
由 From: Greg Kroah-Hartman 提交于
USB should not be having it's own printk macros, so remove warn() and use the system-wide standard of dev_warn() wherever possible. In the few places that will not work out, use a basic printk(). Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Greg Kroah-Hartman 提交于
USB should not be having it's own printk macros, so remove info() and use the system-wide standard of dev_info() wherever possible. Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Anssi Hannula 提交于
Commit 8006479c introduced a spinlock in input_dev->event_lock, which is locked when handling input events. However, the hid-pidff driver sleeps when handling events as it waits for reports being sent to the device before changing the report contents again. This causes a system lockup when trying to use force feedback with a PID device, a regression introduced in 2.6.24 and 2.6.23.15. Fix it by extracting the raw report data from struct hid_report immediately when hid_submit_report() is called, therefore allowing drivers to change the contents of struct hid_report immediately without affecting the already-queued transfer. In hid-pidff, re-add the removed usbhid_wait_io() to pidff_erase_effect() instead, to prevent a full report queue from causing the submission to fail, thus not freeing up device memory. pidff_erase_effect() is not called while dev->event_lock is held. Signed-off-by: NAnssi Hannula <anssi.hannula@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-