<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/hid/hid-playstation.c, branch v6.3</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge branch 'for-6.3/sony' into for-linus</title>
<updated>2023-02-22T09:40:03+00:00</updated>
<author>
<name>Benjamin Tissoires</name>
<email>benjamin.tissoires@redhat.com</email>
</author>
<published>2023-02-22T09:40:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=52bb0598b3ed50c7e729f4a2c8006c60931f5e6e'/>
<id>52bb0598b3ed50c7e729f4a2c8006c60931f5e6e</id>
<content type='text'>
- enforce DS4 controllers to use hid-playstation (Roderick Colenbrander)
- various hid-playstation gyro fixes (Roderick Colenbrander)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- enforce DS4 controllers to use hid-playstation (Roderick Colenbrander)
- various hid-playstation gyro fixes (Roderick Colenbrander)
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: playstation: correct DualSense gyro bias handling.</title>
<updated>2023-01-18T09:12:49+00:00</updated>
<author>
<name>Roderick Colenbrander</name>
<email>roderick@gaikai.com</email>
</author>
<published>2023-01-06T01:59:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6f7dbbd5a9d7954971ff42098658a134470ff6c2'/>
<id>6f7dbbd5a9d7954971ff42098658a134470ff6c2</id>
<content type='text'>
The bias for the gyroscope is not used correctly. The sensor bias
needs to be used in calculation of the 'sensivity' instead of being
an offset.

In practice this has little input on the values as the bias values
tends to be small (+/- 20).

Signed-off-by: Roderick Colenbrander &lt;roderick.colenbrander@sony.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The bias for the gyroscope is not used correctly. The sensor bias
needs to be used in calculation of the 'sensivity' instead of being
an offset.

In practice this has little input on the values as the bias values
tends to be small (+/- 20).

Signed-off-by: Roderick Colenbrander &lt;roderick.colenbrander@sony.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: playstation: correct DualShock4 gyro bias handling.</title>
<updated>2023-01-18T09:12:20+00:00</updated>
<author>
<name>Roderick Colenbrander</name>
<email>roderick@gaikai.com</email>
</author>
<published>2023-01-06T01:59:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=12b18bc2b4318e76d9fecb674e377c2c388d3dd4'/>
<id>12b18bc2b4318e76d9fecb674e377c2c388d3dd4</id>
<content type='text'>
The bias for the gyroscope is not used correctly. The sensor bias
needs to be used in calculation of the 'sensivity' instead of being
an offset.

In practice this has little input on the values as the bias values
tends to be small (+/- 20).

Signed-off-by: Roderick Colenbrander &lt;roderick.colenbrander@sony.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The bias for the gyroscope is not used correctly. The sensor bias
needs to be used in calculation of the 'sensivity' instead of being
an offset.

In practice this has little input on the values as the bias values
tends to be small (+/- 20).

Signed-off-by: Roderick Colenbrander &lt;roderick.colenbrander@sony.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: playstation: fix DualShock4 unreachable calibration code.</title>
<updated>2023-01-18T09:11:48+00:00</updated>
<author>
<name>Roderick Colenbrander</name>
<email>roderick@gaikai.com</email>
</author>
<published>2023-01-06T01:59:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5e25a8cdbe93c50f743e2ff0907996c697347864'/>
<id>5e25a8cdbe93c50f743e2ff0907996c697347864</id>
<content type='text'>
Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Reported-by: Jiapeng Chong &lt;jiapeng.chong@linux.alibaba.com&gt;
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Reported-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Roderick Colenbrander &lt;roderick.colenbrander@sony.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Reported-by: Jiapeng Chong &lt;jiapeng.chong@linux.alibaba.com&gt;
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Reported-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Roderick Colenbrander &lt;roderick.colenbrander@sony.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: playstation: sanity check DualSense calibration data.</title>
<updated>2023-01-18T09:10:58+00:00</updated>
<author>
<name>Roderick Colenbrander</name>
<email>roderick@gaikai.com</email>
</author>
<published>2023-01-06T01:59:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ccf1e1626d37745d0a697db67407beec9ae9d4b8'/>
<id>ccf1e1626d37745d0a697db67407beec9ae9d4b8</id>
<content type='text'>
Make sure calibration values are defined to prevent potential kernel
crashes. This fixes a hypothetical issue for virtual or clone devices
inspired by a similar fix for DS4.

Signed-off-by: Roderick Colenbrander &lt;roderick.colenbrander@sony.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make sure calibration values are defined to prevent potential kernel
crashes. This fixes a hypothetical issue for virtual or clone devices
inspired by a similar fix for DS4.

Signed-off-by: Roderick Colenbrander &lt;roderick.colenbrander@sony.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: playstation: sanity check DualShock4 calibration data.</title>
<updated>2023-01-18T09:10:27+00:00</updated>
<author>
<name>Roderick Colenbrander</name>
<email>roderick@gaikai.com</email>
</author>
<published>2023-01-06T01:59:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=74cb485f68eb3dff6802ee446a602607b03f4fc9'/>
<id>74cb485f68eb3dff6802ee446a602607b03f4fc9</id>
<content type='text'>
Some DualShock4 devices report invalid calibration data resulting
in kernel oopses due to division by zero during report handling.

The devices affected generally appear to be clone devices, which don't
implement all reports properly and don't populate proper calibration
data. The issue may have been seen on an official device with erased
calibration reports.

This patch prevents the crashes by essentially disabling calibration
when invalid values are detected.

Signed-off-by: Roderick Colenbrander &lt;roderick.colenbrander@sony.com&gt;
Tested-by: Alain Carlucci &lt;alain.carlucci@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some DualShock4 devices report invalid calibration data resulting
in kernel oopses due to division by zero during report handling.

The devices affected generally appear to be clone devices, which don't
implement all reports properly and don't populate proper calibration
data. The issue may have been seen on an official device with erased
calibration reports.

This patch prevents the crashes by essentially disabling calibration
when invalid values are detected.

Signed-off-by: Roderick Colenbrander &lt;roderick.colenbrander@sony.com&gt;
Tested-by: Alain Carlucci &lt;alain.carlucci@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: playstation: fix free of uninialized pointer for DS4 in Bluetooth.</title>
<updated>2022-12-19T12:18:02+00:00</updated>
<author>
<name>Roderick Colenbrander</name>
<email>roderick@gaikai.com</email>
</author>
<published>2022-12-13T04:49:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0ee29814c6be17a924761d3712eb8ad63cfe13ac'/>
<id>0ee29814c6be17a924761d3712eb8ad63cfe13ac</id>
<content type='text'>
The 'buf' variable is only used in the USB (if-path) and not in the Bluetooth
else-path. Since it is not set to NULL. this results in freeing an uninitialized
pointer. Since the else code-path doesn't need buf, just return 0.

Fixes: 2d77474a2392 ("HID: playstation: add DualShock4 bluetooth support.")
Signed-off-by: Roderick Colenbrander &lt;roderick.colenbrander@sony.com&gt;
Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Link: https://lore.kernel.org/r/20221213044935.1775499-2-roderick.colenbrander@sony.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The 'buf' variable is only used in the USB (if-path) and not in the Bluetooth
else-path. Since it is not set to NULL. this results in freeing an uninitialized
pointer. Since the else code-path doesn't need buf, just return 0.

Fixes: 2d77474a2392 ("HID: playstation: add DualShock4 bluetooth support.")
Signed-off-by: Roderick Colenbrander &lt;roderick.colenbrander@sony.com&gt;
Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Link: https://lore.kernel.org/r/20221213044935.1775499-2-roderick.colenbrander@sony.com
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: playstation: fix DualShock4 bluetooth CRC endian issue.</title>
<updated>2022-11-16T23:46:13+00:00</updated>
<author>
<name>Roderick Colenbrander</name>
<email>roderick@gaikai.com</email>
</author>
<published>2022-11-16T16:00:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=da03e502bb22ec859af4f7d1f7d4d5f237b6c3fe'/>
<id>da03e502bb22ec859af4f7d1f7d4d5f237b6c3fe</id>
<content type='text'>
The driver was by accident reading the CRC directly from a hardware
structure instead of using get_unaligned_le32.

Fixes: 2d77474a2392 ("HID: playstation: add DualShock4 bluetooth support.")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Roderick Colenbrander &lt;roderick.colenbrander@sony.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The driver was by accident reading the CRC directly from a hardware
structure instead of using get_unaligned_le32.

Fixes: 2d77474a2392 ("HID: playstation: add DualShock4 bluetooth support.")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Roderick Colenbrander &lt;roderick.colenbrander@sony.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: playstation: fix DualShock4 bluetooth memory corruption bug.</title>
<updated>2022-11-16T23:46:13+00:00</updated>
<author>
<name>Roderick Colenbrander</name>
<email>roderick@gaikai.com</email>
</author>
<published>2022-11-16T16:00:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=54980d30eff608545884416576416060b80d011e'/>
<id>54980d30eff608545884416576416060b80d011e</id>
<content type='text'>
The size of the output buffer used for output reports was not updated
to the larger size needed for Bluetooth. This ultimately resulted
in memory corruption of surrounding structures e.g. due to memsets.

Fixes: 2d77474a2392 ("HID: playstation: add DualShock4 bluetooth support.")
Reported-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Roderick Colenbrander &lt;roderick.colenbrander@sony.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The size of the output buffer used for output reports was not updated
to the larger size needed for Bluetooth. This ultimately resulted
in memory corruption of surrounding structures e.g. due to memsets.

Fixes: 2d77474a2392 ("HID: playstation: add DualShock4 bluetooth support.")
Reported-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Signed-off-by: Roderick Colenbrander &lt;roderick.colenbrander@sony.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>HID: playstation: add DualShock4 dongle support.</title>
<updated>2022-11-11T10:07:09+00:00</updated>
<author>
<name>Roderick Colenbrander</name>
<email>roderick@gaikai.com</email>
</author>
<published>2022-10-29T18:48:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c64ed0cd9324f9e5f44deb6834ad9fb5bfa436bc'/>
<id>c64ed0cd9324f9e5f44deb6834ad9fb5bfa436bc</id>
<content type='text'>
This patch adds support for the DualShock4 dongle in a very similar
way we contributed to hid-sony before.

The dongle is a USB to Bluetooth bridge and uses the same HID reports
as a USB device. It reports data through the DS4's main USB input
report independent on whether a Bluetooth controller is connected.
For this reason there is custom dongle report parsing code to
detect controller hotplug and kick of calibration work until we
are ready to process actual input reports.

The logic also incorporates a workaround needed for Steam in which
hid-playstation and Steam using hidraw can fight.

Signed-off-by: Roderick Colenbrander &lt;roderick.colenbrander@sony.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds support for the DualShock4 dongle in a very similar
way we contributed to hid-sony before.

The dongle is a USB to Bluetooth bridge and uses the same HID reports
as a USB device. It reports data through the DS4's main USB input
report independent on whether a Bluetooth controller is connected.
For this reason there is custom dongle report parsing code to
detect controller hotplug and kick of calibration work until we
are ready to process actual input reports.

The logic also incorporates a workaround needed for Steam in which
hid-playstation and Steam using hidraw can fight.

Signed-off-by: Roderick Colenbrander &lt;roderick.colenbrander@sony.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
</feed>
