0103-nand_fixes.patch 675 B

12345678910111213141516171819202122
  1. --- a/drivers/mtd/nand/mtk_nand.c
  2. +++ b/drivers/mtd/nand/mtk_nand.c
  3. @@ -1017,8 +1017,8 @@ static int mtk_nfc_ooblayout_free(struct
  4. if (section >= eccsteps)
  5. return -ERANGE;
  6. - oob_region->length = fdm->reg_size - fdm->ecc_size;
  7. - oob_region->offset = section * fdm->reg_size + fdm->ecc_size;
  8. + oob_region->length = fdm->reg_size - 1;
  9. + oob_region->offset = section * fdm->reg_size + 1;
  10. return 0;
  11. }
  12. @@ -1058,7 +1058,7 @@ static void mtk_nfc_set_fdm(struct mtk_n
  13. fdm->reg_size = NFI_FDM_MAX_SIZE;
  14. /* bad block mark storage */
  15. - fdm->ecc_size = 1;
  16. + fdm->ecc_size = fdm->reg_size;
  17. }
  18. static void mtk_nfc_set_bad_mark_ctl(struct mtk_nfc_bad_mark_ctl *bm_ctl,