summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_gadget.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2016-10-19 19:03:39 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-24 14:29:08 +0200
commitd8e5f0eca1e88215e45aca27115ea747e6164da1 (patch)
treed30a34150e242c46758c0c6c9e150d45879dc0fb /drivers/usb/musb/musb_gadget.c
parentusb: ehci-platform: increase EHCI_MAX_RSTS to 4 (diff)
downloadlinux-d8e5f0eca1e88215e45aca27115ea747e6164da1.tar.xz
linux-d8e5f0eca1e88215e45aca27115ea747e6164da1.zip
usb: musb: Fix hardirq-safe hardirq-unsafe lock order error
If we configure musb with 2430 glue as a peripheral, and then rmmod omap2430 module, we'll get the following error: [ INFO: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected ] ... rmmod/413 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: (&phy->mutex){+.+.+.}, at: [<c04b9fd0>] phy_power_off+0x1c/0xb8 [ 204.678710] and this task is already holding: (&(&musb->lock)->rlock){-.-...}, at: [<bf3a482c>] musb_gadget_stop+0x24/0xec [musb_hdrc] which would create a new lock dependency: (&(&musb->lock)->rlock){-.-...} -> (&phy->mutex){+.+.+.} ... This is because some glue layers expect musb_platform_enable/disable to be called with spinlock held, and 2430 glue layer has USB PHY on the I2C bus using a mutex. We could fix the glue layers to take the spinlock, but we still have a problem of musb_plaform_enable/disable being called in an unbalanced manner. So that would still lead into USB PHY enable/disable related problems for omap2430 glue layer. While it makes sense to only enable USB PHY when needed from PM point of view, in this case we just can't do it yet without breaking things. So let's just revert phy_enable/disable related changes instead and reconsider this after we have fixed musb_platform_enable/disable to be balanced. Fixes: a83e17d0f73b ("usb: musb: Improve PM runtime and phy handling for 2430 glue layer") Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/musb/musb_gadget.c')
0 files changed, 0 insertions, 0 deletions