Skip to content

Commit

Permalink
usb: musb: fix PHY power on/off
Browse files Browse the repository at this point in the history
commi 30a70b0 (usb: musb: fix obex in g_nokia.ko
causing kernel panic) removed phy_power_on()
and phy_power_off() calls from runtime PM callbacks
but it failed to note that the driver depended
on pm_runtime_get_sync() calls to power up the PHY,
thus leaving some platforms without any means to
have a working PHY.

Fix that by enabling the phy during omap2430_musb_init()
and killing it in omap2430_musb_exit().

Fixes: 30a70b0 (usb: musb: fix obex in g_nokia.ko causing kernel panic)
Cc: <stable@vger.kernel.org> # v3.14
Cc: Pali Rohár <pali.rohar@gmail.com>
Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Reported-by: Michael Scott <hashcode0f@gmail.com>
Tested-by: Michael Scott <hashcode0f@gmail.com>
Tested-by: Stefan Roese <sr@denx.de>
Reported-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Felipe Balbi committed Apr 15, 2014
1 parent c9eaa44 commit 3063a12
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usb/musb/omap2430.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ static int omap2430_musb_init(struct musb *musb)
omap_musb_set_mailbox(glue);

phy_init(musb->phy);
phy_power_on(musb->phy);

pm_runtime_put_noidle(musb->controller);
return 0;
Expand Down Expand Up @@ -478,6 +479,7 @@ static int omap2430_musb_exit(struct musb *musb)
del_timer_sync(&musb_idle_timer);

omap2430_low_level_exit(musb);
phy_power_off(musb->phy);
phy_exit(musb->phy);

return 0;
Expand Down

0 comments on commit 3063a12

Please sign in to comment.