提交 a3839fbc 编写于 作者: M Maya Erez 提交者: Kalle Valo

wil6210: protect against sporadic interrupt during suspend flow

During the suspend flow, wil6210 HW can send sporadic interrupts,
while PCIe bus is not operational.
To prevent that, keep the interrupts disabled during the suspend
flow and re-enable them only after PCIe enablement in resume.
Signed-off-by: NMaya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
上级 b819447d
...@@ -80,12 +80,20 @@ int wil_suspend(struct wil6210_priv *wil, bool is_runtime) ...@@ -80,12 +80,20 @@ int wil_suspend(struct wil6210_priv *wil, bool is_runtime)
} }
} }
if (wil->platform_ops.suspend) /* Disable PCIe IRQ to prevent sporadic IRQs when PCIe is suspending */
wil_dbg_pm(wil, "Disabling PCIe IRQ before suspending\n");
wil_disable_irq(wil);
if (wil->platform_ops.suspend) {
rc = wil->platform_ops.suspend(wil->platform_handle); rc = wil->platform_ops.suspend(wil->platform_handle);
if (rc)
wil_enable_irq(wil);
}
out: out:
wil_dbg_pm(wil, "suspend: %s => %d\n", wil_dbg_pm(wil, "suspend: %s => %d\n",
is_runtime ? "runtime" : "system", rc); is_runtime ? "runtime" : "system", rc);
return rc; return rc;
} }
...@@ -104,6 +112,9 @@ int wil_resume(struct wil6210_priv *wil, bool is_runtime) ...@@ -104,6 +112,9 @@ int wil_resume(struct wil6210_priv *wil, bool is_runtime)
} }
} }
wil_dbg_pm(wil, "Enabling PCIe IRQ\n");
wil_enable_irq(wil);
/* if netif up, bring hardware up /* if netif up, bring hardware up
* During open(), IFF_UP set after actual device method * During open(), IFF_UP set after actual device method
* invocation. This prevent recursive call to wil_up() * invocation. This prevent recursive call to wil_up()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册