提交 f8c4b0e7 编写于 作者: A Aaro Koskinen 提交者: Felipe Balbi

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: NAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 e574d570
...@@ -237,9 +237,13 @@ void omap_musb_mailbox(enum omap_musb_vbus_id_status status) ...@@ -237,9 +237,13 @@ void omap_musb_mailbox(enum omap_musb_vbus_id_status status)
{ {
struct omap2430_glue *glue = _glue; struct omap2430_glue *glue = _glue;
if (glue && glue_to_musb(glue)) { if (!glue) {
glue->status = status; pr_err("%s: musb core is not yet initialized\n", __func__);
} else { return;
}
glue->status = status;
if (!glue_to_musb(glue)) {
pr_err("%s: musb core is not yet ready\n", __func__); pr_err("%s: musb core is not yet ready\n", __func__);
return; return;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册