[PATCH] mtd: spi-nor: improve wait-till-ready timeout loop

Brian Norris computersforpeace at gmail.com
Tue Nov 25 22:54:25 PST 2014


On Wed, Nov 05, 2014 at 02:32:03AM -0800, Brian Norris wrote:
> There are a few small issues with the timeout loop in
> spi_nor_wait_till_ready():
> 
>  * The first operation should not be a reschedule; we should check the
>    status register at least once to see if we're complete!
> 
>  * We should check the status register one last time after declaring the
>    deadline has passed, to prevent a premature timeout erro (this is
>    theoretically possible if we sleep for a long time after the previous
>    status register check).
> 
>  * Add an error message, so it's obvious if we ever hit a timeout.
> 
> Signed-off-by: Brian Norris <computersforpeace at gmail.com>

Applied to l2-mtd.git.

Brian



More information about the linux-mtd mailing list