Hello @diegov, this doesn't read like a Valve issue. You'd be better off getting in touch with the maintainer of hid-sony, reporting this issue to the kernel bug tracker, or your distro's bug tracker.
If someone finds an actionable indicator this is an issue on the userspace side, let me know and I can re-open.
I think there could be a userspace component. I'm not very familiar with the way calibration works, but steam could be sending invalid calibration data to the device, triggering the issue. I have not been able to reproduce this issue with the controller outside of steam, which is why I thought I'd log it here.
The fact that this causes a panic is clearly a kernel issue, but I think it's worth investigating how steam is handling the ds4 dongle, in case it's sending it invalid data of some sort, which could cause issues even if the kernel problem is fixed.
I've sent this to the linux-input list (https://www.spinics.net/lists/linux-input/msg60061.html) and I'll be trying to help figure it out, but there are some questions in the thread about how steam handles the controller and it would be very useful for someone from Valve to provide some details there if possible.
I have the same issue here with Kernel 5.4
I filed a new ticket :
https://bugzilla.kernel.org/show_bug.cgi?id=206785
Nothing extracted yet.
Your system information
Please describe your issue in as much detail as possible:
I'm using the official Sony DualShock 4 dongle (USB 054c:0ba0)
I've enable DualShock 4 support on steam.
I've configured lightbar colour and intensity
After a system reboot, I can connect the controller normally, and everything works. If I turn off the controller (either through steam or by holding the playstation button on the controller for a few seconds), and turn it on again, it causes a kernel panic due to a division error in the dualshock4_parse_report kernel function.
This happens almost every time I do it, very rarely I'm able to reconnect the controller.
This is very likely a kernel bug, but it only happens when I use the controller through steam. If I turn on and off and on again the controller without starting steam, this issue doesn't happen. So it might be related to the way steam handles the controller device.
The problem occurs in this line in hid-sony.c:
Here's a backtrace of the issue:
I've tested this on 3 different computers plus qemu under gdb, and the issue always happens. Unfortunately I don't have a second dongle to verify if there isn't a hardware issue with my dongle.
I have lent the dongle to a friend using windows, and he didn't have any issues with it when enabling dualshock support on steam.
Note this is happening with kernel 4.20 but I've had this issue now for more than a year so it's persisted through multiple kernel upgrades.
Steps for reproducing this issue: