Search Linux Wireless

Re: [PATCH v2] wifi: brcmfmac: Fix SDIO suspend/resume regression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kalle,

On 3/24/23 08:11, Kalle Valo wrote:
> Ulf Hansson <ulf.hansson@xxxxxxxxxx> writes:
> 
>> + Yann, Christophe
>>
>> On Mon, 20 Mar 2023 at 13:22, Hans de Goede <hdegoede@xxxxxxxxxx> 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@xxxxxxxxxx>
>>> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
>>
>> Seems reasonable to me, thanks for fixing this! Feel free to add:
>>
>> Reviewed-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
> 
> As this is an older regression from v5.19 should I take this to
> wireless-next to get more testing time?

AFAIK the only ACPI platforms (which this patch impacts) these SDIO wifi modules are used on are x86  Bay Trail and Cherry Trail SoCs, such as the list of _4_ devices I have tested on and it does fix a real regression.

Even though this is a somewhat older regression my personal preference would be for this to get send to Linus sooner rather then later so that this regression gets fixed.

Regards,

Hans





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux