* Re: [PATCH] mtd: set mtd partition panic write flag
@ 2019-11-05 23:03 ` Richard Weinberger
0 siblings, 0 replies; 20+ messages in thread
From: Richard Weinberger @ 2019-11-05 23:03 UTC (permalink / raw)
To: Miquel Raynal
Cc: Vignesh Raghavendra, Kamal Dasu, linux-kernel, Marek Vasut,
bcm-kernel-feedback-list, linux-mtd, Brian Norris,
David Woodhouse
----- Ursprüngliche Mail -----
> Von: "Miquel Raynal" <miquel.raynal@bootlin.com>
> An: "Kamal Dasu" <kdasu.kdev@gmail.com>
> CC: "linux-mtd" <linux-mtd@lists.infradead.org>, "bcm-kernel-feedback-list" <bcm-kernel-feedback-list@broadcom.com>,
> "linux-kernel" <linux-kernel@vger.kernel.org>, "David Woodhouse" <dwmw2@infradead.org>, "Brian Norris"
> <computersforpeace@gmail.com>, "Marek Vasut" <marek.vasut@gmail.com>, "richard" <richard@nod.at>, "Vignesh Raghavendra"
> <vigneshr@ti.com>
> Gesendet: Dienstag, 5. November 2019 20:03:44
> Betreff: Re: [PATCH] mtd: set mtd partition panic write flag
> Hi Kamal,
>
> Richard, something to look into below :)
I'm still recovering from a bad cold. So my brain is not fully working ;)
> Kamal Dasu <kdasu.kdev@gmail.com> wrote on Mon, 21 Oct 2019 15:32:52
> -0400:
>
>> Check mtd panic write flag and set the mtd partition panic
>> write flag so that low level drivers can use it to take
>> required action to ensure oops data gets written to assigned
>> mtd partition.
>
> I feel there is something wrong with the current implementation
> regarding partitions but I am not sure this is the right fix. Is this
> something you detected with some kind of static checker or did you
> actually experience an issue?
>
> In the commit log you say "check mtd (I suppose you mean the
> master) panic write flag and set the mtd partition panic write flag"
> which makes sense, but in reality my understanding is that you do the
> opposite: you check mtd->oops_panic_write which is the partitions'
> structure, and set part->parent->oops_panic_write which is the master's
> flag.
IIUC the problem happens when you run mtdoops on a mtd partition.
The the flag is only set for the partition instead for the master.
So the right fix would be setting the parent's oops_panic_write in
mtd_panic_write().
Then we don't have to touch mtdpart.c
Thanks,
//richard
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] mtd: set mtd partition panic write flag
2019-11-05 23:03 ` Richard Weinberger
@ 2019-11-11 20:35 ` Kamal Dasu
-1 siblings, 0 replies; 20+ messages in thread
From: Kamal Dasu @ 2019-11-11 20:35 UTC (permalink / raw)
To: Richard Weinberger
Cc: Miquel Raynal, linux-mtd, bcm-kernel-feedback-list, linux-kernel,
David Woodhouse, Brian Norris, Marek Vasut, Vignesh Raghavendra
Richard,
On Tue, Nov 5, 2019 at 6:03 PM Richard Weinberger <richard@nod.at> wrote:
>
> ----- Ursprüngliche Mail -----
> > Von: "Miquel Raynal" <miquel.raynal@bootlin.com>
> > An: "Kamal Dasu" <kdasu.kdev@gmail.com>
> > CC: "linux-mtd" <linux-mtd@lists.infradead.org>, "bcm-kernel-feedback-list" <bcm-kernel-feedback-list@broadcom.com>,
> > "linux-kernel" <linux-kernel@vger.kernel.org>, "David Woodhouse" <dwmw2@infradead.org>, "Brian Norris"
> > <computersforpeace@gmail.com>, "Marek Vasut" <marek.vasut@gmail.com>, "richard" <richard@nod.at>, "Vignesh Raghavendra"
> > <vigneshr@ti.com>
> > Gesendet: Dienstag, 5. November 2019 20:03:44
> > Betreff: Re: [PATCH] mtd: set mtd partition panic write flag
>
> > Hi Kamal,
> >
> > Richard, something to look into below :)
>
> I'm still recovering from a bad cold. So my brain is not fully working ;)
Thanks for reviewing this. Hope you are feeling better now.
>
> > Kamal Dasu <kdasu.kdev@gmail.com> wrote on Mon, 21 Oct 2019 15:32:52
> > -0400:
> >
> >> Check mtd panic write flag and set the mtd partition panic
> >> write flag so that low level drivers can use it to take
> >> required action to ensure oops data gets written to assigned
> >> mtd partition.
> >
> > I feel there is something wrong with the current implementation
> > regarding partitions but I am not sure this is the right fix. Is this
> > something you detected with some kind of static checker or did you
> > actually experience an issue?
> >
> > In the commit log you say "check mtd (I suppose you mean the
> > master) panic write flag and set the mtd partition panic write flag"
> > which makes sense, but in reality my understanding is that you do the
> > opposite: you check mtd->oops_panic_write which is the partitions'
> > structure, and set part->parent->oops_panic_write which is the master's
> > flag.
>
> IIUC the problem happens when you run mtdoops on a mtd partition.
> The the flag is only set for the partition instead for the master.
>
> So the right fix would be setting the parent's oops_panic_write in
How do I get access to the parts parent in the core ?. Maybe I am
missing something.
> mtd_panic_write().
> Then we don't have to touch mtdpart.c
>
> Thanks,
> //richard
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] mtd: set mtd partition panic write flag
@ 2019-11-11 20:35 ` Kamal Dasu
0 siblings, 0 replies; 20+ messages in thread
From: Kamal Dasu @ 2019-11-11 20:35 UTC (permalink / raw)
To: Richard Weinberger
Cc: Vignesh Raghavendra, linux-kernel, Marek Vasut,
bcm-kernel-feedback-list, Miquel Raynal, linux-mtd, Brian Norris,
David Woodhouse
Richard,
On Tue, Nov 5, 2019 at 6:03 PM Richard Weinberger <richard@nod.at> wrote:
>
> ----- Ursprüngliche Mail -----
> > Von: "Miquel Raynal" <miquel.raynal@bootlin.com>
> > An: "Kamal Dasu" <kdasu.kdev@gmail.com>
> > CC: "linux-mtd" <linux-mtd@lists.infradead.org>, "bcm-kernel-feedback-list" <bcm-kernel-feedback-list@broadcom.com>,
> > "linux-kernel" <linux-kernel@vger.kernel.org>, "David Woodhouse" <dwmw2@infradead.org>, "Brian Norris"
> > <computersforpeace@gmail.com>, "Marek Vasut" <marek.vasut@gmail.com>, "richard" <richard@nod.at>, "Vignesh Raghavendra"
> > <vigneshr@ti.com>
> > Gesendet: Dienstag, 5. November 2019 20:03:44
> > Betreff: Re: [PATCH] mtd: set mtd partition panic write flag
>
> > Hi Kamal,
> >
> > Richard, something to look into below :)
>
> I'm still recovering from a bad cold. So my brain is not fully working ;)
Thanks for reviewing this. Hope you are feeling better now.
>
> > Kamal Dasu <kdasu.kdev@gmail.com> wrote on Mon, 21 Oct 2019 15:32:52
> > -0400:
> >
> >> Check mtd panic write flag and set the mtd partition panic
> >> write flag so that low level drivers can use it to take
> >> required action to ensure oops data gets written to assigned
> >> mtd partition.
> >
> > I feel there is something wrong with the current implementation
> > regarding partitions but I am not sure this is the right fix. Is this
> > something you detected with some kind of static checker or did you
> > actually experience an issue?
> >
> > In the commit log you say "check mtd (I suppose you mean the
> > master) panic write flag and set the mtd partition panic write flag"
> > which makes sense, but in reality my understanding is that you do the
> > opposite: you check mtd->oops_panic_write which is the partitions'
> > structure, and set part->parent->oops_panic_write which is the master's
> > flag.
>
> IIUC the problem happens when you run mtdoops on a mtd partition.
> The the flag is only set for the partition instead for the master.
>
> So the right fix would be setting the parent's oops_panic_write in
How do I get access to the parts parent in the core ?. Maybe I am
missing something.
> mtd_panic_write().
> Then we don't have to touch mtdpart.c
>
> Thanks,
> //richard
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] mtd: set mtd partition panic write flag
2019-11-05 23:03 ` Richard Weinberger
@ 2020-01-09 15:03 ` Miquel Raynal
-1 siblings, 0 replies; 20+ messages in thread
From: Miquel Raynal @ 2020-01-09 15:03 UTC (permalink / raw)
To: Richard Weinberger
Cc: Kamal Dasu, linux-mtd, bcm-kernel-feedback-list, linux-kernel,
David Woodhouse, Brian Norris, Marek Vasut, Vignesh Raghavendra
Hello,
Richard Weinberger <richard@nod.at> wrote on Wed, 6 Nov 2019 00:03:42
+0100 (CET):
> ----- Ursprüngliche Mail -----
> > Von: "Miquel Raynal" <miquel.raynal@bootlin.com>
> > An: "Kamal Dasu" <kdasu.kdev@gmail.com>
> > CC: "linux-mtd" <linux-mtd@lists.infradead.org>, "bcm-kernel-feedback-list" <bcm-kernel-feedback-list@broadcom.com>,
> > "linux-kernel" <linux-kernel@vger.kernel.org>, "David Woodhouse" <dwmw2@infradead.org>, "Brian Norris"
> > <computersforpeace@gmail.com>, "Marek Vasut" <marek.vasut@gmail.com>, "richard" <richard@nod.at>, "Vignesh Raghavendra"
> > <vigneshr@ti.com>
> > Gesendet: Dienstag, 5. November 2019 20:03:44
> > Betreff: Re: [PATCH] mtd: set mtd partition panic write flag
>
> > Hi Kamal,
> >
> > Richard, something to look into below :)
>
> I'm still recovering from a bad cold. So my brain is not fully working ;)
>
> > Kamal Dasu <kdasu.kdev@gmail.com> wrote on Mon, 21 Oct 2019 15:32:52
> > -0400:
> >
> >> Check mtd panic write flag and set the mtd partition panic
> >> write flag so that low level drivers can use it to take
> >> required action to ensure oops data gets written to assigned
> >> mtd partition.
> >
> > I feel there is something wrong with the current implementation
> > regarding partitions but I am not sure this is the right fix. Is this
> > something you detected with some kind of static checker or did you
> > actually experience an issue?
> >
> > In the commit log you say "check mtd (I suppose you mean the
> > master) panic write flag and set the mtd partition panic write flag"
> > which makes sense, but in reality my understanding is that you do the
> > opposite: you check mtd->oops_panic_write which is the partitions'
> > structure, and set part->parent->oops_panic_write which is the master's
> > flag.
>
> IIUC the problem happens when you run mtdoops on a mtd partition.
> The the flag is only set for the partition instead for the master.
>
> So the right fix would be setting the parent's oops_panic_write in
> mtd_panic_write().
> Then we don't have to touch mtdpart.c
>
This issue is still open, right? Kamal can you send an updated version?
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] mtd: set mtd partition panic write flag
@ 2020-01-09 15:03 ` Miquel Raynal
0 siblings, 0 replies; 20+ messages in thread
From: Miquel Raynal @ 2020-01-09 15:03 UTC (permalink / raw)
To: Richard Weinberger
Cc: Vignesh Raghavendra, Kamal Dasu, linux-kernel, Marek Vasut,
bcm-kernel-feedback-list, linux-mtd, Brian Norris,
David Woodhouse
Hello,
Richard Weinberger <richard@nod.at> wrote on Wed, 6 Nov 2019 00:03:42
+0100 (CET):
> ----- Ursprüngliche Mail -----
> > Von: "Miquel Raynal" <miquel.raynal@bootlin.com>
> > An: "Kamal Dasu" <kdasu.kdev@gmail.com>
> > CC: "linux-mtd" <linux-mtd@lists.infradead.org>, "bcm-kernel-feedback-list" <bcm-kernel-feedback-list@broadcom.com>,
> > "linux-kernel" <linux-kernel@vger.kernel.org>, "David Woodhouse" <dwmw2@infradead.org>, "Brian Norris"
> > <computersforpeace@gmail.com>, "Marek Vasut" <marek.vasut@gmail.com>, "richard" <richard@nod.at>, "Vignesh Raghavendra"
> > <vigneshr@ti.com>
> > Gesendet: Dienstag, 5. November 2019 20:03:44
> > Betreff: Re: [PATCH] mtd: set mtd partition panic write flag
>
> > Hi Kamal,
> >
> > Richard, something to look into below :)
>
> I'm still recovering from a bad cold. So my brain is not fully working ;)
>
> > Kamal Dasu <kdasu.kdev@gmail.com> wrote on Mon, 21 Oct 2019 15:32:52
> > -0400:
> >
> >> Check mtd panic write flag and set the mtd partition panic
> >> write flag so that low level drivers can use it to take
> >> required action to ensure oops data gets written to assigned
> >> mtd partition.
> >
> > I feel there is something wrong with the current implementation
> > regarding partitions but I am not sure this is the right fix. Is this
> > something you detected with some kind of static checker or did you
> > actually experience an issue?
> >
> > In the commit log you say "check mtd (I suppose you mean the
> > master) panic write flag and set the mtd partition panic write flag"
> > which makes sense, but in reality my understanding is that you do the
> > opposite: you check mtd->oops_panic_write which is the partitions'
> > structure, and set part->parent->oops_panic_write which is the master's
> > flag.
>
> IIUC the problem happens when you run mtdoops on a mtd partition.
> The the flag is only set for the partition instead for the master.
>
> So the right fix would be setting the parent's oops_panic_write in
> mtd_panic_write().
> Then we don't have to touch mtdpart.c
>
This issue is still open, right? Kamal can you send an updated version?
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] mtd: set mtd partition panic write flag
2020-01-09 15:03 ` Miquel Raynal
@ 2020-01-09 15:25 ` Kamal Dasu
-1 siblings, 0 replies; 20+ messages in thread
From: Kamal Dasu @ 2020-01-09 15:25 UTC (permalink / raw)
To: Miquel Raynal
Cc: Richard Weinberger, Kamal Dasu, linux-mtd,
bcm-kernel-feedback-list, linux-kernel, David Woodhouse,
Brian Norris, Marek Vasut, Vignesh Raghavendra
Miquel,
Yes the issue is still open. I was trying to understand the suggestion
and did not get a reply on the question I had
Richard wrote :
"So the right fix would be setting the parent's oops_panic_write in
mtd_panic_write().
Then we don't have to touch mtdpart.c"
How do I get access to the parts parent in the core ?. Maybe I am
missing something.
Kamal
On Thu, Jan 9, 2020 at 10:03 AM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>
> Hello,
>
> Richard Weinberger <richard@nod.at> wrote on Wed, 6 Nov 2019 00:03:42
> +0100 (CET):
>
> > ----- Ursprüngliche Mail -----
> > > Von: "Miquel Raynal" <miquel.raynal@bootlin.com>
> > > An: "Kamal Dasu" <kdasu.kdev@gmail.com>
> > > CC: "linux-mtd" <linux-mtd@lists.infradead.org>, "bcm-kernel-feedback-list" <bcm-kernel-feedback-list@broadcom.com>,
> > > "linux-kernel" <linux-kernel@vger.kernel.org>, "David Woodhouse" <dwmw2@infradead.org>, "Brian Norris"
> > > <computersforpeace@gmail.com>, "Marek Vasut" <marek.vasut@gmail.com>, "richard" <richard@nod.at>, "Vignesh Raghavendra"
> > > <vigneshr@ti.com>
> > > Gesendet: Dienstag, 5. November 2019 20:03:44
> > > Betreff: Re: [PATCH] mtd: set mtd partition panic write flag
> >
> > > Hi Kamal,
> > >
> > > Richard, something to look into below :)
> >
> > I'm still recovering from a bad cold. So my brain is not fully working ;)
> >
> > > Kamal Dasu <kdasu.kdev@gmail.com> wrote on Mon, 21 Oct 2019 15:32:52
> > > -0400:
> > >
> > >> Check mtd panic write flag and set the mtd partition panic
> > >> write flag so that low level drivers can use it to take
> > >> required action to ensure oops data gets written to assigned
> > >> mtd partition.
> > >
> > > I feel there is something wrong with the current implementation
> > > regarding partitions but I am not sure this is the right fix. Is this
> > > something you detected with some kind of static checker or did you
> > > actually experience an issue?
> > >
> > > In the commit log you say "check mtd (I suppose you mean the
> > > master) panic write flag and set the mtd partition panic write flag"
> > > which makes sense, but in reality my understanding is that you do the
> > > opposite: you check mtd->oops_panic_write which is the partitions'
> > > structure, and set part->parent->oops_panic_write which is the master's
> > > flag.
> >
> > IIUC the problem happens when you run mtdoops on a mtd partition.
> > The the flag is only set for the partition instead for the master.
> >
> > So the right fix would be setting the parent's oops_panic_write in
> > mtd_panic_write().
> > Then we don't have to touch mtdpart.c
> >
>
> This issue is still open, right? Kamal can you send an updated version?
>
>
> Thanks,
> Miquèl
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] mtd: set mtd partition panic write flag
@ 2020-01-09 15:25 ` Kamal Dasu
0 siblings, 0 replies; 20+ messages in thread
From: Kamal Dasu @ 2020-01-09 15:25 UTC (permalink / raw)
To: Miquel Raynal
Cc: Vignesh Raghavendra, Kamal Dasu, Richard Weinberger,
linux-kernel, Marek Vasut, bcm-kernel-feedback-list, linux-mtd,
Brian Norris, David Woodhouse
Miquel,
Yes the issue is still open. I was trying to understand the suggestion
and did not get a reply on the question I had
Richard wrote :
"So the right fix would be setting the parent's oops_panic_write in
mtd_panic_write().
Then we don't have to touch mtdpart.c"
How do I get access to the parts parent in the core ?. Maybe I am
missing something.
Kamal
On Thu, Jan 9, 2020 at 10:03 AM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>
> Hello,
>
> Richard Weinberger <richard@nod.at> wrote on Wed, 6 Nov 2019 00:03:42
> +0100 (CET):
>
> > ----- Ursprüngliche Mail -----
> > > Von: "Miquel Raynal" <miquel.raynal@bootlin.com>
> > > An: "Kamal Dasu" <kdasu.kdev@gmail.com>
> > > CC: "linux-mtd" <linux-mtd@lists.infradead.org>, "bcm-kernel-feedback-list" <bcm-kernel-feedback-list@broadcom.com>,
> > > "linux-kernel" <linux-kernel@vger.kernel.org>, "David Woodhouse" <dwmw2@infradead.org>, "Brian Norris"
> > > <computersforpeace@gmail.com>, "Marek Vasut" <marek.vasut@gmail.com>, "richard" <richard@nod.at>, "Vignesh Raghavendra"
> > > <vigneshr@ti.com>
> > > Gesendet: Dienstag, 5. November 2019 20:03:44
> > > Betreff: Re: [PATCH] mtd: set mtd partition panic write flag
> >
> > > Hi Kamal,
> > >
> > > Richard, something to look into below :)
> >
> > I'm still recovering from a bad cold. So my brain is not fully working ;)
> >
> > > Kamal Dasu <kdasu.kdev@gmail.com> wrote on Mon, 21 Oct 2019 15:32:52
> > > -0400:
> > >
> > >> Check mtd panic write flag and set the mtd partition panic
> > >> write flag so that low level drivers can use it to take
> > >> required action to ensure oops data gets written to assigned
> > >> mtd partition.
> > >
> > > I feel there is something wrong with the current implementation
> > > regarding partitions but I am not sure this is the right fix. Is this
> > > something you detected with some kind of static checker or did you
> > > actually experience an issue?
> > >
> > > In the commit log you say "check mtd (I suppose you mean the
> > > master) panic write flag and set the mtd partition panic write flag"
> > > which makes sense, but in reality my understanding is that you do the
> > > opposite: you check mtd->oops_panic_write which is the partitions'
> > > structure, and set part->parent->oops_panic_write which is the master's
> > > flag.
> >
> > IIUC the problem happens when you run mtdoops on a mtd partition.
> > The the flag is only set for the partition instead for the master.
> >
> > So the right fix would be setting the parent's oops_panic_write in
> > mtd_panic_write().
> > Then we don't have to touch mtdpart.c
> >
>
> This issue is still open, right? Kamal can you send an updated version?
>
>
> Thanks,
> Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] mtd: set mtd partition panic write flag
2020-01-09 15:25 ` Kamal Dasu
@ 2020-01-09 17:28 ` Miquel Raynal
-1 siblings, 0 replies; 20+ messages in thread
From: Miquel Raynal @ 2020-01-09 17:28 UTC (permalink / raw)
To: Kamal Dasu
Cc: Richard Weinberger, Kamal Dasu, linux-mtd,
bcm-kernel-feedback-list, linux-kernel, David Woodhouse,
Brian Norris, Marek Vasut, Vignesh Raghavendra
Hi Kamal,
Kamal Dasu <kamal.dasu@broadcom.com> wrote on Thu, 9 Jan 2020 10:25:59
-0500:
> Miquel,
>
> Yes the issue is still open. I was trying to understand the suggestion
> and did not get a reply on the question I had
>
> Richard wrote :
> "So the right fix would be setting the parent's oops_panic_write in
> mtd_panic_write().
> Then we don't have to touch mtdpart.c"
>
> How do I get access to the parts parent in the core ?. Maybe I am
> missing something.
I think the solution is to set the oops_panic_write of the root parent, instead of updating the flag of the mtd device itself (which is maybe a partition).
Would this help?
https://www.spinics.net/lists/linux-mtd/msg10454.html
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] mtd: set mtd partition panic write flag
@ 2020-01-09 17:28 ` Miquel Raynal
0 siblings, 0 replies; 20+ messages in thread
From: Miquel Raynal @ 2020-01-09 17:28 UTC (permalink / raw)
To: Kamal Dasu
Cc: Vignesh Raghavendra, Kamal Dasu, Richard Weinberger,
linux-kernel, Marek Vasut, bcm-kernel-feedback-list, linux-mtd,
Brian Norris, David Woodhouse
Hi Kamal,
Kamal Dasu <kamal.dasu@broadcom.com> wrote on Thu, 9 Jan 2020 10:25:59
-0500:
> Miquel,
>
> Yes the issue is still open. I was trying to understand the suggestion
> and did not get a reply on the question I had
>
> Richard wrote :
> "So the right fix would be setting the parent's oops_panic_write in
> mtd_panic_write().
> Then we don't have to touch mtdpart.c"
>
> How do I get access to the parts parent in the core ?. Maybe I am
> missing something.
I think the solution is to set the oops_panic_write of the root parent, instead of updating the flag of the mtd device itself (which is maybe a partition).
Would this help?
https://www.spinics.net/lists/linux-mtd/msg10454.html
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] mtd: set mtd partition panic write flag
2020-01-09 17:28 ` Miquel Raynal
@ 2020-05-02 18:08 ` Miquel Raynal
-1 siblings, 0 replies; 20+ messages in thread
From: Miquel Raynal @ 2020-05-02 18:08 UTC (permalink / raw)
To: Kamal Dasu
Cc: Vignesh Raghavendra, Kamal Dasu, Richard Weinberger,
linux-kernel, Marek Vasut, bcm-kernel-feedback-list, linux-mtd,
Brian Norris, David Woodhouse
Hi Kamal,
Miquel Raynal <miquel.raynal@bootlin.com> wrote on Thu, 9 Jan 2020
18:28:07 +0100:
> Hi Kamal,
>
> Kamal Dasu <kamal.dasu@broadcom.com> wrote on Thu, 9 Jan 2020 10:25:59
> -0500:
>
> > Miquel,
> >
> > Yes the issue is still open. I was trying to understand the suggestion
> > and did not get a reply on the question I had
> >
> > Richard wrote :
> > "So the right fix would be setting the parent's oops_panic_write in
> > mtd_panic_write().
> > Then we don't have to touch mtdpart.c"
> >
> > How do I get access to the parts parent in the core ?. Maybe I am
> > missing something.
>
> I think the solution is to set the oops_panic_write of the root parent, instead of updating the flag of the mtd device itself (which is maybe a partition).
>
> Would this help?
>
> https://www.spinics.net/lists/linux-mtd/msg10454.html
I'm pinging you here as well, as I think you raise a real issue, and we
agreed on a solution, which can now be easily setup with the above
change which has been applied and support for functions like:
static inline struct mtd_info *mtd_get_master(struct mtd_info *mtd)
static inline u64 mtd_get_master_ofs(struct mtd_info *mtd, u64 ofs)
static inline bool mtd_is_partition(const struct mtd_info *mtd)
static inline bool mtd_has_partitions(const struct mtd_info *mtd)
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] mtd: set mtd partition panic write flag
@ 2020-05-02 18:08 ` Miquel Raynal
0 siblings, 0 replies; 20+ messages in thread
From: Miquel Raynal @ 2020-05-02 18:08 UTC (permalink / raw)
To: Kamal Dasu
Cc: Vignesh Raghavendra, Kamal Dasu, Richard Weinberger,
linux-kernel, Marek Vasut, bcm-kernel-feedback-list, linux-mtd,
Brian Norris, David Woodhouse
Hi Kamal,
Miquel Raynal <miquel.raynal@bootlin.com> wrote on Thu, 9 Jan 2020
18:28:07 +0100:
> Hi Kamal,
>
> Kamal Dasu <kamal.dasu@broadcom.com> wrote on Thu, 9 Jan 2020 10:25:59
> -0500:
>
> > Miquel,
> >
> > Yes the issue is still open. I was trying to understand the suggestion
> > and did not get a reply on the question I had
> >
> > Richard wrote :
> > "So the right fix would be setting the parent's oops_panic_write in
> > mtd_panic_write().
> > Then we don't have to touch mtdpart.c"
> >
> > How do I get access to the parts parent in the core ?. Maybe I am
> > missing something.
>
> I think the solution is to set the oops_panic_write of the root parent, instead of updating the flag of the mtd device itself (which is maybe a partition).
>
> Would this help?
>
> https://www.spinics.net/lists/linux-mtd/msg10454.html
I'm pinging you here as well, as I think you raise a real issue, and we
agreed on a solution, which can now be easily setup with the above
change which has been applied and support for functions like:
static inline struct mtd_info *mtd_get_master(struct mtd_info *mtd)
static inline u64 mtd_get_master_ofs(struct mtd_info *mtd, u64 ofs)
static inline bool mtd_is_partition(const struct mtd_info *mtd)
static inline bool mtd_has_partitions(const struct mtd_info *mtd)
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] mtd: set mtd partition panic write flag
2020-05-02 18:08 ` Miquel Raynal
@ 2020-05-04 15:20 ` Kamal Dasu
-1 siblings, 0 replies; 20+ messages in thread
From: Kamal Dasu @ 2020-05-04 15:20 UTC (permalink / raw)
To: Miquel Raynal
Cc: Vignesh Raghavendra, Kamal Dasu, Richard Weinberger,
linux-kernel, Marek Vasut, bcm-kernel-feedback-list, linux-mtd,
Brian Norris, David Woodhouse
On Sat, May 2, 2020 at 2:08 PM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>
> Hi Kamal,
>
> Miquel Raynal <miquel.raynal@bootlin.com> wrote on Thu, 9 Jan 2020
> 18:28:07 +0100:
>
> > Hi Kamal,
> >
> > Kamal Dasu <kamal.dasu@broadcom.com> wrote on Thu, 9 Jan 2020 10:25:59
> > -0500:
> >
> > > Miquel,
> > >
> > > Yes the issue is still open. I was trying to understand the suggestion
> > > and did not get a reply on the question I had
> > >
> > > Richard wrote :
> > > "So the right fix would be setting the parent's oops_panic_write in
> > > mtd_panic_write().
> > > Then we don't have to touch mtdpart.c"
> > >
> > > How do I get access to the parts parent in the core ?. Maybe I am
> > > missing something.
> >
> > I think the solution is to set the oops_panic_write of the root parent, instead of updating the flag of the mtd device itself (which is maybe a partition).
> >
> > Would this help?
> >
> > https://www.spinics.net/lists/linux-mtd/msg10454.html
>
> I'm pinging you here as well, as I think you raise a real issue, and we
> agreed on a solution, which can now be easily setup with the above
> change which has been applied and support for functions like:
>
> static inline struct mtd_info *mtd_get_master(struct mtd_info *mtd)
> static inline u64 mtd_get_master_ofs(struct mtd_info *mtd, u64 ofs)
> static inline bool mtd_is_partition(const struct mtd_info *mtd)
> static inline bool mtd_has_partitions(const struct mtd_info *mtd)
>
So I should only set master->oops_panic_write with the new code ?.
> Thanks,
> Miquèl
Kamal
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] mtd: set mtd partition panic write flag
@ 2020-05-04 15:20 ` Kamal Dasu
0 siblings, 0 replies; 20+ messages in thread
From: Kamal Dasu @ 2020-05-04 15:20 UTC (permalink / raw)
To: Miquel Raynal
Cc: Vignesh Raghavendra, Kamal Dasu, Richard Weinberger,
linux-kernel, Marek Vasut, bcm-kernel-feedback-list, linux-mtd,
Brian Norris, David Woodhouse
On Sat, May 2, 2020 at 2:08 PM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>
> Hi Kamal,
>
> Miquel Raynal <miquel.raynal@bootlin.com> wrote on Thu, 9 Jan 2020
> 18:28:07 +0100:
>
> > Hi Kamal,
> >
> > Kamal Dasu <kamal.dasu@broadcom.com> wrote on Thu, 9 Jan 2020 10:25:59
> > -0500:
> >
> > > Miquel,
> > >
> > > Yes the issue is still open. I was trying to understand the suggestion
> > > and did not get a reply on the question I had
> > >
> > > Richard wrote :
> > > "So the right fix would be setting the parent's oops_panic_write in
> > > mtd_panic_write().
> > > Then we don't have to touch mtdpart.c"
> > >
> > > How do I get access to the parts parent in the core ?. Maybe I am
> > > missing something.
> >
> > I think the solution is to set the oops_panic_write of the root parent, instead of updating the flag of the mtd device itself (which is maybe a partition).
> >
> > Would this help?
> >
> > https://www.spinics.net/lists/linux-mtd/msg10454.html
>
> I'm pinging you here as well, as I think you raise a real issue, and we
> agreed on a solution, which can now be easily setup with the above
> change which has been applied and support for functions like:
>
> static inline struct mtd_info *mtd_get_master(struct mtd_info *mtd)
> static inline u64 mtd_get_master_ofs(struct mtd_info *mtd, u64 ofs)
> static inline bool mtd_is_partition(const struct mtd_info *mtd)
> static inline bool mtd_has_partitions(const struct mtd_info *mtd)
>
So I should only set master->oops_panic_write with the new code ?.
> Thanks,
> Miquèl
Kamal
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] mtd: set mtd partition panic write flag
2020-05-04 15:20 ` Kamal Dasu
@ 2020-05-04 17:29 ` Miquel Raynal
-1 siblings, 0 replies; 20+ messages in thread
From: Miquel Raynal @ 2020-05-04 17:29 UTC (permalink / raw)
To: Kamal Dasu
Cc: Vignesh Raghavendra, Kamal Dasu, Richard Weinberger,
linux-kernel, Marek Vasut, bcm-kernel-feedback-list, linux-mtd,
Brian Norris, David Woodhouse
Hi Kamal,
Kamal Dasu <kamal.dasu@broadcom.com> wrote on Mon, 4 May 2020 11:20:16
-0400:
> On Sat, May 2, 2020 at 2:08 PM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> >
> > Hi Kamal,
> >
> > Miquel Raynal <miquel.raynal@bootlin.com> wrote on Thu, 9 Jan 2020
> > 18:28:07 +0100:
> >
> > > Hi Kamal,
> > >
> > > Kamal Dasu <kamal.dasu@broadcom.com> wrote on Thu, 9 Jan 2020 10:25:59
> > > -0500:
> > >
> > > > Miquel,
> > > >
> > > > Yes the issue is still open. I was trying to understand the suggestion
> > > > and did not get a reply on the question I had
> > > >
> > > > Richard wrote :
> > > > "So the right fix would be setting the parent's oops_panic_write in
> > > > mtd_panic_write().
> > > > Then we don't have to touch mtdpart.c"
> > > >
> > > > How do I get access to the parts parent in the core ?. Maybe I am
> > > > missing something.
> > >
> > > I think the solution is to set the oops_panic_write of the root parent, instead of updating the flag of the mtd device itself (which is maybe a partition).
> > >
> > > Would this help?
> > >
> > > https://www.spinics.net/lists/linux-mtd/msg10454.html
> >
> > I'm pinging you here as well, as I think you raise a real issue, and we
> > agreed on a solution, which can now be easily setup with the above
> > change which has been applied and support for functions like:
> >
> > static inline struct mtd_info *mtd_get_master(struct mtd_info *mtd)
> > static inline u64 mtd_get_master_ofs(struct mtd_info *mtd, u64 ofs)
> > static inline bool mtd_is_partition(const struct mtd_info *mtd)
> > static inline bool mtd_has_partitions(const struct mtd_info *mtd)
> >
>
> So I should only set master->oops_panic_write with the new code ?.
Yes, if you can still reproduce the issue and it solves your problem,
then it's I think a nice fix.
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] mtd: set mtd partition panic write flag
@ 2020-05-04 17:29 ` Miquel Raynal
0 siblings, 0 replies; 20+ messages in thread
From: Miquel Raynal @ 2020-05-04 17:29 UTC (permalink / raw)
To: Kamal Dasu
Cc: Vignesh Raghavendra, Kamal Dasu, Richard Weinberger,
linux-kernel, Marek Vasut, bcm-kernel-feedback-list, linux-mtd,
Brian Norris, David Woodhouse
Hi Kamal,
Kamal Dasu <kamal.dasu@broadcom.com> wrote on Mon, 4 May 2020 11:20:16
-0400:
> On Sat, May 2, 2020 at 2:08 PM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> >
> > Hi Kamal,
> >
> > Miquel Raynal <miquel.raynal@bootlin.com> wrote on Thu, 9 Jan 2020
> > 18:28:07 +0100:
> >
> > > Hi Kamal,
> > >
> > > Kamal Dasu <kamal.dasu@broadcom.com> wrote on Thu, 9 Jan 2020 10:25:59
> > > -0500:
> > >
> > > > Miquel,
> > > >
> > > > Yes the issue is still open. I was trying to understand the suggestion
> > > > and did not get a reply on the question I had
> > > >
> > > > Richard wrote :
> > > > "So the right fix would be setting the parent's oops_panic_write in
> > > > mtd_panic_write().
> > > > Then we don't have to touch mtdpart.c"
> > > >
> > > > How do I get access to the parts parent in the core ?. Maybe I am
> > > > missing something.
> > >
> > > I think the solution is to set the oops_panic_write of the root parent, instead of updating the flag of the mtd device itself (which is maybe a partition).
> > >
> > > Would this help?
> > >
> > > https://www.spinics.net/lists/linux-mtd/msg10454.html
> >
> > I'm pinging you here as well, as I think you raise a real issue, and we
> > agreed on a solution, which can now be easily setup with the above
> > change which has been applied and support for functions like:
> >
> > static inline struct mtd_info *mtd_get_master(struct mtd_info *mtd)
> > static inline u64 mtd_get_master_ofs(struct mtd_info *mtd, u64 ofs)
> > static inline bool mtd_is_partition(const struct mtd_info *mtd)
> > static inline bool mtd_has_partitions(const struct mtd_info *mtd)
> >
>
> So I should only set master->oops_panic_write with the new code ?.
Yes, if you can still reproduce the issue and it solves your problem,
then it's I think a nice fix.
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 20+ messages in thread