public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Przemyslaw Marczak <p.marczak@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mmc: sdhci: Avoid commands errors by simple timeout adaptation.
Date: Tue, 01 Oct 2013 18:59:14 +0200	[thread overview]
Message-ID: <524AFF62.7030706@samsung.com> (raw)
In-Reply-To: <FAD1DC26-AE08-44EF-97F0-5CC682ABD7A2@antoniou-consulting.com>

Hello Pantelis,
Thank you for reply


On 10/01/2013 05:50 PM, Pantelis Antoniou wrote:
>     while (sdhci_readl(host, SDHCI_PRESENT_STATE) & mask) {
> -        if (timeout == 0) {
> +        if (time == cmd_timeout) {
> time >= cmd_timeout here.
>
> You rely on the timeout hitting exactly the same value which is not 
> guaranteed.
I think this condition is guaranteed here, because of "time" value that 
is incremented only inside the loop.
Also if meets (time == cmd_timeout) condition and next if timeout will 
be increased twice, then eg. if current timeout
is 100ms -> next will be 200 ms, so it needs 100 loops and no more.

Am I wrong?

Regards

-- 
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com

  reply	other threads:[~2013-10-01 16:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-01 12:16 [U-Boot] [PATCH] mmc: sdhci: Avoid commands errors by simple timeout adaptation Przemyslaw Marczak
2013-10-01 15:50 ` Pantelis Antoniou
2013-10-01 16:59   ` Przemyslaw Marczak [this message]
2013-10-02  9:40     ` Pantelis Antoniou
2013-10-04  4:39 ` Jaehoon Chung
2013-10-04 13:17   ` Przemyslaw Marczak
2013-10-08 16:12 ` [U-Boot] [PATCH v2] " Przemyslaw Marczak
2013-10-15 20:18   ` Przemyslaw Marczak
2013-10-29 13:02     ` Przemyslaw Marczak
2013-10-29 13:08       ` Pantelis Antoniou
2013-10-29 13:24         ` Przemyslaw Marczak
2013-10-29 13:28           ` Pantelis Antoniou
2013-10-29 13:39             ` Mateusz Zalega
2013-10-31  7:49 ` [U-Boot] [PATCH] " Pantelis Antoniou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=524AFF62.7030706@samsung.com \
    --to=p.marczak@samsung.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox