From: "s.hauer@pengutronix.de" <s.hauer@pengutronix.de>
To: Ping-Ke Shih <pkshih@realtek.com>
Cc: "martin.blumenstingl@googlemail.com"
<martin.blumenstingl@googlemail.com>,
"johannes@sipsolutions.net" <johannes@sipsolutions.net>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
"neojou@gmail.com" <neojou@gmail.com>,
"kvalo@kernel.org" <kvalo@kernel.org>,
"tony0620emma@gmail.com" <tony0620emma@gmail.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux@ulli-kroll.de" <linux@ulli-kroll.de>
Subject: Re: [PATCH v2 05/10] rtw88: iterate over vif/sta list non-atomically
Date: Wed, 8 Jun 2022 15:37:00 +0200 [thread overview]
Message-ID: <20220608133700.GW1615@pengutronix.de> (raw)
In-Reply-To: <e0aa1ba4336ab130712e1fcb425e6fd0adca4145.camel@realtek.com>
On Wed, Jun 08, 2022 at 01:25:34PM +0000, Ping-Ke Shih wrote:
> Hi Martin and Sascha,
>
> Thank you both.
>
> On Wed, 2022-06-08 at 00:06 +0200, Martin Blumenstingl wrote:
> > Hi Sascha,
> >
> > thanks for this patch!
> >
> > On Mon, May 30, 2022 at 3:55 PM Sascha Hauer <s.hauer@pengutronix.de> wrote:
> > [...]
> > > drivers/net/wireless/realtek/rtw88/phy.c | 6 +-
> > > drivers/net/wireless/realtek/rtw88/ps.c | 2 +-
> > > drivers/net/wireless/realtek/rtw88/util.c | 103 ++++++++++++++++++++++
> > > drivers/net/wireless/realtek/rtw88/util.h | 12 ++-
> > > 4 files changed, 116 insertions(+), 7 deletions(-)
> > I compared the changes from this patch with my earlier work. I would
> > like to highlight a few functions to understand if they were left out
> > on purpose or by accident.
> >
> > __fw_recovery_work() in main.c (unfortunately I am not sure how to
> > trigger/test this "firmware recovery" logic):
>
> This can be triggered by 'echo 1 > /sys/kernel/debug/ieee80211/rtw88/fw_crash',
> but only the latest firmware of 8822c can support this.
>
> > - this is already called with &rtwdev->mutex held
> > - it uses rtw_iterate_keys_rcu() (which internally uses rtw_write32
> > from rtw_sec_clear_cam). feel free to either add [0] to your series or
> > even squash it into an existing patch
>
> ieee80211_iter_keys() check lockdep_assert_wiphy(hw->wiphy), but we don't
> hold the lock in this work; it also do mutex_lock(&local->key_mtx) that
> I'm afraid it could cause deadlock.
>
> So, I think we can use _rcu version to collect key list like sta and vif.
>
> > - it uses rtw_iterate_stas_atomic() (which internally uses
> > rtw_fw_send_h2c_command from rtw_fw_media_status_report)
> > - it uses rtw_iterate_vifs_atomic() (which internally can read/write
> > registers from rtw_chip_config_bfee)
> > - in my previous series I simply replaced the
> > rtw_iterate_stas_atomic() and rtw_iterate_vifs_atomic() calls with the
> > non-atomic variants (for the rtw_iterate_keys_rcu() call I did some
> > extra cleanup, see [0])
> >
> > rtw_wow_fw_media_status() in wow.c (unfortunately I am also not sure
> > how to test WoWLAN):
> > - I am not sure if &rtwdev->mutex is held when this function is called
> > - it uses rtw_iterate_stas_atomic() (which internally uses
> > rtw_fw_send_h2c_command from rtw_fw_media_status_report)
> > - in my previous series I simply replaced rtw_iterate_stas_atomic()
> > with it's non-atomic variant
> >
> > Additionally I rebased my SDIO work on top of your USB series.
> > This makes SDIO support a lot easier - so thank you for your work!
> > I found that three of my previous patches (in addition to [0] which I
> > already mentioned earlier) are still needed to get rid of some
> > warnings when using the SDIO interface (the same warnings may or may
> > not be there with the USB interface - it just depends on whether your
> > AP makes rtw88 hit that specific code-path):
> > - [1]: rtw88: Configure the registers from rtw_bf_assoc() outside the RCU lock
>
> I think we need this.
>
> > - [2]: rtw88: Move rtw_chip_cfg_csi_rate() out of rtw_vif_watch_dog_iter()
>
> I think we don't need this, but just use rtw_iterate_vifs() to
> iterate rtw_vif_watch_dog_iter.
>
> > - [3]: rtw88: Move rtw_update_sta_info() out of rtw_ra_mask_info_update_iter()
>
> Need partial -- hold rtwdev->mutex before entering rtw_ra_mask_info_update().
>
> Then, use rtw_iterate_stas() to iterate rtw_ra_mask_info_update_iter.
> No need others.
>
>
> Sascha, could you squash Martin's patches into your patchset?
> And, then I can do more tests on PCI cards.
Yes, will do and send a v3 with it.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2022-06-08 13:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-30 13:54 [PATCH v2 00/10] RTW88: Add support for USB variants Sascha Hauer
2022-05-30 13:54 ` [PATCH v2 01/10] rtw88: Call rtw_fw_beacon_filter_config() with rtwdev->mutex held Sascha Hauer
2022-05-30 13:54 ` [PATCH v2 02/10] rtw88: Drop rf_lock Sascha Hauer
2022-05-30 13:54 ` [PATCH v2 03/10] rtw88: Drop h2c.lock Sascha Hauer
2022-05-30 13:54 ` [PATCH v2 04/10] rtw88: Drop coex mutex Sascha Hauer
2022-05-30 13:54 ` [PATCH v2 05/10] rtw88: iterate over vif/sta list non-atomically Sascha Hauer
2022-06-07 22:06 ` Martin Blumenstingl
2022-06-08 13:25 ` Ping-Ke Shih
2022-06-08 13:37 ` s.hauer [this message]
2022-06-09 2:55 ` Ping-Ke Shih
2022-05-30 13:54 ` [PATCH v2 06/10] rtw88: Add common USB chip support Sascha Hauer
2022-05-30 13:54 ` [PATCH v2 07/10] rtw88: Add rtw8821cu chipset support Sascha Hauer
2022-05-31 1:00 ` Ping-Ke Shih
2022-05-30 13:54 ` [PATCH v2 08/10] rtw88: Add rtw8822bu " Sascha Hauer
2022-05-30 13:54 ` [PATCH v2 09/10] rtw88: Add rtw8822cu " Sascha Hauer
2022-05-30 13:54 ` [PATCH v2 10/10] rtw88: disable powersave modes for USB devices Sascha Hauer
2022-05-31 1:07 ` Ping-Ke Shih
2022-05-31 7:42 ` s.hauer
2022-06-09 12:51 ` Ping-Ke Shih
2022-06-10 13:26 ` s.hauer
2022-06-13 0:02 ` Ping-Ke Shih
2022-06-14 7:06 ` s.hauer
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=20220608133700.GW1615@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=johannes@sipsolutions.net \
--cc=kernel@pengutronix.de \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linux@ulli-kroll.de \
--cc=martin.blumenstingl@googlemail.com \
--cc=neojou@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pkshih@realtek.com \
--cc=tony0620emma@gmail.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 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).