Commit e11d2bf
Peter Chen
usb: cdns3: gadget: own the lock wrongly at the suspend routine
When the system goes to suspend, if the controller is at device mode with
cable connecting to host, the call stack is: cdns3_suspend->
cdns3_gadget_suspend -> cdns3_disconnect_gadget, after cdns3_disconnect_gadget
is called, it owns lock wrongly, it causes the system being deadlock after
resume due to at cdns3_device_thread_irq_handler, it tries to get the lock,
but can't get it forever.
To fix it, we delete the unlock-lock operations at cdns3_disconnect_gadget,
and do it at the caller.
Fixes: b1234e3 ("usb: cdns3: add runtime PM support")
Acked-by: Pawel Laszczak <pawell@cadence.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>1 parent 52d3967 commit e11d2bf
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1750 | 1750 | | |
1751 | 1751 | | |
1752 | 1752 | | |
1753 | | - | |
1754 | | - | |
| 1753 | + | |
1755 | 1754 | | |
1756 | | - | |
1757 | | - | |
1758 | 1755 | | |
1759 | 1756 | | |
1760 | 1757 | | |
| |||
1765 | 1762 | | |
1766 | 1763 | | |
1767 | 1764 | | |
| 1765 | + | |
1768 | 1766 | | |
1769 | 1767 | | |
1770 | 1768 | | |
| |||
1789 | 1787 | | |
1790 | 1788 | | |
1791 | 1789 | | |
| 1790 | + | |
1792 | 1791 | | |
| 1792 | + | |
1793 | 1793 | | |
1794 | 1794 | | |
1795 | 1795 | | |
| |||
3275 | 3275 | | |
3276 | 3276 | | |
3277 | 3277 | | |
| 3278 | + | |
3278 | 3279 | | |
3279 | 3280 | | |
3280 | 3281 | | |
| 3282 | + | |
3281 | 3283 | | |
| 3284 | + | |
3282 | 3285 | | |
3283 | 3286 | | |
3284 | 3287 | | |
| |||
0 commit comments