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]
Date:   Mon, 30 Nov 2020 09:44:30 +0200
From:   Adrian Hunter <adrian.hunter@...el.com>
To:     AKASHI Takahiro <takahiro.akashi@...aro.org>,
        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.1 13/27] mmc: sdhci-uhs2: add set_power() to
 support vdd2

On 30/11/20 9:15 am, AKASHI Takahiro wrote:
> On Thu, Nov 26, 2020 at 10:16:27AM +0200, Adrian Hunter wrote:
>> On 6/11/20 4:27 am, AKASHI Takahiro wrote:
>>> This is a UHS-II version of sdhci's set_power operation.
>>> VDD2, as well as VDD, is handled here.
>>>
>>> Signed-off-by: Ben Chuang <ben.chuang@...esyslogic.com.tw>
>>> Signed-off-by: AKASHI Takahiro <takahiro.akashi@...aro.org>
>>> ---
>>>  drivers/mmc/host/sdhci-uhs2.c | 80 +++++++++++++++++++++++++++++++++++
>>>  drivers/mmc/host/sdhci-uhs2.h |  2 +
>>>  drivers/mmc/host/sdhci.c      | 58 +++++++++++++++----------
>>>  drivers/mmc/host/sdhci.h      |  2 +
>>>  4 files changed, 119 insertions(+), 23 deletions(-)
>>>
>>> diff --git a/drivers/mmc/host/sdhci-uhs2.c b/drivers/mmc/host/sdhci-uhs2.c
>>> index e2b9743fe17d..2bf78cc4e9ed 100644
>>> --- a/drivers/mmc/host/sdhci-uhs2.c
>>> +++ b/drivers/mmc/host/sdhci-uhs2.c
>>> @@ -98,6 +98,86 @@ void sdhci_uhs2_reset(struct sdhci_host *host, u16 mask)
>>>  }
>>>  EXPORT_SYMBOL_GPL(sdhci_uhs2_reset);
>>>  
>>> +void sdhci_uhs2_set_power(struct sdhci_host *host, unsigned char mode,
>>> +			  unsigned short vdd)
>>
>> This function isn't used, so let's rename it sdhci_uhs2_set_power_noreg and
>> drop regulator support.
> 
> I have no strong opinion, but here Ben might want to further rework
> the new sdhci_uhs2_set_power_noreg() now that it is almost the same as
> GLI's gl9755_set_power()(, adding a new quirk?).
> 
>>> +{
>>> +	struct mmc_host *mmc = host->mmc;
>>> +	u8 pwr;
>>> +
>>> +	/* FIXME: check if flags & MMC_UHS2_SUPPORT? */
>>> +	if (!(host->mmc->caps & MMC_CAP_UHS2)) {
>>
>> As commented in another patch, please use a helper fn
> 
> As said, I would defer this.
> 
>>> +		sdhci_set_power(host, mode, vdd);
>>> +		return;
>>> +	}
>>> +
>>> +	if (mode != MMC_POWER_OFF) {
>>> +		pwr = sdhci_get_vdd_value(vdd);
>>
>> Simpler to open code this esp. as there are only 2 valid values:
>>
>> 		switch (1 << vdd) {
> 
> Can you ignore MMC_VDD_165_195 and MMC_VDD_20_21 here?

They are outside UHS-II spec, but you decide.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ