Commit c9d907de authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by Ben Hutchings

iwlegacy: always monitor for stuck queues

commit c2ca7d92 upstream.

This is iwlegacy version of:

commit 342bbf3f
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Sun Mar 4 08:50:46 2012 -0800

    iwlwifi: always monitor for stuck queues

    If we only monitor while associated, the following
    can happen:
     - we're associated, and the queue stuck check
       runs, setting the queue "touch" time to X
     - we disassociate, stopping the monitoring,
       which leaves the time set to X
     - almost 2s later, we associate, and enqueue
       a frame
     - before the frame is transmitted, we monitor
       for stuck queues, and find the time set to
       X, although it is now later than X + 2000ms,
       so we decide that the queue is stuck and
       erroneously restart the device
Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
[bwh: Backported to 3.2: adjust filename, function and variable names]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 04208303
...@@ -1884,7 +1884,6 @@ void iwl_legacy_bg_watchdog(unsigned long data) ...@@ -1884,7 +1884,6 @@ void iwl_legacy_bg_watchdog(unsigned long data)
return; return;
/* monitor and check for other stuck queues */ /* monitor and check for other stuck queues */
if (iwl_legacy_is_any_associated(priv)) {
for (cnt = 0; cnt < priv->hw_params.max_txq_num; cnt++) { for (cnt = 0; cnt < priv->hw_params.max_txq_num; cnt++) {
/* skip as we already checked the command queue */ /* skip as we already checked the command queue */
if (cnt == priv->cmd_queue) if (cnt == priv->cmd_queue)
...@@ -1892,7 +1891,6 @@ void iwl_legacy_bg_watchdog(unsigned long data) ...@@ -1892,7 +1891,6 @@ void iwl_legacy_bg_watchdog(unsigned long data)
if (iwl_legacy_check_stuck_queue(priv, cnt)) if (iwl_legacy_check_stuck_queue(priv, cnt))
return; return;
} }
}
mod_timer(&priv->watchdog, jiffies + mod_timer(&priv->watchdog, jiffies +
msecs_to_jiffies(IWL_WD_TICK(timeout))); msecs_to_jiffies(IWL_WD_TICK(timeout)));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment