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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMdYzYq0A4FitRGe49fxvjbwLUCi_KGwCtfz7pmayt_dK=r32w@mail.gmail.com>
Date:   Tue, 1 Mar 2022 06:49:20 -0500
From:   Peter Geis <pgwipeout@...il.com>
To:     Robin Murphy <robin.murphy@....com>
Cc:     Jaehoon Chung <jh80.chung@...sung.com>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Heiko Stuebner <heiko@...ech.de>, linux-mmc@...r.kernel.org,
        arm-mail-list <linux-arm-kernel@...ts.infradead.org>,
        "open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mmc: host: dw-mmc-rockchip: avoid logspam when cd-broken

On Tue, Mar 1, 2022 at 6:23 AM Robin Murphy <robin.murphy@....com> wrote:
>
> On 2022-02-28 22:36, Peter Geis wrote:
> > The dw_mmc-rockchip driver drops a large amound of logspam constantly
> > when the cd-broken flag is enabled.
> > Set the warning to be debug ratelimited in this case.
>
> Isn't this just papering over some fundamental problem with the clock?
> If it's failing to set the expected rate for communicating with a card,
> then presumably that's an issue for correct operation in general? The
> fact that polling for a card makes a lot more of that communication
> happen seems unrelated :/

Good Morning,

This only happens when a card is not inserted, so communication cannot happen.
I found it while lighting off the SoQuartz module.
As it is pin compatible with the RPi CM4, and the CM4 does not have a
card detect line, sdmmc is non functional without cd-broken.
This led to the fun spew when there wasn't a card inserted as this
function is called every poll tick.

Thanks,
Peter

>
> Robin.
>
> > Signed-off-by: Peter Geis <pgwipeout@...il.com>
> > ---
> >   drivers/mmc/host/dw_mmc-rockchip.c | 9 +++++++--
> >   1 file changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
> > index 95d0ec0f5f3a..d0ebf0afa42a 100644
> > --- a/drivers/mmc/host/dw_mmc-rockchip.c
> > +++ b/drivers/mmc/host/dw_mmc-rockchip.c
> > @@ -50,8 +50,13 @@ static void dw_mci_rk3288_set_ios(struct dw_mci *host, struct mmc_ios *ios)
> >               cclkin = ios->clock * RK3288_CLKGEN_DIV;
> >
> >       ret = clk_set_rate(host->ciu_clk, cclkin);
> > -     if (ret)
> > -             dev_warn(host->dev, "failed to set rate %uHz\n", ios->clock);
> > +     if (ret) {
> > +             /* this screams when card detection is broken */
> > +             if (host->slot->mmc->caps & MMC_CAP_NEEDS_POLL)
> > +                     dev_dbg_ratelimited(host->dev, "failed to set rate %uHz\n", ios->clock);
> > +             else
> > +                     dev_warn(host->dev, "failed to set rate %uHz\n", ios->clock);
> > +     }
> >
> >       bus_hz = clk_get_rate(host->ciu_clk) / RK3288_CLKGEN_DIV;
> >       if (bus_hz != host->bus_hz) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ