* Kernel marking NAND blocks bad @ 2008-07-02 19:35 Ron Madrid 2008-07-02 19:46 ` Scott Wood 0 siblings, 1 reply; 5+ messages in thread From: Ron Madrid @ 2008-07-02 19:35 UTC (permalink / raw) To: Scott Wood, linuxppc-dev Scott, I know I asked about this in the past, but I can't remember where it was left. Did this get resolved in some other repository that isn't the main linux-2.6 repository? If it didn't I think I might have a solution. BTW I'm using 2.6.26-rc8 Ron ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Kernel marking NAND blocks bad 2008-07-02 19:35 Kernel marking NAND blocks bad Ron Madrid @ 2008-07-02 19:46 ` Scott Wood 2008-07-02 19:59 ` Ron Madrid 0 siblings, 1 reply; 5+ messages in thread From: Scott Wood @ 2008-07-02 19:46 UTC (permalink / raw) To: Ron Madrid; +Cc: linuxppc-dev Ron Madrid wrote: > I know I asked about this in the past, but I can't remember where it was left. Did this get > resolved in some other repository that isn't the main linux-2.6 repository? If it didn't I think > I might have a solution. BTW I'm using 2.6.26-rc8 What was the issue? -Scott ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Kernel marking NAND blocks bad 2008-07-02 19:46 ` Scott Wood @ 2008-07-02 19:59 ` Ron Madrid 2008-07-02 20:03 ` Scott Wood 0 siblings, 1 reply; 5+ messages in thread From: Ron Madrid @ 2008-07-02 19:59 UTC (permalink / raw) To: Scott Wood; +Cc: linuxppc-dev During boot the kernel mounts the root file system and (I think) based on the size of the NAND in the dts attempts to "format" the rest of the NAND fs partition. At this point the blocks are being marked as bad. Therefore, when I reboot, the kernel thinks that there is no more usable space in the file system due to all the "bad" blocks. My dts is very similar to the 8313. I think the problem is that for the Large Page FLASH, when checking for bad blocks bytes 0 and 1 in the oob are being checked. However in fsl_elbc_nand.c the .oobfree begins at byte 1. Therefore if something is being written to byte 1 in the oob, and later is checked to see if the block is bad, it will be seen as bad when it checks byte 0 and 1. The changes below have worked for me, but I don't know if these changes are "right", or if there is something else that should be done instead. /* Large Page FLASH with FMR[ECCM] = 0 */ static struct nand_ecclayout fsl_elbc_oob_lp_eccm0 = { .eccbytes = 12, .eccpos = {6, 7, 8, 22, 23, 24, 38, 39, 40, 54, 55, 56}, - .oobfree = { {1, 5}, {9, 13}, {25, 13}, {41, 13}, {57, 7} }, + .oobfree = { {2, 4}, {9, 13}, {25, 13}, {41, 13}, {57, 7} }, .oobavail = 48, }; /* Large Page FLASH with FMR[ECCM] = 1 */ static struct nand_ecclayout fsl_elbc_oob_lp_eccm1 = { .eccbytes = 12, .eccpos = {8, 9, 10, 24, 25, 26, 40, 41, 42, 56, 57, 58}, - .oobfree = { {1, 7}, {11, 13}, {27, 13}, {43, 13}, {59, 5} }, + .oobfree = { {2, 6}, {11, 13}, {27, 13}, {43, 13}, {59, 5} }, .oobavail = 48, }; Ron --- Scott Wood <scottwood@freescale•com> wrote: > Ron Madrid wrote: > > I know I asked about this in the past, but I can't remember where it was left. Did this get > > resolved in some other repository that isn't the main linux-2.6 repository? If it didn't I > think > > I might have a solution. BTW I'm using 2.6.26-rc8 > > What was the issue? > > -Scott > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Kernel marking NAND blocks bad 2008-07-02 19:59 ` Ron Madrid @ 2008-07-02 20:03 ` Scott Wood 2008-07-02 21:13 ` Ron Madrid 0 siblings, 1 reply; 5+ messages in thread From: Scott Wood @ 2008-07-02 20:03 UTC (permalink / raw) To: Ron Madrid; +Cc: linuxppc-dev Ron Madrid wrote: > /* Large Page FLASH with FMR[ECCM] = 0 */ > static struct nand_ecclayout fsl_elbc_oob_lp_eccm0 = { > .eccbytes = 12, > .eccpos = {6, 7, 8, 22, 23, 24, 38, 39, 40, 54, 55, 56}, > - .oobfree = { {1, 5}, {9, 13}, {25, 13}, {41, 13}, {57, 7} }, > + .oobfree = { {2, 4}, {9, 13}, {25, 13}, {41, 13}, {57, 7} }, > .oobavail = 48, > }; > > /* Large Page FLASH with FMR[ECCM] = 1 */ > static struct nand_ecclayout fsl_elbc_oob_lp_eccm1 = { > .eccbytes = 12, > .eccpos = {8, 9, 10, 24, 25, 26, 40, 41, 42, 56, 57, 58}, > - .oobfree = { {1, 7}, {11, 13}, {27, 13}, {43, 13}, {59, 5} }, > + .oobfree = { {2, 6}, {11, 13}, {27, 13}, {43, 13}, {59, 5} }, > .oobavail = 48, > }; Anton's recent patchset (posted to the MTD list) should fix this. -scott ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Kernel marking NAND blocks bad 2008-07-02 20:03 ` Scott Wood @ 2008-07-02 21:13 ` Ron Madrid 0 siblings, 0 replies; 5+ messages in thread From: Ron Madrid @ 2008-07-02 21:13 UTC (permalink / raw) To: Scott Wood; +Cc: linuxppc-dev Thank you (once again). I found the information. Ron --- Scott Wood <scottwood@freescale•com> wrote: > Ron Madrid wrote: > > /* Large Page FLASH with FMR[ECCM] = 0 */ > > static struct nand_ecclayout fsl_elbc_oob_lp_eccm0 = { > > .eccbytes = 12, > > .eccpos = {6, 7, 8, 22, 23, 24, 38, 39, 40, 54, 55, 56}, > > - .oobfree = { {1, 5}, {9, 13}, {25, 13}, {41, 13}, {57, 7} }, > > + .oobfree = { {2, 4}, {9, 13}, {25, 13}, {41, 13}, {57, 7} }, > > .oobavail = 48, > > }; > > > > /* Large Page FLASH with FMR[ECCM] = 1 */ > > static struct nand_ecclayout fsl_elbc_oob_lp_eccm1 = { > > .eccbytes = 12, > > .eccpos = {8, 9, 10, 24, 25, 26, 40, 41, 42, 56, 57, 58}, > > - .oobfree = { {1, 7}, {11, 13}, {27, 13}, {43, 13}, {59, 5} }, > > + .oobfree = { {2, 6}, {11, 13}, {27, 13}, {43, 13}, {59, 5} }, > > .oobavail = 48, > > }; > > Anton's recent patchset (posted to the MTD list) should fix this. > > -scott > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-07-02 21:13 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-07-02 19:35 Kernel marking NAND blocks bad Ron Madrid 2008-07-02 19:46 ` Scott Wood 2008-07-02 19:59 ` Ron Madrid 2008-07-02 20:03 ` Scott Wood 2008-07-02 21:13 ` Ron Madrid
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox