All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Hans de Goede <hdegoede@redhat.com>,
	Arend van Spriel <aspriel@gmail.com>,
	Franky Lin <franky.lin@broadcom.com>,
	Hante Meuleman <hante.meuleman@broadcom.com>,
	linux-wireless@vger.kernel.org,
	brcm80211-dev-list.pdl@broadcom.com,
	SHA-cyfmac-dev-list@infineon.com,
	Yann Gautier <yann.gautier@foss.st.com>,
	Christophe ROULLIER-SCND-02 <christophe.roullier@foss.st.com>
Subject: Re: [PATCH v2] wifi: brcmfmac: Fix SDIO suspend/resume regression
Date: Fri, 24 Mar 2023 09:11:38 +0200	[thread overview]
Message-ID: <874jqavd1x.fsf@kernel.org> (raw)
In-Reply-To: <CAPDyKFpacDCKeoyoz86oB-esqTP05Aqd6FZvXvMSA5pmdjo+ow@mail.gmail.com> (Ulf Hansson's message of "Thu, 23 Mar 2023 15:33:44 +0100")

Ulf Hansson <ulf.hansson@linaro.org> writes:

> + Yann, Christophe
>
> On Mon, 20 Mar 2023 at 13:22, Hans de Goede <hdegoede@redhat.com> wrote:
>>
>> After commit 92cadedd9d5f ("brcmfmac: Avoid keeping power to SDIO card
>> unless WOWL is used"), the wifi adapter by default is turned off on suspend
>> and then re-probed on resume.
>>
>> In at least 2 model x86/acpi tablets with brcmfmac43430a1 wifi adapters,
>> the newly added re-probe on resume fails like this:
>>
>>  brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
>>  ieee80211 phy1: brcmf_bus_started: failed: -110
>>  ieee80211 phy1: brcmf_attach: dongle is not responding: err=-110
>>  brcmfmac: brcmf_sdio_firmware_callback: brcmf_attach failed
>>
>> It seems this specific brcmfmac model does not like being reprobed without
>> it actually being turned off first.
>>
>> And the adapter is not being turned off during suspend because of
>> commit f0992ace680c ("brcmfmac: prohibit ACPI power management for brcmfmac
>> driver").
>>
>> Now that the driver is being reprobed on resume, the disabling of ACPI
>> pm is no longer necessary, except when WOWL is used (in which case there
>> is no-reprobe).
>>
>> Move the dis-/en-abling of ACPI pm to brcmf_sdio_wowl_config(), this fixes
>> the brcmfmac43430a1 suspend/resume regression and should help save some
>> power when suspended.
>>
>> This change means that the code now also may re-enable ACPI pm when WOWL
>> gets disabled. ACPI pm should only be re-enabled if it was enabled by
>> the ACPI core originally. Add a brcmf_sdiod_acpi_save_power_manageable()
>> to save the original state for this.
>>
>> This has been tested on the following devices:
>>
>> Asus T100TA                brcmfmac43241b4-sdio
>> Acer Iconia One 7 B1-750   brcmfmac43340-sdio
>> Chuwi Hi8                  brcmfmac43430a0-sdio
>> Chuwi Hi8                  brcmfmac43430a1-sdio
>>
>> (the Asus T100TA is the device for which the prohibiting of ACPI pm
>>  was originally added)
>>
>> Fixes: 92cadedd9d5f ("brcmfmac: Avoid keeping power to SDIO card unless WOWL is used")
>> Cc: Ulf Hansson <ulf.hansson@linaro.org>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>
> Seems reasonable to me, thanks for fixing this! Feel free to add:
>
> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>

As this is an older regression from v5.19 should I take this to
wireless-next to get more testing time?

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

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

  reply	other threads:[~2023-03-24  7:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20 12:22 [PATCH v2] wifi: brcmfmac: Fix SDIO suspend/resume regression Hans de Goede
2023-03-23 14:33 ` Ulf Hansson
2023-03-24  7:11   ` Kalle Valo [this message]
2023-03-24  7:43     ` Hans de Goede
2023-03-24  8:12   ` Yann Gautier
2023-03-31 15:00 ` Kalle Valo
  -- strict thread matches above, loose matches on Subject: below --
2023-03-20 12:09 Hans de Goede

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=874jqavd1x.fsf@kernel.org \
    --to=kvalo@kernel.org \
    --cc=SHA-cyfmac-dev-list@infineon.com \
    --cc=aspriel@gmail.com \
    --cc=brcm80211-dev-list.pdl@broadcom.com \
    --cc=christophe.roullier@foss.st.com \
    --cc=franky.lin@broadcom.com \
    --cc=hante.meuleman@broadcom.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=yann.gautier@foss.st.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.