diff options
author | Pascal Giard <pascal.giard@etsmtl.ca> | 2021-06-04 19:10:23 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-14 17:59:26 +0300 |
commit | 44535bbc811f56c0e241832cc7dcfd3d42221524 (patch) | |
tree | 9cfc897492f1ccb9626e84ca2e3bdbf83aceeea7 /lib/percpu_test.c | |
parent | b128089939716d8d47bcb3574c53311110e68d90 (diff) | |
download | linux-44535bbc811f56c0e241832cc7dcfd3d42221524.tar.xz |
HID: sony: fix freeze when inserting ghlive ps3/wii dongles
[ Upstream commit fb1a79a6b6e1223ddb18f12aa35e36f832da2290 ]
This commit fixes a freeze on insertion of a Guitar Hero Live PS3/WiiU
USB dongle. Indeed, with the current implementation, inserting one of
those USB dongles will lead to a hard freeze. I apologize for not
catching this earlier, it didn't occur on my old laptop.
While the issue was isolated to memory alloc/free, I could not figure
out why it causes a freeze. So this patch fixes this issue by
simplifying memory allocation and usage.
We remind that for the dongle to work properly, a control URB needs to
be sent periodically. We used to alloc/free the URB each time this URB
needed to be sent.
With this patch, the memory for the URB is allocated on the probe, reused
for as long as the dongle is plugged in, and freed once the dongle is
unplugged.
Signed-off-by: Pascal Giard <pascal.giard@etsmtl.ca>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'lib/percpu_test.c')
0 files changed, 0 insertions, 0 deletions