Commit 923e5b3d authored by Bruno Randolf's avatar Bruno Randolf Committed by John W. Linville

ath5k: Count how many times a queue got stuck

Add a counter to show how many times a queue got stuck in the debugfs queue
file.
Signed-off-by: default avatarBruno Randolf <br1@einfach.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 4edd761f
......@@ -892,6 +892,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];
}
......@@ -2193,6 +2194,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 {
......
......@@ -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
......
......@@ -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))
......
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