MLK-21073 usb: cdns3: core: fix the oops when the interrupt occurs during suspend
When the interrupt occurs during the USB is entering suspend, the
cdns->lpm flag may not be updated well, the below oops may occur.
We treat above interrupt as wakeup interrupt, it should be handled
after lpm flag is set.
irq 120: nobody cared (try booting with the "irqpoll" option)
CPU: 0 PID: 107 Comm: kworker/0:1 Tainted: G O 4.14.78 #1
Hardware name: Freescale i.MX8QM MEK (DT)
Workqueue: pm pm_runtime_work
Call trace:
[<
ffff000008083230>] el1_irq+0xb0/0x124
[<
ffff000009028fcc>] _raw_spin_unlock_irqrestore+0x18/0x48
[<
ffff000008147a6c>] __irq_put_desc_unlock+0x1c/0x44
[<
ffff000008149e4c>] enable_irq+0x54/0x90
[<
ffff0000089cb08c>] cdns3_enter_suspend+0x30c/0x3ac
[<
ffff0000089cb274>] cdns3_runtime_suspend+0x40/0x78
[<
ffff000008796cd8>] pm_generic_runtime_suspend+0x28/0x48
[<
ffff0000087a7400>] genpd_runtime_suspend+0x90/0x21c
[<
ffff00000879a14c>] __rpm_callback+0x130/0x264
[<
ffff00000879a2a4>] rpm_callback+0x24/0x78
[<
ffff000008798ec8>] rpm_suspend+0x10c/0x668
[<
ffff0000087996b4>] rpm_idle+0x1c0/0x390
[<
ffff00000879aa6c>] pm_runtime_work+0x94/0xe0
[<
ffff0000080fac88>] process_one_work+0x140/0x3f8
[<
ffff0000080fb078>] worker_thread+0x138/0x3e4
[<
ffff0000081014e0>] kthread+0x104/0x130
[<
ffff00000808552c>] ret_from_fork+0x10/0x18
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
(cherry picked from commit
e9f0c22de405d2e7f9698e67fbebde1e5aa37fdc)