From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: Ping-Ke Shih <pkshih@realtek.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
Yan-Hsuan Chuang <tony0620emma@gmail.com>,
Kalle Valo <kvalo@kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Chris Morgan <macroalpha82@gmail.com>,
Nitin Gupta <nitin.gupta981@gmail.com>,
Neo Jou <neojou@gmail.com>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Larry Finger <Larry.Finger@lwfinger.net>
Subject: Re: [PATCH v3 2/9] wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets
Date: Thu, 23 Mar 2023 12:16:52 +0100 [thread overview]
Message-ID: <CAFBinCCspK=GaCMEiHsXi=0H4Sbp2vg_4EK=8bqQLWR8+qg7Sw@mail.gmail.com> (raw)
In-Reply-To: <f7b9dda9d852456caffc3c0572f88947@realtek.com>
Hello Ping-Ke,
On Thu, Mar 23, 2023 at 3:23 AM Ping-Ke Shih <pkshih@realtek.com> wrote:
[...]
> > + if (direct) {
> > + addr = rtw_sdio_to_bus_offset(rtwdev, addr);
> > + val = rtw_sdio_readl(rtwdev, addr, &ret);
> > + } else if (addr & 3) {
>
> else if (IS_ALIGNED(addr, 4) {
I'll add these IS_ALIGNED in v4
Also I found an issue with RTW_WCPU_11N devices where indirect read
works differently (those can't use
REG_SDIO_INDIRECT_REG_CFG/REG_SDIO_INDIRECT_REG_DATA but need to go
through the normal path with WLAN_IOREG_OFFSET instead). I'll also
include that fix in v4
[...]
> > + ret = rtw_register_hw(rtwdev, hw);
> > + if (ret) {
> > + rtw_err(rtwdev, "failed to register hw");
> > + goto err_destroy_txwq;
> > + }
> > +
>
> Today, people reported there is race condition between register netdev and NAPI
> in rtw89 driver. I wonder if there will be in register netdev and request IRQ.
>
> You can add a msleep(10 * 100) here, and then do 'ifconfig up' and 'iw scan'
> quickly right after SDIO probe to see if it can work well. Otherwise, switching
> the order of rtw_register_hw() and rtw_sdio_request_irq() could be a possible
> solution.
I tried with 1 second and 10 second delays here and could not find any problems.
That said, I am still going to swap the order because a) it seems to
be what most drivers do (ath9k for example) and b) SDIO is a slow bus
and especially slow on my Amlogic SM1 SoC which has some SDIO DMA
errata.
Also testing this made me find another bug during module unregister (I
thought I caught all of them by now) and will include this fix in v4
as well.
As always: thank you for all your inputs!
Best regards,
Martin
next prev parent reply other threads:[~2023-03-23 11:17 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-20 21:34 [PATCH v3 0/9] rtw88: Add SDIO support Martin Blumenstingl
2023-03-20 21:35 ` [PATCH v3 1/9] wifi: rtw88: Clear RTW_FLAG_POWERON early in rtw_mac_power_switch() Martin Blumenstingl
2023-03-23 2:02 ` Ping-Ke Shih
2023-03-20 21:35 ` [PATCH v3 2/9] wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets Martin Blumenstingl
2023-03-23 2:23 ` Ping-Ke Shih
2023-03-23 11:16 ` Martin Blumenstingl [this message]
2023-03-23 19:03 ` Martin Blumenstingl
2023-03-27 9:11 ` Ping-Ke Shih
2023-03-20 21:35 ` [PATCH v3 3/9] wifi: rtw88: mac: Support SDIO specific bits in the power on sequence Martin Blumenstingl
2023-03-23 2:27 ` Ping-Ke Shih
2023-03-20 21:35 ` [PATCH v3 4/9] wifi: rtw88: main: Add the {cpwm,rpwm}_addr for SDIO based chipsets Martin Blumenstingl
2023-03-23 2:28 ` Ping-Ke Shih
2023-03-20 21:35 ` [PATCH v3 5/9] wifi: rtw88: main: Reserve 8 bytes of extra TX headroom for SDIO cards Martin Blumenstingl
2023-03-23 2:28 ` Ping-Ke Shih
2023-03-20 21:35 ` [PATCH v3 6/9] mmc: sdio: add Realtek SDIO vendor ID and various wifi device IDs Martin Blumenstingl
2023-03-23 2:29 ` Ping-Ke Shih
2023-03-26 14:02 ` Pali Rohár
2023-03-20 21:35 ` [PATCH v3 7/9] wifi: rtw88: Add support for the SDIO based RTL8822BS chipset Martin Blumenstingl
2023-03-23 2:29 ` Ping-Ke Shih
2023-03-20 21:35 ` [PATCH v3 8/9] wifi: rtw88: Add support for the SDIO based RTL8822CS chipset Martin Blumenstingl
2023-03-23 2:30 ` Ping-Ke Shih
2023-03-20 21:35 ` [PATCH v3 9/9] wifi: rtw88: Add support for the SDIO based RTL8821CS chipset Martin Blumenstingl
2023-03-23 2:33 ` 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='CAFBinCCspK=GaCMEiHsXi=0H4Sbp2vg_4EK=8bqQLWR8+qg7Sw@mail.gmail.com' \
--to=martin.blumenstingl@googlemail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=jernej.skrabec@gmail.com \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=macroalpha82@gmail.com \
--cc=neojou@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nitin.gupta981@gmail.com \
--cc=pkshih@realtek.com \
--cc=tony0620emma@gmail.com \
--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).