提交 3100d76c 编写于 作者: L Li Jun 提交者: Yang Yingliang

usb: dwc3: core: add phy cleanup for probe error handling

stable inclusion
from linux-4.19.155
commit a68cbd8b95e713c07dc38970e8c0bb2bf90bbae4

--------------------------------

commit 03c1fd62 upstream.

Add the phy cleanup if dwc3 mode init fail, which is the missing part of
de-init for dwc3 core init.

Fixes: c499ff71 ("usb: dwc3: core: re-factor init and exit paths")
Cc: <stable@vger.kernel.org>
Signed-off-by: NLi Jun <jun.li@nxp.com>
Signed-off-by: NFelipe Balbi <balbi@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 b3e20901
...@@ -1507,6 +1507,17 @@ static int dwc3_probe(struct platform_device *pdev) ...@@ -1507,6 +1507,17 @@ static int dwc3_probe(struct platform_device *pdev)
err5: err5:
dwc3_event_buffers_cleanup(dwc); dwc3_event_buffers_cleanup(dwc);
usb_phy_shutdown(dwc->usb2_phy);
usb_phy_shutdown(dwc->usb3_phy);
phy_exit(dwc->usb2_generic_phy);
phy_exit(dwc->usb3_generic_phy);
usb_phy_set_suspend(dwc->usb2_phy, 1);
usb_phy_set_suspend(dwc->usb3_phy, 1);
phy_power_off(dwc->usb2_generic_phy);
phy_power_off(dwc->usb3_generic_phy);
dwc3_ulpi_exit(dwc); dwc3_ulpi_exit(dwc);
err4: err4:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册