diff options
author | Robert Jarzmik <robert.jarzmik@free.fr> | 2015-08-19 20:30:15 +0200 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-08-19 15:25:32 -0700 |
commit | 21fc0ef9652f0c809dc0d3e0a67f1e1bf6ff8255 (patch) | |
tree | dc40cd7c6fbd2d4b7a82c13d1eed833029c61034 /lib/debugobjects.c | |
parent | 0b14392db2e998157d924085d7913e537ec26121 (diff) | |
download | linux-21fc0ef9652f0c809dc0d3e0a67f1e1bf6ff8255.tar.gz linux-21fc0ef9652f0c809dc0d3e0a67f1e1bf6ff8255.tar.bz2 linux-21fc0ef9652f0c809dc0d3e0a67f1e1bf6ff8255.zip |
mtd: nand: pxa3xx-nand: fix random command timeouts
When 2 commands are submitted in a row, and the second is very quick,
the completion of the second command might never come. This happens
especially if the second command is quick, such as a status read after
an erase.
The issue is that in the interrupt handler, the status bits are cleared
after the new command is issued. There is a small temporal window where
this happens :
- the previous command has set the command done bit
- the ready for a command bit is set
- the handler submits the next command
- just then, the command completes, and the command done bit is still
set
- the handler clears the "previous" command done bit
- the handler exits
In this flow, the "command done" of the next command will never trigger
a new interrupt to finish the status command, as it was cleared for both
commands.
Fix this by clearing the status bit before submitting a new command.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions