This is a note to let you know that I've just added the patch titled mtd: nand: omap: fix ecclayout->oobfree->length to the 3.13-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mtd-nand-omap-fix-ecclayout-oobfree-length.patch and it can be found in the queue-3.13 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From bb38eefb6858ce16b34716145b9597a5680aa54c Mon Sep 17 00:00:00 2001 From: Pekon Gupta <pekon@xxxxxx> Date: Mon, 17 Feb 2014 13:11:25 +0530 Subject: mtd: nand: omap: fix ecclayout->oobfree->length From: Pekon Gupta <pekon@xxxxxx> commit bb38eefb6858ce16b34716145b9597a5680aa54c upstream. This patch excludes reserved-marker byte-position from oobfree->length calculation. Thus all bytes from oobfree->offset till end of OOB are free. Signed-off-by: Pekon Gupta <pekon@xxxxxx> Signed-off-by: Brian Norris <computersforpeace@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/mtd/nand/omap2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -2000,9 +2000,8 @@ static int omap_nand_probe(struct platfo goto return_error; } - /* populate remaining ECC layout data */ - ecclayout->oobfree->length = mtd->oobsize - (BADBLOCK_MARKER_LENGTH + - ecclayout->eccbytes); + /* all OOB bytes from oobfree->offset till end off OOB are free */ + ecclayout->oobfree->length = mtd->oobsize - ecclayout->oobfree->offset; /* check if NAND device's OOB is enough to store ECC signatures */ if (mtd->oobsize < (ecclayout->eccbytes + BADBLOCK_MARKER_LENGTH)) { pr_err("not enough OOB bytes required = %d, available=%d\n", Patches currently in stable-queue which might be from pekon@xxxxxx are queue-3.13/mtd-nand-omap-fix-ecclayout-oobfree-offset.patch queue-3.13/arm-omap2-gpmc-fix-dt-nand-child-nodes-not-probed-when-mtd_nand-is-built-as-module.patch queue-3.13/arm-omap2-gpmc-fix-dt-onenand-child-nodes-not-probed-when-mtd_onenand-is-built-as-module.patch queue-3.13/mtd-nand-omap-fix-ecclayout-to-be-in-sync-with-u-boot-nand-driver.patch queue-3.13/mtd-nand-omap-fix-ecclayout-oobfree-length.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html