<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/input, branch v3.2.97</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2.97</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2.97'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2018-01-01T20:50:50Z</updated>
<entry>
<title>Input: uinput - avoid FF flush when destroying device</title>
<updated>2018-01-01T20:50:50Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2017-09-02T00:13:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3eee55582f4b23d2579286c5ba61d82828bd655f'/>
<id>urn:sha1:3eee55582f4b23d2579286c5ba61d82828bd655f</id>
<content type='text'>
commit e8b95728f724797f958912fd9b765a695595d3a6 upstream.

Normally, when input device supporting force feedback effects is being
destroyed, we try to "flush" currently playing effects, so that the
physical device does not continue vibrating (or executing other effects).
Unfortunately this does not work well for uinput as flushing of the effects
deadlocks with the destroy action:

- if device is being destroyed because the file descriptor is being closed,
  then there is noone to even service FF requests;

- if device is being destroyed because userspace sent UI_DEV_DESTROY,
  while theoretically it could be possible to service FF requests,
  userspace is unlikely to do so (they'd need to make sure FF handling
  happens on a separate thread) even if kernel solves the issue with FF
  ioctls deadlocking with UI_DEV_DESTROY ioctl on udev-&gt;mutex.

To avoid lockups like the one below, let's install a custom input device
flush handler, and avoid trying to flush force feedback effects when we
destroying the device, and instead rely on uinput to shut off the device
properly.

NMI watchdog: Watchdog detected hard LOCKUP on cpu 3
...
 &lt;&lt;EOE&gt;&gt;  [&lt;ffffffff817a0307&gt;] _raw_spin_lock_irqsave+0x37/0x40
 [&lt;ffffffff810e633d&gt;] complete+0x1d/0x50
 [&lt;ffffffffa00ba08c&gt;] uinput_request_done+0x3c/0x40 [uinput]
 [&lt;ffffffffa00ba587&gt;] uinput_request_submit.part.7+0x47/0xb0 [uinput]
 [&lt;ffffffffa00bb62b&gt;] uinput_dev_erase_effect+0x5b/0x76 [uinput]
 [&lt;ffffffff815d91ad&gt;] erase_effect+0xad/0xf0
 [&lt;ffffffff815d929d&gt;] flush_effects+0x4d/0x90
 [&lt;ffffffff815d4cc0&gt;] input_flush_device+0x40/0x60
 [&lt;ffffffff815daf1c&gt;] evdev_cleanup+0xac/0xc0
 [&lt;ffffffff815daf5b&gt;] evdev_disconnect+0x2b/0x60
 [&lt;ffffffff815d74ac&gt;] __input_unregister_device+0xac/0x150
 [&lt;ffffffff815d75f7&gt;] input_unregister_device+0x47/0x70
 [&lt;ffffffffa00bac45&gt;] uinput_destroy_device+0xb5/0xc0 [uinput]
 [&lt;ffffffffa00bb2de&gt;] uinput_ioctl_handler.isra.9+0x65e/0x740 [uinput]
 [&lt;ffffffff811231ab&gt;] ? do_futex+0x12b/0xad0
 [&lt;ffffffffa00bb3f8&gt;] uinput_ioctl+0x18/0x20 [uinput]
 [&lt;ffffffff81241248&gt;] do_vfs_ioctl+0x298/0x480
 [&lt;ffffffff81337553&gt;] ? security_file_ioctl+0x43/0x60
 [&lt;ffffffff812414a9&gt;] SyS_ioctl+0x79/0x90
 [&lt;ffffffff817a04ee&gt;] entry_SYSCALL_64_fastpath+0x12/0x71

Reported-by: Rodrigo Rivas Costa &lt;rodrigorivascosta@gmail.com&gt;
Reported-by: Clément VUCHENER &lt;clement.vuchener@gmail.com&gt;
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=193741
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Input: gtco - fix potential out-of-bound access</title>
<updated>2017-11-26T13:51:11Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2017-10-23T23:46:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2de544fd1b16f76f8dd1213d585ce611155ccd34'/>
<id>urn:sha1:2de544fd1b16f76f8dd1213d585ce611155ccd34</id>
<content type='text'>
commit a50829479f58416a013a4ccca791336af3c584c7 upstream.

parse_hid_report_descriptor() has a while (i &lt; length) loop, which
only guarantees that there's at least 1 byte in the buffer, but the
loop body can read multiple bytes which causes out-of-bounds access.

Reported-by: Andrey Konovalov &lt;andreyknvl@google.com&gt;
Reviewed-by: Andrey Konovalov &lt;andreyknvl@google.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
[bwh: Backported to 3.2: use &amp;device-&gt;usbdev-&gt;dev as the device for dev_err()]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Input: i8042 - add Gigabyte P57 to the keyboard reset table</title>
<updated>2017-11-26T13:51:10Z</updated>
<author>
<name>Kai-Heng Feng</name>
<email>kai.heng.feng@canonical.com</email>
</author>
<published>2017-09-15T16:36:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4d9031264bf8c9766b1effbbd81c82e6e29cb48e'/>
<id>urn:sha1:4d9031264bf8c9766b1effbbd81c82e6e29cb48e</id>
<content type='text'>
commit 697c5d8a36768b36729533fb44622b35d56d6ad0 upstream.

Similar to other Gigabyte laptops, the touchpad on P57 requires a
keyboard reset to detect Elantech touchpad correctly.

BugLink: https://bugs.launchpad.net/bugs/1594214
Signed-off-by: Kai-Heng Feng &lt;kai.heng.feng@canonical.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Input: xpad - validate USB endpoint type during probe</title>
<updated>2017-11-26T13:51:09Z</updated>
<author>
<name>Cameron Gutman</name>
<email>aicommander@gmail.com</email>
</author>
<published>2017-09-12T18:27:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d5025b4788cafc54fb0160d9d8a6ff0fd42416f5'/>
<id>urn:sha1:d5025b4788cafc54fb0160d9d8a6ff0fd42416f5</id>
<content type='text'>
commit 122d6a347329818419b032c5a1776e6b3866d9b9 upstream.

We should only see devices with interrupt endpoints. Ignore any other
endpoints that we find, so we don't send try to send them interrupt URBs
and trigger a WARN down in the USB stack.

Reported-by: Andrey Konovalov &lt;andreyknvl@google.com&gt;
Tested-by: Andrey Konovalov &lt;andreyknvl@google.com&gt;
Signed-off-by: Cameron Gutman &lt;aicommander@gmail.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Input: xpad - don't depend on endpoint order</title>
<updated>2017-11-26T13:51:09Z</updated>
<author>
<name>Cameron Gutman</name>
<email>aicommander@gmail.com</email>
</author>
<published>2017-01-04T06:40:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c59778f2b745d3dd5ce497d200ebdc303eaaabf6'/>
<id>urn:sha1:c59778f2b745d3dd5ce497d200ebdc303eaaabf6</id>
<content type='text'>
commit c01b5e7464f0cf20936d7467c7528163c4e2782d upstream.

The order of endpoints is well defined on official Xbox pads, but
we have found at least one 3rd-party pad that doesn't follow the
standard ("Titanfall 2 Xbox One controller" 0e6f:0165).

Fortunately, we get lucky with this specific pad because it uses
endpoint addresses that differ only by direction. We know that
there are other pads out where this is not true, so let's go
ahead and fix this.

Signed-off-by: Cameron Gutman &lt;aicommander@gmail.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
[bwh: Backported to 3.2:
 - Use 'fail3' label in case of failure
 - Adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Input: xpad - add support for Xbox One controllers</title>
<updated>2017-11-26T13:51:08Z</updated>
<author>
<name>Ted Mielczarek</name>
<email>ted@mielczarek.org</email>
</author>
<published>2014-08-08T18:21:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8e6535216c719085f1eea7a61c7512339f79a8fc'/>
<id>urn:sha1:8e6535216c719085f1eea7a61c7512339f79a8fc</id>
<content type='text'>
commit 1a48ff81b3912be5fadae3fafde6c2f632246a4c upstream.

Xbox One controllers require an initialization message to start sending
data, so xpad_init_output becomes a required function. The Xbox One
controller does not have LEDs like the Xbox 360 controller, so that
functionality is not implemented. The format of messages controlling rumble
is currently undocumented, so rumble support is not yet implemented.

Note that Xbox One controller advertises three interfaces with the same
interface class, subclass and protocol, so we have to also match against
interface number.

Signed-off-by: Ted Mielczarek &lt;ted@mielczarek.org&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Input: xpad - add a few new VID/PID combinations</title>
<updated>2017-11-26T13:51:08Z</updated>
<author>
<name>Guillermo A. Amaral</name>
<email>g@maral.me</email>
</author>
<published>2012-12-03T07:26:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=da2a3dada9ea15469bdfd06350d055aa8692a27c'/>
<id>urn:sha1:da2a3dada9ea15469bdfd06350d055aa8692a27c</id>
<content type='text'>
commit 540602a43ae5fa94064f8fae100f5ca75d4c002b upstream.

This adds VID/PID combinations for MadCatz, PDP and PowerA (new).

Removed Pelican 'TSZ' Wired Xbox 360 Controller since it's clashing with Edge
wireless Controller and I failed to confirm the PID.

Signed-off-by: "Guillermo A. Amaral B." &lt;g@maral.me&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Input: trackpoint - add new trackpoint firmware ID</title>
<updated>2017-11-11T13:34:30Z</updated>
<author>
<name>Aaron Ma</name>
<email>aaron.ma@canonical.com</email>
</author>
<published>2017-08-18T19:17:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b24bc551bf907ff6a5200b990a95b43a1938123b'/>
<id>urn:sha1:b24bc551bf907ff6a5200b990a95b43a1938123b</id>
<content type='text'>
commit ec667683c532c93fb41e100e5d61a518971060e2 upstream.

Synaptics add new TP firmware ID: 0x2 and 0x3, for now both lower 2 bits
are indicated as TP. Change the constant to bitwise values.

This makes trackpoint to be recognized on Lenovo Carbon X1 Gen5 instead
of it being identified as "PS/2 Generic Mouse".

Signed-off-by: Aaron Ma &lt;aaron.ma@canonical.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Input: i8042 - fix crash at boot time</title>
<updated>2017-10-12T14:27:16Z</updated>
<author>
<name>Chen Hong</name>
<email>chenhong3@huawei.com</email>
</author>
<published>2017-07-02T22:11:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=87f5229f69b4bfc48c97c631d823dea5444029c3'/>
<id>urn:sha1:87f5229f69b4bfc48c97c631d823dea5444029c3</id>
<content type='text'>
commit 340d394a789518018f834ff70f7534fc463d3226 upstream.

The driver checks port-&gt;exists twice in i8042_interrupt(), first when
trying to assign temporary "serio" variable, and second time when deciding
whether it should call serio_interrupt(). The value of port-&gt;exists may
change between the 2 checks, and we may end up calling serio_interrupt()
with a NULL pointer:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000050
IP: [&lt;ffffffff8150feaf&gt;] _spin_lock_irqsave+0x1f/0x40
PGD 0
Oops: 0002 [#1] SMP
last sysfs file:
CPU 0
Modules linked in:

Pid: 1, comm: swapper Not tainted 2.6.32-358.el6.x86_64 #1 QEMU Standard PC (i440FX + PIIX, 1996)
RIP: 0010:[&lt;ffffffff8150feaf&gt;]  [&lt;ffffffff8150feaf&gt;] _spin_lock_irqsave+0x1f/0x40
RSP: 0018:ffff880028203cc0  EFLAGS: 00010082
RAX: 0000000000010000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000282 RSI: 0000000000000098 RDI: 0000000000000050
RBP: ffff880028203cc0 R08: ffff88013e79c000 R09: ffff880028203ee0
R10: 0000000000000298 R11: 0000000000000282 R12: 0000000000000050
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000098
FS:  0000000000000000(0000) GS:ffff880028200000(0000) knlGS:0000000000000000
CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 0000000000000050 CR3: 0000000001a85000 CR4: 00000000001407f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process swapper (pid: 1, threadinfo ffff88013e79c000, task ffff88013e79b500)
Stack:
ffff880028203d00 ffffffff813de186 ffffffffffffff02 0000000000000000
&lt;d&gt; 0000000000000000 0000000000000000 0000000000000000 0000000000000098
&lt;d&gt; ffff880028203d70 ffffffff813e0162 ffff880028203d20 ffffffff8103b8ac
Call Trace:
&lt;IRQ&gt;
 [&lt;ffffffff813de186&gt;] serio_interrupt+0x36/0xa0
[&lt;ffffffff813e0162&gt;] i8042_interrupt+0x132/0x3a0
[&lt;ffffffff8103b8ac&gt;] ? kvm_clock_read+0x1c/0x20
[&lt;ffffffff8103b8b9&gt;] ? kvm_clock_get_cycles+0x9/0x10
[&lt;ffffffff810e1640&gt;] handle_IRQ_event+0x60/0x170
[&lt;ffffffff8103b154&gt;] ? kvm_guest_apic_eoi_write+0x44/0x50
[&lt;ffffffff810e3d8e&gt;] handle_edge_irq+0xde/0x180
[&lt;ffffffff8100de89&gt;] handle_irq+0x49/0xa0
[&lt;ffffffff81516c8c&gt;] do_IRQ+0x6c/0xf0
[&lt;ffffffff8100b9d3&gt;] ret_from_intr+0x0/0x11
[&lt;ffffffff81076f63&gt;] ? __do_softirq+0x73/0x1e0
[&lt;ffffffff8109b75b&gt;] ? hrtimer_interrupt+0x14b/0x260
[&lt;ffffffff8100c1cc&gt;] ? call_softirq+0x1c/0x30
[&lt;ffffffff8100de05&gt;] ? do_softirq+0x65/0xa0
[&lt;ffffffff81076d95&gt;] ? irq_exit+0x85/0x90
[&lt;ffffffff81516d80&gt;] ? smp_apic_timer_interrupt+0x70/0x9b
[&lt;ffffffff8100bb93&gt;] ? apic_timer_interrupt+0x13/0x20

To avoid the issue let's change the second check to test whether serio is
NULL or not.

Also, let's take i8042_lock in i8042_start() and i8042_stop() instead of
trying to be overly smart and using memory barriers.

Signed-off-by: Chen Hong &lt;chenhong3@huawei.com&gt;
[dtor: take lock in i8042_start()/i8042_stop()]
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Input: i8042 - add Fujitsu Lifebook AH544 to notimeout list</title>
<updated>2017-09-15T17:30:54Z</updated>
<author>
<name>Daniel Drake</name>
<email>drake@endlessm.com</email>
</author>
<published>2017-06-20T02:48:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9ddfcdbef9694ce05d022e1e003a35aaca152a19'/>
<id>urn:sha1:9ddfcdbef9694ce05d022e1e003a35aaca152a19</id>
<content type='text'>
commit 817ae460c784f32cd45e60b2b1b21378c3c6a847 upstream.

Without this quirk, the touchpad is not responsive on this product, with
the following message repeated in the logs:

 psmouse serio1: bad data from KBC - timeout

Add it to the notimeout list alongside other similar Fujitsu laptops.

Signed-off-by: Daniel Drake &lt;drake@endlessm.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
</feed>
