From: SEO HOYOUNG Date: Fri, 10 May 2019 01:10:11 +0000 (+0900) Subject: [ERD][NEUS7920-261] [9610] usb: notify: disable USB L2 mode X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=453b1b5da11316f03158dbf03da759d9081f2d77;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [ERD][NEUS7920-261] [9610] usb: notify: disable USB L2 mode Change-Id: Ic3ef8ca60924e69735173555a0921fe9d6a0096c Signed-off-by: SEO HOYOUNG --- diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index ae13bc4f13d3..1699f017fd81 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -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