1. 23 4月, 2019 22 次提交
  2. 22 4月, 2019 16 次提交
  3. 21 4月, 2019 2 次提交
    • F
      usb: dwc2: fix gadget disconnect · 7fd9f31c
      Fabrice Gasnier 提交于
      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: NFabrice Gasnier <fabrice.gasnier@st.com>
      Reviewed-by: NMarek Vasut <marex@denx.de>
      7fd9f31c
    • P
      usb: reload watchdog during ums command · 85d0aec0
      Patrick Delaunay 提交于
      Reload the watchdog in the mass storage command ums
      to avoid reboot during the usb waiting loop
      when the host doesn't send any request.
      Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com>
      85d0aec0