chip driver mar_ram.c never sets MTD_ERASE_DONE state
Oliver Kühlert
oliver.kuehlert at sysgo.com
Thu Jun 17 09:51:46 EDT 2004
Hello,
trying to erase on an mtd devices using the map_ram.c driver
blocks the current process and never wakes up. (see mtdchar.c, ioctl func)
I believe, that this can be fixed by adding the marked line in map_ram.c:
static int mapram_erase (struct mtd_info *mtd, struct erase_info *instr)
{
/* Yeah, it's inefficient. Who cares? It's faster than a _real_
flash erase. */
struct map_info *map = (struct map_info *)mtd->priv;
unsigned long i;
for (i=0; i<instr->len; i++)
map_write8(map, 0xFF, instr->addr + i);
!!!!!!----> instr->state = MTD_ERASE_DONE; <----- !!!!!!
if (instr->callback)
instr->callback(instr);
return 0;
}
Best regards, Oliver Kühlert
--
Dr. Oliver Kuehlert SYSGO Real-Time Solutions AG
oliver.kuehlert at sysgo.com
Software Engineering Embedded and Real-Time Software www.sysgo.de
Voice: +49-6136-9948-0 Am Pfaffenstein 14 www.osek.de
FAX: +49-6136-9948-10 55270 Klein-Winternheim, Germany www.elinos.com
More information about the linux-mtd
mailing list