提交 f8d2b920 编写于 作者: A Amitkumar Karwar 提交者: John W. Linville

mwifiex: fix hung task on command timeout

Sometimes when command timeout occurs due to a firmware or
hardware bug, there may be some synchronous commands in command
queue. These commands are never downloaded to firmware causing
hung task warnings. This patch replaces wait_event_interruptible
call with wait_event_interruptible_timeout to fix the issue.
Signed-off-by: NAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: NAvinash Patil <patila@marvell.com>
Signed-off-by: NBing Zhao <bzhao@marvell.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 20474129
...@@ -60,9 +60,10 @@ int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter, ...@@ -60,9 +60,10 @@ int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter,
int status; int status;
/* Wait for completion */ /* Wait for completion */
status = wait_event_interruptible(adapter->cmd_wait_q.wait, status = wait_event_interruptible_timeout(adapter->cmd_wait_q.wait,
*(cmd_queued->condition)); *(cmd_queued->condition),
if (status) { (12 * HZ));
if (status <= 0) {
dev_err(adapter->dev, "cmd_wait_q terminated: %d\n", status); dev_err(adapter->dev, "cmd_wait_q terminated: %d\n", status);
mwifiex_cancel_all_pending_cmd(adapter); mwifiex_cancel_all_pending_cmd(adapter);
return status; return status;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册