* [PATCH] NAND: fix remaining OOB length calculation in nand_read_page_syndrome/nand_write_page_syndrome
@ 2006-06-07 5:34 Vitaly Wool
0 siblings, 0 replies; only message in thread
From: Vitaly Wool @ 2006-06-07 5:34 UTC (permalink / raw)
To: linux-mtd
Hi folks,
inlined is the trivial patch that fixes remaining OOB length calculation in nand_read_page_syndrome/nand_write_page_syndrome.
Signed-off-by: Vitaly Wool <vwool@ru.mvista.com>
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 77406fc..e74678e 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -883,7 +883,7 @@ static int nand_read_page_syndrome(struc
}
/* Calculate remaining oob bytes */
- i = oob - chip->oob_poi;
+ i = mtd->oobsize - (oob - chip->oob_poi);
if (i)
chip->read_buf(mtd, oob, i);
@@ -1334,7 +1334,7 @@ static void nand_write_page_syndrome(str
}
/* Calculate remaining oob bytes */
- i = oob - chip->oob_poi;
+ i = mtd->oobsize - (oob - chip->oob_poi);
if (i)
chip->write_buf(mtd, oob, i);
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-06-07 5:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-07 5:34 [PATCH] NAND: fix remaining OOB length calculation in nand_read_page_syndrome/nand_write_page_syndrome Vitaly Wool
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox