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: <20200914064001.GA2743583@laputa>
Date:   Mon, 14 Sep 2020 15:40:01 +0900
From:   AKASHI Takahiro <takahiro.akashi@...aro.org>
To:     Adrian Hunter <adrian.hunter@...el.com>
Cc:     Ben Chuang <benchuanggli@...il.com>, ulf.hansson@...aro.org,
        linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
        ben.chuang@...esyslogic.com.tw, greg.tu@...esyslogic.com.tw
Subject: Re: [RFC PATCH V3 13/21] mmc: sdhci: UHS-II support, skip
 signal_voltage_switch()

Adrian,

On Fri, Aug 21, 2020 at 05:09:01PM +0300, Adrian Hunter wrote:
> On 10/07/20 2:11 pm, Ben Chuang wrote:
> > From: AKASHI Takahiro <takahiro.akashi@...aro.org>
> > 
> > sdhci_start_signal_voltage_switch() should be called only in UHS-I mode,
> > and not for UHS-II mode.
> > 
> > Signed-off-by: Ben Chuang <ben.chuang@...esyslogic.com.tw>
> > Signed-off-by: AKASHI Takahiro <takahiro.akashi@...aro.org>
> > ---
> >  drivers/mmc/host/sdhci.c | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> > index 5511649946b9..7f2537648a08 100644
> > --- a/drivers/mmc/host/sdhci.c
> > +++ b/drivers/mmc/host/sdhci.c
> > @@ -2623,8 +2623,13 @@ int sdhci_start_signal_voltage_switch(struct mmc_host *mmc,
> >  	/*
> >  	 * Signal Voltage Switching is only applicable for Host Controllers
> >  	 * v3.00 and above.
> > +	 * But for UHS2, the signal voltage is supplied by vdd2 which is
> > +	 * already 1.8v so no voltage switch required.
> >  	 */
> > -	if (host->version < SDHCI_SPEC_300)
> > +	if (host->version < SDHCI_SPEC_300 ||
> > +	    (IS_ENABLED(CONFIG_MMC_SDHCI_UHS2) &&
> > +	     host->version >= SDHCI_SPEC_400 &&
> > +	     host->mmc->flags & MMC_UHS2_SUPPORT))
> 
> Please look at hooking ->start_signal_voltage_switch() instead

Do you mean that you want every platform driver who wants to support UHS-II
to set NULL to start_signal_voltage_switch hook even if this hack is
platform agnostic?
(Another option is that it would be put in sdhci_uhs2_add_host() which
is responsible to set MMC_UHS2_SUPPORT.)

-Takahiro Akashi

> 
> 
> >  		return 0;
> >  
> >  	ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
> > 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ