Message ID | 20160407130251.GA19696@c50.bag.software (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Kalle Valo |
Headers | show |
Hi Vishal, 2016-04-07 15:02 GMT+02:00 Vishal Thanki <vishalthanki@gmail.com>: > Hi All, > > I noticed that sometime I see the kernel trace while system enters into > suspend. The trace log is attached with this email. > > From the kernel trace it appears that mwifiex_cancel_all_pending_cmd() > function tries to cancel the current command by invoking > mwifiex_complete_cmd(). Just before calling this routine, the > adapter->curr_cmd->wait_q_enabled is set to false. And there is a > WARN_ON() in the mwifiex_complete_cmd() routine on this variable being > false, because this condition will always evaluate to true. thanks for the analysis. tested-by: afenkart@gmail.com > > I think by setting the wait_q_enabled flag to false after calling the > mwifiex_complete_cmd() should fix this problem. I have attached the > patch for the same, however I am not sure if that is the right way to > fix this issue. If there is any better way to fix it, please suggest. > > Thanks, > Vishal -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Apr 7, 2016 at 11:12 PM, Andreas Fenkart <afenkart@gmail.com> wrote: > Hi Vishal, > > 2016-04-07 15:02 GMT+02:00 Vishal Thanki <vishalthanki@gmail.com>: >> Hi All, >> >> I noticed that sometime I see the kernel trace while system enters into >> suspend. The trace log is attached with this email. >> >> From the kernel trace it appears that mwifiex_cancel_all_pending_cmd() >> function tries to cancel the current command by invoking >> mwifiex_complete_cmd(). Just before calling this routine, the >> adapter->curr_cmd->wait_q_enabled is set to false. And there is a >> WARN_ON() in the mwifiex_complete_cmd() routine on this variable being >> false, because this condition will always evaluate to true. > > thanks for the analysis. > tested-by: afenkart@gmail.com > Thanks for the feedback. Should I submit the patch as a separate email? Vishal -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/wireless/marvell/mwifiex/cmdevt.c b/drivers/net/wireless/marvell/mwifiex/cmdevt.c index a12adee..6f047064 100644 --- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c +++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c @@ -1009,9 +1009,9 @@ mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter) spin_lock_irqsave(&adapter->mwifiex_cmd_lock, cmd_flags); /* Cancel current cmd */ if ((adapter->curr_cmd) && (adapter->curr_cmd->wait_q_enabled)) { - adapter->curr_cmd->wait_q_enabled = false; adapter->cmd_wait_q.status = -1; mwifiex_complete_cmd(adapter, adapter->curr_cmd); + adapter->curr_cmd->wait_q_enabled = false; /* no recycle probably wait for response */ } /* Cancel all pending command */