Commit c499ff71ff2a ("usb: dwc3: core: re-factor init and exit paths") moved the call to dwc3_phy_setup() from dwc3_probe() to dwc3_core_init() and after the dwc3_readl() (now in dwc3_core_is_valid). This broke USB and Ethernet on Odroid XU4, because dwc3_readl() needs dwc3_phy_setup() to be run before. Fix this by moving the call to dwc3_phy_setup() before dwc3_core_is_valid(). This fixes USB and Ethernet on Odroid XU4. This needs and is supposed to be applied on top of https://patchwork.kernel.org/patch/9815981/ Also see https://bugs.debian.org/843448 Signed-off-by: Jochen Sprickerhof <git@xxxxxxxxxxxxxxxxxxxxx> Fixes: c499ff71ff2a ("usb: dwc3: core: re-factor init and exit paths") --- drivers/usb/dwc3/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 03474d3575ab..3c6faddc1394 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -747,6 +747,10 @@ static int dwc3_core_init(struct dwc3 *dwc) u32 reg; int ret; + ret = dwc3_phy_setup(dwc); + if (ret) + goto err0; + if (!dwc3_core_is_valid(dwc)) { dev_err(dwc->dev, "this is not a DesignWare USB3 DRD Core\n"); ret = -ENODEV; @@ -774,10 +778,6 @@ static int dwc3_core_init(struct dwc3 *dwc) if (ret) goto err0; - ret = dwc3_phy_setup(dwc); - if (ret) - goto err0; - dwc3_core_setup_global_control(dwc); dwc3_core_num_eps(dwc); -- 2.13.2
Attachment:
signature.asc
Description: PGP signature