--- linux-2.6.25/drivers/mtd/chips/cfi_cmdset_0001.c 2008-04-17 04:49:44.000000000 +0200 +++ linux-2.6.25.hacked/drivers/mtd/chips/cfi_cmdset_0001.c 2008-04-23 10:27:12.000000000 +0200 @@ -712,6 +712,12 @@ if (chip->priv && map_word_andequal(map, status, status_PWS, status_PWS)) break; + if (time_after(jiffies, timeo)) { + printk(KERN_ERR "%s: Waiting for chip to be ready timed out. Status %lx\n", + map->name, status.x[0]); + return -EIO; + } + spin_unlock(chip->mutex); cfi_udelay(1); spin_lock(chip->mutex);