diff options
Diffstat (limited to 'usb.current/usb-ehci-mxc-bail-out-on-transceiver-problems.patch')
| -rw-r--r-- | usb.current/usb-ehci-mxc-bail-out-on-transceiver-problems.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/usb.current/usb-ehci-mxc-bail-out-on-transceiver-problems.patch b/usb.current/usb-ehci-mxc-bail-out-on-transceiver-problems.patch new file mode 100644 index 00000000000000..1d6323fefa3830 --- /dev/null +++ b/usb.current/usb-ehci-mxc-bail-out-on-transceiver-problems.patch @@ -0,0 +1,69 @@ +From w.sang@pengutronix.de Wed Jun 16 13:24:59 2010 +From: Wolfram Sang <w.sang@pengutronix.de> +Date: Tue, 15 Jun 2010 12:34:23 +0200 +Subject: USB: ehci-mxc: bail out on transceiver problems +To: linux-usb@vger.kernel.org +Cc: linux-arm-kernel@lists.infradead.org, Wolfram Sang <w.sang@pengutronix.de>, Sascha Hauer <s.hauer@pengutronix.de>, Daniel Mack <daniel@caiaq.de>, Greg KH <gregkh@suse.de>, stable@kernel.org +Message-ID: <1276598063-3956-2-git-send-email-w.sang@pengutronix.de> + + +The old code registered the hcd even if there were no transceivers +detected, leading to oopses like this if we try to probe a non-existant +ULPI: + +[ 2.730000] mxc-ehci mxc-ehci.0: unable to init transceiver +[ 2.740000] timeout polling for ULPI device +[ 2.740000] timeout polling for ULPI device +[ 2.750000] mxc-ehci mxc-ehci.0: unable to enable vbus on transceiver +[ 2.750000] mxc-ehci mxc-ehci.0: Freescale On-Chip EHCI Host Controller +[ 2.760000] mxc-ehci mxc-ehci.0: new USB bus registered, assigned bus number 2 +[ 2.770000] Unhandled fault: external abort on non-linefetch (0x808) at 0xc4876184 +[ 2.770000] Internal error: : 808 [#1] PREEMPT +[ 2.770000] last sysfs file: +[ 2.770000] Modules linked in: +[ 2.770000] CPU: 0 Not tainted (2.6.33.5 #5) +[ 2.770000] PC is at ehci_hub_control+0x4d4/0x8f8 +[ 2.770000] LR is at ehci_mxc_setup+0xbc/0xdc +[ 2.770000] pc : [<c0196dfc>] lr : [<c019bc8c>] psr: 00000093 +[ 2.770000] sp : c3815e40 ip : 00000001 fp : 60000013 +[ 2.770000] r10: c4876184 r9 : 00000000 r8 : c3814000 +[ 2.770000] r7 : c391d2cc r6 : 00000001 r5 : 00000001 r4 : 00000000 +[ 2.770000] r3 : 80000000 r2 : 00000007 r1 : 80000000 r0 : c4876184 +[ 2.770000] Flags: nzcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel +[ 2.770000] Control: 0005317f Table: a0004000 DAC: 00000017 +[ 2.770000] Process swapper (pid: 1, stack limit = 0xc3814270) +... + +Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> +Cc: Sascha Hauer <s.hauer@pengutronix.de> +Cc: stable <stable@kernel.org> +Acked-by: Daniel Mack <daniel@caiaq.de> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/host/ehci-mxc.c | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +--- a/drivers/usb/host/ehci-mxc.c ++++ b/drivers/usb/host/ehci-mxc.c +@@ -207,10 +207,17 @@ static int ehci_mxc_drv_probe(struct pla + /* Initialize the transceiver */ + if (pdata->otg) { + pdata->otg->io_priv = hcd->regs + ULPI_VIEWPORT_OFFSET; +- if (otg_init(pdata->otg) != 0) +- dev_err(dev, "unable to init transceiver\n"); +- else if (otg_set_vbus(pdata->otg, 1) != 0) ++ ret = otg_init(pdata->otg); ++ if (ret) { ++ dev_err(dev, "unable to init transceiver, probably missing\n"); ++ ret = -ENODEV; ++ goto err_add; ++ } ++ ret = otg_set_vbus(pdata->otg, 1); ++ if (ret) { + dev_err(dev, "unable to enable vbus on transceiver\n"); ++ goto err_add; ++ } + } + + priv->hcd = hcd; |
