[ERD][NEUS7920-261] [9610] usb: notify: disable USB L2 mode
authorSEO HOYOUNG <hy50.seo@samsung.com>
Fri, 10 May 2019 01:10:11 +0000 (10:10 +0900)
committerKim Gunho <gunho.kim@samsung.com>
Fri, 30 Aug 2019 07:58:56 +0000 (16:58 +0900)
Change-Id: Ic3ef8ca60924e69735173555a0921fe9d6a0096c
Signed-off-by: SEO HOYOUNG <hy50.seo@samsung.com>
drivers/usb/core/hcd.c

index ae13bc4f13d361d940dbb20143d95df0941b2799..1699f017fd815a83442900c0026e47946085cd4d 100644 (file)
@@ -2293,12 +2293,13 @@ int hcd_bus_suspend(struct usb_device *rhdev, pm_message_t msg)
                                "suspend", status);
        }
 
+#ifndef CONFIG_USB_OTG_SW_SWITCH
        /* L2 suspend only support USB2.0port */
        if (hcd->state == HC_STATE_SUSPENDED) {
                dev_info(&rhdev->dev, "HCD STATE IS SUSPENDED, NEED WAKE UNLOCK\n");
                hcd->driver->wake_lock(hcd, 0);
        }
-
+#endif
        return status;
 }
 
@@ -2326,11 +2327,12 @@ int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg)
                struct usb_device *udev;
                int port1;
 
+#ifndef CONFIG_USB_OTG_SW_SWITCH
                if (hcd->state == HC_STATE_RESUMING) {
                        dev_info(&rhdev->dev, "HCD STATE IS RESUMING, NEED WAKE LOCK\n");
                        hcd->driver->wake_lock(hcd, 1);
                }
-
+#endif
                spin_lock_irq(&hcd_root_hub_lock);
                if (!HCD_DEAD(hcd)) {
                        usb_set_device_state(rhdev, rhdev->actconfig