提交 2ce2c3ac 编写于 作者: P Pavankumar Kondeti 提交者: Greg Kroah-Hartman

USB: OTG: msm: Clear in_lpm flag before enabling the IRQ in resume

The current code is clearing in_lpm flag after enabling the IRQ.
If IRQ comes immediately before in_lpm flag is set, it thinks that
hardware is in low power mode and disables the IRQ.  Fix this by
clearing in_lpm flag before enabling the IRQ.
Signed-off-by: NPavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 ac1aa6a2
...@@ -389,14 +389,14 @@ static int msm_otg_resume(struct msm_otg *motg) ...@@ -389,14 +389,14 @@ static int msm_otg_resume(struct msm_otg *motg)
if (bus) if (bus)
set_bit(HCD_FLAG_HW_ACCESSIBLE, &(bus_to_hcd(bus))->flags); set_bit(HCD_FLAG_HW_ACCESSIBLE, &(bus_to_hcd(bus))->flags);
atomic_set(&motg->in_lpm, 0);
if (motg->async_int) { if (motg->async_int) {
motg->async_int = 0; motg->async_int = 0;
pm_runtime_put(otg->dev); pm_runtime_put(otg->dev);
enable_irq(motg->irq); enable_irq(motg->irq);
} }
atomic_set(&motg->in_lpm, 0);
dev_info(otg->dev, "USB exited from low power mode\n"); dev_info(otg->dev, "USB exited from low power mode\n");
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册