]> git.baikalelectronics.ru Git - kernel.git/commit
usb: musb: core: Fix pm runtime for deferred probe
authorTony Lindgren <tony@atomide.com>
Tue, 8 Dec 2015 05:23:15 +0000 (21:23 -0800)
committerFelipe Balbi <balbi@ti.com>
Tue, 8 Dec 2015 14:41:09 +0000 (08:41 -0600)
commit9aa6f14d6cd603e50fd10f08e85c9ae18b0e8fff
tree92228da51cff433b569da9e8faafa7f7589c8b49
parentc234217321d2b05829737a9a113908da7a408261
usb: musb: core: Fix pm runtime for deferred probe

If musb_init_controller fails at musb_platform_init, we have already
called pm_runtime_irq_safe for musb and that causes the pm runtime count
to be enabled for parent before the parent has completed initialization.
This causes pm to stop working as on unload nothing gets idled.

This issue can be reproduced at least with:

# modprobe omap2430
HS USB OTG: no transceiver configured
musb-hdrc musb-hdrc.0.auto: musb_init_controller failed with status -517
# modprobe phy-twl4030-usb
# rmmod omap2430

And after the steps above omap2430 will block deeper idle states on
omap3.

To fix this, let's not enable pm runtime until we need to and the
parent has been initialized. Note that this does not fix the issue of
PM being broken for musb during runtime.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/musb_core.c