aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/wil6210/debugfs.c
diff options
context:
space:
mode:
authorVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>2014-12-23 02:47:08 -0500
committerKalle Valo <kvalo@codeaurora.org>2015-01-15 07:31:19 -0500
commit995cdd0ebd064156247c983c14e8e7aef23785c8 (patch)
tree5574d6642e47bae083666da1d9ac53fd80cf406a /drivers/net/wireless/ath/wil6210/debugfs.c
parent100106d7021fe34ba4d0195a519aa5e2ecae82ab (diff)
wil6210: improve debugfs for VRING
When printing VRING on debugfs (file "vrings"), software head & tail indexes were printed in decimal format while hardware tail in hexadecimal only. It is not comfortable to compare indexes in different formats; on the other hand, hexadecimal output useful to see hardware glitches. To serve all purposes, print hardware tail in both decimal and hexadecimal formats. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/debugfs.c')
-rw-r--r--drivers/net/wireless/ath/wil6210/debugfs.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c
index 32df4b7c5e62..59bc49475be4 100644
--- a/drivers/net/wireless/ath/wil6210/debugfs.c
+++ b/drivers/net/wireless/ath/wil6210/debugfs.c
@@ -50,6 +50,7 @@ static void wil_print_vring(struct seq_file *s, struct wil6210_priv *wil,
50 char _s, char _h) 50 char _s, char _h)
51{ 51{
52 void __iomem *x = wmi_addr(wil, vring->hwtail); 52 void __iomem *x = wmi_addr(wil, vring->hwtail);
53 u32 v;
53 54
54 seq_printf(s, "VRING %s = {\n", name); 55 seq_printf(s, "VRING %s = {\n", name);
55 seq_printf(s, " pa = %pad\n", &vring->pa); 56 seq_printf(s, " pa = %pad\n", &vring->pa);
@@ -58,10 +59,12 @@ static void wil_print_vring(struct seq_file *s, struct wil6210_priv *wil,
58 seq_printf(s, " swtail = %d\n", vring->swtail); 59 seq_printf(s, " swtail = %d\n", vring->swtail);
59 seq_printf(s, " swhead = %d\n", vring->swhead); 60 seq_printf(s, " swhead = %d\n", vring->swhead);
60 seq_printf(s, " hwtail = [0x%08x] -> ", vring->hwtail); 61 seq_printf(s, " hwtail = [0x%08x] -> ", vring->hwtail);
61 if (x) 62 if (x) {
62 seq_printf(s, "0x%08x\n", ioread32(x)); 63 v = ioread32(x);
63 else 64 seq_printf(s, "0x%08x = %d\n", v, v);
65 } else {
64 seq_puts(s, "???\n"); 66 seq_puts(s, "???\n");
67 }
65 68
66 if (vring->va && (vring->size < 1025)) { 69 if (vring->va && (vring->size < 1025)) {
67 uint i; 70 uint i;