diff options
author | Ezequiel Garcia <ezequiel.garcia@free-electrons.com> | 2013-12-18 18:44:08 -0300 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2014-01-03 11:22:26 -0800 |
commit | d20d0a6cf75ba60cac5d00f9a4c2caabf611c51e (patch) | |
tree | c55974e413ba3378ec9dc98bd4a0952c719484cb /drivers/mtd/lpddr | |
parent | 919193cee04f49628ae9efdc45bf4af1e506205f (diff) |
mtd: nand: pxa3xx: Clear need_wait flag when starting a command
Currently the driver assumes all commands will eventually trigger a RnB
transition, and thus a "device is ready" IRQ.
This assumption means that on every issued command, the dev_ready completion
handler is init'ed and the need_wait flag is set.
However this is incorrect: some commands (such as NAND_CMD_STATUS) don't
make the device 'busy' and thus a RnB transition never occurs.
Given, the NAND core never calls waitfunc() after such commands, this
is not a problem.
Therefore, it's possible to only clear the need_wait flag on every command
that is started.
This fixes a current bug that can be reproduced on PXA boards by writing
blank (all 0xff'ed) to a page:
1. The kernel issues NAND_CMD_STATUS and sets need_wait=1. The flag
won't be cleared for this command since no RnB transition is
involved.
2. NAND_CMD_PAGEPROG is issued but since the data is blank, the driver
decides not to execute the command (and no IRQ activity is
involved).
3. The NAND core calls waitfunc() and waits for the dev_ready
completion, which will never end since the device _is_ already ready.
Tested-by: Arnaud Ebalard <arno@natisbad.org>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/lpddr')
0 files changed, 0 insertions, 0 deletions