usb: dwc3: rockchip: Don't reset otg logic if device connect

During dwc3 resume, it shoudn't reset otg controller logic
if device is connecting with the otg port, because it will
cause device to be reenumerated. More seriously, it may
cause the otg_work to enter disconnect process and power
down usb3 controller power domain, at the same time, if
the xHCI driver is accessing the controller asynchronously,
it will cause system hang.

Change-Id: Id546277bd4082b7baeff830788643a800330ae8e
Signed-off-by: William Wu <william.wu@rock-chips.com>
This commit is contained in:
William Wu 2018-07-19 10:51:41 +08:00 committed by Tao Huang
parent 04da766284
commit 8c47ad3c7b

View File

@ -969,9 +969,11 @@ static int __maybe_unused dwc3_rockchip_resume(struct device *dev)
struct dwc3_rockchip *rockchip = dev_get_drvdata(dev);
struct dwc3 *dwc = rockchip->dwc;
reset_control_assert(rockchip->otg_rst);
udelay(1);
reset_control_deassert(rockchip->otg_rst);
if (!rockchip->connected) {
reset_control_assert(rockchip->otg_rst);
udelay(1);
reset_control_deassert(rockchip->otg_rst);
}
rockchip->suspended = false;