<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/hid/wacom_sys.c, branch linux-6.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-02-23T08:51:31Z</updated>
<entry>
<title>HID: wacom: Do not register input devices until after hid_hw_start</title>
<updated>2024-02-23T08:51:31Z</updated>
<author>
<name>Jason Gerecke</name>
</author>
<published>2024-01-29T22:35:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=79187e8099a9feb550916dbfb962497522022b6d'/>
<id>urn:sha1:79187e8099a9feb550916dbfb962497522022b6d</id>
<content type='text'>
commit c1d6708bf0d3dd976460d435373cf5abf21ce258 upstream.

If a input device is opened before hid_hw_start is called, events may
not be received from the hardware. In the case of USB-backed devices,
for example, the hid_hw_start function is responsible for filling in
the URB which is submitted when the input device is opened. If a device
is opened prematurely, polling will never start because the device will
not have been in the correct state to send the URB.

Because the wacom driver registers its input devices before calling
hid_hw_start, there is a window of time where a device can be opened
and end up in an inoperable state. Some ARM-based Chromebooks in particular
reliably trigger this bug.

This commit splits the wacom_register_inputs function into two pieces.
One which is responsible for setting up the allocated inputs (and runs
prior to hid_hw_start so that devices are ready for any input events
they may end up receiving) and another which only registers the devices
(and runs after hid_hw_start to ensure devices can be immediately opened
without issue). Note that the functions to initialize the LEDs and remotes
are also moved after hid_hw_start to maintain their own dependency chains.

Fixes: 7704ac937345 ("HID: wacom: implement generic HID handling for pen generic devices")
Cc: stable@vger.kernel.org # v3.18+
Suggested-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Jason Gerecke &lt;jason.gerecke@wacom.com&gt;
Tested-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>HID: wacom: struct name cleanup</title>
<updated>2023-08-14T09:43:57Z</updated>
<author>
<name>Aaron Armstrong Skomra</name>
</author>
<published>2023-07-25T22:21:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=55ab9b2c42f4ce34264213b608889c9fcbdf392f'/>
<id>urn:sha1:55ab9b2c42f4ce34264213b608889c9fcbdf392f</id>
<content type='text'>
Help differentiate the two remote related "serial" struct variables by
renaming "wacom_remote_data" to "wacom_remote_work_data".

Signed-off-by: Aaron Skomra &lt;skomra@gmail.com&gt;
Signed-off-by: Aaron Armstrong Skomra &lt;aaron.skomra@wacom.com&gt;
Reviewed-by: Jason Gerecke &lt;jason.gerecke@wacom.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: wacom: remove unnecessary 'connected' variable from EKR</title>
<updated>2023-08-14T09:43:57Z</updated>
<author>
<name>Aaron Armstrong Skomra</name>
</author>
<published>2023-07-25T22:20:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2834e38048f1ef9bd7473fbc33e8266ad7a24fcb'/>
<id>urn:sha1:2834e38048f1ef9bd7473fbc33e8266ad7a24fcb</id>
<content type='text'>
The 'connected' variable was poorly named, and this has led to some
confusion. We can get the same information by checking if a serial number
exists in the specified EKR slot.

Signed-off-by: Aaron Skomra &lt;skomra@gmail.com&gt;
Signed-off-by: Aaron Armstrong Skomra &lt;aaron.skomra@wacom.com&gt;
Reviewed-by: Jason Gerecke &lt;jason.gerecke@wacom.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: wacom: remove the battery when the EKR is off</title>
<updated>2023-08-14T09:43:57Z</updated>
<author>
<name>Aaron Armstrong Skomra</name>
</author>
<published>2023-07-25T22:20:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9ac6678b95b0dd9458a7a6869f46e51cd55a1d84'/>
<id>urn:sha1:9ac6678b95b0dd9458a7a6869f46e51cd55a1d84</id>
<content type='text'>
Currently the EKR battery remains even after we stop getting information
from the device. This can lead to a stale battery persisting indefinitely
in userspace.

The remote sends a heartbeat every 10 seconds. Delete the battery if we
miss two heartbeats (after 21 seconds). Restore the battery once we see
a heartbeat again.

Signed-off-by: Aaron Skomra &lt;skomra@gmail.com&gt;
Signed-off-by: Aaron Armstrong Skomra &lt;aaron.skomra@wacom.com&gt;
Reviewed-by: Jason Gerecke &lt;jason.gerecke@wacom.com&gt;
Fixes: 9f1015d45f62 ("HID: wacom: EKR: attach the power_supply on first connection")
CC: stable@vger.kernel.org
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: wacom: Add error check to wacom_parse_and_register()</title>
<updated>2023-05-23T13:11:57Z</updated>
<author>
<name>Denis Arefev</name>
</author>
<published>2023-04-27T11:47:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=16a9c24f24fbe4564284eb575b18cc20586b9270'/>
<id>urn:sha1:16a9c24f24fbe4564284eb575b18cc20586b9270</id>
<content type='text'>
   Added a variable check and
   transition in case of an error

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Denis Arefev &lt;arefev@swemel.ru&gt;
Reviewed-by: Ping Cheng &lt;ping.cheng@wacom.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: wacom: Check for string overflow from strscpy calls</title>
<updated>2023-05-23T13:06:36Z</updated>
<author>
<name>Jason Gerecke</name>
</author>
<published>2023-04-14T18:22:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d9eef346b601afb0bd74b49e0db06f6a5cebd030'/>
<id>urn:sha1:d9eef346b601afb0bd74b49e0db06f6a5cebd030</id>
<content type='text'>
The strscpy function is able to return an error code when a copy would
overflow the size of the destination. The copy is stopped and the buffer
terminated before overflow actually occurs so it is safe to continue
execution, but we should still produce a warning should this occur.

Signed-off-by: Jason Gerecke &lt;jason.gerecke@wacom.com&gt;
Reviewed-by: Ping Cheng &lt;ping.cheng@wacom.com&gt;
Reviewed-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: wacom: Lazy-init batteries</title>
<updated>2023-04-14T14:09:02Z</updated>
<author>
<name>Jason Gerecke</name>
</author>
<published>2023-04-13T18:17:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7fc68653fc2e1a3457bb886e10164119ac48734f'/>
<id>urn:sha1:7fc68653fc2e1a3457bb886e10164119ac48734f</id>
<content type='text'>
Rather than creating batteries as part of the initial device probe, let's
make the process lazy. This gives us the opportunity to prevent batteries
from being created in situations where they are unnecessary.

There are two cases in particular where batteries are being unnecessarily
created at initialization. These are AES sensors (for which we don't know
any battery status information until a battery-powered pen actually comes
into prox) peripheral tablets which share HID descriptors between the
wired-only and wireless-capable SKUs of a family of devices.

This patch will delay battery initialization of the former until a pen
actually comes into prox. It will delay battery initialization of the
latter until either a pen comes into prox or a "heartbeat" packet is
processed.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=217062
Link: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2354
Signed-off-by: Jason Gerecke &lt;jason.gerecke@wacom.com&gt;
Tested-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: wacom: Ensure bootloader PID is usable in hidraw mode</title>
<updated>2022-12-20T14:29:10Z</updated>
<author>
<name>Jason Gerecke</name>
</author>
<published>2022-12-01T23:11:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1db1f392591aff13fd643f0ec7c1d5e27391d700'/>
<id>urn:sha1:1db1f392591aff13fd643f0ec7c1d5e27391d700</id>
<content type='text'>
Some Wacom devices have a special "bootloader" mode that is used for
firmware flashing. When operating in this mode, the device cannot be
used for input, and the HID descriptor is not able to be processed by
the driver. The driver generates an "Unknown device_type" warning and
then returns an error code from wacom_probe(). This is a problem because
userspace still needs to be able to interact with the device via hidraw
to perform the firmware flash.

This commit adds a non-generic device definition for 056a:0094 which
is used when devices are in "bootloader" mode. It marks the devices
with a special BOOTLOADER type that is recognized by wacom_probe() and
wacom_raw_event(). When we see this type we ensure a hidraw device is
created and otherwise keep our hands off so that userspace is in full
control.

Signed-off-by: Jason Gerecke &lt;jason.gerecke@wacom.com&gt;
Tested-by: Tatsunosuke Tobita &lt;tatsunosuke.tobita@wacom.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-6.1/wacom' into for-linus</title>
<updated>2022-10-05T09:36:30Z</updated>
<author>
<name>Benjamin Tissoires</name>
</author>
<published>2022-10-05T09:36:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1af52d6b35bb7faaabb1f0b34fbcae7c619e54e7'/>
<id>urn:sha1:1af52d6b35bb7faaabb1f0b34fbcae7c619e54e7</id>
<content type='text'>
- Simplify comments (Christophe JAILLET)
</content>
</entry>
<entry>
<title>HID: move from strlcpy with unused retval to strscpy</title>
<updated>2022-08-25T09:44:27Z</updated>
<author>
<name>Wolfram Sang</name>
</author>
<published>2022-08-18T21:00:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eeeec27d68204701cc5d49d79f7ba811e8438109'/>
<id>urn:sha1:eeeec27d68204701cc5d49d79f7ba811e8438109</id>
<content type='text'>
Follow the advice of the below link and prefer 'strscpy' in this
subsystem. Conversion is 1:1 because the return value is not used.
Generated by a coccinelle script.

Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
</feed>
