From 2a12e648ce34a7f416d55a45041ac010857ecb53 Mon Sep 17 00:00:00 2001 From: aleph1 Date: Fri, 29 Aug 2003 17:53:05 +0000 Subject: [PATCH] Fix provided by James McKenzie for yaffs_DeleteChunk() - read before write needed --- yaffs_guts.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/yaffs_guts.c b/yaffs_guts.c index 7afb140..365fa69 100644 --- a/yaffs_guts.c +++ b/yaffs_guts.c @@ -14,7 +14,7 @@ */ //yaffs_guts.c -const char *yaffs_guts_c_version="$Id: yaffs_guts.c,v 1.28 2003-08-20 03:53:39 charles Exp $"; +const char *yaffs_guts_c_version="$Id: yaffs_guts.c,v 1.29 2003-08-29 17:53:05 aleph1 Exp $"; #include "yportenv.h" @@ -2863,6 +2863,10 @@ static void yaffs_DeleteChunk(yaffs_Device *dev,int chunkId,int markNAND) if(markNAND) { yaffs_SpareInitialise(&spare); + + //read data before write, to ensure correct ecc + //and transitions are guaranteed 1->0 + yaffs_ReadChunkFromNAND(dev,chunkId,NULL,&spare,0); spare.pageStatus = 0; // To mark it as deleted. -- 2.30.2