Merge branch develop-3.10 into develop-3.10-next
[firefly-linux-kernel-4.4.55.git] / drivers / usb / dwc_otg_310 / dwc_otg_hcd_linux.c
index 7da1cd71e0d67b472d278b44d6e2c02dfa507451..b726c90baf3c238d7e9ff36e77938979f3684012 100755 (executable)
@@ -146,13 +146,11 @@ static inline dwc_otg_hcd_t *hcd_to_dwc_otg_hcd(struct usb_hcd *hcd)
 }
 
 /** Gets the struct usb_hcd that contains a dwc_otg_hcd_t. */
-inline struct usb_hcd *dwc_otg_hcd_to_hcd(dwc_otg_hcd_t *dwc_otg_hcd)
+static inline struct usb_hcd *dwc_otg_hcd_to_hcd(dwc_otg_hcd_t *dwc_otg_hcd)
 {
        return dwc_otg_hcd_get_priv_data(dwc_otg_hcd);
 }
 
-EXPORT_SYMBOL(dwc_otg_hcd_to_hcd);
-
 /** Gets the usb_host_endpoint associated with an URB. */
 inline struct usb_host_endpoint *dwc_urb_to_endpoint(struct urb *urb)
 {
@@ -376,7 +374,7 @@ static void dwc_otg_hcd_enable(struct work_struct *work)
                        _core_if->hcd_cb->disconnect(_core_if->hcd_cb->p);
                }
 #endif
-               pldata->soft_reset();
+               pldata->soft_reset(pldata, RST_RECNT);
                dwc_otg_disable_host_interrupts(core_if);
                if (pldata->phy_suspend)
                        pldata->phy_suspend(pldata, USB_PHY_SUSPEND);
@@ -534,7 +532,7 @@ int otg20_hcd_init(struct platform_device *_dev)
            (otg_dev->core_if->usb_mode == USB_MODE_FORCE_HOST)) {
                INIT_DELAYED_WORK(&dwc_otg_hcd->host_enable_work,
                                  otg20_hcd_connect_detect);
-               schedule_delayed_work(&dwc_otg_hcd->host_enable_work, HZ >> 2);
+               schedule_delayed_work(&dwc_otg_hcd->host_enable_work, 0);
        }
        return 0;
 
@@ -639,7 +637,7 @@ int host20_hcd_init(struct platform_device *_dev)
        dwc_otg_hcd->connect_detect_timer.function = dwc_otg_hcd_connect_detect;
        dwc_otg_hcd->connect_detect_timer.data = (unsigned long)(dwc_otg_hcd);
        init_timer(&dwc_otg_hcd->connect_detect_timer);
-       mod_timer(&dwc_otg_hcd->connect_detect_timer, jiffies + (HZ << 3));
+       mod_timer(&dwc_otg_hcd->connect_detect_timer, jiffies + (HZ << 1));
 
        INIT_DELAYED_WORK(&dwc_otg_hcd->host_enable_work, dwc_otg_hcd_enable);
        return 0;
@@ -1017,12 +1015,11 @@ static int urb_enqueue(struct usb_hcd *hcd,
 
        if (unlikely(atomic_read(&urb->reject))) {
                retval = -EPERM;
-               printk
-                   ("%s urb %p submissions will fail, urb->reject %d, use_count %d\n",
-                    __func__, urb, atomic_read(&urb->reject),
-                    atomic_read(&urb->use_count));
+               DWC_DEBUGPL(DBG_HCD,
+                           "%s urb %p submissions will fail,reject %d,count %d\n",
+                           __func__, urb, atomic_read(&urb->reject),
+                           atomic_read(&urb->use_count));
                return retval;
-
        }
 
        if ((usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS)