1 --- a/drivers/mtd/chips/cfi_cmdset_0002.c
2 +++ b/drivers/mtd/chips/cfi_cmdset_0002.c
3 @@ -1634,8 +1634,8 @@ static int __xipram do_write_oneword(str
7 - if (chip_ready(map, adr))
9 + if (chip_good(map, adr, datum))
12 /* Latency issues. Drop the lock, wait a while and retry */
13 UDELAY(map, chip, adr, 1);
14 @@ -1651,6 +1651,8 @@ static int __xipram do_write_oneword(str
20 xip_enable(map, chip, adr);
22 if (mode == FL_OTP_WRITE)
23 @@ -2229,7 +2231,6 @@ static int cfi_amdstd_panic_write(struct
29 * Handle devices with one erase region, that only implement
30 * the chip erase command.
31 @@ -2297,7 +2298,7 @@ static int __xipram do_erase_chip(struct
34 if (chip_good(map, adr, map_word_ff(map)))
38 if (time_after(jiffies, timeo)) {
39 printk(KERN_WARNING "MTD %s(): software timeout\n",
40 @@ -2321,6 +2322,7 @@ static int __xipram do_erase_chip(struct
45 chip->state = FL_READY;
46 xip_enable(map, chip, adr);
48 @@ -2393,7 +2395,7 @@ static int __xipram do_erase_oneblock(st
51 if (chip_good(map, adr, map_word_ff(map)))
55 if (time_after(jiffies, timeo)) {
56 printk(KERN_WARNING "MTD %s(): software timeout\n",
57 @@ -2417,6 +2419,7 @@ static int __xipram do_erase_oneblock(st
62 chip->state = FL_READY;
63 xip_enable(map, chip, adr);