Re: [PATCH] mtd: rawnand: fix return value check for bad block status

2018-06-22 Thread Boris Brezillon
On Mon, 18 Jun 2018 15:57:57 +0200 Miquel Raynal wrote: > Hi Boris, > > On Wed, 13 Jun 2018 14:32:36 +0530, Abhishek Sahu > wrote: > > > Positive return value from read_oob() is making false BAD > > blocks. For some of the NAND controllers, OOB bytes will be > > protected with ECC and read_oob

Re: [PATCH] mtd: rawnand: fix return value check for bad block status

2018-06-18 Thread Miquel Raynal
Hi Boris, On Wed, 13 Jun 2018 14:32:36 +0530, Abhishek Sahu wrote: > Positive return value from read_oob() is making false BAD > blocks. For some of the NAND controllers, OOB bytes will be > protected with ECC and read_oob() will return number of bitflips. > If there is any bitflip in ECC protec

[PATCH] mtd: rawnand: fix return value check for bad block status

2018-06-13 Thread Abhishek Sahu
Positive return value from read_oob() is making false BAD blocks. For some of the NAND controllers, OOB bytes will be protected with ECC and read_oob() will return number of bitflips. If there is any bitflip in ECC protected OOB bytes for BAD block status page, then that block is getting treated as