[PATCH] Bug in m25p80.c during whole-chip erase

Mike Frysinger vapier.adi at gmail.com
Mon Apr 27 17:26:31 EDT 2009


On Mon, Apr 27, 2009 at 17:10, Steven A. Falco wrote:
> There is a logic error in "whole chip erase" for the m25p80 family.  If
> the whole device is successfully erased, erase_chip() will return 0, and
> the code will fall through to the "else" clause, and do sector-by-sector
> erase in addition to the whole-chip erase.  This patch corrects that.
>
> Also, the MAX_READY_WAIT_COUNT is insufficient for an m25p16 connected
> to a 400 MHz powerpc.  Increasing it allows me to successfully program
> the device on my board.

in general, trying to set timeouts "close" to the spec gains nothing
with spi flash devices.  the timeout limit is hit only when an error
occurs, and errors should not occur during the normal run of things.
on the other side, having a timeout be wrongly hit when the device is
operating correctly is a much worse situation to be in.
-mike



More information about the linux-mtd mailing list