<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/input/serio/libps2.c, branch v4.19.77</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.77</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.77'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-02-03T00:50:28+00:00</updated>
<entry>
<title>Input: libps2 - relax command byte ACK handling</title>
<updated>2018-02-03T00:50:28+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2018-01-17T20:00:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=29acc42e8e10a4721757af9ed8aec569d30ce39b'/>
<id>urn:sha1:29acc42e8e10a4721757af9ed8aec569d30ce39b</id>
<content type='text'>
When we probe PS/2 devices we first issue "Get ID" command and only if we
receive what we consider a valid keyboard or mouse ID we disable the device
and continue with protocol detection. That means that the device may be
transmitting motion or keystroke data, while we expect ACK response.

Instead of signaling failure if we see anything but ACK/NAK let's ignore
"garbage" response until we see ACK for the command byte (first byte). The
checks for subsequent ACKs of command parameters will continue be strict.

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: libps2 - support retransmission of command data</title>
<updated>2018-02-03T00:50:27+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2018-01-05T06:01:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b99e1f2a1a3f4158bed9b9e9e97ac46678d8c2ac'/>
<id>urn:sha1:b99e1f2a1a3f4158bed9b9e9e97ac46678d8c2ac</id>
<content type='text'>
The devices are allowed to respond to either command byte or command
parameter with a NAK (0xfe), and the host is supposed to resend the
"correct" byte. The device then will either respond with ACK or ERR (0xfc).
Let's teach libps2 to handle the NAK responses properly, so that individual
drivers do not need to handle them.

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: libps2 - add debugging statements</title>
<updated>2018-02-03T00:50:25+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2018-01-02T20:21:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=147b903da65daedc90dbeb66a75dd608a6a41ef2'/>
<id>urn:sha1:147b903da65daedc90dbeb66a75dd608a6a41ef2</id>
<content type='text'>
Debugging via i8042.debug and analyzing raw PS/2 data stream may be
cumbersome as you need to locate the boundaries of commands, decipher the
sliced commands, etc, etc. Let's add a bit more high level debug statements
for ps2_sendbyte(), ps2_command(), and ps2_sliced_command().

We do not introduce a new module parameter, but rater rely on the kernel
having dynamic debug facility enabled (which most everyone has nowadays).
Enable with:

echo "file libps2.c +pf" &gt; /sys/kernel/debug/dynamic_debug/control

or add "libps2.dyndbg=+pf" to the kernel command line.

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: psmouse - move sliced command implementation to libps2</title>
<updated>2018-02-03T00:50:24+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2018-01-02T20:03:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=08be954b7a7de6742d3d47e4dc20e3b086410761'/>
<id>urn:sha1:08be954b7a7de6742d3d47e4dc20e3b086410761</id>
<content type='text'>
In preparation to adding some debugging statements to PS/2 control
sequences let's move psmouse_sliced_command() into libps2 and rename it
to ps2_sliced_command().

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: libps2 - use u8 for byte data</title>
<updated>2018-02-03T00:50:21+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2018-01-04T18:58:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b28bad65c1fec47076ebee88b51b0dafa31f5065'/>
<id>urn:sha1:b28bad65c1fec47076ebee88b51b0dafa31f5065</id>
<content type='text'>
Instead of using unsigned char for the byte data switch to using u8. Also
use unsigned int for the command codes and timeouts, and have
ps2_handle_ack() and ps2_handle_response() return bool instead of int, as
they do not return error codes but rather signal whether a byte was handled
or not handled. ps2_is_keyboard_id() now returns bool as well.

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: libps2 - fix switch statement formatting</title>
<updated>2018-02-03T00:50:18+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2018-01-04T19:05:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d5e0d9187abd5e3ce23884c375c4b36f403e42be'/>
<id>urn:sha1:d5e0d9187abd5e3ce23884c375c4b36f403e42be</id>
<content type='text'>
Individual labels of switch statements should have the same indentation
level as the switch statement itself.

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: i8042 - break load dependency between atkbd/psmouse and i8042</title>
<updated>2016-07-27T21:20:09+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2016-07-25T18:36:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4097461897df91041382ff6fcd2bfa7ee6b2448c'/>
<id>urn:sha1:4097461897df91041382ff6fcd2bfa7ee6b2448c</id>
<content type='text'>
As explained in 1407814240-4275-1-git-send-email-decui@microsoft.com we
have a hard load dependency between i8042 and atkbd which prevents
keyboard from working on Gen2 Hyper-V VMs.

&gt; hyperv_keyboard invokes serio_interrupt(), which needs a valid serio
&gt; driver like atkbd.c.  atkbd.c depends on libps2.c because it invokes
&gt; ps2_command().  libps2.c depends on i8042.c because it invokes
&gt; i8042_check_port_owner().  As a result, hyperv_keyboard actually
&gt; depends on i8042.c.
&gt;
&gt; For a Generation 2 Hyper-V VM (meaning no i8042 device emulated), if a
&gt; Linux VM (like Arch Linux) happens to configure CONFIG_SERIO_I8042=m
&gt; rather than =y, atkbd.ko can't load because i8042.ko can't load(due to
&gt; no i8042 device emulated) and finally hyperv_keyboard can't work and
&gt; the user can't input: https://bugs.archlinux.org/task/39820
&gt; (Ubuntu/RHEL/SUSE aren't affected since they use CONFIG_SERIO_I8042=y)

To break the dependency we move away from using i8042_check_port_owner()
and instead allow serio port owner specify a mutex that clients should use
to serialize PS/2 command stream.

Reported-by: Mark Laws &lt;mdl@60hz.org&gt;
Tested-by: Mark Laws &lt;mdl@60hz.org&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;</content>
</entry>
<entry>
<title>Input: psmouse - fix data race in __ps2_command</title>
<updated>2015-09-29T23:08:29+00:00</updated>
<author>
<name>Dmitry Vyukov</name>
<email>dvyukov@google.com</email>
</author>
<published>2015-09-29T22:54:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=218c1f76b8b25d6dc9d01443f071cb618e206b0c'/>
<id>urn:sha1:218c1f76b8b25d6dc9d01443f071cb618e206b0c</id>
<content type='text'>
The data race happens on ps2dev-&gt;cmdcnt and ps2dev-&gt;cmdbuf contents.
__ps2_command reads that data concurrently with the interrupt handler. As
the result, for example, if a response arrives just after the timeout,
__ps2_command can copy out garbage from ps2dev-&gt;cmdbuf but then see that
ps2dev-&gt;cmdcnt is 0 and return success.

Stop the interrupt handler with serio_pause_rx() before reading the
results.

The data race was found with KernelThreadSanitizer (KTSAN).

Signed-off-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;</content>
</entry>
<entry>
<title>Input: delete non-required instances of include &lt;linux/init.h&gt;</title>
<updated>2014-01-07T07:23:57+00:00</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2014-01-06T18:27:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bf9a9f8e5105b13cea954b254008f383ed0b4045'/>
<id>urn:sha1:bf9a9f8e5105b13cea954b254008f383ed0b4045</id>
<content type='text'>
None of these files are actually using any __init type directives
and hence don't need to include &lt;linux/init.h&gt;.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: libps2.c: fix comment typo arrrives.</title>
<updated>2011-06-27T10:28:56+00:00</updated>
<author>
<name>Justin P. Mattock</name>
<email>justinmattock@gmail.com</email>
</author>
<published>2011-06-23T06:29:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=83ae417b857072d54c3c111067046283e3ee6b58'/>
<id>urn:sha1:83ae417b857072d54c3c111067046283e3ee6b58</id>
<content type='text'>
Fix a typo in a comment.

Signed-off-by: Justin P. Mattock &lt;justinmattock@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
</feed>
