diff options
author | Tadashi Abe <tabe@mvista.com> | 2011-05-19 02:58:15 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2011-05-24 21:11:11 -0400 |
commit | 100f2341e305f98de3aa12fb472771ab029cbda7 (patch) | |
tree | 40cc6edf73cf06b6392a18fd496cb9dc071c98d4 /drivers/mtd/lpddr | |
parent | 52534f2dba5d033c0c33e515faa2767d7e8e986a (diff) |
mtd: fix hang-up in cfi erase and read contention
cfi erase command hangs up when erase and read contention occurs.
If read runs at the same address as erase operation, read issues
Erase-Suspend via get_chip() and the erase goes into sleep in wait queue.
But in this case, read operation exits by time-out without waking it up.
I think the other variants (0001, 0020 and lpddr) have the same problem too.
Tested and verified the patch only on CFI-0002 flash, though.
Signed-off-by: Tadashi Abe <tabe@mvista.com>
Acked-by: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/lpddr')
-rw-r--r-- | drivers/mtd/lpddr/lpddr_cmds.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c index 12679925b420..16dcd1c76baf 100644 --- a/drivers/mtd/lpddr/lpddr_cmds.c +++ b/drivers/mtd/lpddr/lpddr_cmds.c | |||
@@ -313,12 +313,7 @@ static int chip_ready(struct map_info *map, struct flchip *chip, int mode) | |||
313 | if (ret) { | 313 | if (ret) { |
314 | /* Oops. something got wrong. */ | 314 | /* Oops. something got wrong. */ |
315 | /* Resume and pretend we weren't here. */ | 315 | /* Resume and pretend we weren't here. */ |
316 | map_write(map, CMD(LPDDR_RESUME), | 316 | put_chip(map, chip); |
317 | map->pfow_base + PFOW_COMMAND_CODE); | ||
318 | map_write(map, CMD(LPDDR_START_EXECUTION), | ||
319 | map->pfow_base + PFOW_COMMAND_EXECUTE); | ||
320 | chip->state = FL_ERASING; | ||
321 | chip->oldstate = FL_READY; | ||
322 | printk(KERN_ERR "%s: suspend operation failed." | 317 | printk(KERN_ERR "%s: suspend operation failed." |
323 | "State may be wrong \n", map->name); | 318 | "State may be wrong \n", map->name); |
324 | return -EIO; | 319 | return -EIO; |