mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: linux-wireless@vger.kernel.org,
	"Yan-Hsuan Chuang" <tony0620emma@gmail.com>,
	"Ulf Hansson" <ulf.hansson@linaro.org>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	linux-mmc@vger.kernel.org,
	"Chris Morgan" <macromorgan@hotmail.com>,
	"Nitin Gupta" <nitin.gupta981@gmail.com>,
	"Neo Jou" <neojou@gmail.com>, Pkshih <pkshih@realtek.com>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Larry Finger" <Larry.Finger@lwfinger.net>,
	"Pali Rohár" <pali@kernel.org>,
	"Simon Horman" <simon.horman@corigine.com>,
	"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>
Subject: Re: [PATCH v5 1/9] wifi: rtw88: Clear RTW_FLAG_POWERON early in rtw_mac_power_switch()
Date: Wed, 12 Apr 2023 12:52:46 +0000 (UTC)	[thread overview]
Message-ID: <168130396220.26381.3962423931177985292.kvalo@kernel.org> (raw)
In-Reply-To: <20230405200729.632435-2-martin.blumenstingl@googlemail.com>

Martin Blumenstingl <martin.blumenstingl@googlemail.com> wrote:

> The SDIO HCI implementation needs to know when the MAC is powered on.
> This is needed because 32-bit register access has to be split into 4x
> 8-bit register access when the MAC is not fully powered on or while
> powering off. When the MAC is powered on 32-bit register access can be
> used to reduce the number of transfers but splitting into 4x 8-bit
> register access still works in that case.
> 
> During the power on sequence is how RTW_FLAG_POWERON is only set when
> the power on sequence has completed successfully. During power off
> however RTW_FLAG_POWERON is set. This means that the upcoming SDIO HCI
> implementation does not know that it has to use 4x 8-bit register
> accessors. Clear the RTW_FLAG_POWERON flag early when powering off the
> MAC so the whole power off sequence is processed with RTW_FLAG_POWERON
> unset. This will make it possible to use the RTW_FLAG_POWERON flag in
> the upcoming SDIO HCI implementation.
> 
> Note that a failure in rtw_pwr_seq_parser() while applying
> chip->pwr_off_seq can theoretically result in the RTW_FLAG_POWERON
> flag being cleared while the chip is still powered on. However,
> depending on when the failure occurs in the power off sequence the
> chip may be on or off. Even the original approach of clearing
> RTW_FLAG_POWERON only when the power off sequence has been applied
> successfully could end up in some corner case where the chip is
> powered off but RTW_FLAG_POWERON was not cleared.
> 
> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

9 patches applied to wireless-next.git, thanks.

6a92566088b1 wifi: rtw88: Clear RTW_FLAG_POWERON early in rtw_mac_power_switch()
65371a3f14e7 wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets
b722e5b130bc wifi: rtw88: mac: Support SDIO specific bits in the power on sequence
a5d25f9ff918 wifi: rtw88: main: Add the {cpwm,rpwm}_addr for SDIO based chipsets
02461d9368c5 wifi: rtw88: main: Reserve 8 bytes of extra TX headroom for SDIO cards
7d6d2dd326a8 mmc: sdio: add Realtek SDIO vendor ID and various wifi device IDs
095e62dd7427 wifi: rtw88: Add support for the SDIO based RTL8822BS chipset
6fdacb78f799 wifi: rtw88: Add support for the SDIO based RTL8822CS chipset
b2a777d68434 wifi: rtw88: Add support for the SDIO based RTL8821CS chipset

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20230405200729.632435-2-martin.blumenstingl@googlemail.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


  reply	other threads:[~2023-04-12 12:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-05 20:07 [PATCH v5 0/9] rtw88: Add SDIO support Martin Blumenstingl
2023-04-05 20:07 ` [PATCH v5 1/9] wifi: rtw88: Clear RTW_FLAG_POWERON early in rtw_mac_power_switch() Martin Blumenstingl
2023-04-12 12:52   ` Kalle Valo [this message]
2023-04-05 20:07 ` [PATCH v5 2/9] wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets Martin Blumenstingl
2023-04-06  2:31   ` Ping-Ke Shih
2023-04-05 20:07 ` [PATCH v5 3/9] wifi: rtw88: mac: Support SDIO specific bits in the power on sequence Martin Blumenstingl
2023-04-05 20:07 ` [PATCH v5 4/9] wifi: rtw88: main: Add the {cpwm,rpwm}_addr for SDIO based chipsets Martin Blumenstingl
2023-04-05 20:07 ` [PATCH v5 5/9] wifi: rtw88: main: Reserve 8 bytes of extra TX headroom for SDIO cards Martin Blumenstingl
2023-04-05 20:07 ` [PATCH v5 6/9] mmc: sdio: add Realtek SDIO vendor ID and various wifi device IDs Martin Blumenstingl
2023-04-05 20:07 ` [PATCH v5 7/9] wifi: rtw88: Add support for the SDIO based RTL8822BS chipset Martin Blumenstingl
2023-04-05 20:07 ` [PATCH v5 8/9] wifi: rtw88: Add support for the SDIO based RTL8822CS chipset Martin Blumenstingl
2023-04-05 20:07 ` [PATCH v5 9/9] wifi: rtw88: Add support for the SDIO based RTL8821CS chipset Martin Blumenstingl

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=168130396220.26381.3962423931177985292.kvalo@kernel.org \
    --to=kvalo@kernel.org \
    --cc=Larry.Finger@lwfinger.net \
    --cc=jernej.skrabec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=macromorgan@hotmail.com \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=neojou@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nitin.gupta981@gmail.com \
    --cc=pali@kernel.org \
    --cc=pkshih@realtek.com \
    --cc=simon.horman@corigine.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

all inboxes | Powered by JetHome®