]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: Bug in m25p80.c during whole-chip erase
authorSteven A. Falco <sfalco@harris.com>
Mon, 27 Apr 2009 21:10:10 +0000 (17:10 -0400)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 29 Apr 2009 05:49:28 +0000 (06:49 +0100)
commit818bda15b728407847c0a7f4a0dcc3bf6a6b55e5
treed63af4077e9f102a39c0f2d035f72dfa5fb7c1fc
parent0b4bf6d2f52074e695292cd7e1b1da7bf3b71bee
mtd: Bug in m25p80.c during whole-chip erase

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.

Signed-off-by: Steven A. Falco <sfalco@harris.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/devices/m25p80.c