a224b626243c9c561c8d9356b648c7b18c1da8d6
[openwrt/staging/ldir.git] /
1 From: Lorenzo Bianconi <lorenzo@kernel.org>
2 Date: Sun, 27 Aug 2023 19:31:41 +0200
3 Subject: [PATCH] net: ethernet: mtk_wed: add some more info in wed_txinfo_show
4 handler
5
6 Add some new info in Wireless Ethernet Dispatcher wed_txinfo_show
7 debugfs handler useful during debugging.
8
9 Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
10 Link: https://lore.kernel.org/r/3390292655d568180b73d2a25576f61aa63310e5.1693157377.git.lorenzo@kernel.org
11 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
12 ---
13
14 --- a/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c
15 +++ b/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c
16 @@ -127,8 +127,17 @@ wed_txinfo_show(struct seq_file *s, void
17 DUMP_WDMA_RING(WDMA_RING_RX(0)),
18 DUMP_WDMA_RING(WDMA_RING_RX(1)),
19
20 - DUMP_STR("TX FREE"),
21 + DUMP_STR("WED TX FREE"),
22 DUMP_WED(WED_RX_MIB(0)),
23 + DUMP_WED_RING(WED_RING_RX(0)),
24 + DUMP_WED(WED_WPDMA_RX_COHERENT_MIB(0)),
25 + DUMP_WED(WED_RX_MIB(1)),
26 + DUMP_WED_RING(WED_RING_RX(1)),
27 + DUMP_WED(WED_WPDMA_RX_COHERENT_MIB(1)),
28 +
29 + DUMP_STR("WED WPDMA TX FREE"),
30 + DUMP_WED_RING(WED_WPDMA_RING_RX(0)),
31 + DUMP_WED_RING(WED_WPDMA_RING_RX(1)),
32 };
33 struct mtk_wed_hw *hw = s->private;
34 struct mtk_wed_device *dev = hw->wed_dev;
35 --- a/drivers/net/ethernet/mediatek/mtk_wed_regs.h
36 +++ b/drivers/net/ethernet/mediatek/mtk_wed_regs.h
37 @@ -266,6 +266,8 @@ struct mtk_wdma_desc {
38
39 #define MTK_WED_WPDMA_TX_MIB(_n) (0x5a0 + (_n) * 4)
40 #define MTK_WED_WPDMA_TX_COHERENT_MIB(_n) (0x5d0 + (_n) * 4)
41 +#define MTK_WED_WPDMA_RX_MIB(_n) (0x5e0 + (_n) * 4)
42 +#define MTK_WED_WPDMA_RX_COHERENT_MIB(_n) (0x5f0 + (_n) * 4)
43
44 #define MTK_WED_WPDMA_RING_TX(_n) (0x600 + (_n) * 0x10)
45 #define MTK_WED_WPDMA_RING_RX(_n) (0x700 + (_n) * 0x10)