* [PATCH] rtw89: add AXIDMA and TX FIFO dump in mac_mem_dump
@ 2021-11-19 5:59 Ping-Ke Shih
2021-11-19 20:06 ` Larry Finger
0 siblings, 1 reply; 3+ messages in thread
From: Ping-Ke Shih @ 2021-11-19 5:59 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, leo.li
From: Chia-Yuan Li <leo.li@realtek.com>
The AXIDMA is tx/rx packet transmission between PCIE host
and device, and TX FIFO is MAC TX data.
We dump them to ensure these memory buffers correct.
Signed-off-by: Chia-Yuan Li <leo.li@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/debug.c | 5 +++++
drivers/net/wireless/realtek/rtw89/mac.h | 10 ++++++++++
2 files changed, 15 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtw89/debug.c b/drivers/net/wireless/realtek/rtw89/debug.c
index 29eb188c888c7..dabee20b37c49 100644
--- a/drivers/net/wireless/realtek/rtw89/debug.c
+++ b/drivers/net/wireless/realtek/rtw89/debug.c
@@ -723,6 +723,7 @@ rtw89_debug_priv_mac_mem_dump_select(struct file *filp,
}
static const u32 mac_mem_base_addr_table[RTW89_MAC_MEM_MAX] = {
+ [RTW89_MAC_MEM_AXIDMA] = AXIDMA_BASE_ADDR,
[RTW89_MAC_MEM_SHARED_BUF] = SHARED_BUF_BASE_ADDR,
[RTW89_MAC_MEM_DMAC_TBL] = DMAC_TBL_BASE_ADDR,
[RTW89_MAC_MEM_SHCUT_MACHDR] = SHCUT_MACHDR_BASE_ADDR,
@@ -735,6 +736,10 @@ static const u32 mac_mem_base_addr_table[RTW89_MAC_MEM_MAX] = {
[RTW89_MAC_MEM_BA_CAM] = BA_CAM_BASE_ADDR,
[RTW89_MAC_MEM_BCN_IE_CAM0] = BCN_IE_CAM0_BASE_ADDR,
[RTW89_MAC_MEM_BCN_IE_CAM1] = BCN_IE_CAM1_BASE_ADDR,
+ [RTW89_MAC_MEM_TXD_FIFO_0] = TXD_FIFO_0_BASE_ADDR,
+ [RTW89_MAC_MEM_TXD_FIFO_1] = TXD_FIFO_1_BASE_ADDR,
+ [RTW89_MAC_MEM_TXDATA_FIFO_0] = TXDATA_FIFO_0_BASE_ADDR,
+ [RTW89_MAC_MEM_TXDATA_FIFO_1] = TXDATA_FIFO_1_BASE_ADDR,
};
static void rtw89_debug_dump_mac_mem(struct seq_file *m,
diff --git a/drivers/net/wireless/realtek/rtw89/mac.h b/drivers/net/wireless/realtek/rtw89/mac.h
index 6f3db8a2a9c2a..94cd29bd83d77 100644
--- a/drivers/net/wireless/realtek/rtw89/mac.h
+++ b/drivers/net/wireless/realtek/rtw89/mac.h
@@ -227,6 +227,7 @@ enum rtw89_mac_dbg_port_sel {
/* SRAM mem dump */
#define R_AX_INDIR_ACCESS_ENTRY 0x40000
+#define AXIDMA_BASE_ADDR 0x18006000
#define STA_SCHED_BASE_ADDR 0x18808000
#define RXPLD_FLTR_CAM_BASE_ADDR 0x18813000
#define SECURITY_CAM_BASE_ADDR 0x18814000
@@ -240,10 +241,15 @@ enum rtw89_mac_dbg_port_sel {
#define DMAC_TBL_BASE_ADDR 0x18800000
#define SHCUT_MACHDR_BASE_ADDR 0x18800800
#define BCN_IE_CAM1_BASE_ADDR 0x188A0000
+#define TXD_FIFO_0_BASE_ADDR 0x18856200
+#define TXD_FIFO_1_BASE_ADDR 0x188A1080
+#define TXDATA_FIFO_0_BASE_ADDR 0x18856000
+#define TXDATA_FIFO_1_BASE_ADDR 0x188A1000
#define CCTL_INFO_SIZE 32
enum rtw89_mac_mem_sel {
+ RTW89_MAC_MEM_AXIDMA,
RTW89_MAC_MEM_SHARED_BUF,
RTW89_MAC_MEM_DMAC_TBL,
RTW89_MAC_MEM_SHCUT_MACHDR,
@@ -256,6 +262,10 @@ enum rtw89_mac_mem_sel {
RTW89_MAC_MEM_BA_CAM,
RTW89_MAC_MEM_BCN_IE_CAM0,
RTW89_MAC_MEM_BCN_IE_CAM1,
+ RTW89_MAC_MEM_TXD_FIFO_0,
+ RTW89_MAC_MEM_TXD_FIFO_1,
+ RTW89_MAC_MEM_TXDATA_FIFO_0,
+ RTW89_MAC_MEM_TXDATA_FIFO_1,
/* keep last */
RTW89_MAC_MEM_LAST,
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] rtw89: add AXIDMA and TX FIFO dump in mac_mem_dump
2021-11-19 5:59 [PATCH] rtw89: add AXIDMA and TX FIFO dump in mac_mem_dump Ping-Ke Shih
@ 2021-11-19 20:06 ` Larry Finger
2021-11-22 2:15 ` Pkshih
0 siblings, 1 reply; 3+ messages in thread
From: Larry Finger @ 2021-11-19 20:06 UTC (permalink / raw)
To: Ping-Ke Shih, kvalo; +Cc: linux-wireless, leo.li
On 11/18/21 23:59, Ping-Ke Shih wrote:
> From: Chia-Yuan Li <leo.li@realtek.com>
>
> The AXIDMA is tx/rx packet transmission between PCIE host
> and device, and TX FIFO is MAC TX data.
> We dump them to ensure these memory buffers correct.
>
> Signed-off-by: Chia-Yuan Li <leo.li@realtek.com>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
The code in this patch is fine, but I think you may want to change the commit
message. Te mo, "We dump them to ensure these memory buffers correct" means that
the change here will fix the memory buffers. I think you want to say "We dump
them to verify that these memory buffers are correct." This means that you are
providing a way to dump the buffers so that their correctness can be determined.
Reviewed-by: Larry Finger <Larry.Finger@lwfinger.net"
Larry
> ---
> drivers/net/wireless/realtek/rtw89/debug.c | 5 +++++
> drivers/net/wireless/realtek/rtw89/mac.h | 10 ++++++++++
> 2 files changed, 15 insertions(+)
>
> diff --git a/drivers/net/wireless/realtek/rtw89/debug.c b/drivers/net/wireless/realtek/rtw89/debug.c
> index 29eb188c888c7..dabee20b37c49 100644
> --- a/drivers/net/wireless/realtek/rtw89/debug.c
> +++ b/drivers/net/wireless/realtek/rtw89/debug.c
> @@ -723,6 +723,7 @@ rtw89_debug_priv_mac_mem_dump_select(struct file *filp,
> }
>
> static const u32 mac_mem_base_addr_table[RTW89_MAC_MEM_MAX] = {
> + [RTW89_MAC_MEM_AXIDMA] = AXIDMA_BASE_ADDR,
> [RTW89_MAC_MEM_SHARED_BUF] = SHARED_BUF_BASE_ADDR,
> [RTW89_MAC_MEM_DMAC_TBL] = DMAC_TBL_BASE_ADDR,
> [RTW89_MAC_MEM_SHCUT_MACHDR] = SHCUT_MACHDR_BASE_ADDR,
> @@ -735,6 +736,10 @@ static const u32 mac_mem_base_addr_table[RTW89_MAC_MEM_MAX] = {
> [RTW89_MAC_MEM_BA_CAM] = BA_CAM_BASE_ADDR,
> [RTW89_MAC_MEM_BCN_IE_CAM0] = BCN_IE_CAM0_BASE_ADDR,
> [RTW89_MAC_MEM_BCN_IE_CAM1] = BCN_IE_CAM1_BASE_ADDR,
> + [RTW89_MAC_MEM_TXD_FIFO_0] = TXD_FIFO_0_BASE_ADDR,
> + [RTW89_MAC_MEM_TXD_FIFO_1] = TXD_FIFO_1_BASE_ADDR,
> + [RTW89_MAC_MEM_TXDATA_FIFO_0] = TXDATA_FIFO_0_BASE_ADDR,
> + [RTW89_MAC_MEM_TXDATA_FIFO_1] = TXDATA_FIFO_1_BASE_ADDR,
> };
>
> static void rtw89_debug_dump_mac_mem(struct seq_file *m,
> diff --git a/drivers/net/wireless/realtek/rtw89/mac.h b/drivers/net/wireless/realtek/rtw89/mac.h
> index 6f3db8a2a9c2a..94cd29bd83d77 100644
> --- a/drivers/net/wireless/realtek/rtw89/mac.h
> +++ b/drivers/net/wireless/realtek/rtw89/mac.h
> @@ -227,6 +227,7 @@ enum rtw89_mac_dbg_port_sel {
> /* SRAM mem dump */
> #define R_AX_INDIR_ACCESS_ENTRY 0x40000
>
> +#define AXIDMA_BASE_ADDR 0x18006000
> #define STA_SCHED_BASE_ADDR 0x18808000
> #define RXPLD_FLTR_CAM_BASE_ADDR 0x18813000
> #define SECURITY_CAM_BASE_ADDR 0x18814000
> @@ -240,10 +241,15 @@ enum rtw89_mac_dbg_port_sel {
> #define DMAC_TBL_BASE_ADDR 0x18800000
> #define SHCUT_MACHDR_BASE_ADDR 0x18800800
> #define BCN_IE_CAM1_BASE_ADDR 0x188A0000
> +#define TXD_FIFO_0_BASE_ADDR 0x18856200
> +#define TXD_FIFO_1_BASE_ADDR 0x188A1080
> +#define TXDATA_FIFO_0_BASE_ADDR 0x18856000
> +#define TXDATA_FIFO_1_BASE_ADDR 0x188A1000
>
> #define CCTL_INFO_SIZE 32
>
> enum rtw89_mac_mem_sel {
> + RTW89_MAC_MEM_AXIDMA,
> RTW89_MAC_MEM_SHARED_BUF,
> RTW89_MAC_MEM_DMAC_TBL,
> RTW89_MAC_MEM_SHCUT_MACHDR,
> @@ -256,6 +262,10 @@ enum rtw89_mac_mem_sel {
> RTW89_MAC_MEM_BA_CAM,
> RTW89_MAC_MEM_BCN_IE_CAM0,
> RTW89_MAC_MEM_BCN_IE_CAM1,
> + RTW89_MAC_MEM_TXD_FIFO_0,
> + RTW89_MAC_MEM_TXD_FIFO_1,
> + RTW89_MAC_MEM_TXDATA_FIFO_0,
> + RTW89_MAC_MEM_TXDATA_FIFO_1,
>
> /* keep last */
> RTW89_MAC_MEM_LAST,
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] rtw89: add AXIDMA and TX FIFO dump in mac_mem_dump
2021-11-19 20:06 ` Larry Finger
@ 2021-11-22 2:15 ` Pkshih
0 siblings, 0 replies; 3+ messages in thread
From: Pkshih @ 2021-11-22 2:15 UTC (permalink / raw)
To: Larry Finger, kvalo; +Cc: linux-wireless, 李佳遠
> -----Original Message-----
> From: Larry Finger <larry.finger@gmail.com> On Behalf Of Larry Finger
> Sent: Saturday, November 20, 2021 4:07 AM
> To: Pkshih <pkshih@realtek.com>; kvalo@codeaurora.org
> Cc: linux-wireless@vger.kernel.org; 李佳遠 <leo.li@realtek.com>
> Subject: Re: [PATCH] rtw89: add AXIDMA and TX FIFO dump in mac_mem_dump
>
> On 11/18/21 23:59, Ping-Ke Shih wrote:
> > From: Chia-Yuan Li <leo.li@realtek.com>
> >
> > The AXIDMA is tx/rx packet transmission between PCIE host
> > and device, and TX FIFO is MAC TX data.
> > We dump them to ensure these memory buffers correct.
> >
> > Signed-off-by: Chia-Yuan Li <leo.li@realtek.com>
> > Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
>
> The code in this patch is fine, but I think you may want to change the commit
> message. Te mo, "We dump them to ensure these memory buffers correct" means that
> the change here will fix the memory buffers. I think you want to say "We dump
> them to verify that these memory buffers are correct." This means that you are
> providing a way to dump the buffers so that their correctness can be determined.
>
> Reviewed-by: Larry Finger <Larry.Finger@lwfinger.net"
I have fixed and sent v2.
Thank you.
--
Ping-Ke
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-22 2:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-19 5:59 [PATCH] rtw89: add AXIDMA and TX FIFO dump in mac_mem_dump Ping-Ke Shih
2021-11-19 20:06 ` Larry Finger
2021-11-22 2:15 ` Pkshih
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).