Re: [PATCH v2 07/16] mtd/docg3: add OOB layout to mtdinfo

From: Mike Dunn
Date: Sun Nov 13 2011 - 19:00:08 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/