Patchwork [RFC] mtd: nand: Fix bad block identification issue

login
register
mail settings
Submitter Artem Bityutskiy
Date April 28, 2011, 5:30 p.m.
Message ID <1304011843.2737.3.camel@localhost>
Download mbox | patch
Permalink /patch/93267/
State Accepted
Commit 26d9be11485ea8c1102c3e8eaa7667412eef4950
Headers show

Comments

Artem Bityutskiy - April 28, 2011, 5:30 p.m.
On Wed, 2011-04-27 at 17:39 +0530, Saxena, Parth wrote:
> This patch solves the above issue for omap by initialising
> badblockbits. We are working further on this to find a generic fix
> to the problem in nand_base.c.

But it looks like the generic solution is to return the line which was
accidentally removed, how about this patch

From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Date: Thu, 28 Apr 2011 20:26:59 +0300
Subject: [PATCH] mtd: return badblockbits back

In commit c7b28e25cb9beb943aead770ff14551b55fa8c79 the initialization of
the backblockbits was accidentally removed. This patch returns it back,
because otherwise some NAND drivers are broken.

This problem was reported by "Saxena, Parth <parth.saxena@ti.com>" here:
http://lists.infradead.org/pipermail/linux-mtd/2011-April/035221.html

Reported-by: Saxena, Parth <parth.saxena@ti.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: stable@kernel.org [2.6.36+]
---
 drivers/mtd/nand/nand_base.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Artem Bityutskiy - April 29, 2011, 1:12 p.m.
On Thu, 2011-04-28 at 20:30 +0300, Artem Bityutskiy wrote:
> On Wed, 2011-04-27 at 17:39 +0530, Saxena, Parth wrote:
> > This patch solves the above issue for omap by initialising
> > badblockbits. We are working further on this to find a generic fix
> > to the problem in nand_base.c.
> 
> But it looks like the generic solution is to return the line which was
> accidentally removed, how about this patch
> 
> From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> Date: Thu, 28 Apr 2011 20:26:59 +0300
> Subject: [PATCH] mtd: return badblockbits back
> 
> In commit c7b28e25cb9beb943aead770ff14551b55fa8c79 the initialization of
> the backblockbits was accidentally removed. This patch returns it back,
> because otherwise some NAND drivers are broken.
> 
> This problem was reported by "Saxena, Parth <parth.saxena@ti.com>" here:
> http://lists.infradead.org/pipermail/linux-mtd/2011-April/035221.html
> 
> Reported-by: Saxena, Parth <parth.saxena@ti.com>
> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> Cc: stable@kernel.org [2.6.36+]
> ---
>  drivers/mtd/nand/nand_base.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)

Any ack/nack/tested-by?
Saxena, Parth - April 29, 2011, 2:22 p.m.
> -----Original Message-----
> From: Artem Bityutskiy [mailto:dedekind1@gmail.com]
> Sent: Thursday, April 28, 2011 11:01 PM
> To: Saxena, Parth; Brian Norris
> Cc: linux-mtd@lists.infradead.org; Basheer, Mansoor Ahamed; linux-
> omap@vger.kernel.org
> Subject: Re: [RFC] mtd: nand: Fix bad block identification issue
> 
> On Wed, 2011-04-27 at 17:39 +0530, Saxena, Parth wrote:
> > This patch solves the above issue for omap by initialising
> > badblockbits. We are working further on this to find a generic fix
> > to the problem in nand_base.c.
> 
> But it looks like the generic solution is to return the line which was
> accidentally removed, how about this patch
> 
> From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> Date: Thu, 28 Apr 2011 20:26:59 +0300
> Subject: [PATCH] mtd: return badblockbits back
> 
> In commit c7b28e25cb9beb943aead770ff14551b55fa8c79 the initialization of
> the backblockbits was accidentally removed. This patch returns it back,
> because otherwise some NAND drivers are broken.
> 
> This problem was reported by "Saxena, Parth <parth.saxena@ti.com>" here:
> http://lists.infradead.org/pipermail/linux-mtd/2011-April/035221.html
> 
> Reported-by: Saxena, Parth <parth.saxena@ti.com>
> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> Cc: stable@kernel.org [2.6.36+]
> ---
>  drivers/mtd/nand/nand_base.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index 15510f2..5a7f817 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -3106,6 +3106,8 @@ ident_done:
>  		chip->chip_shift += 32 - 1;
>  	}
> 
> +	chip->badblockbits = 8;
> +
>  	/* Set the bad block position */
>  	if (mtd->writesize > 512 || (busw & NAND_BUSWIDTH_16))
>  		chip->badblockpos = NAND_LARGE_BADBLOCK_POS;
[Saxena, Parth] 

Tested-By: Saxena, Parth <parth.saxena@ti.com>
Acked By: Saxena, Parth <parth.saxena@ti.com>

> --
> 1.7.2.3
> 
> --
> Best Regards,
> Artem Bityutskiy (Артём Битюцкий)
Artem Bityutskiy - April 29, 2011, 5:44 p.m.
On Fri, 2011-04-29 at 19:52 +0530, Saxena, Parth wrote:
> 
> > -----Original Message-----
> > From: Artem Bityutskiy [mailto:dedekind1@gmail.com]
> > Sent: Thursday, April 28, 2011 11:01 PM
> > To: Saxena, Parth; Brian Norris
> > Cc: linux-mtd@lists.infradead.org; Basheer, Mansoor Ahamed; linux-
> > omap@vger.kernel.org
> > Subject: Re: [RFC] mtd: nand: Fix bad block identification issue
> > 
> > On Wed, 2011-04-27 at 17:39 +0530, Saxena, Parth wrote:
> > > This patch solves the above issue for omap by initialising
> > > badblockbits. We are working further on this to find a generic fix
> > > to the problem in nand_base.c.
> > 
> > But it looks like the generic solution is to return the line which was
> > accidentally removed, how about this patch
> > 
> > From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> > Date: Thu, 28 Apr 2011 20:26:59 +0300
> > Subject: [PATCH] mtd: return badblockbits back
> > 
> > In commit c7b28e25cb9beb943aead770ff14551b55fa8c79 the initialization of
> > the backblockbits was accidentally removed. This patch returns it back,
> > because otherwise some NAND drivers are broken.
> > 
> > This problem was reported by "Saxena, Parth <parth.saxena@ti.com>" here:
> > http://lists.infradead.org/pipermail/linux-mtd/2011-April/035221.html
> > 
> > Reported-by: Saxena, Parth <parth.saxena@ti.com>
> > Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> > Cc: stable@kernel.org [2.6.36+]
> > ---
> >  drivers/mtd/nand/nand_base.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> > index 15510f2..5a7f817 100644
> > --- a/drivers/mtd/nand/nand_base.c
> > +++ b/drivers/mtd/nand/nand_base.c
> > @@ -3106,6 +3106,8 @@ ident_done:
> >  		chip->chip_shift += 32 - 1;
> >  	}
> > 
> > +	chip->badblockbits = 8;
> > +
> >  	/* Set the bad block position */
> >  	if (mtd->writesize > 512 || (busw & NAND_BUSWIDTH_16))
> >  		chip->badblockpos = NAND_LARGE_BADBLOCK_POS;
> [Saxena, Parth] 
> 
> Tested-By: Saxena, Parth <parth.saxena@ti.com>
> Acked By: Saxena, Parth <parth.saxena@ti.com>

Thanks, pushing to the l2-mtd-2.6.git.
Brian Norris - April 29, 2011, 6:03 p.m.
On 4/29/2011 10:44 AM, Artem Bityutskiy wrote:
> On Fri, 2011-04-29 at 19:52 +0530, Saxena, Parth wrote:
>>
>>> -----Original Message-----
>>> From: Artem Bityutskiy [mailto:dedekind1@gmail.com]
>>> Sent: Thursday, April 28, 2011 11:01 PM
>>> To: Saxena, Parth; Brian Norris
>>> Cc: linux-mtd@lists.infradead.org; Basheer, Mansoor Ahamed; linux-
>>> omap@vger.kernel.org
>>> Subject: Re: [RFC] mtd: nand: Fix bad block identification issue
>>>
>>> On Wed, 2011-04-27 at 17:39 +0530, Saxena, Parth wrote:
>>>> This patch solves the above issue for omap by initialising
>>>> badblockbits. We are working further on this to find a generic fix
>>>> to the problem in nand_base.c.
>>>
>>> But it looks like the generic solution is to return the line which was
>>> accidentally removed, how about this patch
>>>
>>> From: Artem Bityutskiy<Artem.Bityutskiy@nokia.com>
>>> Date: Thu, 28 Apr 2011 20:26:59 +0300
>>> Subject: [PATCH] mtd: return badblockbits back
>>>
>>> In commit c7b28e25cb9beb943aead770ff14551b55fa8c79 the initialization of
>>> the backblockbits was accidentally removed. This patch returns it back,
>>> because otherwise some NAND drivers are broken.
>>>
>>> This problem was reported by "Saxena, Parth<parth.saxena@ti.com>" here:
>>> http://lists.infradead.org/pipermail/linux-mtd/2011-April/035221.html
>>>
>>> Reported-by: Saxena, Parth<parth.saxena@ti.com>
>>> Signed-off-by: Artem Bityutskiy<Artem.Bityutskiy@nokia.com>
>>> Cc: stable@kernel.org [2.6.36+]
>>> ---
>>>   drivers/mtd/nand/nand_base.c |    2 ++
>>>   1 files changed, 2 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
>>> index 15510f2..5a7f817 100644
>>> --- a/drivers/mtd/nand/nand_base.c
>>> +++ b/drivers/mtd/nand/nand_base.c
>>> @@ -3106,6 +3106,8 @@ ident_done:
>>>   		chip->chip_shift += 32 - 1;
>>>   	}
>>>
>>> +	chip->badblockbits = 8;
>>> +
>>>   	/* Set the bad block position */
>>>   	if (mtd->writesize>  512 || (busw&  NAND_BUSWIDTH_16))
>>>   		chip->badblockpos = NAND_LARGE_BADBLOCK_POS;
>> [Saxena, Parth]
>>
>> Tested-By: Saxena, Parth<parth.saxena@ti.com>
>> Acked By: Saxena, Parth<parth.saxena@ti.com>
>
> Thanks, pushing to the l2-mtd-2.6.git.
>

As promised (but too late?):

Acked-by: Brian Norris <computersforpeace@gmail.com>
Artem Bityutskiy - April 29, 2011, 6:05 p.m.
On Fri, 2011-04-29 at 11:03 -0700, Brian Norris wrote:
> As promised (but too late?):
> 
> Acked-by: Brian Norris <computersforpeace@gmail.com>

No, not late, I rebase my l2 tree with no shame :-) But once the patch
hits the real mtd tree, then we never change it. So, I've added you tag,
thanks.

Patch

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 15510f2..5a7f817 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -3106,6 +3106,8 @@  ident_done:
 		chip->chip_shift += 32 - 1;
 	}
 
+	chip->badblockbits = 8;
+
 	/* Set the bad block position */
 	if (mtd->writesize > 512 || (busw & NAND_BUSWIDTH_16))
 		chip->badblockpos = NAND_LARGE_BADBLOCK_POS;