[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4EC067CE.4050805@newsguy.com>
Date: Sun, 13 Nov 2011 16:58:54 -0800
From: Mike Dunn <mikedunn@...sguy.com>
To: Robert Jarzmik <robert.jarzmik@...e.fr>
CC: dwmw2@...radead.org, dedekind1@...il.com,
linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 07/16] mtd/docg3: add OOB layout to mtdinfo
On 11/13/2011 02:18 AM, Robert Jarzmik wrote:
> I took a different approach. I check an internal docg3 register to see if the
> page was written. Or I could had have checked the Hamming code, as I don't think
> it can be 0xff whatever the pagesize 7 bytes values.
>
> The reason behind is that the Hamming code is Ham(64, 57), ie. Ham(2^6,
> 2^6-6-1). The means the 6 bits are enough to cover all codewords possibilities,
> and 0xff is not one of them.
>
> So unless a bitflip in Hamming code, 0xff in it means blank page.
Clever!
> And I think
> the ECC engine is even smarter, with the ECCCONF1_PAGE_IS_WRITTEN.
I forgot about this. If the hardware can indeed tell you, I guess this is the
best way. Sounds like I'll be updating my blank page detection.
Mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists