Fix USB hotplug issue on Linux for sc5xx for Linux 1.1.0

Document created by Aaronwu Employee on Jul 14, 2017
Version 1Show Document
  • View in full screen mode

With Linux 1.1.0, some times the USB hotplug may get failed, to solve this, apply the following patch from Linux kernel code, we will include this fix in coming new release.

 

drivers/usb/musb/adi.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/musb/adi.c b/drivers/usb/musb/adi.c
index a060337..a5899a9 100644
--- a/drivers/usb/musb/adi.c
+++ b/drivers/usb/musb/adi.c
@@ -111,12 +111,13 @@ static void musb_conn_timer_handler(unsigned long _musb)
     musb_writeb(musb->mregs, MUSB_POWER, val);
     toggle = 1;
    }
-   /* The delay time is set to 1/4 second by default,
-    * shortening it, if accelerating A-plug detection
-    * is needed in OTG mode.
-    */
-   mod_timer(&glue->musb_conn_timer, jiffies + TIMER_DELAY / 4);
   }
+
+  /* The delay time is set to 1/4 second by default,
+   * shortening it, if accelerating A-plug detection
+   * is needed in OTG mode.
+   */
+  mod_timer(&glue->musb_conn_timer, jiffies + TIMER_DELAY / 4);
   break;
  default:
   dev_dbg(musb->controller, "%s state not handled\n",

Attachments

    Outcomes