usb: imx: Do not disable VBUS on ehci_register()'s success
Subsystems (2)
PATCH 1/1 usb: imx: Do not disable VBUS on ehci_register()'s success
Original code was written to exit early on ehci_register()'s success. As a part of e3eb0c729b, however, it was modified to to early exit on failure instead. This resulted in VBUS being erroneously disabled after EHCI controller was added, thus breaking USB on some i.MX boards (confirmed on ZII's RDU2).
Fixes e3eb0c729b ("usb: host: ehci: add ehci_unregister()")
Signed-off-by Andrey Smirnov <[email protected]>
Cc Vivien Didelot <[email protected]>
--- drivers/usb/imx/chipidea-imx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/usb/imx/chipidea-imx.c +3 -3
@@ -201,14 +201,14 @@ static int ci_register_role(struct imx_chipidea *ci)return ret; ehci =ehci_register (ci->dev, &ci->data); -if (IS_ERR (ehci)) +if (IS_ERR (ehci)) { +regulator_disable (ci->vbus);return PTR_ERR (ehci); + } ci->ehci = ehci; ci->dev->detect = ci_ehci_detect; - -regulator_disable (ci->vbus); }else {dev_err (ci->dev,"Host support not available\n" );return -ENODEV ;
Signature · 7 lines
2.20.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 6 lines · Andrey Smirnov
Original code was written to exit early on ehci_register()'s success. As a part of
e3eb0c729b, however, it was modified to to early exit on failure instead. This resulted in VBUS being erroneously disabled after EHCI controller was added, thus breaking USB on some i.MX boards (confirmed on ZII's RDU2).
Quoted 6 lines
Fixes e3eb0c729b ("usb: host: ehci: add ehci_unregister()")Signed-off-by Andrey Smirnov <[email protected]>Cc Vivien Didelot <[email protected]>--- drivers/usb/imx/chipidea-imx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Applied to master, thanks
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox