Message ID | 20250415090720.194048-1-dmantipov@yandex.ru |
---|---|
State | New |
Headers | show |
Series | wifi: rtw88: do not ignore hardware read error during DPK | expand |
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 >
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> 1 patch(es) applied to rtw-next branch of rtw.git, thanks. 20d3c19bd8f9 wifi: rtw88: do not ignore hardware read error during DPK --- https://github.com/pkshih/rtw.git
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"); rtw_write8(rtwdev, 0x1b10, 0x0); rtw_write32_mask(rtwdev, REG_NCTL0, BIT_SUBPAGE, 0x0000000c);
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(-)