From fb3805a55a9fd85ad72a7349c1ce396511122c8f Mon Sep 17 00:00:00 2001 From: Meng Dongyang Date: Tue, 11 Oct 2016 17:59:58 +0800 Subject: [PATCH] usb: dwc3: rockchip: force dwc3 suspend immediately after disconneted When usb device or host reconnect quickly, the dwc3 controller still in the state of resume and can not resume again after receive connect notify. So we need to suspend dwc3 controller immediately when receive the notify of disconnect. This patch fix the bug "set device address fail" when resume or quick reconnect. Change-Id: Iaef6363cdece497f8d7be745017674e119fe3529 Signed-off-by: Meng Dongyang --- drivers/usb/dwc3/dwc3-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/dwc3-rockchip.c b/drivers/usb/dwc3/dwc3-rockchip.c index 1d0c2279feeb..74ba61e00795 100644 --- a/drivers/usb/dwc3/dwc3-rockchip.c +++ b/drivers/usb/dwc3/dwc3-rockchip.c @@ -226,7 +226,7 @@ static void dwc3_rockchip_otg_extcon_evt_work(struct work_struct *work) phy_power_off(dwc->usb3_generic_phy); } - pm_runtime_put_sync(dwc->dev); + pm_runtime_put_sync_suspend(dwc->dev); rockchip->connected = false; dev_info(rockchip->dev, "USB unconnected\n"); -- 2.34.1