diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2013-03-05 06:04:23 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-03-05 06:26:59 -0500 |
commit | f8c4b0e73b636fe06e8283f29905c2e60ed66fa1 (patch) | |
tree | 6aabcbd375af4862a443f67123773f80835b4e65 /drivers/usb | |
parent | e574d5708156585ee506b7f914ed4a55a319d294 (diff) |
usb: musb: omap2430: fix omap_musb_mailbox glue check again
Commit 80ab72e1 (usb: musb: omap2430: fix the readiness check
in omap_musb_mailbox) made the check incorrect, as we will lose the
glue/link status during the normal built-in probe order (twl4030_usb is
probed after musb omap2430, but before musb core is ready).
As a result, if you boot with USB cable on and load g_ether, the
connection does not work as the code thinks the cable is off and the
phy gets powered down immediately. This is a major regression in 3.9-rc1.
So the proper check should be: exit if _glue is NULL, but if it's
initialized we memorize the status, and then check if the musb core
is ready.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/musb/omap2430.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 1762354fe793..2a39c110d3d5 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
@@ -237,9 +237,13 @@ void omap_musb_mailbox(enum omap_musb_vbus_id_status status) | |||
237 | { | 237 | { |
238 | struct omap2430_glue *glue = _glue; | 238 | struct omap2430_glue *glue = _glue; |
239 | 239 | ||
240 | if (glue && glue_to_musb(glue)) { | 240 | if (!glue) { |
241 | glue->status = status; | 241 | pr_err("%s: musb core is not yet initialized\n", __func__); |
242 | } else { | 242 | return; |
243 | } | ||
244 | glue->status = status; | ||
245 | |||
246 | if (!glue_to_musb(glue)) { | ||
243 | pr_err("%s: musb core is not yet ready\n", __func__); | 247 | pr_err("%s: musb core is not yet ready\n", __func__); |
244 | return; | 248 | return; |
245 | } | 249 | } |