public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* A problem in JFFS2 code about ECC'd NOR flash
@ 2005-07-20  8:28 赵 豆豆
  2005-07-20 11:30 ` Jörn Engel
  0 siblings, 1 reply; 2+ messages in thread
From: 赵 豆豆 @ 2005-07-20  8:28 UTC (permalink / raw)
  To: linux-mtd

Hi,

For ECC'd NOR flash, the clean marker is written by
jffs2_flash_direct_writev() in jffs2_mark_erased_block().
Then the first 16 bytes of first page is filled with
clean marker. But wbuf know nothing about this 16 bytes.
So subsequent jffs2_flash_writev() will have problem. In
particular jffs2_flash_writev() will write the first page
for the second time.
Am I right? Or can this be confirmed by the JFFS2 developer?

Thanks,
Forrest

_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: A problem in JFFS2 code about ECC'd NOR flash
  2005-07-20  8:28 A problem in JFFS2 code about ECC'd NOR flash 赵 豆豆
@ 2005-07-20 11:30 ` Jörn Engel
  0 siblings, 0 replies; 2+ messages in thread
From: Jörn Engel @ 2005-07-20 11:30 UTC (permalink / raw)
  To: ?? ????; +Cc: linux-mtd

On Wed, 20 July 2005 16:28:09 +0800, ?? ???? wrote:
> 
> For ECC'd NOR flash, the clean marker is written by
> jffs2_flash_direct_writev() in jffs2_mark_erased_block().
> Then the first 16 bytes of first page is filled with
> clean marker. But wbuf know nothing about this 16 bytes.
> So subsequent jffs2_flash_writev() will have problem. In
> particular jffs2_flash_writev() will write the first page
> for the second time.
> Am I right? Or can this be confirmed by the JFFS2 developer?

This has been answered in irc already, but for the record...

ECC NOR requires writes in aligned multiples of 8 bytes.  The wbuf
size is 8 bytes only.  16 bytes, if written through the wbuf, would be
written directly to flash and leave the wbuf empty.  Writing them
directly, without wbuf, yields the same result, so current code is
safe.

Jörn

-- 
Audacity augments courage; hesitation, fear.
-- Publilius Syrus 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-07-20 11:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-20  8:28 A problem in JFFS2 code about ECC'd NOR flash 赵 豆豆
2005-07-20 11:30 ` Jörn Engel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox