提交 51495288 编写于 作者: A Amitkumar Karwar 提交者: Kalle Valo

mwifiex: fix PCIe legacy interrupt problem

In corner case, we may end up processing same interrupt twice.
We have a logic to read pending interrupts at the end of interrupt
processing routine. It has a race with interrupts read in interrupt
handler. This patch solves the problem by ORing the interrupt bitmap
in this case.

The symptom for this bug is below messages in dmesg log.

[   11.522123] mwifiex_pcie 0000:01:00.0: CMD_RESP: invalid cmd resp
[   11.680412] mwifiex_pcie 0000:01:00.0: There is no command but got cmdrsp

Link: https://bugzilla.kernel.org/show_bug.cgi?id=109681Signed-off-by: NAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: NCathy Luo <cluo@marvell.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 2af86f9d
...@@ -2300,6 +2300,12 @@ static int mwifiex_process_pcie_int(struct mwifiex_adapter *adapter) ...@@ -2300,6 +2300,12 @@ static int mwifiex_process_pcie_int(struct mwifiex_adapter *adapter)
} }
} }
if (!card->msi_enable) {
spin_lock_irqsave(&adapter->int_lock, flags);
pcie_ireg |= adapter->int_status;
adapter->int_status = 0;
spin_unlock_irqrestore(&adapter->int_lock, flags);
}
} }
mwifiex_dbg(adapter, INTR, mwifiex_dbg(adapter, INTR,
"info: cmd_sent=%d data_sent=%d\n", "info: cmd_sent=%d data_sent=%d\n",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册