public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MTD: pxa3xx_nand: Fix blank page ECC mismatch
@ 2011-06-03 13:03 Daniel Mack
  2011-06-03 15:04 ` Lei Wen
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Mack @ 2011-06-03 13:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arm-kernel, Daniel Mack, Lei Wen, Haojian Zhuang,
	David Woodhouse, stable

This bug was introduced in f8155a40 ("mtd: pxa3xx_nand: rework irq
logic") and causes the PXA3xx NAND controller fail to operate with NAND
flash that has empty pages. According to the comment in this block, the
hardware controller will report a double-bit error for empty pages,
which can and must be ignored.

This patch restores the original behaviour of the driver.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: David Woodhouse <David.Woodhouse@intel.com>
Cc: stable@kernel.org
---
 drivers/mtd/nand/pxa3xx_nand.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index 0c6ed72..60167d1 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -687,6 +687,8 @@ static int pxa3xx_nand_read_page_hwecc(struct mtd_info *mtd,
 		 * OOB, ignore such double bit errors
 		 */
 		if (is_buf_blank(buf, mtd->writesize))
+			info->retcode = ERR_NONE;
+		else
 			mtd->ecc_stats.failed++;
 	}
 
-- 
1.7.5.1


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

* Re: [PATCH] MTD: pxa3xx_nand: Fix blank page ECC mismatch
  2011-06-03 13:03 [PATCH] MTD: pxa3xx_nand: Fix blank page ECC mismatch Daniel Mack
@ 2011-06-03 15:04 ` Lei Wen
  2011-06-03 15:31   ` Lei Wen
  0 siblings, 1 reply; 4+ messages in thread
From: Lei Wen @ 2011-06-03 15:04 UTC (permalink / raw)
  To: Daniel Mack
  Cc: linux-kernel, David Woodhouse, Lei Wen, Haojian Zhuang, stable,
	linux-arm-kernel

On Fri, Jun 3, 2011 at 9:03 PM, Daniel Mack <zonque@gmail.com> wrote:
> This bug was introduced in f8155a40 ("mtd: pxa3xx_nand: rework irq
> logic") and causes the PXA3xx NAND controller fail to operate with NAND
> flash that has empty pages. According to the comment in this block, the
> hardware controller will report a double-bit error for empty pages,
> which can and must be ignored.
>
> This patch restores the original behaviour of the driver.
>
> Signed-off-by: Daniel Mack <zonque@gmail.com>
> Cc: Lei Wen <leiwen@marvell.com>
> Cc: Haojian Zhuang <haojian.zhuang@marvell.com>
> Cc: David Woodhouse <David.Woodhouse@intel.com>
> Cc: stable@kernel.org
> ---
>  drivers/mtd/nand/pxa3xx_nand.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
> index 0c6ed72..60167d1 100644
> --- a/drivers/mtd/nand/pxa3xx_nand.c
> +++ b/drivers/mtd/nand/pxa3xx_nand.c
> @@ -687,6 +687,8 @@ static int pxa3xx_nand_read_page_hwecc(struct mtd_info *mtd,
>                 * OOB, ignore such double bit errors
>                 */
>                if (is_buf_blank(buf, mtd->writesize))
> +                       info->retcode = ERR_NONE;
> +               else
>                        mtd->ecc_stats.failed++;
>        }
>
> --
> 1.7.5.1
>

Acked-by: Lei Wen <leiwen@marvell.com>

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

* Re: [PATCH] MTD: pxa3xx_nand: Fix blank page ECC mismatch
  2011-06-03 15:04 ` Lei Wen
@ 2011-06-03 15:31   ` Lei Wen
  2011-06-06 10:40     ` Artem Bityutskiy
  0 siblings, 1 reply; 4+ messages in thread
From: Lei Wen @ 2011-06-03 15:31 UTC (permalink / raw)
  To: Daniel Mack
  Cc: linux-kernel, David Woodhouse, Lei Wen, Haojian Zhuang, stable,
	linux-arm-kernel, linux-mtd

Also cc to MTD mailist
Cc: linux-mtd@lists.infradead.org

On Fri, Jun 3, 2011 at 11:04 PM, Lei Wen <adrian.wenl@gmail.com> wrote:
> On Fri, Jun 3, 2011 at 9:03 PM, Daniel Mack <zonque@gmail.com> wrote:
>> This bug was introduced in f8155a40 ("mtd: pxa3xx_nand: rework irq
>> logic") and causes the PXA3xx NAND controller fail to operate with NAND
>> flash that has empty pages. According to the comment in this block, the
>> hardware controller will report a double-bit error for empty pages,
>> which can and must be ignored.
>>
>> This patch restores the original behaviour of the driver.
>>
>> Signed-off-by: Daniel Mack <zonque@gmail.com>
>> Cc: Lei Wen <leiwen@marvell.com>
>> Cc: Haojian Zhuang <haojian.zhuang@marvell.com>
>> Cc: David Woodhouse <David.Woodhouse@intel.com>
>> Cc: stable@kernel.org
>> ---
>>  drivers/mtd/nand/pxa3xx_nand.c |    2 ++
>>  1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
>> index 0c6ed72..60167d1 100644
>> --- a/drivers/mtd/nand/pxa3xx_nand.c
>> +++ b/drivers/mtd/nand/pxa3xx_nand.c
>> @@ -687,6 +687,8 @@ static int pxa3xx_nand_read_page_hwecc(struct mtd_info *mtd,
>>                 * OOB, ignore such double bit errors
>>                 */
>>                if (is_buf_blank(buf, mtd->writesize))
>> +                       info->retcode = ERR_NONE;
>> +               else
>>                        mtd->ecc_stats.failed++;
>>        }
>>
>> --
>> 1.7.5.1
>>
>
> Acked-by: Lei Wen <leiwen@marvell.com>
>

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

* Re: [PATCH] MTD: pxa3xx_nand: Fix blank page ECC mismatch
  2011-06-03 15:31   ` Lei Wen
@ 2011-06-06 10:40     ` Artem Bityutskiy
  0 siblings, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2011-06-06 10:40 UTC (permalink / raw)
  To: Lei Wen
  Cc: Daniel Mack, David Woodhouse, Lei Wen, Haojian Zhuang,
	linux-kernel, linux-mtd, stable, linux-arm-kernel

On Fri, 2011-06-03 at 23:31 +0800, Lei Wen wrote:
> Also cc to MTD mailist
> Cc: linux-mtd@lists.infradead.org

Please, re-send non-quoted patch.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)


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

end of thread, other threads:[~2011-06-06 10:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-03 13:03 [PATCH] MTD: pxa3xx_nand: Fix blank page ECC mismatch Daniel Mack
2011-06-03 15:04 ` Lei Wen
2011-06-03 15:31   ` Lei Wen
2011-06-06 10:40     ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox