kernel_samsung_a53x/drivers/usb/gadget
Konstantin Aladyshev d04574d2d2 usb: gadget: f_hid: fix report descriptor allocation
commit 61890dc28f7d9e9aac8a9471302613824c22fae4 upstream.

The commit 89ff3dfac604 ("usb: gadget: f_hid: fix f_hidg lifetime vs
cdev") has introduced a bug that leads to hid device corruption after
the replug operation.
Reverse device managed memory allocation for the report descriptor
to fix the issue.

Tested:
This change was tested on the AMD EthanolX CRB server with the BMC
based on the OpenBMC distribution. The BMC provides KVM functionality
via the USB gadget device:
- before: KVM page refresh results in a broken USB device,
- after: KVM page refresh works without any issues.

Fixes: 89ff3dfac604 ("usb: gadget: f_hid: fix f_hidg lifetime vs cdev")
Cc: stable@vger.kernel.org
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Link: https://lore.kernel.org/r/20231206080744.253-2-aladyshev22@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-18 12:11:45 +01:00
..
function usb: gadget: f_hid: fix report descriptor allocation 2024-11-18 12:11:45 +01:00
legacy usb: raw-gadget: properly handle interrupted requests 2024-11-18 10:58:48 +01:00
udc usb: gadget: udc-xilinx: replace memcpy with memcpy_toio 2024-11-08 11:25:51 +01:00
composite.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
config.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
configfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
configfs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
epautoconf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
functions.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_f.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_f.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
u_os_desc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usbstring.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00