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: <CWXP265MB2680E13C9509570773ABD792C45E9@CWXP265MB2680.GBRP265.PROD.OUTLOOK.COM>
Date:   Fri, 30 Apr 2021 10:45:02 +0000
From:   Christian Löhle <CLoehle@...erstone.com>
To:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
        "ulf.hansson@...aro.org" <ulf.hansson@...aro.org>
CC:     "pali@...nel.org" <pali@...nel.org>,
        "huyue2@...ong.com" <huyue2@...ong.com>,
        "tiantao6@...ilicon.com" <tiantao6@...ilicon.com>
Subject: Re: [PATCH] mmc: enable UHS voltage switch for SDSC if supported

So are there any other concerns, comments or opinions about this?


From: Christian Löhle <CLoehle@...erstone.com>
Sent: Thursday, April 22, 2021 3:18 PM
To: linux-kernel@...r.kernel.org <linux-kernel@...r.kernel.org>; linux-mmc@...r.kernel.org <linux-mmc@...r.kernel.org>; Christian Löhle <CLoehle@...erstone.com>; ulf.hansson@...aro.org <ulf.hansson@...aro.org>
Cc: pali@...nel.org <pali@...nel.org>; huyue2@...ong.com <huyue2@...ong.com>; tiantao6@...ilicon.com <tiantao6@...ilicon.com>
Subject: [PATCH] mmc: enable UHS voltage switch for SDSC if supported 
 
Ignore the reported capacity if the card otherwise reports UHS support.

Currently SDSC cards reporting UHS support except for the CCS do not run
through the voltage switch.
While strictly speaking a SDSC card cannot support UHS in compliance
with the standard, there is no good reason to throttle them that way.
Especially for pSLCs in practice such cards benefit greatly by this patch,
as they can be new and UHS supporting, but must not lie about their CCS.
The behaviour of linux-mmc for SDSC is deviating from the standard anyway
in such a case, as the card is treated as UHS card not supporting the
voltage switch in general.
Such a card will come up as
mmc0: new ultra high speed SDR25 SD card at address 0001.
Thus the subsystem will support CMD23 and others to the card.
But if we deviate from the standard anyway, then we might as well
not throttle SDSC to 25MB/s.

Signed-off-by: Christian Loehle <cloehle@...erstone.com>
---
 drivers/mmc/core/sd.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index 6fa51a6ed058..281ca2da8e0b 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -841,11 +841,10 @@ int mmc_sd_get_cid(struct mmc_host *host, u32 ocr, u32 *cid, u32 *rocr)
                 return err;
 
         /*
-        * In case CCS and S18A in the response is set, start Signal Voltage
-        * Switch procedure. SPI mode doesn't support CMD11.
+        * In case S18A in the response is set, start Signal Voltage Switch
+        * procedure. SPI mode doesn't support CMD11.
          */
-       if (!mmc_host_is_spi(host) && rocr &&
-          ((*rocr & 0x41000000) == 0x41000000)) {
+       if (!mmc_host_is_spi(host) && rocr && (*rocr & 0x01000000)) {
                 err = mmc_set_uhs_voltage(host, pocr);
                 if (err == -EAGAIN) {
                         retries--;
-- 
2.31.1
Hyperstone GmbH | Line-Eid-Strasse 3 | 78467 Konstanz
Managing Directors: Dr. Jan Peter Berns.
Commercial register of local courts: Freiburg HRB381782

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ