diff options
author | Roderick Colenbrander <roderick.colenbrander@sony.com> | 2020-11-09 23:22:28 -0800 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2020-11-25 13:53:50 +0100 |
commit | f5dc93b7875bcb8be77baa792cc9432aaf65365b (patch) | |
tree | 38b056668354279c1d4793e167b8bcb415c9689b /tools/perf/scripts/python/flamegraph.py | |
parent | b4c00e7976636f33a4f67eab436a11666c8afd60 (diff) |
HID: sony: Workaround for DS4 dongle hotplug kernel crash.
The hid-sony driver has custom DS4 connect/disconnect logic for the
DS4 dongle, which is a USB dongle acting as a proxy to Bluetooth
connected DS4.
The connect/disconnect logic works fine generally, however not in
conjunction with Steam. Steam implements its own DS4 driver using
hidraw. Both hid-sony and Steam are issuing their own HID requests
and are racing each other during DS4 dongle connect/disconnect
resulting in a kernel crash in hid-sony.
The problem is that upon a DS4 connect to the dongle, hid-sony kicks
of 'ds4_get_calibration_data' from within its dongle hotplug code.
The calibration code issues raw HID feature report for reportID 0x02.
When Steam is running, it issues a feature report for reportID 0x12
typically just prior to hid-sony requesting feature reportID 0x02.
The result is that 'ds4_get_calibration_data' receives the data Steam
requested as that's the HID report returing first. Currently this
results in it processing invalid data, which ultimately results in a
divide by zero upon a future 'dualshock4_parse_report'.
The solution for now is to check within 'ds4_get_calibration_data' to
check if we received data for the feature report we issued and if not
retry. This fixes bug 206785.
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions