From: Bruno Randolf <br1@einfach.org>
To: linville@tuxdriver.com
Cc: ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org
Subject: [PATCH 08/11] ath5k: Count how many times a queue got stuck
Date: Fri, 17 Sep 2010 11:37:02 +0900 [thread overview]
Message-ID: <20100917023702.24997.19042.stgit@tt-desk> (raw)
In-Reply-To: <20100917023543.24997.48466.stgit@tt-desk>
Add a counter to show how many times a queue got stuck in the debugfs queue
file.
Signed-off-by: Bruno Randolf <br1@einfach.org>
---
drivers/net/wireless/ath/ath5k/base.c | 2 ++
drivers/net/wireless/ath/ath5k/base.h | 1 +
drivers/net/wireless/ath/ath5k/debug.c | 2 ++
3 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index d13df7a..c4f0786 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -896,6 +896,7 @@ ath5k_txq_setup(struct ath5k_softc *sc,
txq->setup = true;
txq->txq_len = 0;
txq->txq_poll_mark = false;
+ txq->txq_stuck = 0;
}
return &sc->txqs[qnum];
}
@@ -2197,6 +2198,7 @@ ath5k_tx_complete_poll_work(struct work_struct *work)
"TX queue stuck %d\n",
txq->qnum);
needreset = true;
+ txq->txq_stuck++;
spin_unlock_bh(&txq->lock);
break;
} else {
diff --git a/drivers/net/wireless/ath/ath5k/base.h b/drivers/net/wireless/ath/ath5k/base.h
index d8e2674..7f9d0d3 100644
--- a/drivers/net/wireless/ath/ath5k/base.h
+++ b/drivers/net/wireless/ath/ath5k/base.h
@@ -88,6 +88,7 @@ struct ath5k_txq {
bool setup;
int txq_len; /* number of queued buffers */
bool txq_poll_mark;
+ unsigned int txq_stuck; /* informational counter */
};
#define ATH5K_LED_MAX_NAME_LEN 31
diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c
index b2c610b..6583a82 100644
--- a/drivers/net/wireless/ath/ath5k/debug.c
+++ b/drivers/net/wireless/ath/ath5k/debug.c
@@ -785,6 +785,8 @@ static ssize_t read_file_queue(struct file *file, char __user *user_buf,
len += snprintf(buf+len, sizeof(buf)-len,
" len: %d bufs: %d\n", txq->txq_len, n);
+ len += snprintf(buf+len, sizeof(buf)-len,
+ " stuck: %d\n", txq->txq_stuck);
}
if (len > sizeof(buf))
next prev parent reply other threads:[~2010-09-17 2:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-17 2:36 [PATCH 00/11] ath5k: Add multiple queues / QoS support + more Bruno Randolf
2010-09-17 2:36 ` [PATCH 01/11] ath/ath5k/ath9k: Fix crypto capabilities merge issue Bruno Randolf
2010-09-17 2:36 ` [PATCH 02/11] This change reorganizes the main ath5k file in order to re-group Bruno Randolf
2010-09-17 3:32 ` Bob Copeland
2010-09-17 2:36 ` [PATCH 03/11] ath5k: Use four hardware queues Bruno Randolf
2010-09-17 2:36 ` [PATCH 04/11] ath5k: Fix queue debug file Bruno Randolf
2010-09-17 2:36 ` [PATCH 05/11] ath5k: Fix TX queues stopping Bruno Randolf
2010-09-17 2:36 ` [PATCH 06/11] ath5k: Move tx frame completion into separate function Bruno Randolf
2010-09-17 2:36 ` [PATCH 07/11] ath5k: Add watchdog for stuck TX queues Bruno Randolf
2010-09-17 2:37 ` Bruno Randolf [this message]
2010-09-17 2:37 ` [PATCH 09/11] ath5k: Keep last descriptor in queue Bruno Randolf
2010-09-17 2:37 ` [PATCH 10/11] ath5k: Simplify cw_min/max and AIFS configuration Bruno Randolf
2010-09-17 2:37 ` [PATCH 11/11] ath5k: Add tx queue configuration function Bruno Randolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100917023702.24997.19042.stgit@tt-desk \
--to=br1@einfach.org \
--cc=ath5k-devel@lists.ath5k.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.