All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@ti.com>
To: <computersforpeace@gmail.com>, <dwmw2@infradead.org>, <tony@atomide.com>
Cc: "Rini, Tom" <trini@ti.com>,
	pekon@pek-sem.com, linux-omap@vger.kernel.org,
	linux-mtd@lists.infradead.org, ezequiel@vanguardiasur.com.ar
Subject: [PATCH v2] mtd: nand: omap: Fix NAND enumeration on 3430 LDP
Date: Wed, 19 Nov 2014 14:22:23 +0200	[thread overview]
Message-ID: <546C8B7F.6030600@ti.com> (raw)
In-Reply-To: <1415185258-11747-1-git-send-email-rogerq@ti.com>

3430LDP has NAND flash with 32 bytes OOB size which is sufficient to hold
BCH8 codes but the small page check introduced in
commit b491da7233d5 ("mtd: nand: omap: clean-up ecc layout for BCH ecc schemes")
considers anything below 64 bytes unsuitable for BCH4/8/16. There is another
bug in that code where it doesn't skip the check for OMAP_ECC_HAM1_CODE_SW.

Get rid of that small page check code as it is insufficient and redundant
because we are checking for OOB available bytes vs ecc layout before calling
nand_scan_tail().

Fixes: b491da7233d5 ("mtd: nand: omap: clean-up ecc layout for BCH ecc schemes")

Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 drivers/mtd/nand/omap2.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 3b357e9..10d07dd 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -1741,13 +1741,6 @@ static int omap_nand_probe(struct platform_device *pdev)
 		goto return_error;
 	}
 
-	/* check for small page devices */
-	if ((mtd->oobsize < 64) && (pdata->ecc_opt != OMAP_ECC_HAM1_CODE_HW)) {
-		dev_err(&info->pdev->dev, "small page devices are not supported\n");
-		err = -EINVAL;
-		goto return_error;
-	}
-
 	/* re-populate low-level callbacks based on xfer modes */
 	switch (pdata->xfer_type) {
 	case NAND_OMAP_PREFETCH_POLLED:
-- 
1.8.3.2

WARNING: multiple messages have this Message-ID (diff)
From: Roger Quadros <rogerq@ti.com>
To: computersforpeace@gmail.com, dwmw2@infradead.org, tony@atomide.com
Cc: ezequiel@vanguardiasur.com.ar, linux-mtd@lists.infradead.org,
	linux-omap@vger.kernel.org, pekon@pek-sem.com, "Rini,
	Tom" <trini@ti.com>
Subject: [PATCH v2] mtd: nand: omap: Fix NAND enumeration on 3430 LDP
Date: Wed, 19 Nov 2014 14:22:23 +0200	[thread overview]
Message-ID: <546C8B7F.6030600@ti.com> (raw)
In-Reply-To: <1415185258-11747-1-git-send-email-rogerq@ti.com>

3430LDP has NAND flash with 32 bytes OOB size which is sufficient to hold
BCH8 codes but the small page check introduced in
commit b491da7233d5 ("mtd: nand: omap: clean-up ecc layout for BCH ecc schemes")
considers anything below 64 bytes unsuitable for BCH4/8/16. There is another
bug in that code where it doesn't skip the check for OMAP_ECC_HAM1_CODE_SW.

Get rid of that small page check code as it is insufficient and redundant
because we are checking for OOB available bytes vs ecc layout before calling
nand_scan_tail().

Fixes: b491da7233d5 ("mtd: nand: omap: clean-up ecc layout for BCH ecc schemes")

Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 drivers/mtd/nand/omap2.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 3b357e9..10d07dd 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -1741,13 +1741,6 @@ static int omap_nand_probe(struct platform_device *pdev)
 		goto return_error;
 	}
 
-	/* check for small page devices */
-	if ((mtd->oobsize < 64) && (pdata->ecc_opt != OMAP_ECC_HAM1_CODE_HW)) {
-		dev_err(&info->pdev->dev, "small page devices are not supported\n");
-		err = -EINVAL;
-		goto return_error;
-	}
-
 	/* re-populate low-level callbacks based on xfer modes */
 	switch (pdata->xfer_type) {
 	case NAND_OMAP_PREFETCH_POLLED:
-- 
1.8.3.2



  parent reply	other threads:[~2014-11-19 12:22 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-05 11:00 [PATCH] mtd: nand: omap: Fix NAND enumeration on 3430 LDP Roger Quadros
2014-11-05 11:00 ` Roger Quadros
2014-11-06 18:03 ` Tony Lindgren
2014-11-06 18:03   ` Tony Lindgren
2014-11-07  9:35   ` Roger Quadros
2014-11-07  9:35     ` Roger Quadros
2014-11-07  9:58     ` Roger Quadros
2014-11-07  9:58       ` Roger Quadros
2014-11-07 22:48       ` Tony Lindgren
2014-11-07 22:48         ` Tony Lindgren
2014-11-09 19:29         ` pekon
2014-11-09 19:29           ` pekon
2014-11-12 18:02           ` Tony Lindgren
2014-11-12 18:02             ` Tony Lindgren
2014-11-13 11:29             ` Roger Quadros
2014-11-13 11:29               ` Roger Quadros
2014-11-13 16:00               ` Tom Rini
2014-11-13 16:00                 ` Tom Rini
2014-11-13 17:54                 ` Tony Lindgren
2014-11-13 17:54                   ` Tony Lindgren
2014-11-15 11:12               ` pekon
2014-11-15 11:12                 ` pekon
2014-11-13 12:00           ` Roger Quadros
2014-11-13 12:00             ` Roger Quadros
2014-11-19 12:22 ` Roger Quadros [this message]
2014-11-19 12:22   ` [PATCH v2] " Roger Quadros
2014-11-26  6:47   ` Brian Norris
2014-11-26  6:47     ` Brian Norris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=546C8B7F.6030600@ti.com \
    --to=rogerq@ti.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=pekon@pek-sem.com \
    --cc=tony@atomide.com \
    --cc=trini@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.