diff options
author | Paul Bolle <pebolle@tiscali.nl> | 2012-06-27 04:36:27 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-06-28 14:37:44 -0400 |
commit | 26b6da6b7829dc7cf5d21e854564be90c7928323 (patch) | |
tree | 2beecc84d1d0b8f46679a9253cc11a592c5139ac | |
parent | bf52592fe4901f486a5266fd73e4ee80205b18b4 (diff) |
iwlegacy: print how long queue was actually stuck
Every now and then, after resuming from suspend, the iwlegacy driver
prints
iwl4965 0000:03:00.0: Queue 2 stuck for 2000 ms.
iwl4965 0000:03:00.0: On demand firmware reload
I have no idea what causes these errors. But the code currently uses
wd_timeout in the first error. wd_timeout will generally be set at
IL_DEF_WD_TIMEOUT (ie, 2000). Perhaps printing for how long the queue
was actually stuck can clarify the cause of these errors.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlegacy/common.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c index cbf2dc18341f..763c7529921b 100644 --- a/drivers/net/wireless/iwlegacy/common.c +++ b/drivers/net/wireless/iwlegacy/common.c | |||
@@ -4717,10 +4717,11 @@ il_check_stuck_queue(struct il_priv *il, int cnt) | |||
4717 | struct il_tx_queue *txq = &il->txq[cnt]; | 4717 | struct il_tx_queue *txq = &il->txq[cnt]; |
4718 | struct il_queue *q = &txq->q; | 4718 | struct il_queue *q = &txq->q; |
4719 | unsigned long timeout; | 4719 | unsigned long timeout; |
4720 | unsigned long now = jiffies; | ||
4720 | int ret; | 4721 | int ret; |
4721 | 4722 | ||
4722 | if (q->read_ptr == q->write_ptr) { | 4723 | if (q->read_ptr == q->write_ptr) { |
4723 | txq->time_stamp = jiffies; | 4724 | txq->time_stamp = now; |
4724 | return 0; | 4725 | return 0; |
4725 | } | 4726 | } |
4726 | 4727 | ||
@@ -4728,9 +4729,9 @@ il_check_stuck_queue(struct il_priv *il, int cnt) | |||
4728 | txq->time_stamp + | 4729 | txq->time_stamp + |
4729 | msecs_to_jiffies(il->cfg->wd_timeout); | 4730 | msecs_to_jiffies(il->cfg->wd_timeout); |
4730 | 4731 | ||
4731 | if (time_after(jiffies, timeout)) { | 4732 | if (time_after(now, timeout)) { |
4732 | IL_ERR("Queue %d stuck for %u ms.\n", q->id, | 4733 | IL_ERR("Queue %d stuck for %u ms.\n", q->id, |
4733 | il->cfg->wd_timeout); | 4734 | jiffies_to_msecs(now - txq->time_stamp)); |
4734 | ret = il_force_reset(il, false); | 4735 | ret = il_force_reset(il, false); |
4735 | return (ret == -EAGAIN) ? 0 : 1; | 4736 | return (ret == -EAGAIN) ? 0 : 1; |
4736 | } | 4737 | } |