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: <1583796065.23665.8.camel@mtkswgap22>
Date:   Tue, 10 Mar 2020 07:21:05 +0800
From:   Chun-Hung Wu <chun-hung.wu@...iatek.com>
To:     Linus Walleij <linus.walleij@...aro.org>
CC:     Chaotian Jing <chaotian.jing@...iatek.com>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        "Pavel Machek" <pavel@....cz>,
        Kate Stewart <kstewart@...uxfoundation.org>,
        "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
        Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
        Pan Bian <bianpan2016@....com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Allison Randal <allison@...utok.net>,
        Mathieu Malaterre <malat@...ian.org>,
        Stanley Chu <stanley.chu@...iatek.com>,
        Kuohong Wang <kuohong.wang@...iatek.com>,
        <kernel-team@...roid.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        linux-mmc <linux-mmc@...r.kernel.org>,
        "moderated list:ARM/Mediatek SoC support" 
        <linux-mediatek@...ts.infradead.org>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>, <wsd_upstream@...iatek.com>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 1/4] [1/4] mmc: core: expose MMC_CAP2_CQE* to dt

On Fri, 2020-02-21 at 15:33 +0100, Linus Walleij wrote:
> On Mon, Feb 17, 2020 at 7:32 AM Chun-Hung Wu <chun-hung.wu@...iatek.com> wrote:
> 
> > Expose MMC_CAP2_CQE and MMC_CAP2_CQE_DCMD
> > to host->caps2 if
> > 1. "supports-cqe" is defined in dt and
> > 2. "disable-cqe-dcmd" is not defined in dt.
> >
> > ---
> >  drivers/mmc/core/host.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
> > index 105b7a7..efb0dbe 100644
> > --- a/drivers/mmc/core/host.c
> > +++ b/drivers/mmc/core/host.c
> > @@ -319,6 +319,14 @@ int mmc_of_parse(struct mmc_host *host)
> >                 host->caps2 |= MMC_CAP2_NO_SD;
> >         if (device_property_read_bool(dev, "no-mmc"))
> >                 host->caps2 |= MMC_CAP2_NO_MMC;
> > +       if (device_property_read_bool(dev, "supports-cqe"))
> > +               host->caps2 |= MMC_CAP2_CQE;
> 
> I don't understand why this is even a DT property as it should
> be clear from the hosts compatible whether it supports CQE or
> not. But it's too late to do anything about that I suppose, and
> I just assume there is something I don't understand here.
"supports-cqe" as my understanding is like HS400 HS200 is a host
capability.
> 
> > +       /* Must be after "supports-cqe" check */
> > +       if (!device_property_read_bool(dev, "disable-cqe-dcmd")) {
> > +               if (host->caps2 & MMC_CAP2_CQE)
> > +                       host->caps2 |= MMC_CAP2_CQE_DCMD;
> > +       }
> 
> This is the right place to do this I suppose. Disabling CQE
> selectively is something you might wanna do for debugging.
> Acked-by: Linus Walleij <linus.walleij@...aro.org>
> 
> I see that some drivers are already parsing this DT property
> on their own, should we follow up with patches so that these:
> 
> $ git grep 'supports-cqe'
> drivers/mmc/host/sdhci-brcmstb.c:       if
> (device_property_read_bool(&pdev->dev, "supports-cqe")) {
> drivers/mmc/host/sdhci-msm.c:   if (of_property_read_bool(node, "supports-cqe"))
> drivers/mmc/host/sdhci-tegra.c: if
> (device_property_read_bool(host->mmc->parent, "supports-cqe"))
> 
> Make use of the central parsing instead?
In v4, I will remove the vendor driver dt setting and use central
parsing instead.
> 
> Yours,
> Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ