OpenCloudOS-Kernel/drivers/usb/usbip
Simon Holesch 73ec94aac5 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-08 07:54:44 +02:00
..
Kconfig
Makefile
stub.h
stub_dev.c USB: usbip: fix stub_dev hub disconnect 2023-11-20 11:59:26 +01:00
stub_main.c usbip: usbip_host: Replace strlcpy with strscpy 2023-06-23 09:54:32 +02:00
stub_rx.c usbip: Don't submit special requests twice 2024-09-08 07:54:44 +02:00
stub_tx.c
usbip_common.c Treewide: Stop corrupting socket's task_frag 2022-12-19 17:28:49 -08:00
usbip_common.h kthread: add kthread_stop_put 2024-06-12 11:12:52 +02:00
usbip_event.c
vhci.h
vhci_hcd.c usb: vhci-hcd: Do not drop references before new references are gained 2024-08-14 13:58:54 +02:00
vhci_rx.c
vhci_sysfs.c
vhci_tx.c
vudc.h
vudc_dev.c USB: usbip: Remove an unnecessary goto 2023-08-08 10:36:51 +02:00
vudc_main.c usb: usbip: eliminate anonymous module_init & module_exit 2022-03-18 12:52:56 +01:00
vudc_rx.c usb/usbip: Fix v_recv_cmd_submit() to use PIPE_BULK define 2022-11-11 10:28:42 +01:00
vudc_sysfs.c usbip: vudc: Convert snprintf() to sysfs_emit() 2022-10-22 13:20:49 +02:00
vudc_transfer.c
vudc_tx.c