* strange bad block code
@ 2011-04-21 14:05 Matthieu CASTET
2011-04-21 15:21 ` Matthieu CASTET
0 siblings, 1 reply; 2+ messages in thread
From: Matthieu CASTET @ 2011-04-21 14:05 UTC (permalink / raw)
To: linux-mtd@lists.infradead.org, Brian Norris
Hi,
while looking at the bad block code, I saw that e0b58d0a introduced a
"chip->badblockbits" for bad block detection in nand_block_bad[1].
That's great because to we can use it to handle bit flip in bad block marker.
But few commit latter c7b28e25cb9 removed "chip->badblockbits = 8;" from common
code.
So now chip->badblockbits = 0.
How such code wan works ?
Adding NAND_SKIP_BBTSCAN in any driver, expose the problem.
[1]
if (likely(chip->badblockbits == 8))
res = bad != 0xFF;
else
res = hweight8(bad) < chip->badblockbits;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: strange bad block code
2011-04-21 14:05 strange bad block code Matthieu CASTET
@ 2011-04-21 15:21 ` Matthieu CASTET
0 siblings, 0 replies; 2+ messages in thread
From: Matthieu CASTET @ 2011-04-21 15:21 UTC (permalink / raw)
To: Matthieu CASTET; +Cc: linux-mtd@lists.infradead.org, Brian Norris
Matthieu CASTET a écrit :
> Hi,
>
> while looking at the bad block code, I saw that e0b58d0a introduced a
> "chip->badblockbits" for bad block detection in nand_block_bad[1].
> That's great because to we can use it to handle bit flip in bad block marker.
>
> But few commit latter c7b28e25cb9 removed "chip->badblockbits = 8;" from common
> code.
> So now chip->badblockbits = 0.
>
> How such code wan works ?
>
> Adding NAND_SKIP_BBTSCAN in any driver, expose the problem.
>
BTW nand_block_bad seems broken with the new NAND_BBT_SCAN2NDPAGE and
NAND_BBT_SCANBYTE1AND6.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-21 15:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-21 14:05 strange bad block code Matthieu CASTET
2011-04-21 15:21 ` Matthieu CASTET
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.