public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"lvc-project@linuxtesting.org" <lvc-project@linuxtesting.org>
Subject: RE: [PATCH] wifi: rtw88: do not ignore hardware read error during DPK
Date: Wed, 16 Apr 2025 08:49:18 +0000	[thread overview]
Message-ID: <bf895477781f4febb998fc5d413355a0@realtek.com> (raw)
In-Reply-To: <20250415090720.194048-1-dmantipov@yandex.ru>

Dmitry Antipov <dmantipov@yandex.ru> wrote:
> In 'rtw8822c_dpk_cal_coef1()', do not ignore error returned
> by 'check_hw_ready()' but issue a warning to denote possible
> DPK issue. Compile tested only.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: 5227c2ee453d ("rtw88: 8822c: add SW DPK support")
> Suggested-by: Ping-Ke Shih <pkshih@realtek.com>
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
> ---
>  drivers/net/wireless/realtek/rtw88/rtw8822c.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
> b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
> index 5e53e0db177e..8937a7b656ed 100644
> --- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
> +++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
> @@ -3951,7 +3951,8 @@ static void rtw8822c_dpk_cal_coef1(struct rtw_dev *rtwdev)
>         rtw_write32(rtwdev, REG_NCTL0, 0x00001148);
>         rtw_write32(rtwdev, REG_NCTL0, 0x00001149);
> 
> -       check_hw_ready(rtwdev, 0x2d9c, MASKBYTE0, 0x55);
> +       if (!check_hw_ready(rtwdev, 0x2d9c, MASKBYTE0, 0x55))
> +               rtw_warn(rtwdev, "DPK stuck, performance may be suboptimal");

I tested 10 times with real hardware. No warnings to bother users.

But this test is extra load to me. I might ignore this kind of patch in the future.

> 
>         rtw_write8(rtwdev, 0x1b10, 0x0);
>         rtw_write32_mask(rtwdev, REG_NCTL0, BIT_SUBPAGE, 0x0000000c);
> --
> 2.49.0
> 


  reply	other threads:[~2025-04-16  8:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-15  9:07 [PATCH] wifi: rtw88: do not ignore hardware read error during DPK Dmitry Antipov
2025-04-16  8:49 ` Ping-Ke Shih [this message]
2025-04-17  5:58 ` Ping-Ke Shih

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=bf895477781f4febb998fc5d413355a0@realtek.com \
    --to=pkshih@realtek.com \
    --cc=dmantipov@yandex.ru \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lvc-project@linuxtesting.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