Re: [Yaffs] Problem with Yaffs on Routerboard RB112 and kern…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: yaffs
Subject: Re: [Yaffs] Problem with Yaffs on Routerboard RB112 and kernel 2.6.19
On Thursday 10 May 2007 07:03, David Goodenough wrote:
> OK, I have dumped the first 1024 bytes of /dev/mtd0. It reads:-
>
> ECC failed: 8
> ECC corrected: 0
> Number of bad blocks: 0
> Number of bbt blocks: 0
> Block size 16384, page size 512, OOB size 16
> Dumping data starting at 0x00000000 and ending at 0x00000400...
> ECC: 1 uncorrectable bitflip(s) at offset 0x00000000
> 0x00000000: 01 00 00 00 01 00 00 00 ff ff 6b 65 72 6e 65 6c
> 0x00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x00000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x000000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x000000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x000000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x000000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x000000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x000000f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x00000100: 00 00 00 00 00 00 00 00 00 00 ff ff a4 81 00 00
> 0x00000110: 00 00 00 00 00 00 00 00 c1 43 6d 38 c1 43 6d 38
> 0x00000120: c1 43 6d 38 00 00 00 00 ff ff ff ff ff ff ff ff
> 0x00000130: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x00000140: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x00000150: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x00000160: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x00000170: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x00000180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x00000190: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x000001a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x000001b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x000001c0: ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00
> 0x000001d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x000001e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 0x000001f0: ff ff ff ff ff ff ff ff 00 00 00 00 00 00 00 00
> OOB Data: 00 00 10 00 00 ff 9d 01 ff f0 0f 5c 81 aa 5a a7
> ECC: 1 uncorrectable bitflip(s) at offset 0x00000200


If you're getting ECC errors here it is possibly because the flash has been
written using yaffs_ecc.c and read (with nand_dump) using mtd's nand_ecc.c

nand_ecc.c generates exaclty the same data as yaffs_ecc.c, but the byte
ordering is different. Both implement the SmartMedia ECC mechanism, but the
byte order is broken in nand_ecc.c

There are two solutions to this mess:
1) Microtik should provide their driver configs under GPL.
2) Trace through the data reading/writing to see where the OOB byte ordering
is getting screwed up.


> 0x00000200: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
> 0x00000210: 02 00 08 00 01 00 00 00 40 00 28 80 34 00 00 00
> 0x00000220: 44 fb 1f 00 01 10 00 50 34 00 20 00 03 00 28 00
> 0x00000230: 14 00 13 00 00 00 00 70 70 73 19 00 70 93 29 80
> 0x00000240: 70 93 29 80 18 00 00 00 18 00 00 00 04 00 00 00
> 0x00000250: 04 00 00 00 01 00 00 00 a0 00 00 00 00 10 10 80
> 0x00000260: 00 10 10 80 68 b7 17 00 68 b7 17 00 05 00 00 00
> 0x00000270: 20 00 00 00 01 00 00 00 00 c0 17 00 00 e0 27 80
> 0x00000280: 00 e0 27 80 00 c0 05 00 e0 6f 08 00 07 00 00 00
> 0x00000290: 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x000002a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x000002b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x000002c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x000002d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x000002e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x000002f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x00000300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x00000310: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x00000320: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x00000330: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x00000340: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x00000350: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x00000360: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x00000370: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x00000380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x00000390: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x000003a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x000003b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x000003c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x000003d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x000003e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 0x000003f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> OOB Data: 01 00 10 80 ff ff 9d 01 a6 55 97 d8 81 ff ff ff
>
> I hope this makes sense to someone.
>
> David
>
> _______________________________________________
> yaffs mailing list
>
> http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs