lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPDyKFoJpxFOzJVRVF=R2UXuwBPfuegmaZ==-ohhw98dMgpk+Q@mail.gmail.com>
Date:   Tue, 15 Mar 2022 13:30:26 +0100
From:   Ulf Hansson <ulf.hansson@...aro.org>
To:     Yann Gautier <yann.gautier@...s.st.com>
Cc:     linux-kernel@...r.kernel.org, linux-mmc@...r.kernel.org,
        linux-stm32@...md-mailman.stormreply.com,
        Christophe Kerello <christophe.kerello@...s.st.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Ludovic Barre <ludovic.barre@...s.st.com>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Russell King <linux@...linux.org.uk>,
        Marek Vasut <marex@...x.de>, kernel@...electronics.com,
        Manivannan Sadhasivam <mani@...nel.org>,
        Grzegorz Szymaszek <gszymaszek@...rt.pl>,
        Christophe ROULLIER-SCND-02 <christophe.roullier@...s.st.com>
Subject: Re: [PATCH v2] mmc: mmci: manage MMC_PM_KEEP_POWER per variant config

On Tue, 15 Mar 2022 at 11:08, Yann Gautier <yann.gautier@...s.st.com> wrote:
>
> On 3/15/22 10:07, Ulf Hansson wrote:
> > On Mon, 14 Mar 2022 at 17:52, Yann Gautier <yann.gautier@...s.st.com> wrote:
> >>
> >> On 3/14/22 17:18, Ulf Hansson wrote:
> >>> On Mon, 14 Mar 2022 at 15:34, Yann Gautier <yann.gautier@...s.st.com> wrote:
> >>>>
> >>>> On 3/14/22 14:03, Ulf Hansson wrote:
> >>>>> On Mon, 14 Mar 2022 at 13:56, Yann Gautier <yann.gautier@...s.st.com> wrote:
> >>>>>>
> >>>>>> Add a disable_keep_power field in variant_data struct. The
> >>>>>> MMC_PM_KEEP_POWER flag will be enabled if disable_keep_power is not set.
> >>>>>> It is only set to true for stm32_sdmmc variants.
> >>>>>>
> >>>>>> The issue was seen on STM32MP157C-DK2 board, which embeds a wifi chip.
> >>>>>> It doesn't correctly support low power on this board. The Wifi chip
> >>>>>> awaits an always-on regulator, but it was connected to v3v3 which is off
> >>>>>> in low-power sequence. MMC_PM_KEEP_POWER should then be disabled.
> >>>>>
> >>>>> Just to make sure I get this correct.
> >>>>>
> >>>>> Why can't the regulator stay on during system suspend? The point is,
> >>>>> we don't need an always on regulator to cope with this.
> >>>>>
> >>>>> Kind regards
> >>>>> Uffe
> >>>>
> >>>> Hi Ulf,
> >>>>
> >>>> This v3v3 regulator powers most of the devices on this board. So we need
> >>>> to switch it off to gain power in suspend mode.
> >>>
> >>> I see. Thanks for sharing that information.
> >>>
> >>> The MMC_PM_KEEP_POWER flag is there to describe what is supported by
> >>> the platform/host. It doesn't mean that the card *must* stay powered
> >>> on during system suspend. Instead that depends on whether system
> >>> wakeup for the SDIO/WiFi is supported too - and if that is enabled by
> >>> userspace. If not, the regulator will be turned off for the SDIO card
> >>> during system suspend.
> >>>
> >>> Assuming the regulator is implemented as a proper regulator and can
> >>> remain on during system suspend, the right thing would be to keep the
> >>> MMC_PM_KEEP_POWER flag around.
> >>>
> >>> Kind regards
> >>> Uffe
> >>>
> >>
> >> OK, but in the wifi driver we use on this platform (brcmfmac), the
> >> suspend/resume functions (brcmf_ops_sdio_suspend/brcmf_ops_sdio_resume)
> >> use the flag to check regu was off, and then call probe function during
> >> resume, to re-init Wifi chip and reload its firmware.
> >
> > I had a closer look at the brcmfmac driver, thanks for the pointers.
> >
> > In my opinion, I think we should change the brcmfmac driver, so it
> > decides to power off the SDIO card, unless the WiFi chip is configured
> > to serve us with system wakeups.
> >
> > I can send a patch for brcmfmac that we can try, unless you want to
> > send it yourself?
> >
>
> Hi Ulf,
> If you already have an idea of the patch in the brcmfmac driver, can you
> propose something?

Sure, I will post a patch as soon as I can.

> We'll be able to test it at our side.

Great, I will keep you posted!

[...]

Kind regards
Uffe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ