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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <92123c0398e154334cc947ce8f16e89ce0c3c9af.camel@gmail.com>
Date:   Wed, 15 Sep 2021 11:54:35 +0200
From:   Bean Huo <huobean@...il.com>
To:     Ulf Hansson <ulf.hansson@...aro.org>
Cc:     Adrian Hunter <adrian.hunter@...el.com>,
        Wolfram Sang <wsa+renesas@...g-engineering.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Avri Altman <avri.altman@....com>,
        linux-mmc <linux-mmc@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "Bean Huo (beanhuo)" <beanhuo@...ron.com>
Subject: Re: [PATCH v1 2/2] mmc: core: No need to calculate the timeout
 value for CQE data transmission

On Tue, 2021-09-14 at 10:13 +0200, Ulf Hansson wrote:
> >          }
> > +       /*
> > +        * In case CQE is enabled, the timeout will be set a
> > maximum timeout in
> > +        * sdhci_cqe_enable(), so, no need to go through the below
> > algorithm.
> > +        */
> > +       if (host->cqe_enabled)
> 
> 
>  I don't think this is a good idea. For example, host->cqe_enabled is
> 
> set for the hsq case well.

Uffe,

My apologies for this, I forgot to check hsq, hsq will call
sdhci_send_command() as well.


How about changing it to this?

 
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 240c5af793dc..7235e398ef93 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -649,6 +649,7 @@ EXPORT_SYMBOL(mmc_wait_for_cmd);
 void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card
*card)
 {
        unsigned int mult;
+       struct mmc_host *host = card->host;
 
        /*
         * SDIO cards only define an upper 1 s limit on access.
@@ -659,6 +660,13 @@ void mmc_set_data_timeout(struct mmc_data *data,
const struct mmc_card *card)
                return;
        }
 
+       /*
+        * For the CQE use case, the data transfer timeout will be set
a maximum
+        * timeout value in HW timer in function sdhci_cqe_enable(),
so, no need
+        * to go through the below algorithm.
+        */
+       if (host->cqe_enabled && !host->hsq_enabled)
+               return;
        /*
         * SD cards use a 100 multiplier rather than 10
         */

I have another timeout change associated with data transfer as well, if
this change is acceptible, I will submit it with that together.

Kind regards,
Bean

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ