Re: [Yaffs] RE:Bad blocks - DMESG

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Brad Beveridge
Date:  
To: Chandru
CC: yaffs
Subject: Re: [Yaffs] RE:Bad blocks - DMESG
Hi Candru,
On 13/02/07, Chandru <> wrote:
> Hello Brad,
>
> When my board is up and running, the dmesg gives me the following error.
> **>>ecc error fix performed on chunk 19889:1
> **>>Block 621 marked for retirement

<SNIP>>
>         Why is it trying to fix the same region everytime ? What does that
> number mean "chunk 19889:1" ?

In Yaffs terminology, a chunk is one page of NAND. So you are
accessing the 19889th page on the device (19889/32 = block 621).
Without looking at the Yaffs code, I'm not 100% sure what the ":1"
part is - perhaps the byte address?

> When I try to run nanddump, I get Input/Output error when it encounters the
> second block. I get all FF when I dump the hex content for the first block
> and error when it encounters second block.

All FF is good. Not being able to read the second block is really
bad. Even if the second block is "bad" you shouldn't get an I/O
error. If I were in your situation, I would tend to suspect that the
MTD layer is not properly integrated with the kernel, or your NAND
driver is not correctly accessing NAND. I would suspect the former
rather than the latter because a broken NAND driver (ie, not correctly
performing the addressing cycles) will still give you some data back
rather than an error.
And at the end of the day, Yaffs and nanddump will access the MTD
layer in largely the same manner.

>
>         I will go ahead testing the first block using nandwrite as you
> suggested.

>
> I am using 2.4.19 kernel and yaffs filesystem.

I know you mentioned you don't want to move to a newer kernel, but
please keep in mind that MTD is a moving target, and no longer
supports 2.4 kernels. The Yaffs MTD interface tries to keep up with
MTD, as such you may potentially have mismatched interfaces between
Yaffs and MTD. I've not personally had that problem before so I don't
know what to expect.

Cheers
Brad

>
>
> Thanks,
> Chandru.
>
>
> -----Original Message-----
> From: Brad Beveridge [mailto:brad.beveridge@gmail.com]
> Sent: Tuesday, February 13, 2007 8:01 PM
> To: Chandru
> Cc:
> Subject: Re: [Yaffs] RE:Bad blocks - DMESG
>
> On 12/02/07, Chandru <> wrote:
> > Thanks Brad.
> No problem :)
>
> > Can you suggest me a few steps for debugging this issue ? Like I would
> like
> > to read this nand device contents. I couldn't do it with nanddump. Is thr
> > any other way to get the contents of the nand ? I would like to read a
> > particular location on the nand, the contents on that particular location
> ?
>
> I may have missed a previous message of yours, but you say that
> nanddump doesn't work? Can you give the error output? I think
> getting nanddump and nandwrite working are probably the first steps in
> ensuring a working MTD nand driver.
> Most (all?) NAND chips guarentee that block 0 will always be a good
> block. I would start my driver debugging by using nandwrite to write
> a few bytes to block 0, verify them with nanddump and then erase &
> verify the block. This will test the data path to your chip via the
> MTD driver.
> If that step is failing, then you must get that working properly first.
>
> Good luck!
> Brad
>
> >
> > Thanks,
> > Chandru.
> >
> >
> >
> > -----Original Message-----
> > From:
> > [mailto:yaffs-bounces@lists.aleph1.co.uk] On Behalf Of
> >
> > Sent: Friday, February 09, 2007 5:31 PM
> > To:
> > Subject: yaffs Digest, Vol 21, Issue 3
> >
> > Send yaffs mailing list submissions to
> >         

> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> >         http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
> > or, via email, send a message with subject or body 'help' to
> >         

> >
> > You can reach the person managing the list at
> >         

> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of yaffs digest..."
> >
> >
> > Today's Topics:
> >
> >    1. Re: Bad blocks - DMESG (Brad Beveridge)

> >
> >
> > ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Thu, 8 Feb 2007 17:05:11 -0800
> > From: "Brad Beveridge" <>
> > Subject: Re: [Yaffs] Bad blocks - DMESG
> > To: 
> > Message-ID:
> >         <>
> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed

> >
> > Hi Chandru,
> > Blocks on NAND chips can and do go bad, and chips often come from the
> > factory with bad blocks.
> > It looks like Yaffs has marked four blocks bad, which is probably to
> > be expected if this is the first time you've run yaffs on this device.
> > In my experience, after an initial flurry of blocks being marked as
> > bad, things will settle down and blocks will stay good for a long
> > time.
> >
> > If you can read and write files reliably to the Yaffs partition
> > without excessive numbers of blocks being marked bad, then I would
> > believe that you have set Yaffs up correctly.
> >
> > NAND drivers are often all or nothing, either it works properly, or it
> > really doesn't work at all.
> >
> > Hope that helps,
> > Brad
> >
> >
> >
> > ------------------------------
> >
> > _______________________________________________
> > yaffs mailing list
> >
> > http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
> >
> >
> > End of yaffs Digest, Vol 21, Issue 3
> > ************************************
> >
> >
> > __________ NOD32 2045 (20070208) Information __________
> >
> > This message was checked by NOD32 antivirus system.
> > http://www.eset.com
> >
> >
> >
> > _______________________________________________
> > yaffs mailing list
> >
> > http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
> >
>
>