USB: dwc3-msm: Protect enabling phy irqs with mutex
Currently driver is enabling hsphy_irq and ssphy_irq at the end
of dwc3_msm_suspend() without any spinlock/mutex protection. But
if it happens that hsphy_irq or ssphy_irq gets fired right after
enablement of irqs, there is a chance that we might see warnings
related to unbalanced irq enable. This could happen due to flag
is not yet set to indicate phy irqs enabled in suspend(). This
might cause phy irq left enabled after resume and could cause
crash due to unclocked access in host mode. Fix the unbalance irq
enable by having mutex protection and also extend mutex protection
for dwc3_msm_suspend() and dwc3_msm_resume().
Change-Id: I8c2d26f82feb235add64305c1d0e5b686993e9e9
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
1 file changed