MLK-17323 usb: cdns3: fix the kernel dump during the reboot stress test
authorPeter Chen <peter.chen@nxp.com>
Mon, 15 Jan 2018 02:16:03 +0000 (10:16 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Tue, 20 Mar 2018 19:55:25 +0000 (14:55 -0500)
During the reboot stress test, there may "nobody cared irq" for CDNS3,
the interrupts are occurred during the controller is entering low power
mode. In fact, we do no expect interrupt during this period, so disable
controller interrupt for it. With this patch, the kernel dump does
not occur again during reboot stress test.

[   18.460516] irq 44: nobody cared (try booting with the "irqpoll" option)
[   18.467222] CPU: 0 PID: 112 Comm: kworker/0:1 Not tainted 4.9.51-04150-ge84b58d-dirty #1198
[   18.475573] Hardware name: Freescale i.MX8QXP MEK (DT)
[   18.480720] Workqueue: pm pm_runtime_work
[   18.484739] Call trace:
[   18.487186] [<ffff0000080884e0>] dump_backtrace+0x0/0x1e0
[   18.492588] [<ffff0000080886d4>] show_stack+0x14/0x20
[   18.497644] [<ffff0000083e571c>] dump_stack+0x94/0xb8
[   18.502701] [<ffff0000081062c0>] __report_bad_irq+0x38/0xe8
[   18.508276] [<ffff000008106644>] note_interrupt+0x20c/0x2e0
[   18.513853] [<ffff00000810386c>] handle_irq_event_percpu+0x44/0x58
[   18.520038] [<ffff0000081038c8>] handle_irq_event+0x48/0x78
[   18.525608] [<ffff000008107260>] handle_fasteoi_irq+0xb8/0x1b0
[   18.531445] [<ffff000008102894>] generic_handle_irq+0x24/0x38
[   18.537187] [<ffff000008102f04>] __handle_domain_irq+0x5c/0xb8
[   18.543017] [<ffff00000808163c>] gic_handle_irq+0xbc/0x168
[   18.548506] Exception stack(0xffff80083ff4ae00 to 0xffff80083ff4af30)
[   18.554946] ae00: ffff80083ff4ae30 0001000000000000 ffff80083ff4af60 ffff0000080c1fec
[   18.562781] ae20: 0000000040000145 ffff80083a474000 0000000000000000 0000000000000000
[   18.570617] ae40: 00000000fffeecc3 ffff000008a2d368 00000000020c49ba 0000000000000020
[   18.578454] ae60: 000000000f78257c 7fffffffffffffff 0000000000000020 ffff80083a403f00
[   18.586290] ae80: ffff80083ff51ab0 ffff000008cb0b68 00000000000003ef 0000000000000000
[   18.594125] aea0: 0000000000000011 00000000000003ef 0000000000000019 0000000000000001
[   18.601962] aec0: 0000000000000007 ffff0000092f9000 ffff0000092f5b08 0000000000000000
[   18.609798] aee0: ffff000009501180 ffff80083a002a80 ffff80083a474000 00000000fffeecc2
[   18.617634] af00: ffff80083ff4b090 ffff000009336000 0000000000000002 ffff80083ff4af60
[   18.625469] af20: ffff0000080c243c ffff80083ff4af60
[   18.630343] [<ffff0000080827b0>] el1_irq+0xb0/0x124
[   18.635220] [<ffff0000080c243c>] irq_exit+0xac/0xf0
[   18.640099] [<ffff000008102f08>] __handle_domain_irq+0x60/0xb8
[   18.645928] [<ffff00000808163c>] gic_handle_irq+0xbc/0x168
[   18.651409] Exception stack(0xffff80083a477ad0 to 0xffff80083a477c00)

Acked-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
drivers/usb/cdns3/core.c

index 9f601cb..a823842 100644 (file)
@@ -701,6 +701,7 @@ static void cdns3_enter_suspend(struct cdns3 *cdns, bool suspend, bool wakeup)
        if (cdns->role != CDNS3_ROLE_HOST)
                return;
 
+       disable_irq(cdns->irq);
        if (suspend) {
                value = readl(otg_regs + OTGREFCLK);
                value |= OTG_STB_CLK_SWITCH_EN;
@@ -828,6 +829,7 @@ static void cdns3_enter_suspend(struct cdns3 *cdns, bool suspend, bool wakeup)
                if (timeout_us <= 0)
                        dev_err(cdns->dev, "wait xhci_power_on_ready timeout\n");
        }
+       enable_irq(cdns->irq);
 }
 
 #ifdef CONFIG_PM_SLEEP