Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] NAND_ECC_SOFT_BCH can support subpage reads too
@ 2014-04-25  5:31 Ron
  2014-05-21  0:51 ` Brian Norris
  0 siblings, 1 reply; 2+ messages in thread
From: Ron @ 2014-04-25  5:31 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, linux-mtd

Signed-off-by: Ron Lee <ron@debian.org>
---
 drivers/mtd/nand/nand_base.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 9d01c4d..7f5b814 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -4023,8 +4023,16 @@ int nand_scan_tail(struct mtd_info *mtd)
 	chip->pagebuf = -1;
 
 	/* Large page NAND with SOFT_ECC should support subpage reads */
-	if ((ecc->mode == NAND_ECC_SOFT) && (chip->page_shift > 9))
-		chip->options |= NAND_SUBPAGE_READ;
+	switch (ecc->mode) {
+	case NAND_ECC_SOFT:
+	case NAND_ECC_SOFT_BCH:
+		if (chip->page_shift > 9)
+			chip->options |= NAND_SUBPAGE_READ;
+		break;
+
+	default:
+		break;
+	}
 
 	/* Fill in remaining MTD driver data */
 	mtd->type = nand_is_slc(chip) ? MTD_NANDFLASH : MTD_MLCNANDFLASH;
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] NAND_ECC_SOFT_BCH can support subpage reads too
  2014-04-25  5:31 [PATCH] NAND_ECC_SOFT_BCH can support subpage reads too Ron
@ 2014-05-21  0:51 ` Brian Norris
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Norris @ 2014-05-21  0:51 UTC (permalink / raw)
  To: Ron; +Cc: linux-mtd, David Woodhouse

On Fri, Apr 25, 2014 at 03:01:35PM +0930, Ron wrote:
> Signed-off-by: Ron Lee <ron@debian.org>

Pushed to l2-mtd.git. Thanks!

BTW, can you fix your git config so that it uses your full name? You
have the sign-off right, but git-send-email is still just picking your
name up as "Ron."

Brian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-21  0:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-25  5:31 [PATCH] NAND_ECC_SOFT_BCH can support subpage reads too Ron
2014-05-21  0:51 ` Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox