usb: dwc3: rockchip: force dwc3 suspend immediately after disconneted
authorMeng Dongyang <daniel.meng@rock-chips.com>
Tue, 11 Oct 2016 09:59:58 +0000 (17:59 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Thu, 13 Oct 2016 08:15:34 +0000 (16:15 +0800)
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 <daniel.meng@rock-chips.com>
drivers/usb/dwc3/dwc3-rockchip.c

index 1d0c2279feeb780ed7fdcc4e545198ebd45386d2..74ba61e00795c75dbd8294c82ec3387278872431 100644 (file)
@@ -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");