All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
Cc: "richard@nod.at" <richard@nod.at>,
	"vigneshr@ti.com" <vigneshr@ti.com>,
	"bbrezillon@kernel.org" <bbrezillon@kernel.org>,
	Tony O'Brien <Tony.OBrien@alliedtelesis.co.nz>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mtd: rawnand: marvell: Use correct logic for nand-keep-config
Date: Tue, 4 Oct 2022 12:00:58 +0200	[thread overview]
Message-ID: <20221004120058.409a9552@xps-13> (raw)
In-Reply-To: <482a4114-eeb1-2303-2896-8e480abda876@alliedtelesis.co.nz>

Hi Chris,

Chris.Packham@alliedtelesis.co.nz wrote on Mon, 3 Oct 2022 21:46:31
+0000:

> Hi All,
> 
> On 27/09/22 15:47, Chris Packham wrote:
> > From: Tony O'Brien <tony.obrien@alliedtelesis.co.nz>
> >
> > Originally the absence of the marvell,nand-keep-config property caused
> > the setup_data_interface function to be provided. However when
> > setup_data_interface was moved into nand_controller_ops the logic was
> > unintentionally inverted. Update the logic so that only if the
> > marvell,nand-keep-config property is present the bootloader NAND config
> > kept.
> >
> > Fixes: 7a08dbaedd36 ("mtd: rawnand: Move ->setup_data_interface() to nand_controller_ops")
> > Signed-off-by: Tony O'Brien <tony.obrien@alliedtelesis.co.nz>
> > Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>  
> 
> Just following up on this. I know things have probably been busy with 
> the 6.0 release but it's been a week so I figured I'd give this a bump.

I was just off the past week :)

I will queue it soon.

> 
> > ---
> >
> > Notes:
> >      I think this is a bug that's been lurking for 4 years or so. I'm not
> >      sure that's particularly long in the life of an embedded device but it
> >      does make me wonder if there have been other bug reports about it.

I don't remember any... Indeed this must be fixed.

> >      We noticed this because we had a bootloader that used maxed out NAND
> >      timings which made the time it took the kernel to do anything on the
> >      file system longer than we expected.
> >
> >   drivers/mtd/nand/raw/marvell_nand.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c
> > index 2455a581fd70..b248c5f657d5 100644
> > --- a/drivers/mtd/nand/raw/marvell_nand.c
> > +++ b/drivers/mtd/nand/raw/marvell_nand.c
> > @@ -2672,7 +2672,7 @@ static int marvell_nand_chip_init(struct device *dev, struct marvell_nfc *nfc,
> >   	chip->controller = &nfc->controller;
> >   	nand_set_flash_node(chip, np);
> >   
> > -	if (!of_property_read_bool(np, "marvell,nand-keep-config"))
> > +	if (of_property_read_bool(np, "marvell,nand-keep-config"))
> >   		chip->options |= NAND_KEEP_TIMINGS;
> >   
> >   	mtd = nand_to_mtd(chip)  


Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
Cc: "richard@nod.at" <richard@nod.at>,
	"vigneshr@ti.com" <vigneshr@ti.com>,
	"bbrezillon@kernel.org" <bbrezillon@kernel.org>,
	Tony O'Brien <Tony.OBrien@alliedtelesis.co.nz>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mtd: rawnand: marvell: Use correct logic for nand-keep-config
Date: Tue, 4 Oct 2022 12:00:58 +0200	[thread overview]
Message-ID: <20221004120058.409a9552@xps-13> (raw)
In-Reply-To: <482a4114-eeb1-2303-2896-8e480abda876@alliedtelesis.co.nz>

Hi Chris,

Chris.Packham@alliedtelesis.co.nz wrote on Mon, 3 Oct 2022 21:46:31
+0000:

> Hi All,
> 
> On 27/09/22 15:47, Chris Packham wrote:
> > From: Tony O'Brien <tony.obrien@alliedtelesis.co.nz>
> >
> > Originally the absence of the marvell,nand-keep-config property caused
> > the setup_data_interface function to be provided. However when
> > setup_data_interface was moved into nand_controller_ops the logic was
> > unintentionally inverted. Update the logic so that only if the
> > marvell,nand-keep-config property is present the bootloader NAND config
> > kept.
> >
> > Fixes: 7a08dbaedd36 ("mtd: rawnand: Move ->setup_data_interface() to nand_controller_ops")
> > Signed-off-by: Tony O'Brien <tony.obrien@alliedtelesis.co.nz>
> > Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>  
> 
> Just following up on this. I know things have probably been busy with 
> the 6.0 release but it's been a week so I figured I'd give this a bump.

I was just off the past week :)

I will queue it soon.

> 
> > ---
> >
> > Notes:
> >      I think this is a bug that's been lurking for 4 years or so. I'm not
> >      sure that's particularly long in the life of an embedded device but it
> >      does make me wonder if there have been other bug reports about it.

I don't remember any... Indeed this must be fixed.

> >      We noticed this because we had a bootloader that used maxed out NAND
> >      timings which made the time it took the kernel to do anything on the
> >      file system longer than we expected.
> >
> >   drivers/mtd/nand/raw/marvell_nand.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c
> > index 2455a581fd70..b248c5f657d5 100644
> > --- a/drivers/mtd/nand/raw/marvell_nand.c
> > +++ b/drivers/mtd/nand/raw/marvell_nand.c
> > @@ -2672,7 +2672,7 @@ static int marvell_nand_chip_init(struct device *dev, struct marvell_nfc *nfc,
> >   	chip->controller = &nfc->controller;
> >   	nand_set_flash_node(chip, np);
> >   
> > -	if (!of_property_read_bool(np, "marvell,nand-keep-config"))
> > +	if (of_property_read_bool(np, "marvell,nand-keep-config"))
> >   		chip->options |= NAND_KEEP_TIMINGS;
> >   
> >   	mtd = nand_to_mtd(chip)  


Thanks,
Miquèl

  parent reply	other threads:[~2022-10-04 10:01 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27  2:47 [PATCH] mtd: rawnand: marvell: Use correct logic for nand-keep-config Chris Packham
2022-09-27  2:47 ` Chris Packham
2022-09-27  2:54 ` Chris Packham
2022-09-27  2:54   ` Chris Packham
2022-10-04 10:02   ` Miquel Raynal
2022-10-04 10:02     ` Miquel Raynal
2022-10-04 19:41     ` Chris Packham
2022-10-04 19:41       ` Chris Packham
2022-10-04 21:21       ` Chris Packham
2022-10-04 21:21         ` Chris Packham
2022-10-05  7:34         ` Miquel Raynal
2022-10-05  7:34           ` Miquel Raynal
2022-10-03 21:46 ` Chris Packham
2022-10-03 21:46   ` Chris Packham
2022-10-04  6:25   ` Boris Brezillon
2022-10-04  6:25     ` Boris Brezillon
2022-10-04 10:00   ` Miquel Raynal [this message]
2022-10-04 10:00     ` Miquel Raynal
2022-10-18  9:02 ` Miquel Raynal
2022-10-18  9:02   ` Miquel Raynal

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=20221004120058.409a9552@xps-13 \
    --to=miquel.raynal@bootlin.com \
    --cc=Chris.Packham@alliedtelesis.co.nz \
    --cc=Tony.OBrien@alliedtelesis.co.nz \
    --cc=bbrezillon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=vigneshr@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.