- 26 3月, 2009 1 次提交
-
-
由 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>
-
- 17 2月, 2009 1 次提交
-
-
由 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>
-
- 04 1月, 2009 3 次提交
-
-
由 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>
-
由 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 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>
-
- 13 11月, 2008 1 次提交
-
-
由 Oliver Neukum 提交于
As open needs to sleep hidraw was wrong to call it with a spinlock held. Furthermore, open can of course fail which needs to be handled. Signed-off-by: NOliver Neukum <oneukum@suse.de> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 23 10月, 2008 1 次提交
-
-
由 Jiri Slaby 提交于
Add omitted unlock_kernel() to hidraw_ioctl(). Added in 979c407e (HID: Push down BKL into ioctl handler in hidraw). Corresponing sparse warning: drivers/hid/hidraw.c:267:9: warning: context imbalance in 'hidraw_ioctl': wrong count at exit drivers/hid/hidraw.c:267:9: context 'kernel_lock': wanted 0, got 1 Signed-off-by: NJiri Slaby <jirislaby@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 18 10月, 2008 1 次提交
-
-
由 Jiri Slaby 提交于
hidraw_exit() marked as __exit is called from __init function from HID core. Remove the section placement from that function. Reported-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NJiri Slaby <jirislaby@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 17 10月, 2008 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
Now that device_create() has been audited, rename things back to the original call to be sane. Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 15 10月, 2008 2 次提交
-
-
由 Jiri Kosina 提交于
The bound check on the buffer length if (count > HID_MIN_BUFFER_SIZE) is of course incorrent, the proper check is if (count > HID_MAX_BUFFER_SIZE) Fix it. Reported-by: NJerry Ryle <jerry@mindtribe.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jiri Slaby 提交于
Next step for complete hid bus, this patch includes: - call parser either from probe or from hid-core if there is no probe. - add ll_driver structure and centralize some stuff there (open, close...) - split and merge usb_hid_configure and hid_probe into several functions to allow hooks/fixes between them Signed-off-by: NJiri Slaby <jslaby@suse.cz> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 23 7月, 2008 2 次提交
-
-
由 Jiri Kosina 提交于
hidraw_release() forgot to free the linked list structure, causing memory leak. Reported-by: NJuan Marcos Diez Esteban <juan_m_diez@yahoo.es> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Alan Cox 提交于
In this case I simply wrapped it as code review suggests the locking already terminally broken and I didn't want to make it first. See added comment Signed-off-by: NAlan Cox <alan@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 22 7月, 2008 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
device_create() is race-prone, so use the race-free device_create_drvdata() instead as device_create() is going away. Signed-off-by: NJiri Kosina <jkosina@suse.cz> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 21 6月, 2008 1 次提交
-
-
由 Jonathan Corbet 提交于
Signed-off-by: NJonathan Corbet <corbet@lwn.net>
-
- 20 10月, 2007 1 次提交
-
-
由 Pavel Emelyanov 提交于
The task_struct->pid member is going to be deprecated, so start using the helpers (task_pid_nr/task_pid_vnr/task_pid_nr_ns) in the kernel. The first thing to start with is the pid, printed to dmesg - in this case we may safely use task_pid_nr(). Besides, printks produce more (much more) than a half of all the explicit pid usage. [akpm@linux-foundation.org: git-drm went and changed lots of stuff] Signed-off-by: NPavel Emelyanov <xemul@openvz.org> Cc: Dave Airlie <airlied@linux.ie> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 15 10月, 2007 1 次提交
-
-
由 Jiri Kosina 提交于
Fix bogus copying of data into userspace when HIDIOCGRDESC is issued. HID-transport layer makes sure that dev->hid->rdesc is not larger than HID_MAX_DESCRIPTOR_SIZE. Noticed-by: NAl Viro <viro@ftp.linux.org.uk> Signed-off-by: NJiri Kosina <jkosina@suse.cz> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 14 10月, 2007 2 次提交
-
-
由 Mariusz Kozlowski 提交于
It looks like hidraw_connect() is leaking memory in case of failure. Also it should return -ENOMEM when kzalloc fails. Signed-off-by: NMariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 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>
-