[PATCH] cfi: Fixup of write errors on XIP

Nicolas Pitre nico at cam.org
Wed Mar 29 11:34:04 EST 2006


On Tue, 28 Mar 2006, Alexey, Korolev wrote:

> Nicolas,
> 
> I've made some more investigations for the write errors issue on XIP.
> The issue takes place when I attempt to write some data to one chip and erase
> data from another.

Ahhhh !

> I'm afraid that this issue can be easily reproduced in case of system
> overload.

... and more than one flash chip.

> I found two possible ways for fixing this issue:
> 1. Which has been sent before.
> Add lines in waiting cycle of do_write_buffer.
> 
> 2. Fixup in xip_udelay function.
> xip_udelay already check's the status. So this function will not wait more
> than required.

I think both solutions, although they fix this particular problem, are 
not addressing the fundamental issue which is that the current code 
structure to cope with XIP and non-XIP is becoming a total mess.  In 
fact the whole timeout/error handling should be factored out of every 
functions into a sincle subfunction, actually one for XIP and one for 
non-XIP.  This way the non-XIP case would not have to care about chip 
state changing since that cannot happen, and the timeout treshold would 
be more accurately computed as well.


Nicolas




More information about the linux-mtd mailing list