All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jagan Teki <jagannadh.teki@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] sf: fix timebase data type in _wait_ready()
Date: Wed, 6 Apr 2016 16:52:24 +0530	[thread overview]
Message-ID: <CAD6G_RQvVvk2peDDCc1sKmApoKX20rBOysnRgx-mqbGRGDTbVQ@mail.gmail.com> (raw)
In-Reply-To: <20160405000154.GB23166@bill-the-cat>

On 5 April 2016 at 05:31, Tom Rini <trini@konsulko.com> wrote:
> On Mon, Apr 04, 2016 at 11:03:52AM -0600, Stephen Warren wrote:
>
>> From: Stephen Warren <swarren@nvidia.com>
>>
>> get_timer() returns an unsigned 64-bit value, but is currently assigned to
>> a signed 32-bit variable. Due to sign extension and data truncation, this
>> causes the timeout loop in spi_flash_cmd_wait_ready() to immediately (and
>> incorrectly) fire for about 50% of all time values, based on whether bit
>> 31 is set. In sandbox at least, this causes the test to pass or fail based
>> on system uptime, as opposed to time since the U-Boot binary was started.
>>
>> Fixes: 4efad20a1751 ("sf: Update status reg check in spi_flash_cmd_wait_ready")
>> Signed-off-by: Stephen Warren <swarren@nvidia.com>
>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Reviewed-by: Jagan Teki <jteki@openedev.com>

-- 
Jagan.

  reply	other threads:[~2016-04-06 11:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04 17:03 [U-Boot] [PATCH] sf: fix timebase data type in _wait_ready() Stephen Warren
2016-04-05  0:01 ` Tom Rini
2016-04-06 11:22   ` Jagan Teki [this message]
2016-04-12 15:43     ` Stephen Warren
2016-04-12 16:03       ` Tom Rini
2016-04-21  5:49     ` Stephen Warren
2016-04-25 16:44       ` Stephen Warren
2016-04-25 16:46         ` Tom Rini
2016-04-26  0:16 ` [U-Boot] " Tom Rini

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=CAD6G_RQvVvk2peDDCc1sKmApoKX20rBOysnRgx-mqbGRGDTbVQ@mail.gmail.com \
    --to=jagannadh.teki@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.