public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH V2] mtd: mxc_nand: Fix crash after MTD resync
@ 2013-07-03  0:34 Marek Vasut
  2013-07-12 13:26 ` Marek Vasut
  0 siblings, 1 reply; 4+ messages in thread
From: Marek Vasut @ 2013-07-03  0:34 UTC (permalink / raw)
  To: u-boot

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;
 
-- 
1.7.10.4

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

* [U-Boot] [PATCH V2] mtd: mxc_nand: Fix crash after MTD resync
  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
  2013-07-12 21:12   ` Scott Wood
  0 siblings, 1 reply; 4+ messages in thread
From: Marek Vasut @ 2013-07-12 13:26 UTC (permalink / raw)
  To: u-boot

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

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

* [U-Boot] [PATCH V2] mtd: mxc_nand: Fix crash after MTD resync
  2013-07-12 13:26 ` Marek Vasut
@ 2013-07-12 21:12   ` Scott Wood
  2013-07-12 22:06     ` Marek Vasut
  0 siblings, 1 reply; 4+ messages in thread
From: Scott Wood @ 2013-07-12 21:12 UTC (permalink / raw)
  To: u-boot

Oh, sorry... didn't realize the release was in three days. :-(

I'll send a pull request.

-Scott

On 07/12/2013 08:26:04 AM, Marek Vasut wrote:
> 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
> 
> 
> 

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

* [U-Boot] [PATCH V2] mtd: mxc_nand: Fix crash after MTD resync
  2013-07-12 21:12   ` Scott Wood
@ 2013-07-12 22:06     ` Marek Vasut
  0 siblings, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2013-07-12 22:06 UTC (permalink / raw)
  To: u-boot

Dear Scott Wood,

> Oh, sorry... didn't realize the release was in three days. :-(
> 
> I'll send a pull request.
> 
> -Scott

Thanks ;-)

Best regards,
Marek Vasut

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

end of thread, other threads:[~2013-07-12 22:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2013-07-12 21:12   ` Scott Wood
2013-07-12 22:06     ` Marek Vasut

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