From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Mon, 25 Apr 2016 12:46:00 -0400 Subject: [U-Boot] [PATCH] sf: fix timebase data type in _wait_ready() In-Reply-To: <571E4952.3070004@wwwdotorg.org> References: <1459789432-13372-1-git-send-email-swarren@wwwdotorg.org> <20160405000154.GB23166@bill-the-cat> <571869CD.9090708@wwwdotorg.org> <571E4952.3070004@wwwdotorg.org> Message-ID: <20160425164600.GK3732@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Apr 25, 2016 at 10:44:02AM -0600, Stephen Warren wrote: > On 04/20/2016 11:49 PM, Stephen Warren wrote: > >On 04/06/2016 05:22 AM, Jagan Teki wrote: > >>On 5 April 2016 at 05:31, Tom Rini wrote: > >>>On Mon, Apr 04, 2016 at 11:03:52AM -0600, Stephen Warren wrote: > >>> > >>>>From: Stephen Warren > >>>> > >>>>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 > >>> > >>>Reviewed-by: Tom Rini > >> > >>Reviewed-by: Jagan Teki > > > >Jagan, are you going to apply this? > > Tom, does it make sense for you to apply this? If Jagan doesn't want to make up a small PR for this, yes. And since I should do an rc3 today, yes, I should pick this up myself. Thanks for the reminder. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: