rk: restore file mode
[firefly-linux-kernel-4.4.55.git] / drivers / usb / dwc_otg_310 / dwc_otg_hcd.c
index 4f2e7ac8a1b7d7128ba67a79f994ba50ad0feeeb..9df43cd1aba17ef10f45f45d01d03a8b790633f2 100755 (executable)
@@ -480,8 +480,11 @@ void dwc_otg_hcd_stop(dwc_otg_hcd_t *hcd)
        pldata = hcd->core_if->otg_dev->pldata;
        DWC_DEBUGPL(DBG_HCD, "DWC OTG HCD STOP\n");
 
-       /* Turn off all host-specific interrupts. */
-       dwc_otg_disable_host_interrupts(hcd->core_if);
+       /*
+        * Set status flags for the hub driver.
+        */
+       hcd->flags.b.port_connect_status_change = 1;
+       hcd->flags.b.port_connect_status = 0;
 
        /*
         * The root hub should be disconnected before this function is called.
@@ -489,15 +492,12 @@ void dwc_otg_hcd_stop(dwc_otg_hcd_t *hcd)
         * and the QH lists (via ..._hcd_endpoint_disable).
         */
        DWC_SPINLOCK_IRQSAVE(hcd->lock, &flags);
+       /* Turn off all host-specific interrupts. */
+       dwc_otg_disable_host_interrupts(hcd->core_if);
+
        kill_all_urbs(hcd);
        DWC_SPINUNLOCK_IRQRESTORE(hcd->lock, flags);
 
-       /*
-        * Set status flags for the hub driver.
-        */
-       hcd->flags.b.port_connect_status_change = 1;
-       hcd->flags.b.port_connect_status = 0;
-
        /* Turn off the vbus power */
        DWC_PRINTF("PortPower off\n");
        hprt0.b.prtpwr = 0;