|
@@ -312,7 +312,7 @@ static int nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip)
|
|
/* Select the NAND device */
|
|
/* Select the NAND device */
|
|
chip->select_chip(mtd, chipnr);
|
|
chip->select_chip(mtd, chipnr);
|
|
} else
|
|
} else
|
|
- page = (int)ofs;
|
|
|
|
|
|
+ page = (int)(ofs >> chip->page_shift);
|
|
|
|
|
|
if (chip->options & NAND_BUSWIDTH_16) {
|
|
if (chip->options & NAND_BUSWIDTH_16) {
|
|
chip->cmdfunc(mtd, NAND_CMD_READOOB, chip->badblockpos & 0xFE,
|
|
chip->cmdfunc(mtd, NAND_CMD_READOOB, chip->badblockpos & 0xFE,
|