From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2] mtd: mxc_nand: Fix crash after MTD resync
Date: Fri, 12 Jul 2013 15:26:04 +0200 [thread overview]
Message-ID: <201307121526.04200.marex@denx.de> (raw)
In-Reply-To: <1372811674-10395-1-git-send-email-marex@denx.de>
Hi,
Tom/Stefano, can you pick this for .07? Otherwise all mxc with NAND are broken.
Thanks
> The driver triggered a BUG() in nand_base.c:3214/nand_scan_tail()
> because the ecc.strength was not set in NAND_ECC_HW_SYNDROME ECC
> mode.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Benoit Thebaudeau <benoit.thebaudeau@advansee.com>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Cc: Scott Wood <scottwood@freescale.com>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
> drivers/mtd/nand/mxc_nand.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> V2: Set ecc.strength for both NAND_ECC_HW and NAND_ECC_HW_SYNDROME mode
>
> diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
> index ac435f2..40b0741 100644
> --- a/drivers/mtd/nand/mxc_nand.c
> +++ b/drivers/mtd/nand/mxc_nand.c
> @@ -1242,12 +1242,10 @@ int board_nand_init(struct nand_chip *this)
> this->ecc.mode = NAND_ECC_HW;
> }
>
> - if (this->ecc.mode == NAND_ECC_HW) {
> - if (is_mxc_nfc_1())
> - this->ecc.strength = 1;
> - else
> - this->ecc.strength = 4;
> - }
> + if (is_mxc_nfc_1())
> + this->ecc.strength = 1;
> + else
> + this->ecc.strength = 4;
>
> host->pagesize_2k = 0;
Best regards,
Marek Vasut
next prev parent reply other threads:[~2013-07-12 13:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-03 0:34 [U-Boot] [PATCH V2] mtd: mxc_nand: Fix crash after MTD resync Marek Vasut
2013-07-12 13:26 ` Marek Vasut [this message]
2013-07-12 21:12 ` Scott Wood
2013-07-12 22:06 ` Marek Vasut
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=201307121526.04200.marex@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/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.