summaryrefslogtreecommitdiff
path: root/drivers/usb/chipidea/core.c
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@nxp.com>2017-09-25 17:37:28 +0800
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:28:36 +0800
commit61aef08486a7a4ebdfc40625c0f6e8fa5d834806 (patch)
tree029acaf2efc4353c360313ae2d7d11d6b0492ce0 /drivers/usb/chipidea/core.c
parentf384555f1c3c4867965f04dc3ed84f5cdd91fa42 (diff)
MLK-16532 usb: chipidea: do not call WARN_ON if controller is going to suspend twice
At current PM framework, the dev->runtime_suspend may be called after dev->system_suspend is called, and the dev->runtime_resume may be called before dev->system_suspend is called. So, we need to delete WARN_ON to avoid before dump: [ 466.712978] [<ffff200008c49cdc>] ci_hdrc_imx_runtime_suspend+0x2c/0xa8 [ 466.719619] [<ffff2000088c29e8>] pm_generic_runtime_suspend+0x48/0x68 [ 466.726168] [<ffff2000088d4f04>] genpd_runtime_suspend+0xcc/0x300 [ 466.732372] [<ffff2000088c7068>] pm_runtime_force_suspend+0x48/0xa8 [ 466.738748] [<ffff2000088d5330>] pm_genpd_suspend_noirq+0xa0/0x118 [ 466.745032] [<ffff2000088c86ec>] dpm_run_callback+0x4c/0xc0 [ 466.750709] [<ffff2000088c941c>] __device_suspend_noirq+0x194/0x3d0 [ 466.757080] [<ffff2000088cb460>] dpm_suspend_noirq+0x188/0x328 [ 466.763024] [<ffff200008143218>] suspend_devices_and_enter+0x230/0x650 [ 466.769655] [<ffff200008143990>] pm_suspend+0x358/0x3d0 [ 466.774984] [<ffff200008141f0c>] state_store+0x8c/0x100 [ 466.780321] [<ffff20000857a83c>] kobj_attr_store+0x44/0x60 [ 466.785915] [<ffff2000083436a8>] sysfs_kf_write+0x98/0xb0 [ 466.791419] [<ffff200008342118>] kernfs_fop_write+0x120/0x288 [ 466.797276] [<ffff20000828d518>] __vfs_write+0xc0/0x238 [ 466.802604] [<ffff20000828e900>] vfs_write+0xc8/0x248 [ 466.807764] [<ffff200008290678>] SyS_write+0xa0/0x110 [ 466.812919] [<ffff20000808374c>] __sys_trace_return+0x0/0x4 BuildInfo: - SCFW 1f59442e, IMX-MKIMAGE fb52c576, ATF - U-Boot 2017.03-imx_v2017.03+g34be5a2 Cc: Anson Huang <anson.huang@nxp.com> Acked-by: Jun Li <jun.li@nxp.com> Signed-off-by: Peter Chen <peter.chen@nxp.com>
Diffstat (limited to 'drivers/usb/chipidea/core.c')
-rw-r--r--drivers/usb/chipidea/core.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index 1a83465eee36..b850178694b6 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -1241,10 +1241,8 @@ static int ci_controller_resume(struct device *dev)
dev_dbg(dev, "at %s\n", __func__);
- if (!ci->in_lpm) {
- WARN_ON(1);
+ if (!ci->in_lpm)
return 0;
- }
ci_hdrc_enter_lpm(ci, false);
@@ -1363,10 +1361,8 @@ static int ci_runtime_suspend(struct device *dev)
dev_dbg(dev, "at %s\n", __func__);
- if (ci->in_lpm) {
- WARN_ON(1);
+ if (ci->in_lpm)
return 0;
- }
if (ci_otg_is_fsm_mode(ci))
ci_otg_fsm_suspend_for_srp(ci);