Timeout in do_write_oneword()
Marius Groeger
mag at sysgo.de
Thu Dec 12 08:36:51 EST 2002
Hello,
we ran into a problem with the current CVS version of
drivers/mtd/chips/cfi_cmdset_0002.c::do_write_oneword(), line 514. We
think the following is broken on most platform, where HZ is 100 and
results in a 10ms jiffy resolution:
timeo = jiffies + (HZ/1000); /* setting timeout to 1ms for now */
Wouldn't this be better:
/* setting timeout to 1ms for now, but wait a least one system tick */
timeo = jiffies + (HZ/1000) ? (HZ/1000) : 1;
Regards,
Marius
-----------------------------------------------------------------------------
Marius Groeger SYSGO Real-Time Solutions AG mgroeger at sysgo.de
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