From: Ping-Ke Shih <pkshih@realtek.com>
To: Fiona Klute <fiona.klute@gmx.de>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: "Kalle Valo" <kvalo@kernel.org>,
"Ulf Hansson" <ulf.hansson@linaro.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
"Pavel Machek" <pavel@ucw.cz>, "Ondřej Jirman" <megi@xff.cz>
Subject: RE: [PATCH 2/9] wifi: rtw88: Debug output for rtw8723x EFUSE
Date: Mon, 5 Feb 2024 02:17:27 +0000 [thread overview]
Message-ID: <40d7f3f551254cb8b3cdfcba25052550@realtek.com> (raw)
In-Reply-To: <20240202121050.977223-3-fiona.klute@gmx.de>
> -----Original Message-----
> From: Fiona Klute <fiona.klute@gmx.de>
> Sent: Friday, February 2, 2024 8:11 PM
> To: linux-wireless@vger.kernel.org; Ping-Ke Shih <pkshih@realtek.com>
> Cc: Kalle Valo <kvalo@kernel.org>; Ulf Hansson <ulf.hansson@linaro.org>; linux-mmc@vger.kernel.org; Pavel
> Machek <pavel@ucw.cz>; Ondřej Jirman <megi@xff.cz>; Fiona Klute <fiona.klute@gmx.de>
> Subject: [PATCH 2/9] wifi: rtw88: Debug output for rtw8723x EFUSE
>
> Some 8703b chips contain invalid EFUSE data, getting detailed
> information is critical when analyzing issues caused by that.
>
> Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
> ---
> The TX power table debug output function (rtw8723x_debug_txpwr_limit)
> isn't specific to the chip family. Should I move it to debug.c
> (e.g. as rtw_debug_txpwr_limit_2g)?
I think no need. My another thinking is to add an debugfs entry to read
these stuff out, but if failed to probe we can't get these information.
>
> drivers/net/wireless/realtek/rtw88/rtw8723x.c | 159 ++++++++++++++++++
> drivers/net/wireless/realtek/rtw88/rtw8723x.h | 11 ++
> 2 files changed, 170 insertions(+)
>
> diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723x.c
> b/drivers/net/wireless/realtek/rtw88/rtw8723x.c
> index 2b58064547..bca650c6bb 100644
> --- a/drivers/net/wireless/realtek/rtw88/rtw8723x.c
> +++ b/drivers/net/wireless/realtek/rtw88/rtw8723x.c
> @@ -63,6 +63,163 @@ static void __rtw8723x_lck(struct rtw_dev *rtwdev)
> rtw_write8(rtwdev, REG_TXPAUSE, 0x00);
> }
>
> +#define DBG_EFUSE_VAL(map, name) \
I think we should not hide 'rtwdev'
> + rtw_dbg(rtwdev, RTW_DBG_EFUSE, # name "=0x%x\n", \
> + (map)->name)
> +#define DBG_EFUSE_2BYTE(map, name) \
> + rtw_dbg(rtwdev, RTW_DBG_EFUSE, # name "=0x%x%x\n", \
Should format be '%02x%02x' for two bytes?
> + (map)->name[0], (map)->name[1])
> +
> +static void rtw8723xe_efuse_debug(struct rtw_dev *rtwdev,
> + struct rtw8723x_efuse *map)
> +{
> + rtw_dbg(rtwdev, RTW_DBG_EFUSE, "mac_addr=%pM\n", map->e.mac_addr);
> + DBG_EFUSE_2BYTE(map, e.vendor_id);
> + DBG_EFUSE_2BYTE(map, e.device_id);
> + DBG_EFUSE_2BYTE(map, e.sub_vendor_id);
> + DBG_EFUSE_2BYTE(map, e.sub_device_id);
> +}
> +
> +static void rtw8723xu_efuse_debug(struct rtw_dev *rtwdev,
> + struct rtw8723x_efuse *map)
> +{
> + DBG_EFUSE_2BYTE(map, u.vendor_id);
> + DBG_EFUSE_2BYTE(map, u.product_id);
> + DBG_EFUSE_VAL(map, u.usb_option);
> + rtw_dbg(rtwdev, RTW_DBG_EFUSE, "mac_addr=%pM\n", map->u.mac_addr);
Just curious why 'mac_addr' is the first one in rtw8723xe_efuse_debug(), but
the last one here?
> +}
> +
[...]
next prev parent reply other threads:[~2024-02-05 2:17 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-02 12:10 [PATCH 0/9] rtw88: Add support for RTL8723CS/RTL8703B Fiona Klute
2024-02-02 12:10 ` [PATCH 1/9] wifi: rtw88: Shared module for rtw8723x devices Fiona Klute
2024-02-03 14:20 ` kernel test robot
2024-02-03 15:04 ` kernel test robot
2024-02-03 21:47 ` kernel test robot
2024-02-04 10:03 ` kernel test robot
2024-02-05 1:45 ` Ping-Ke Shih
2024-02-05 16:47 ` Fiona Klute
2024-02-06 0:59 ` Ping-Ke Shih
2024-02-02 12:10 ` [PATCH 2/9] wifi: rtw88: Debug output for rtw8723x EFUSE Fiona Klute
2024-02-05 2:17 ` Ping-Ke Shih [this message]
2024-02-05 17:10 ` Fiona Klute
2024-02-02 12:10 ` [PATCH 3/9] wifi: rtw88: Add definitions for 8703b chip Fiona Klute
2024-02-02 12:10 ` [PATCH 4/9] wifi: rtw88: Add rtw8703b.h Fiona Klute
2024-02-05 2:24 ` Ping-Ke Shih
2024-02-06 1:08 ` Fiona Klute
2024-02-06 2:02 ` Ping-Ke Shih
2024-02-02 12:10 ` [PATCH 5/9] wifi: rtw88: Add rtw8703b.c Fiona Klute
2024-02-05 3:01 ` Ping-Ke Shih
2024-02-05 19:06 ` Fiona Klute
2024-02-06 1:37 ` Ping-Ke Shih
2024-02-06 8:12 ` Pavel Machek
2024-02-07 5:58 ` Ping-Ke Shih
2024-02-02 12:10 ` [PATCH 6/9] wifi: rtw88: Add rtw8703b_tables.h Fiona Klute
2024-02-02 12:10 ` [PATCH 7/9] wifi: rtw88: Add rtw8703b_tables.c Fiona Klute
2024-02-02 12:10 ` [PATCH 8/9] wifi: rtw88: Reset 8703b firmware before download Fiona Klute
2024-02-05 3:05 ` Ping-Ke Shih
2024-02-02 12:10 ` [PATCH 9/9] wifi: rtw88: SDIO device driver for RTL8723CS Fiona Klute
2024-02-05 3:10 ` Ping-Ke Shih
2024-02-05 16:07 ` Ulf Hansson
2024-02-02 13:13 ` [PATCH 0/9] rtw88: Add support for RTL8723CS/RTL8703B Dmitry Antipov
2024-02-02 13:27 ` Fiona Klute
2024-02-02 13:54 ` Dmitry Antipov
2024-02-02 14:13 ` Fiona Klute
2024-02-02 20:19 ` Pavel Machek
2024-02-03 0:36 ` Fiona Klute
2024-02-02 20:44 ` Pavel Machek
2024-02-02 20:52 ` Pavel Machek
2024-02-03 11:33 ` Fiona Klute
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=40d7f3f551254cb8b3cdfcba25052550@realtek.com \
--to=pkshih@realtek.com \
--cc=fiona.klute@gmx.de \
--cc=kvalo@kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=megi@xff.cz \
--cc=pavel@ucw.cz \
--cc=ulf.hansson@linaro.org \
/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 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).