<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/hid/wacom_sys.c, branch linux-4.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-01-07T11:07:34Z</updated>
<entry>
<title>HID: wacom: Ensure bootloader PID is usable in hidraw mode</title>
<updated>2023-01-07T11:07:34Z</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=f21b8ddd237a6d5c54c96c1f94e413abf0001c78'/>
<id>urn:sha1:f21b8ddd237a6d5c54c96c1f94e413abf0001c78</id>
<content type='text'>
commit 1db1f392591aff13fd643f0ec7c1d5e27391d700 upstream.

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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>HID: wacom: fix problems when device is not a valid USB device</title>
<updated>2021-12-14T09:04:47Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2021-12-01T18:35:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1309eb2ef1001c4cc7e07b867ad9576d2cfeab47'/>
<id>urn:sha1:1309eb2ef1001c4cc7e07b867ad9576d2cfeab47</id>
<content type='text'>
commit 720ac467204a70308bd687927ed475afb904e11b upstream.

The wacom driver accepts devices of more than just USB types, but some
code paths can cause problems if the device being controlled is not a
USB device due to a lack of checking.  Add the needed checks to ensure
that the USB device accesses are only happening on a "real" USB device,
and not one on some other bus.

Cc: Jiri Kosina &lt;jikos@kernel.org&gt;
Cc: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Cc: linux-input@vger.kernel.org
Cc: stable@vger.kernel.org
Tested-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Link: https://lore.kernel.org/r/20211201183503.2373082-2-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>HID: Fix hid_report_len usage</title>
<updated>2018-04-24T07:34:11Z</updated>
<author>
<name>Aaron Ma</name>
</author>
<published>2018-02-03T15:57:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=10ab7c947d4921b962c7c2a6bffa2486d0cd127d'/>
<id>urn:sha1:10ab7c947d4921b962c7c2a6bffa2486d0cd127d</id>
<content type='text'>
commit 3064a03b94e60388f0955fcc29f3e8a978d28f75 upstream.

Follow the change of return type u32 of hid_report_len,
fix all the types of variables those get the return value of
hid_report_len to u32, and all other code already uses u32.

Cc: stable@vger.kernel.org
Signed-off-by: Aaron Ma &lt;aaron.ma@canonical.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>HID: wacom: EKR: ensure devres groups at higher indexes are released</title>
<updated>2018-02-03T16:05:35Z</updated>
<author>
<name>Aaron Armstrong Skomra</name>
</author>
<published>2017-12-07T20:31:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ddba3c67a5b81955e34563d225a3f117354a247e'/>
<id>urn:sha1:ddba3c67a5b81955e34563d225a3f117354a247e</id>
<content type='text'>
commit 791ae273731fa85d3332e45064dab177ae663e80 upstream.

Background: ExpressKey Remotes communicate their events via usb dongle.
Each dongle can hold up to 5 pairings at one time and one EKR (identified
by its serial number) can unfortunately be paired with its dongle
more than once. The pairing takes place in a round-robin fashion.

Input devices are only created once per EKR, when a new serial number
is seen in the list of pairings. However, if a device is created for
a "higher" paring index and subsequently a second pairing occurs at a
lower pairing index, unpairing the remote with that serial number from
any pairing index will currently cause a driver crash. This occurs
infrequently, as two remotes are necessary to trigger this bug and most
users have only one remote.

As an illustration, to trigger the bug you need to have two remotes,
and pair them in this order:

1. slot 0 -&gt; remote 1 (input device created for remote 1)
2. slot 1 -&gt; remote 1 (duplicate pairing - no device created)
3. slot 2 -&gt; remote 1 (duplicate pairing - no device created)
4. slot 3 -&gt; remote 1 (duplicate pairing - no device created)
5. slot 4 -&gt; remote 2 (input device created for remote 2)

6. slot 0 -&gt; remote 2 (1 destroyed and recreated at slot 1)
7. slot 1 -&gt; remote 2 (1 destroyed and recreated at slot 2)
8. slot 2 -&gt; remote 2 (1 destroyed and recreated at slot 3)
9. slot 3 -&gt; remote 2 (1 destroyed and not recreated)
10. slot 4 -&gt; remote 2 (2 was already in this slot so no changes)

11. slot 0 -&gt; remote 1 (The current code sees remote 2 was paired over in
                        one of the dongle slots it occupied and attempts
                        to remove all information about remote 2 [1]. It
                        calls wacom_remote_destroy_one for remote 2, but
                        the destroy function assumes the lowest index is
                        where the remote's input device was created. The
                        code "cleans up" the other remote 2 pairings
                        including the one which the input device was based
                        on, assuming they were were just duplicate
                        pairings. However, the cleanup doesn't call the
                        devres release function for the input device that
                        was created in slot 4).

This issue is fixed by this commit.

[1] Remote 2 should subsequently be re-created on the next packet from the
EKR at the lowest numbered slot that it occupies (here slot 1).

Fixes: f9036bd43602 ("HID: wacom: EKR: use devres groups to manage resources")
Signed-off-by: Aaron Armstrong Skomra &lt;aaron.skomra@wacom.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>HID: wacom: Always increment hdev refcount within wacom_get_hdev_data</title>
<updated>2017-10-12T09:51:24Z</updated>
<author>
<name>Jason Gerecke</name>
</author>
<published>2017-09-18T16:27:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=953f5e7c6216d26d064baa3e0c5ed081a4ca552d'/>
<id>urn:sha1:953f5e7c6216d26d064baa3e0c5ed081a4ca552d</id>
<content type='text'>
commit 2a5e597c6bb1b873e473e5f57147e9e5d2755430 upstream.

The wacom_get_hdev_data function is used to find and return a reference to
the "other half" of a Wacom device (i.e., the touch device associated with
a pen, or vice-versa). To ensure these references are properly accounted
for, the function is supposed to automatically increment the refcount before
returning. This was not done, however, for devices which have pen &amp; touch
on different interfaces of the same USB device. This can lead to a WARNING
("refcount_t: underflow; use-after-free") when removing the module or device
as we call kref_put() more times than kref_get(). Triggering an "actual" use-
after-free would be difficult since both devices will disappear nearly-
simultaneously. To silence this warning and prevent the potential error, we
need to increment the refcount for all cases within wacom_get_hdev_data.

Fixes: 41372d5d40 ("HID: wacom: Augment 'oVid' and 'oPid' with heuristics for HID_GENERIC")
Signed-off-by: Jason Gerecke &lt;jason.gerecke@wacom.com&gt;
Reviewed-by: Ping Cheng &lt;ping.cheng@wacom.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>HID: wacom: leds: Don't try to control the EKR's read-only LEDs</title>
<updated>2017-10-12T09:51:24Z</updated>
<author>
<name>Aaron Armstrong Skomra</name>
</author>
<published>2017-08-28T21:15:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=04b54e8ff7d01b6e877f9a7915bc30be67dd5c39'/>
<id>urn:sha1:04b54e8ff7d01b6e877f9a7915bc30be67dd5c39</id>
<content type='text'>
commit 74aebed6dc13425233f2224668353cff7a112776 upstream.

Commit a50aac7193f1 introduces 'led.groups' and adds EKR support
for these groups. However, unlike the other devices with LEDs,
the EKR's LEDs are read-only and we shouldn't attempt to control
them in wacom_led_control().

See bug: https://sourceforge.net/p/linuxwacom/bugs/342/

Fixes: a50aac7193f1 ("HID: wacom: leds: dynamically allocate LED groups")
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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>HID: wacom: release the resources before leaving despite devm</title>
<updated>2017-10-08T08:26:07Z</updated>
<author>
<name>Benjamin Tissoires</name>
</author>
<published>2017-01-20T15:20:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fd9597d6ea2803f1929bc9e91ea159e5a9be8480'/>
<id>urn:sha1:fd9597d6ea2803f1929bc9e91ea159e5a9be8480</id>
<content type='text'>
[ Upstream commit 5b779fc52020ac6f5beea31c5eafc3d25cf70dc1 ]

In the general case, the resources are properly released by devm without
needing to do anything. However, when unplugging the wireless receiver,
the kernel segfaults from time to time while calling devres_release_all().

I think in that case the resources attempt to access hid_get_drvdata(hdev)
which has been set to null while leaving wacom_remove().

Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Acked-by: Jason Gerecke &lt;jason.gerecke@wacom.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>HID: wacom: Don't add ghost interface as shared data</title>
<updated>2017-04-08T07:30:33Z</updated>
<author>
<name>Aaron Armstrong Skomra</name>
</author>
<published>2017-03-29T17:35:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8d6c33224261e426641df743250e85b1c6a80674'/>
<id>urn:sha1:8d6c33224261e426641df743250e85b1c6a80674</id>
<content type='text'>
commit 8b4073596997f2ccbf68d8e72e07b827388a4536 upstream.

A previous commit (below) adds a check for already probed interfaces to
Wacom's matching heuristic. Unfortunately this causes the Bamboo Pen
(CTL-460) to match itself to its 'ghost' touch interface. After
subsequent changes to the driver this match to the ghost causes the
kernel to crash. This patch avoids calling wacom_add_shared_data()
for the BAMBOO_PEN's ghost touch interface.

Fixes: 41372d5d40e7 ("HID: wacom: Augment 'oVid' and 'oPid' with heuristics for HID_GENERIC")
Signed-off-by: Aaron Armstrong Skomra &lt;aaron.skomra@wacom.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>HID: wacom: Augment 'oVid' and 'oPid' with heuristics for HID_GENERIC</title>
<updated>2016-08-10T09:44:28Z</updated>
<author>
<name>Jason Gerecke</name>
</author>
<published>2016-08-08T19:06:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=41372d5d40e73ef4d8574e53a39c7faabff20260'/>
<id>urn:sha1:41372d5d40e73ef4d8574e53a39c7faabff20260</id>
<content type='text'>
The 'oVid' and 'oPid' variables used by wacom_are_sibling are a hacky
solution to the problem of the driver historically having few good
heuristics to use in determining if two devices should be considered
siblings or not. While it works well enough for explicitly supported
devices, it offers no help for HID_GENERIC devices. Now that we have
a bit more information (e.g. direct/indirect) available to us though,
we should make use of it it to improve the pairing of such devices.

Signed-off-by: Jason Gerecke &lt;jason.gerecke@wacom.com&gt;
Reviewed-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: wacom: power_supply: provide the actual model_name</title>
<updated>2016-08-05T11:39:23Z</updated>
<author>
<name>Benjamin Tissoires</name>
</author>
<published>2016-07-13T16:06:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9956953ec082e9353ee0828538ff37b149cc91c9'/>
<id>urn:sha1:9956953ec082e9353ee0828538ff37b149cc91c9</id>
<content type='text'>
Instead of displaying a generic "tablet", now g-c-c shows a pretty
"Wacom Intuos Pro S (WL)".

Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Acked-by: Ping Cheng &lt;pingc@wacom.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
</feed>
