diff options
author | Florian Boor <florian.boor@kernelconcepts.de> | 2007-08-09 10:57:03 +0000 |
---|---|---|
committer | Florian Boor <florian.boor@kernelconcepts.de> | 2007-08-09 10:57:03 +0000 |
commit | b9a30358ae133ede815cbf2c4b31ff1977035e30 (patch) | |
tree | 48570a08176de392a718f1712e75379af2e270c1 /packages/uboot/u-boot-mkimage-openmoko-native/nand-badisbad.patch | |
parent | 386d4732c8c4b60c60dc671e97d5a667ebb5e140 (diff) | |
parent | 58259f5baa7ae15a19edbfb0eb52ecef22467e0f (diff) |
merge of '09957ec14fdf3babf0d22d779c7264d24330e535'
and 'c03b12513a0d9faea02ff87386f5cb243f7ece3e'
Diffstat (limited to 'packages/uboot/u-boot-mkimage-openmoko-native/nand-badisbad.patch')
-rw-r--r-- | packages/uboot/u-boot-mkimage-openmoko-native/nand-badisbad.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/packages/uboot/u-boot-mkimage-openmoko-native/nand-badisbad.patch b/packages/uboot/u-boot-mkimage-openmoko-native/nand-badisbad.patch new file mode 100644 index 0000000000..a5800e2499 --- /dev/null +++ b/packages/uboot/u-boot-mkimage-openmoko-native/nand-badisbad.patch @@ -0,0 +1,30 @@ +This patch makes nand_block_checkbad check both the BBT and the actual +OOB data. This avoids accidently passing blocks as good when BBT and +OOB markers are not synchronized, e.g., before "nand createbbt". + +Experimental. + +- Werner Almesberger <werner@openmoko.org> + +Index: u-boot/drivers/nand/nand_base.c +=================================================================== +--- u-boot.orig/drivers/nand/nand_base.c ++++ u-boot/drivers/nand/nand_base.c +@@ -517,11 +517,14 @@ static int nand_block_checkbad (struct m + { + struct nand_chip *this = mtd->priv; + +- if (!this->bbt) +- return this->block_bad(mtd, ofs, getchip); ++ if (this->block_bad(mtd, ofs, getchip)) ++ return 1; + + /* Return info from the table */ +- return nand_isbad_bbt (mtd, ofs, allowbbt); ++ if (this->bbt && nand_isbad_bbt (mtd, ofs, allowbbt)) ++ return 1; ++ ++ return 0; + } + + /** |