projects
/
yaffs2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
987ab45
)
Extra page status checking to combat power loss causing only one bit to change
author
charles
<charles>
Thu, 13 Nov 2008 01:50:16 +0000
(
01:50
+0000)
committer
charles
<charles>
Thu, 13 Nov 2008 01:50:16 +0000
(
01:50
+0000)
direct/yaffs_norif1.c
patch
|
blob
|
history
diff --git
a/direct/yaffs_norif1.c
b/direct/yaffs_norif1.c
index c49b6c4aca22b78faefa71362c0f1b8482b7c54f..4e660d083144dd15bba0e14ffe3d360bd4ef9436 100644
(file)
--- a/
direct/yaffs_norif1.c
+++ b/
direct/yaffs_norif1.c
@@
-35,7
+35,7
@@
*
*/
*
*/
-const char *yaffs_norif1_c_version = "$Id: yaffs_norif1.c,v 1.
2 2008-11-11 01:48:47
charles Exp $";
+const char *yaffs_norif1_c_version = "$Id: yaffs_norif1.c,v 1.
3 2008-11-13 01:50:16
charles Exp $";
#include "yaffs_norif1.h"
#include "yaffs_norif1.h"
@@
-219,11
+219,14
@@
int ynorif1_ReadChunkFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *data, yaf
{
ynorif1_FlashRead32(spareAddr,(__u32 *)spare,16/ 4);
{
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;
* 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;
}
}