kernel_samsung_a53x/drivers/usb/usbip
Simon Holesch 7bd88d4e69 usbip: Don't submit special requests twice
[ Upstream commit 8b6b386f9aa936ed0c190446c71cf59d4a507690 ]

Skip submitting URBs, when identical requests were already sent in
tweak_special_requests(). Instead call the completion handler directly
to return the result of the URB.

Even though submitting those requests twice should be harmless, there
are USB devices that react poorly to some duplicated requests.

One example is the ChipIdea controller implementation in U-Boot: The
second SET_CONFIGURATION request makes U-Boot disable and re-enable all
endpoints. Re-enabling an endpoint in the ChipIdea controller, however,
was broken until U-Boot commit b272c8792502 ("usb: ci: Fix gadget
reinit").

Signed-off-by: Simon Holesch <simon@holesch.de>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Reviewed-by: Hongren Zheng <i@zenithal.me>
Tested-by: Hongren Zheng <i@zenithal.me>
Link: https://lore.kernel.org/r/20240519141922.171460-1-simon@holesch.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:20:58 +01:00
..
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stub.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stub_dev.c USB: usbip: fix stub_dev hub disconnect 2024-11-18 11:43:05 +01:00
stub_main.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stub_rx.c usbip: Don't submit special requests twice 2024-11-23 23:20:58 +01:00
stub_tx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usbip_common.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usbip_common.h kcov: Remove kcov include from sched.h and move it to its users. 2024-11-19 11:32:46 +01:00
usbip_event.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vhci.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vhci_hcd.c usb: vhci-hcd: Do not drop references before new references are gained 2024-11-23 23:20:27 +01:00
vhci_rx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vhci_sysfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vhci_tx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vudc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vudc_dev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vudc_main.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vudc_rx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vudc_sysfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vudc_transfer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vudc_tx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00