stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: rawnand: Fix JEDEC detection
@ 2018-12-13 10:55 Boris Brezillon
  2018-12-13 10:57 ` Miquel Raynal
  2018-12-15 10:26 ` Miquel Raynal
  0 siblings, 2 replies; 4+ messages in thread
From: Boris Brezillon @ 2018-12-13 10:55 UTC (permalink / raw)
  To: Boris Brezillon, Richard Weinberger, Miquel Raynal, linux-mtd
  Cc: David Woodhouse, Brian Norris, Marek Vasut, stable

nand_jedec_detect() should return 1 when the PARAM page parsing
succeeds, otherwise the core considers JEDEC detection failed and falls
back to ID-based detection.

Fixes: 480139d9229e ("mtd: rawnand: get rid of the JEDEC parameter page in nand_chip")
Cc: <stable@vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
---
 drivers/mtd/nand/raw/nand_jedec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mtd/nand/raw/nand_jedec.c b/drivers/mtd/nand/raw/nand_jedec.c
index 5c26492c841d..38b5dc22cb30 100644
--- a/drivers/mtd/nand/raw/nand_jedec.c
+++ b/drivers/mtd/nand/raw/nand_jedec.c
@@ -107,6 +107,8 @@ int nand_jedec_detect(struct nand_chip *chip)
 		pr_warn("Invalid codeword size\n");
 	}
 
+	ret = 1;
+
 free_jedec_param_page:
 	kfree(p);
 	return ret;
-- 
2.17.1

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

* Re: [PATCH] mtd: rawnand: Fix JEDEC detection
  2018-12-13 10:55 [PATCH] mtd: rawnand: Fix JEDEC detection Boris Brezillon
@ 2018-12-13 10:57 ` Miquel Raynal
  2018-12-13 11:03   ` Boris Brezillon
  2018-12-15 10:26 ` Miquel Raynal
  1 sibling, 1 reply; 4+ messages in thread
From: Miquel Raynal @ 2018-12-13 10:57 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Richard Weinberger, linux-mtd, David Woodhouse, Brian Norris,
	Marek Vasut, stable

Hi Boris,

Boris Brezillon <boris.brezillon@bootlin.com> wrote on Thu, 13 Dec 2018
11:55:26 +0100:

> nand_jedec_detect() should return 1 when the PARAM page parsing
> succeeds, otherwise the core considers JEDEC detection failed and falls
> back to ID-based detection.
> 
> Fixes: 480139d9229e ("mtd: rawnand: get rid of the JEDEC parameter page in nand_chip")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
> ---
>  drivers/mtd/nand/raw/nand_jedec.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mtd/nand/raw/nand_jedec.c b/drivers/mtd/nand/raw/nand_jedec.c
> index 5c26492c841d..38b5dc22cb30 100644
> --- a/drivers/mtd/nand/raw/nand_jedec.c
> +++ b/drivers/mtd/nand/raw/nand_jedec.c
> @@ -107,6 +107,8 @@ int nand_jedec_detect(struct nand_chip *chip)
>  		pr_warn("Invalid codeword size\n");
>  	}
>  
> +	ret = 1;
> +
>  free_jedec_param_page:
>  	kfree(p);
>  	return ret;

Sorry for the mistake.

Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>


Thanks,
Miquèl

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

* Re: [PATCH] mtd: rawnand: Fix JEDEC detection
  2018-12-13 10:57 ` Miquel Raynal
@ 2018-12-13 11:03   ` Boris Brezillon
  0 siblings, 0 replies; 4+ messages in thread
From: Boris Brezillon @ 2018-12-13 11:03 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Richard Weinberger, linux-mtd, David Woodhouse, Brian Norris,
	Marek Vasut, stable

On Thu, 13 Dec 2018 11:57:01 +0100
Miquel Raynal <miquel.raynal@bootlin.com> wrote:

> Hi Boris,
> 
> Boris Brezillon <boris.brezillon@bootlin.com> wrote on Thu, 13 Dec 2018
> 11:55:26 +0100:
> 
> > nand_jedec_detect() should return 1 when the PARAM page parsing
> > succeeds, otherwise the core considers JEDEC detection failed and falls
> > back to ID-based detection.
> > 
> > Fixes: 480139d9229e ("mtd: rawnand: get rid of the JEDEC parameter page in nand_chip")
> > Cc: <stable@vger.kernel.org>
> > Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
> > ---
> >  drivers/mtd/nand/raw/nand_jedec.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/mtd/nand/raw/nand_jedec.c b/drivers/mtd/nand/raw/nand_jedec.c
> > index 5c26492c841d..38b5dc22cb30 100644
> > --- a/drivers/mtd/nand/raw/nand_jedec.c
> > +++ b/drivers/mtd/nand/raw/nand_jedec.c
> > @@ -107,6 +107,8 @@ int nand_jedec_detect(struct nand_chip *chip)
> >  		pr_warn("Invalid codeword size\n");
> >  	}
> >  
> > +	ret = 1;
> > +
> >  free_jedec_param_page:
> >  	kfree(p);
> >  	return ret;  
> 
> Sorry for the mistake.
> 
> Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>

Can you queue that one to nand/next?

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

* Re: [PATCH] mtd: rawnand: Fix JEDEC detection
  2018-12-13 10:55 [PATCH] mtd: rawnand: Fix JEDEC detection Boris Brezillon
  2018-12-13 10:57 ` Miquel Raynal
@ 2018-12-15 10:26 ` Miquel Raynal
  1 sibling, 0 replies; 4+ messages in thread
From: Miquel Raynal @ 2018-12-15 10:26 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Richard Weinberger, linux-mtd, David Woodhouse, Brian Norris,
	Marek Vasut, stable

Hi Boris,

Boris Brezillon <boris.brezillon@bootlin.com> wrote on Thu, 13 Dec 2018
11:55:26 +0100:

> nand_jedec_detect() should return 1 when the PARAM page parsing
> succeeds, otherwise the core considers JEDEC detection failed and falls
> back to ID-based detection.
> 
> Fixes: 480139d9229e ("mtd: rawnand: get rid of the JEDEC parameter page in nand_chip")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
> ---
>  drivers/mtd/nand/raw/nand_jedec.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mtd/nand/raw/nand_jedec.c b/drivers/mtd/nand/raw/nand_jedec.c
> index 5c26492c841d..38b5dc22cb30 100644
> --- a/drivers/mtd/nand/raw/nand_jedec.c
> +++ b/drivers/mtd/nand/raw/nand_jedec.c
> @@ -107,6 +107,8 @@ int nand_jedec_detect(struct nand_chip *chip)
>  		pr_warn("Invalid codeword size\n");
>  	}
>  
> +	ret = 1;
> +
>  free_jedec_param_page:
>  	kfree(p);
>  	return ret;

Applied on nand/next.


Thanks,
Miquèl

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

end of thread, other threads:[~2018-12-15 10:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-13 10:55 [PATCH] mtd: rawnand: Fix JEDEC detection Boris Brezillon
2018-12-13 10:57 ` Miquel Raynal
2018-12-13 11:03   ` Boris Brezillon
2018-12-15 10:26 ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).