From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] sf: fix timebase data type in _wait_ready()
Date: Mon, 25 Apr 2016 20:16:13 -0400 [thread overview]
Message-ID: <20160426001613.GV29322@bill-the-cat> (raw)
In-Reply-To: <1459789432-13372-1-git-send-email-swarren@wwwdotorg.org>
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>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160425/3da6bf8a/attachment.sig>
prev parent reply other threads:[~2016-04-26 0:16 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
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 ` Tom Rini [this message]
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=20160426001613.GV29322@bill-the-cat \
--to=trini@konsulko.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