From: Ping-Ke Shih <pkshih@realtek.com>
To: "Marcin Ślusarz" <marcin.slusarz@gmail.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"Marcin Ślusarz" <mslusarz@renau.com>
Subject: RE: wifi: rtw88: 8821CU hangs after some number of power-off/on cycles
Date: Thu, 30 May 2024 03:13:38 +0000 [thread overview]
Message-ID: <b9c85972ab634364bf8a705a4f4513fd@realtek.com> (raw)
In-Reply-To: <CA+GA0_tUy0EuXm0CGYa8SsS78oRNHUanBNwRf_BLXERa1=MYdg@mail.gmail.com>
Marcin Ślusarz <marcin.slusarz@gmail.com> wrote:
> śr., 29 maj 2024 o 03:52 Ping-Ke Shih <pkshih@realtek.com> napisał(a):
> >
> > Marcin Ślusarz <marcin.slusarz@gmail.com> wrote:
> > > wt., 28 maj 2024 o 05:52 Ping-Ke Shih <pkshih@realtek.com> napisał(a):
> > > >
> > > > Marcin Ślusarz <marcin.slusarz@gmail.com> wrote:
> > > > >
> > > > > I found out that the reason for those hangs is a power-off+on sequence that's
> > > > > triggered by the above steps.
> > > >
> > > > To avoid power-off/on sequence once device becomes idle, I would like to add
> > > > a ips_disabled helper. Please revert your changes and apply my attached patch.
> > >
> > > My first attempt was very similar, and it fixed some cases but not all of them.
> > >
> > > This is due to the existence of a second source of power-offs - rtw_ops_stop,
> > > which is called, e.g., on downing the interface (ifconfig wlan0 down).
> >
> > Please try attached v2 patch. I would like to have an explicit helper
> > (i.e. always_power_on in v2) to have this fix, so days later people can be easy
> > to understand how it works. Not prefer adjusting existing flags to implicitly
> > have behavior you want.
>
> So, do you think this is a chip issue, not just some driver misconfiguration?
I asked internal USB WiFi people who say vendor drivers of USB/SDIO can't
power-on/-off frequently but not very sure if hardware issue or driver issue.
>
> I'm asking because if we are going in this direction, there's something
> more to fix... With your v2, very frequently, I hit WARN_ON(!local->started) in
> ieee80211_rx_napi (in wireless-next, the code was moved to ieee80211_rx_list).
>
> With my patch, I checked and hit that WARN_ON, too, but very occasionally.
>
> I think the difference is in what happens in rtw_ips_enter - I disabled only
> the power_off, but you also disabled everything else, including the cancelation
> of work_structs.
>
> The warning itself sounds harmless, but I think users should never see such
> warnings, so this needs to be fixed somehow. Probably some additional
> work_struct(s) need to be canceled?
>
I forgot to say my patch is compiled test only, and I didn't consider flow
too much, just to close the behavior of your patches. You can improve my patch
to be more reliable to avoid WARN_ON().
Ping-Ke
next prev parent reply other threads:[~2024-05-30 3:13 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 17:34 wifi: rtw88: 8821CU hangs after some number of power-off/on cycles Marcin Ślusarz
2024-05-27 17:34 ` [PATCH 1/2] wifi: rtw88: use RTW_FLAG_RUNNING for deciding whether to enter/leave IPS Marcin Ślusarz
2024-05-28 3:56 ` Ping-Ke Shih
2024-05-28 10:53 ` Marcin Ślusarz
2024-05-27 17:34 ` [PATCH 2/2] wifi: rtw88: disable power offs for 8821C Marcin Ślusarz
2024-05-27 18:43 ` wifi: rtw88: 8821CU hangs after some number of power-off/on cycles Bitterblue Smith
2024-05-28 10:42 ` Marcin Ślusarz
2024-05-28 12:25 ` Bitterblue Smith
2024-05-28 12:38 ` Marcin Ślusarz
2024-05-28 3:52 ` Ping-Ke Shih
2024-05-28 10:52 ` Marcin Ślusarz
2024-05-29 1:52 ` Ping-Ke Shih
2024-05-29 15:53 ` Marcin Ślusarz
2024-05-30 3:13 ` Ping-Ke Shih [this message]
2024-06-03 14:52 ` Marcin Ślusarz
2024-06-03 14:55 ` [PATCH] wifi: rtw88/usb: stop rx work before potential power off Marcin Ślusarz
2024-06-04 0:57 ` Ping-Ke Shih
2024-06-14 11:35 ` Marcin Ślusarz
2024-06-14 12:13 ` [PATCH v2 1/2] wifi: rtw88: 8821cu: keep power on always for 8821CU Marcin Ślusarz
2024-06-14 12:13 ` [PATCH v2 2/2] wifi: rtw88/usb: stop rx work before potential power off Marcin Ślusarz
2024-06-17 1:56 ` Ping-Ke Shih
2024-06-17 1:40 ` [PATCH v2 1/2] wifi: rtw88: 8821cu: keep power on always for 8821CU Ping-Ke Shih
2024-06-17 1:47 ` [PATCH] wifi: rtw88/usb: stop rx work before potential power off Ping-Ke Shih
2024-06-03 14:56 ` [PATCH] wifi: rtw88: usb: drop rx skbs when device is not running Marcin Ślusarz
2024-06-04 0:50 ` wifi: rtw88: 8821CU hangs after some number of power-off/on cycles Ping-Ke Shih
2024-06-14 11:42 ` Marcin Ślusarz
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=b9c85972ab634364bf8a705a4f4513fd@realtek.com \
--to=pkshih@realtek.com \
--cc=linux-wireless@vger.kernel.org \
--cc=marcin.slusarz@gmail.com \
--cc=mslusarz@renau.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.