Mercurial > yaffs-ecoscentric
changeset 238:94a1acb51527
Extra page status checking to combat power loss causing only one bit to change
| author | charles |
|---|---|
| date | Thu, 13 Nov 2008 01:50:16 +0000 |
| parents | b97223f16e0e |
| children | 9283fe91d449 |
| files | direct/yaffs_norif1.c |
| diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/direct/yaffs_norif1.c +++ b/direct/yaffs_norif1.c @@ -219,11 +219,14 @@ int ynorif1_ReadChunkFromNAND(yaffs_Devi { ynorif1_FlashRead32(spareAddr,(__u32 *)spare,16/ 4); - /* If the page status is 0xF then it was written properly + /* If the page status is YNOR_POSTMARKER then it was written properly * so change that to 0xFF so that the rest of yaffs is happy. */ if(spare->pageStatus == YNOR_POSTMARKER) spare->pageStatus = 0xFF; + else if(spare->pageStatus != 0xff && + (spare->pageStatus | YNOR_PREMARKER != 0xff)) + spare->pageStatus = YNOR_PREMARKER; }
