android_kernel_xiaomi_sm8450/drivers/usb/usbip
Simon Holesch bd13c1119a 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-09-12 11:06:41 +02:00
..
Kconfig
Makefile
stub_dev.c USB: usbip: fix stub_dev hub disconnect 2023-11-20 11:06:53 +01:00
stub_main.c
stub_rx.c usbip: Don't submit special requests twice 2024-09-12 11:06:41 +02:00
stub_tx.c
stub.h
usbip_common.c
usbip_common.h kcov: Remove kcov include from sched.h and move it to its users. 2024-05-17 11:48:07 +02:00
usbip_event.c usbip: synchronize event handler with sysfs code paths 2021-04-14 08:42:03 +02:00
vhci_hcd.c usb: vhci-hcd: Do not drop references before new references are gained 2024-08-19 05:41:17 +02:00
vhci_rx.c
vhci_sysfs.c
vhci_tx.c
vhci.h
vudc_dev.c usbip: vudc synchronize sysfs code paths 2021-04-14 08:42:03 +02:00
vudc_main.c
vudc_rx.c
vudc_sysfs.c usbip: vudc: fix missing unlock on error in usbip_sockfd_store() 2021-05-14 09:50:19 +02:00
vudc_transfer.c
vudc_tx.c
vudc.h