Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions drivers/mtd/chips/cfi_cmdset_0002.c
Original file line number Diff line number Diff line change
Expand Up @@ -1625,14 +1625,14 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip,
continue;
}

if (time_after(jiffies, timeo) && !chip_ready(map, adr)){
if (time_after(jiffies, timeo) && !chip_good(map, adr, datum)){
xip_enable(map, chip, adr);
printk(KERN_WARNING "MTD %s(): software timeout\n", __func__);
xip_disable(map, chip, adr);
break;
}

if (chip_ready(map, adr))
if (chip_good(map, adr, datum))
break;

/* Latency issues. Drop the lock, wait a while and retry */
Expand Down Expand Up @@ -1874,10 +1874,10 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
continue;
}

if (time_after(jiffies, timeo) && !chip_ready(map, adr))
if (time_after(jiffies, timeo) && !chip_good(map, adr, datum))
break;

if (chip_ready(map, adr)) {
if (chip_good(map, adr, datum)) {
xip_enable(map, chip, adr);
goto op_done;
}
Expand Down Expand Up @@ -2288,7 +2288,7 @@ static int __xipram do_erase_chip(struct map_info *map, struct flchip *chip)
chip->erase_suspended = 0;
}

if (chip_ready(map, adr))
if (chip_good(map, adr, map_word_ff(map)))
break;

if (time_after(jiffies, timeo)) {
Expand Down Expand Up @@ -2377,7 +2377,7 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip,
chip->erase_suspended = 0;
}

if (chip_ready(map, adr)) {
if (chip_good(map, adr, map_word_ff(map))) {
xip_enable(map, chip, adr);
break;
}
Expand Down