cfi_cmdset_0002.c: Timeout for writing

Frederic Giasson fgiasson at mediatrix.com
Wed Oct 30 09:16:27 EST 2002


It is correct as long as HZ/1000 gives you a 1ms value.  Most of CFI flash
device should never take more that a couple of hundreds of microseconds to
write a word.  Nevertheless, to prevent that  jiffies + (HZ/1000) = jiffies,
meaning that HZ/1000 = 0, we could replace the line 511 by

timeo = jiffies + (HZ/1000) + 1;

Frédéric Giasson 



Hello,

Is this correct?

Line 511 in cfi_cmdset_0002.c, function do_write_oneword:
<  timeo = jiffies + (HZ/1000); /* setting timeout to 1ms for now */

Timeo is set to jiffies because HZ/1000 = 0. This don't work in our
integration.
We use MTD in a non-linux environment. jiffies are emulated (10 ms)
Nevertheless I think, it's not correct?

Greetings,
Holger












--__--__--

______________________________________________________
Linux MTD discussion mailing list digest
http://lists.infradead.org/mailman/listinfo/linux-mtd/


End of linux-mtd Digest




More information about the linux-mtd mailing list