14 Oct, 2009
1 commit
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: fix possible deadlock in hidraw_read
HID: fix kerneldoc comment for hid_input_report()
HID: add __init/__exit macros to twinhan.c
12 Oct, 2009
1 commit
-
If the loop in hidraw_read() loops more than once, then we might
end up trying to acquire already locked mutex, casuing a deadlock.Reported-by: iceberg
Signed-off-by: Jiri Kosina
05 Oct, 2009
1 commit
-
Signed-off-by: Alexey Dobriyan
Signed-off-by: Linus Torvalds
01 Oct, 2009
1 commit
-
The kerneldoc comment for 'interrupt' has already confused a lot
of people, as it is simply wrong. It doesn't carry the information
about the context, but is used to distinguish between two fundamental
types of low-level transport transfers -- interrupt vs. control.Make this clear in the comment.
Signed-off-by: Jiri Kosina
29 Sep, 2009
1 commit
-
Trivial patch which adds the __init/__exit macros to the module_init/
module_exit functions of the twinhan driver in hid.Signed-off-by: Peter Huewe
Signed-off-by: Jiri Kosina
22 Sep, 2009
1 commit
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: Remove duplicate Kconfig entry
HID: consolidate connect and disconnect into core code
HID: fix non-atomic allocation in hid_input_report
20 Sep, 2009
1 commit
-
This allows subsytems to provide devtmpfs with non-default permissions
for the device node. Instead of the default mode of 0600, null, zero,
random, urandom, full, tty, ptmx now have a mode of 0666, which allows
non-privileged processes to access standard device nodes in case no
other userspace process applies the expected permissions.This also fixes a wrong assignment in pktcdvd and a checkpatch.pl complain.
Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
17 Sep, 2009
2 commits
-
Signed-off-by: Alessandro Guido
Signed-off-by: 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: Marcel Holtmann
Reported-by: Brian Rogers
Acked-by: Marcel Holtmann
Signed-off-by: Jiri Kosina
15 Sep, 2009
1 commit
-
'interrupt' variable can't be used to safely determine whether
we are running in atomic context or not, as we might be called from
during control transfer completion through hid_ctrl() in atomic
context with interrupt == 0.Reported-by: Jens Axboe
Signed-off-by: Jiri Kosina
14 Sep, 2009
1 commit
26 Aug, 2009
1 commit
-
Commit fa047e4f6fa63a6e9d0ae4d7749538830d14a343 "HID: fix inverted
wheel for bluetooth version of apple mighty mouse" is incomplete. If
we remove Apple MightyMouse (bluetooth version) from the list of
apple_devices in drivers/hid/hid-apple.c we have to remove it from
hid_blacklist in drivers/hid/hid-core.c as well.Signed-off-by: Jan Scholz
Signed-off-by: Jiri Kosina
20 Aug, 2009
1 commit
-
hiddev userspace driver uses a rignbuffer to store the parsed usages
that should be returned through read(). This buffer is 64 bytes long,
which is sufficient for queueing single USB 1.0 low-speed report, which
is of maximum size 48 bytes.There are however USB HID devices which are full-speed USB devices, and
therefore they are free to produce reports 64 bytes long. This is correctly
handled by HID core, but read() on hiddev node gets stuck forever, because
the ring buffer loops infinitely (as it is exactly 64 bytes long as well),
never advancing the buffer pointer.Plus, the core driver is ready to handle highspeed devices, so we should be
able to handle reports from such devices in the hiddev driver as well, which
means we need larger ringbuffer.Reported-by: Michael Zeisel
Signed-off-by: Jiri Kosina
18 Aug, 2009
1 commit
-
__usbhid_submit_report() is a local function wrapped by the exported
symbol usbhid_submit_report(). As such, it should be static.Signed-off-by: H Hartley Sweeten
Cc: Jiri Kosina
Signed-off-by: Jiri Kosina
08 Aug, 2009
4 commits
-
This usb device claims to be of HID class, but is in fact a 802.15.4
lowpan transceiver, therefore the generic HID driver cannot operate this
device. A separate driver for this device will be written for this using
the new 802.15.4 stack.Signed-off-by: Henning Glawe
Signed-off-by: Jiri Kosina -
After some inspection of the Windows iMON driver, several additional
device IDs were added to the lirc_imon driver. At least a few of these
have been seen in the wild, and require manual quirking to keep the
usbhid driver from binding to them. Rather than list out every single
device, ignore the entire device ID range, 0x0034 - 0x0046. Some of
these may not advertise themselves as HID devices, but no harm done to
such devices anyway. Does the right thing in brief testing w/my 0x0045
device.Signed-off-by: Jarod Wilson
Acked-by: Anssi Hannula
Signed-off-by: Jiri Kosina -
Error handling code following a kzalloc should free the allocated data.
The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)//
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
}
(
x->f1 = E
|
(x->f1 == NULL || ...)
|
f(...,x->f1,...)
)
...>
(
return \(0\|\|ptr\);
|
return@p2 ...;
)@script:python@
p1 << r.p1;
p2 << r.p2;
@@print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
//Signed-off-by: Julia Lawall
Cc: Jiri Kosina
Signed-off-by: Andrew Morton
Signed-off-by: Jiri Kosina -
Check whether index is within bounds before testing the element.
declared in drivers/hid/usbhid/hid-core.c:62:
static char *quirks_param[MAX_USBHID_BOOT_QUIRKS] = ...Signed-off-by: Roel Kluin
Cc: Jiri Kosina
Signed-off-by: Andrew Morton
Signed-off-by: Jiri Kosina
23 Jul, 2009
9 commits
-
list_entry, which is an alias for container_of, cannot return NULL, as
there is no way to add a NULL value to a doubly linked list.A simplified version of the semantic match that findds this problem is as
follows:
(http://www.emn.fr/x-info/coccinelle/)//
@r@
expression x,E;
statement S1,S2;
position p,p1;
@@*x = list_entry@p(...)
... when != x = E
*if@p1 (x == NULL) S1 else S2
//Signed-off-by: Julia Lawall
Signed-off-by: Jiri Kosina -
Add explicit key mappings for TwinHan USB HID remote control.
All dummy Ctrl, Alt, Meta, ... key press/release events generated
by the remote are silenced by "unmapping" them. This makes Power and
Volume keys single-key and strips the regular (even while idle) key
release events for Ctrl, Alt, Meta, ...Signed-off-by: Bruno Premont
Signed-off-by: Jiri Kosina -
Trivial patch which adds the __init and __exit macros to the module_init /
module_exit functions of several HID drivers from drivers/hid/Signed-off-by: Peter Huewe
Signed-off-by: Jiri Kosina -
This patch enables rumble in Thrustmaster Dual 3-in-1 trigger gamepads (in both
PC and PS3 modes). It uses the same code as Thrustmaster FireStorm Dual Power 2,
so it only adds new USB IDs to hid-core.c and hid-tmff.cSigned-off-by: Ruben Aos Garralda
Signed-off-by: Jiri Kosina -
When both touch and pen are active send a tool announcement before
sending any status changes so that event users may differentiate
which tool is changing.Restored three usage codes used by the pen.
Signed-off-by: Rafi Rubin
Acked-by: Stephane Chatty
Signed-off-by: Jiri Kosina -
Avoid double spin_lock_init on usbhid->lock.
Signed-off-by: Sergey Senozhatsky
Signed-off-by: Jiri Kosina -
Add force feedback support for Logitech WingMan Formula Force GP
(0x046d/0xc293).Reported-by: wylda@volny.cz
Tested-by: wylda@volny.cz
Signed-off-by: Jiri Kosina -
This patch extends the existing Samsung IrDA (0419:0001) quirk file with newly
reported variants:* New device variants with 203 byte and 135 byte report descriptors were
reported to be recognized incorrectly. This patch adds an autodetection for
those two, using report descriptor size to enable new quirks.* Any other unknown 0419:0001 variants will now be treated without any quirk
flags (i.e. IGNORE_HIDINPUT/HIDDEV_FORCE will not be set by default anymore).More details:
1. Descriptor size 184 bytes ("Satelco bundled remote")
Already supported since kernel 2.6.25 (my old patch).2. Descriptor size 203 bytes ("Optronix remote")
This receiver mostly works with the regular HID input driver. Only when some
keys are released, another spurious key press event is interpreted due to
incorrect array ranges. According to HID 1.11, section 6.2.2.5, arrays should
return a 0 value when no control is asserted, and ranges should go from 1 to
the number of elements. The patch clips the value with a logical range from
1..15 (instead of originally 0..18).Ticket with more information available at
https://bugs.launchpad.net/bugs/3269863. Descriptor size 135 bytes ("Gotview remote")
This receiver has a similar issue than the previous one, i.e. it mostly works
with regular HID input, except some key press events get stuck on key release.
The patch clips the array value from 1..14 (instead of originally 0..17).Ticket with more information available at
http://bugs.archlinux.org/task/152164. Other unknown variants (found one report with 218 bytes,
but no further information about issues)For such unknown variants we should refrain from changing any device flags.
Currently, HIDINPUT is suppressed and HIDDEV is enforced (because in 2.6.25 the
quirk table did not yet allow differentiating variants and we
did not expect variants either). Now we should be as strict as
possible and enable it only for the first variant above.Signed-off-by: Robert Schedel
Signed-off-by: Jiri Kosina -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: Move dereferences below a NULL test
HID: hiddev, fix lock imbalance
20 Jul, 2009
1 commit
-
If the NULL test is necessary, then the dereferences should be moved below
the NULL test.The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)//
@@
type T;
expression E,E1;
identifier i,fld;
statement S;
@@- T i = E->fld;
+ T i;
... when != E=E1
when != i
if (E == NULL||...) S
+ i = E->fld;
//Signed-off-by: Julia Lawall
Signed-off-by: Jiri Kosina
13 Jul, 2009
1 commit
-
* 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_PREEMPTThis will make hardirq.h inclusion cheaper for every PREEMPT=n config
(which includes allmodconfig/allyesconfig, BTW)Signed-off-by: Alexey Dobriyan
Signed-off-by: Linus Torvalds
26 Jun, 2009
1 commit
-
If hid_get_report() fails, we forgot to free the already allocated buffer
for debugging messages on error path. Fix that up.Signed-off-by: Jiri Kosina
22 Jun, 2009
1 commit
-
Add omitted BKL to one switch/case.
Cc: Stable
Signed-off-by: Jiri Slaby
Signed-off-by: Jiri Kosina
16 Jun, 2009
1 commit
-
This adds support for USB drivers to report their requested nodename to
userspace. It also updates a number of USB drivers to provide the
needed subdirectory and device name to be used for them.Signed-off-by: Kay Sievers
Signed-off-by: Jan Blunck
Signed-off-by: Greg Kroah-Hartman
12 Jun, 2009
3 commits
-
This is a followup patch to the one implemeting rdesc representation in debugfs
rather than being dependent on compile-time CONFIG_HID_DEBUG setting.The API of the appropriate formatting functions is slightly modified -- if
they are passed seq_file pointer, the one-shot output for 'rdesc' file mode
is used, and therefore the message is formatted into the corresponding seq_file
immediately.Otherwise the called function allocated a new buffer, formats the text into the
buffer and returns the pointer to it, so that it can be queued into the ring-buffer
of the processess blocked waiting on input on 'events' file in debugfs.'debug' parameter to the 'hid' module is now used solely for the prupose of inetrnal
driver state debugging (parser, transport, etc).Signed-off-by: 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//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: Jiri Kosina
10 Jun, 2009
1 commit
-
Bluetooth version of Apple Mighty mouse (0x05ac/0x030c) doesn't, according to
multiple reports on linux-input@, need the same quirk as the USB version of
this mouse (0x05ac/0x0304) does.Signed-off-by: Jiri Kosina
04 Jun, 2009
2 commits
-
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: Jiri Kosina
-
hidraw accepts any devices, no matter if the device has
already been claimed by other HID driver (hid-input, hidraw), and
this is intended to stay. Fix up the comment to reflect reality.Signed-off-by: Jiri Kosina
20 May, 2009
2 commits
-
Adds support for multitouch interaction on the N-Trig touchscreen, using the
new ABS_MT_* input constants. Single touch support works as previously. This
code was tested against two versions of the N- Trig firmware: one that supports
dual pen/finger single touch, and one that supports finger multitouch but no
pen at all. Copyright notices that looked wrong were removed, as it seems that
there is only code written in 2009 by Rafin Rubin and Stephane Chatty in this
file.Signed-off-by: Stephane Chatty
Signed-off-by: Jiri Kosina -
Added constants to hid.h for all digitizer usages (including the new multitouch
ones that are not yet in the official USB spec but are being pushed by Microsft
as described in their paper "Digitizer Drivers for Windows Touch and Pen-Based
Computers"). Updated hid-debug.c to support the new MT input constants such as
ABS_MT_POSITION_X.Signed-off-by: Stephane Chatty
Signed-off-by: Jiri Kosina