From: Boris Brezillon <boris.brezillon@collabora.com>
To: Daniel Mack <daniel@zonque.org>
Cc: Richard Weinberger <richard.weinberger@gmail.com>,
haojian.zhuang@gmail.com, linux-mtd@lists.infradead.org,
stable@vger.kernel.org, Miquel Raynal <miquel.raynal@bootlin.com>,
robert.jarzmik@free.fr, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mtd: rawnand: marvell: select target before setting up data interface
Date: Sat, 30 Mar 2019 19:09:59 +0100 [thread overview]
Message-ID: <20190330190959.080de229@collabora.com> (raw)
In-Reply-To: <60179efc-122f-2439-bd20-ab27b29afa32@zonque.org>
On Mon, 25 Mar 2019 17:21:42 +0100
Daniel Mack <daniel@zonque.org> wrote:
> Hi Miquel,
>
> On 25/3/2019 10:09 AM, Miquel Raynal wrote:
> > Daniel Mack <daniel@zonque.org> wrote on Fri, 22 Mar 2019 19:48:08
> > +0100:
> >
> >> Hi Miquel,
> >>
> >> On 22/3/2019 9:30 AM, Miquel Raynal wrote:
> >>> + Richard: this is fixes materials
> >>>
> >>> Daniel Mack <daniel@zonque.org> wrote on Thu, 21 Mar 2019 22:20:10
> >>> +0100:
> >>>
> >>>> Now that the nand drivers are responsible for selecting the target
> >>>> prior to hardware access, a call to marvell_nfc_select_target() is
> >>>> necessary from marvell_nfc_setup_data_interface().
> >>>>
> >>>> This is a regression introduced by commit b25251414f6e ("mtd:
> >>>> rawnand: marvell: Stop implementing ->select_chip()").
> >>>>
> >>>> Fixes: b25251414f6e ("mtd: rawnand: marvell: Stop implementing ->select_chip()")
> >>>> Cc: Boris Brezillon <boris.brezillon@collabora.com>
> >>>> Cc: <stable@vger.kernel.org>
> >>>> Signed-off-by: Daniel Mack <daniel@zonque.org>
> >>>> ---
> >>>> drivers/mtd/nand/raw/marvell_nand.c | 2 ++
> >>>> 1 file changed, 2 insertions(+)
> >>>>
> >>>> diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c
> >>>> index 84283c6bb0ff..93abe5be8995 100644
> >>>> --- a/drivers/mtd/nand/raw/marvell_nand.c
> >>>> +++ b/drivers/mtd/nand/raw/marvell_nand.c
> >>>> @@ -2325,6 +2325,8 @@ static int marvell_nfc_setup_data_interface(struct nand_chip *chip, int chipnr,
> >>>> struct marvell_nfc_timings nfc_tmg;
> >>>> int read_delay;
> >>>>
> >>>> + marvell_nfc_select_target(chip, chip->cur_cs);
> >>>> +
> >>>> sdr = nand_get_sdr_timings(conf);
> >>>> if (IS_ERR(sdr))
> >>>> return PTR_ERR(sdr);
> >>>
> >>> I had a short look yesterday and this is very likely to be the root
> >>> cause of the regression, thank you very much!
> >>
> >> Yes it is, it fixes the regression I have reported.
> >>
> >> Do you want me to resend with that nit addressed you mentioned? My
> >> version works well, I know that much :)
> >
> > Yes please, resent with Boris' comment addressed and we'll be fine.
>
> I tried this now, and with 'chip->cur_cs' instead of 'chipnr', the
> regression is back. This function is invoked twice during boot, and in
> both cases, 'chip->cur_cs' is -1, while 'chipnr' is 0. The 2nd time this
> function is invoked, the 'selected_die' cache value is 0, so
> marvell_nfc_select_target() bails early, which seems to be a problem.
>
> I can't quite make sense of that yet, all I know is that calling
> marvell_nfc_select_target() with -1 from
> marvell_nfc_setup_data_interface() makes the driver functional again. Hmm.
I had a quick look at the marvell_nfc_setup_data_interface() function
and it doesn't make sense to call marvell_nfc_select_target() there.
The fact that calling marvell_nfc_select_target(cur_cs) fixes your
problem is probably a side effect, and the bug might come from other
changes I made in b25251414f6e (missing call to
marvell_nfc_select_target() somewhere else in the driver?).
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
WARNING: multiple messages have this Message-ID (diff)
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Daniel Mack <daniel@zonque.org>
Cc: Richard Weinberger <richard.weinberger@gmail.com>,
haojian.zhuang@gmail.com, linux-mtd@lists.infradead.org,
stable@vger.kernel.org, Miquel Raynal <miquel.raynal@bootlin.com>,
robert.jarzmik@free.fr, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mtd: rawnand: marvell: select target before setting up data interface
Date: Sat, 30 Mar 2019 19:09:59 +0100 [thread overview]
Message-ID: <20190330190959.080de229@collabora.com> (raw)
In-Reply-To: <60179efc-122f-2439-bd20-ab27b29afa32@zonque.org>
On Mon, 25 Mar 2019 17:21:42 +0100
Daniel Mack <daniel@zonque.org> wrote:
> Hi Miquel,
>
> On 25/3/2019 10:09 AM, Miquel Raynal wrote:
> > Daniel Mack <daniel@zonque.org> wrote on Fri, 22 Mar 2019 19:48:08
> > +0100:
> >
> >> Hi Miquel,
> >>
> >> On 22/3/2019 9:30 AM, Miquel Raynal wrote:
> >>> + Richard: this is fixes materials
> >>>
> >>> Daniel Mack <daniel@zonque.org> wrote on Thu, 21 Mar 2019 22:20:10
> >>> +0100:
> >>>
> >>>> Now that the nand drivers are responsible for selecting the target
> >>>> prior to hardware access, a call to marvell_nfc_select_target() is
> >>>> necessary from marvell_nfc_setup_data_interface().
> >>>>
> >>>> This is a regression introduced by commit b25251414f6e ("mtd:
> >>>> rawnand: marvell: Stop implementing ->select_chip()").
> >>>>
> >>>> Fixes: b25251414f6e ("mtd: rawnand: marvell: Stop implementing ->select_chip()")
> >>>> Cc: Boris Brezillon <boris.brezillon@collabora.com>
> >>>> Cc: <stable@vger.kernel.org>
> >>>> Signed-off-by: Daniel Mack <daniel@zonque.org>
> >>>> ---
> >>>> drivers/mtd/nand/raw/marvell_nand.c | 2 ++
> >>>> 1 file changed, 2 insertions(+)
> >>>>
> >>>> diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c
> >>>> index 84283c6bb0ff..93abe5be8995 100644
> >>>> --- a/drivers/mtd/nand/raw/marvell_nand.c
> >>>> +++ b/drivers/mtd/nand/raw/marvell_nand.c
> >>>> @@ -2325,6 +2325,8 @@ static int marvell_nfc_setup_data_interface(struct nand_chip *chip, int chipnr,
> >>>> struct marvell_nfc_timings nfc_tmg;
> >>>> int read_delay;
> >>>>
> >>>> + marvell_nfc_select_target(chip, chip->cur_cs);
> >>>> +
> >>>> sdr = nand_get_sdr_timings(conf);
> >>>> if (IS_ERR(sdr))
> >>>> return PTR_ERR(sdr);
> >>>
> >>> I had a short look yesterday and this is very likely to be the root
> >>> cause of the regression, thank you very much!
> >>
> >> Yes it is, it fixes the regression I have reported.
> >>
> >> Do you want me to resend with that nit addressed you mentioned? My
> >> version works well, I know that much :)
> >
> > Yes please, resent with Boris' comment addressed and we'll be fine.
>
> I tried this now, and with 'chip->cur_cs' instead of 'chipnr', the
> regression is back. This function is invoked twice during boot, and in
> both cases, 'chip->cur_cs' is -1, while 'chipnr' is 0. The 2nd time this
> function is invoked, the 'selected_die' cache value is 0, so
> marvell_nfc_select_target() bails early, which seems to be a problem.
>
> I can't quite make sense of that yet, all I know is that calling
> marvell_nfc_select_target() with -1 from
> marvell_nfc_setup_data_interface() makes the driver functional again. Hmm.
I had a quick look at the marvell_nfc_setup_data_interface() function
and it doesn't make sense to call marvell_nfc_select_target() there.
The fact that calling marvell_nfc_select_target(cur_cs) fixes your
problem is probably a side effect, and the bug might come from other
changes I made in b25251414f6e (missing call to
marvell_nfc_select_target() somewhere else in the driver?).
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Daniel Mack <daniel@zonque.org>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard.weinberger@gmail.com>,
stable@vger.kernel.org, linux-mtd@lists.infradead.org,
haojian.zhuang@gmail.com, robert.jarzmik@free.fr,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mtd: rawnand: marvell: select target before setting up data interface
Date: Sat, 30 Mar 2019 19:09:59 +0100 [thread overview]
Message-ID: <20190330190959.080de229@collabora.com> (raw)
In-Reply-To: <60179efc-122f-2439-bd20-ab27b29afa32@zonque.org>
On Mon, 25 Mar 2019 17:21:42 +0100
Daniel Mack <daniel@zonque.org> wrote:
> Hi Miquel,
>
> On 25/3/2019 10:09 AM, Miquel Raynal wrote:
> > Daniel Mack <daniel@zonque.org> wrote on Fri, 22 Mar 2019 19:48:08
> > +0100:
> >
> >> Hi Miquel,
> >>
> >> On 22/3/2019 9:30 AM, Miquel Raynal wrote:
> >>> + Richard: this is fixes materials
> >>>
> >>> Daniel Mack <daniel@zonque.org> wrote on Thu, 21 Mar 2019 22:20:10
> >>> +0100:
> >>>
> >>>> Now that the nand drivers are responsible for selecting the target
> >>>> prior to hardware access, a call to marvell_nfc_select_target() is
> >>>> necessary from marvell_nfc_setup_data_interface().
> >>>>
> >>>> This is a regression introduced by commit b25251414f6e ("mtd:
> >>>> rawnand: marvell: Stop implementing ->select_chip()").
> >>>>
> >>>> Fixes: b25251414f6e ("mtd: rawnand: marvell: Stop implementing ->select_chip()")
> >>>> Cc: Boris Brezillon <boris.brezillon@collabora.com>
> >>>> Cc: <stable@vger.kernel.org>
> >>>> Signed-off-by: Daniel Mack <daniel@zonque.org>
> >>>> ---
> >>>> drivers/mtd/nand/raw/marvell_nand.c | 2 ++
> >>>> 1 file changed, 2 insertions(+)
> >>>>
> >>>> diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c
> >>>> index 84283c6bb0ff..93abe5be8995 100644
> >>>> --- a/drivers/mtd/nand/raw/marvell_nand.c
> >>>> +++ b/drivers/mtd/nand/raw/marvell_nand.c
> >>>> @@ -2325,6 +2325,8 @@ static int marvell_nfc_setup_data_interface(struct nand_chip *chip, int chipnr,
> >>>> struct marvell_nfc_timings nfc_tmg;
> >>>> int read_delay;
> >>>>
> >>>> + marvell_nfc_select_target(chip, chip->cur_cs);
> >>>> +
> >>>> sdr = nand_get_sdr_timings(conf);
> >>>> if (IS_ERR(sdr))
> >>>> return PTR_ERR(sdr);
> >>>
> >>> I had a short look yesterday and this is very likely to be the root
> >>> cause of the regression, thank you very much!
> >>
> >> Yes it is, it fixes the regression I have reported.
> >>
> >> Do you want me to resend with that nit addressed you mentioned? My
> >> version works well, I know that much :)
> >
> > Yes please, resent with Boris' comment addressed and we'll be fine.
>
> I tried this now, and with 'chip->cur_cs' instead of 'chipnr', the
> regression is back. This function is invoked twice during boot, and in
> both cases, 'chip->cur_cs' is -1, while 'chipnr' is 0. The 2nd time this
> function is invoked, the 'selected_die' cache value is 0, so
> marvell_nfc_select_target() bails early, which seems to be a problem.
>
> I can't quite make sense of that yet, all I know is that calling
> marvell_nfc_select_target() with -1 from
> marvell_nfc_setup_data_interface() makes the driver functional again. Hmm.
I had a quick look at the marvell_nfc_setup_data_interface() function
and it doesn't make sense to call marvell_nfc_select_target() there.
The fact that calling marvell_nfc_select_target(cur_cs) fixes your
problem is probably a side effect, and the bug might come from other
changes I made in b25251414f6e (missing call to
marvell_nfc_select_target() somewhere else in the driver?).
next prev parent reply other threads:[~2019-03-30 18:10 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-21 21:20 [PATCH] mtd: rawnand: marvell: select target before setting up data interface Daniel Mack
2019-03-21 21:20 ` Daniel Mack
2019-03-21 21:20 ` Daniel Mack
2019-03-22 8:30 ` Miquel Raynal
2019-03-22 8:30 ` Miquel Raynal
2019-03-22 8:30 ` Miquel Raynal
2019-03-22 9:05 ` Boris Brezillon
2019-03-22 9:05 ` Boris Brezillon
2019-03-22 9:05 ` Boris Brezillon
2019-03-22 18:48 ` Daniel Mack
2019-03-22 18:48 ` Daniel Mack
2019-03-22 18:48 ` Daniel Mack
2019-03-25 9:09 ` Miquel Raynal
2019-03-25 9:09 ` Miquel Raynal
2019-03-25 9:09 ` Miquel Raynal
2019-03-25 16:21 ` Daniel Mack
2019-03-25 16:21 ` Daniel Mack
2019-03-25 16:21 ` Daniel Mack
2019-03-30 18:09 ` Boris Brezillon [this message]
2019-03-30 18:09 ` Boris Brezillon
2019-03-30 18:09 ` Boris Brezillon
2019-03-30 18:20 ` Boris Brezillon
2019-03-30 18:20 ` Boris Brezillon
2019-03-30 18:20 ` Boris Brezillon
2019-04-01 15:29 ` Daniel Mack
2019-04-01 15:29 ` Daniel Mack
2019-04-01 15:29 ` Daniel Mack
2019-04-05 9:48 ` Miquel Raynal
2019-04-05 9:48 ` Miquel Raynal
2019-04-05 9:48 ` 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=20190330190959.080de229@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=daniel@zonque.org \
--cc=haojian.zhuang@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard.weinberger@gmail.com \
--cc=robert.jarzmik@free.fr \
--cc=stable@vger.kernel.org \
/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.