usb_host_drv: dwc_otg stability improvements

- improve NYET error handling
- use split interrupt transaction hack
- clear TT buffers in error situations

Issue #3247
This commit is contained in:
Christian Prochaska 2021-02-02 01:19:34 +01:00 committed by Norman Feske
parent cb2e27f8e4
commit f654e6f02d
3 changed files with 20 additions and 5 deletions

View File

@ -0,0 +1,14 @@
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 5bd400f..044c17c 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -841,7 +841,8 @@ int usb_hub_clear_tt_buffer(struct urb *urb)
clear->tt = tt->multi ? udev->ttport : 1;
clear->devinfo = usb_pipeendpoint (pipe);
clear->devinfo |= udev->devnum << 4;
- clear->devinfo |= usb_pipecontrol(pipe)
+ /* usb_pipeint(pipe) is only relevant for the 'dwc_otg' driver */
+ clear->devinfo |= (usb_pipecontrol(pipe) || usb_pipeint(pipe))
? (USB_ENDPOINT_XFER_CONTROL << 11)
: (USB_ENDPOINT_XFER_BULK << 11);
if (usb_pipein(pipe))

View File

@ -1 +1 @@
c928941836288b77a6f7337fd458d9308ed6cf80
fb5909112c26bcbc48cadae5ccf18d5546c6e86c

View File

@ -75,8 +75,8 @@ URL(dwc_otg) := https://github.com/ssumpf/dwc_otg.git
REV(dwc_otg) := r3
DIR(dwc_otg) := $(SRC_DIR_USB)/drivers/usb/host/dwc_otg
URL(dwc_otg_host) := https://github.com/skalk/dwc_otg.git
REV(dwc_otg_host) := r4
URL(dwc_otg_host) := https://github.com/cproc/dwc_otg.git
REV(dwc_otg_host) := r5
DIR(dwc_otg_host) := $(SRC_DIR_USB_HOST)/drivers/usb/host
@ -207,8 +207,9 @@ PATCH_OPT(patches/usb_tv64.patch) := $(USB_OPT)
# USB HOST
USB_HOST_OPT = -p1 -d$(SRC_DIR_USB_HOST)
PATCH_OPT(patches/usb_host_mem.patch) := $(USB_HOST_OPT)
PATCH_OPT(patches/usb_host_omap.patch) := $(USB_HOST_OPT)
PATCH_OPT(patches/usb_host_mem.patch) := $(USB_HOST_OPT)
PATCH_OPT(patches/usb_host_omap.patch) := $(USB_HOST_OPT)
PATCH_OPT(patches/usb_host_dwc_otg.patch) := $(USB_HOST_OPT)
# USB HID
USB_HID_OPT = -p1 -d$(SRC_DIR_USB_HID)