Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144742
b: refs/heads/master
c: 3f33b0a
h: refs/heads/master
v: v3
  • Loading branch information
Steven A. Falco authored and David Woodhouse committed Apr 29, 2009
1 parent 336211a commit b0d9061
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e7693548950ea5801d5d8b00414aed37033cf972
refs/heads/master: 3f33b0aaac4e208579fe5aa2964857d4e9ba10c5
12 changes: 7 additions & 5 deletions trunk/drivers/mtd/devices/m25p80.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#define SR_SRWD 0x80 /* SR write protect */

/* Define max times to check status register before we give up. */
#define MAX_READY_WAIT_COUNT 100000
#define MAX_READY_WAIT_COUNT 1000000
#define CMD_SIZE 4

#ifdef CONFIG_M25PXX_USE_FAST_READ
Expand Down Expand Up @@ -246,10 +246,12 @@ static int m25p80_erase(struct mtd_info *mtd, struct erase_info *instr)
mutex_lock(&flash->lock);

/* whole-chip erase? */
if (len == flash->mtd.size && erase_chip(flash)) {
instr->state = MTD_ERASE_FAILED;
mutex_unlock(&flash->lock);
return -EIO;
if (len == flash->mtd.size) {
if (erase_chip(flash)) {
instr->state = MTD_ERASE_FAILED;
mutex_unlock(&flash->lock);
return -EIO;
}

/* REVISIT in some cases we could speed up erasing large regions
* by using OPCODE_SE instead of OPCODE_BE_4K. We may have set up
Expand Down

0 comments on commit b0d9061

Please sign in to comment.