Skip to content

Commit

Permalink
[PATCH] NAND: fix remaining OOB length calculation
Browse files Browse the repository at this point in the history
In nand_read_page_syndrome/nand_write_page_syndrome the calculation of
the remaining oob length which is not used by the prepad/ecc/postpad
areas is wrong.

Signed-off-by: Vitaly Wool <vwool@ru.mvista.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Vitaly Wool authored and David Woodhouse committed Jun 20, 2006
1 parent b6d5ee0 commit 7e4178f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mtd/nand/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ static int nand_read_page_syndrome(struct mtd_info *mtd, struct nand_chip *chip,
}

/* Calculate remaining oob bytes */
i = oob - chip->oob_poi;
i = mtd->oobsize - (oob - chip->oob_poi);
if (i)
chip->read_buf(mtd, oob, i);

Expand Down Expand Up @@ -1334,7 +1334,7 @@ static void nand_write_page_syndrome(struct mtd_info *mtd,
}

/* Calculate remaining oob bytes */
i = oob - chip->oob_poi;
i = mtd->oobsize - (oob - chip->oob_poi);
if (i)
chip->write_buf(mtd, oob, i);
}
Expand Down

0 comments on commit 7e4178f

Please sign in to comment.