summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/usbstring.c
diff options
context:
space:
mode:
authorFabrice Gasnier <fabrice.gasnier@st.com>2019-04-17 16:46:13 +0200
committerMarek Vasut <marex@denx.de>2019-04-21 10:26:52 +0200
commit7fd9f31c6bd13609da61b985cf8f5f65ebebd913 (patch)
treea067d20542b434eaa47e8b28ef0fb4f3d250b4f5 /drivers/usb/gadget/usbstring.c
parent85d0aec0fda21da28ac886b2bf973f0e1c1b8d41 (diff)
usb: dwc2: fix gadget disconnect
This fixes a disconnect issue detected with fastboot command, when using dwc2 driver. - On u-boot side: uboot>$ fastboot 0 - On USB host PC side, few seconds after PC>$ fastboot reboot # Get stuck, uboot target never reboots By enabling DEBUG_ISR logs, the bus suspend interrupt is seen before the PC command has been issued. When the USB bus suspend occurs, there's a HACK that disables the fastboot (composite driver). Here is the call stack upon USB bus suspend: - dwc2_handle_usb_suspend_intr() - dev->driver->disconnect() - composite_disconnect() - reset_config() - f->disable() - fastboot_disable() - usb_ep_disable(f_fb->out_ep); - usb_ep_disable(f_fb->in_ep); .. other disable calls. When the resume interrupt happens, everything has been disabled, then nothing happens. fastboot command gets stuck on HOST side. Remove original HACK, that disconnects the composite driver upon USB bus suspend. Implement disconnect detection instead: - check GINTSTS OTG interrupt - read GOTGINT register - check GOTGINT, SesEndDet bit (e.g. session end) This is inspired by what is implemented currently in Linux dwc2 driver. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Reviewed-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'drivers/usb/gadget/usbstring.c')
0 files changed, 0 insertions, 0 deletions