All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] omap : nand : fix subpage ecc issue with prefetch
@ 2011-05-02 11:10 ` Kishore Kadiyala
  0 siblings, 0 replies; 10+ messages in thread
From: Kishore Kadiyala @ 2011-05-02 11:10 UTC (permalink / raw)
  To: linux-omap, linux-mtd, vimal.newwork, bdefaria; +Cc: Kishore Kadiyala

For prefetch engine, read and write  got broken in commit '2c01946c'.
We never hit a scenario of not getting 'gpmc_prefetch_enable'
call success.
When reading/writing a subpage with a non divisible by 4 ecc number
of bytes, the mis-aligned bytes gets handled first before enabling
the Prefetch engine, then it reads/writes rest of the bytes.

Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Signed-off-by: Vimal Singh <vimal.newwork@gmail.com>
Reported-by: Bryan DE FARIA <bdefaria@adeneo-embedded.com>
---
 drivers/mtd/nand/omap2.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index da9a351..2c8040f 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -263,11 +263,10 @@ static void omap_read_buf_pref(struct mtd_info *mtd, u_char *buf, int len)
 	if (ret) {
 		/* PFPW engine is busy, use cpu copy method */
 		if (info->nand.options & NAND_BUSWIDTH_16)
-			omap_read_buf16(mtd, buf, len);
+			omap_read_buf16(mtd, (u_char *)p, len);
 		else
-			omap_read_buf8(mtd, buf, len);
+			omap_read_buf8(mtd, (u_char *)p, len);
 	} else {
-		p = (u32 *) buf;
 		do {
 			r_count = gpmc_read_status(GPMC_PREFETCH_FIFO_CNT);
 			r_count = r_count >> 2;
@@ -293,7 +292,7 @@ static void omap_write_buf_pref(struct mtd_info *mtd,
 						struct omap_nand_info, mtd);
 	uint32_t w_count = 0;
 	int i = 0, ret = 0;
-	u16 *p;
+	u16 *p = (u16 *)buf;
 	unsigned long tim, limit;
 
 	/* take care of subpage writes */
@@ -309,11 +308,10 @@ static void omap_write_buf_pref(struct mtd_info *mtd,
 	if (ret) {
 		/* PFPW engine is busy, use cpu copy method */
 		if (info->nand.options & NAND_BUSWIDTH_16)
-			omap_write_buf16(mtd, buf, len);
+			omap_write_buf16(mtd, (u_char *)p, len);
 		else
-			omap_write_buf8(mtd, buf, len);
+			omap_write_buf8(mtd, (u_char *)p, len);
 	} else {
-		p = (u16 *) buf;
 		while (len) {
 			w_count = gpmc_read_status(GPMC_PREFETCH_FIFO_CNT);
 			w_count = w_count >> 1;
-- 
1.7.4.1


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

* [PATCH] omap : nand : fix subpage ecc issue with prefetch
@ 2011-05-02 11:10 ` Kishore Kadiyala
  0 siblings, 0 replies; 10+ messages in thread
From: Kishore Kadiyala @ 2011-05-02 11:10 UTC (permalink / raw)
  To: linux-omap, linux-mtd, vimal.newwork, bdefaria; +Cc: Kishore Kadiyala

For prefetch engine, read and write  got broken in commit '2c01946c'.
We never hit a scenario of not getting 'gpmc_prefetch_enable'
call success.
When reading/writing a subpage with a non divisible by 4 ecc number
of bytes, the mis-aligned bytes gets handled first before enabling
the Prefetch engine, then it reads/writes rest of the bytes.

Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Signed-off-by: Vimal Singh <vimal.newwork@gmail.com>
Reported-by: Bryan DE FARIA <bdefaria@adeneo-embedded.com>
---
 drivers/mtd/nand/omap2.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index da9a351..2c8040f 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -263,11 +263,10 @@ static void omap_read_buf_pref(struct mtd_info *mtd, u_char *buf, int len)
 	if (ret) {
 		/* PFPW engine is busy, use cpu copy method */
 		if (info->nand.options & NAND_BUSWIDTH_16)
-			omap_read_buf16(mtd, buf, len);
+			omap_read_buf16(mtd, (u_char *)p, len);
 		else
-			omap_read_buf8(mtd, buf, len);
+			omap_read_buf8(mtd, (u_char *)p, len);
 	} else {
-		p = (u32 *) buf;
 		do {
 			r_count = gpmc_read_status(GPMC_PREFETCH_FIFO_CNT);
 			r_count = r_count >> 2;
@@ -293,7 +292,7 @@ static void omap_write_buf_pref(struct mtd_info *mtd,
 						struct omap_nand_info, mtd);
 	uint32_t w_count = 0;
 	int i = 0, ret = 0;
-	u16 *p;
+	u16 *p = (u16 *)buf;
 	unsigned long tim, limit;
 
 	/* take care of subpage writes */
@@ -309,11 +308,10 @@ static void omap_write_buf_pref(struct mtd_info *mtd,
 	if (ret) {
 		/* PFPW engine is busy, use cpu copy method */
 		if (info->nand.options & NAND_BUSWIDTH_16)
-			omap_write_buf16(mtd, buf, len);
+			omap_write_buf16(mtd, (u_char *)p, len);
 		else
-			omap_write_buf8(mtd, buf, len);
+			omap_write_buf8(mtd, (u_char *)p, len);
 	} else {
-		p = (u16 *) buf;
 		while (len) {
 			w_count = gpmc_read_status(GPMC_PREFETCH_FIFO_CNT);
 			w_count = w_count >> 1;
-- 
1.7.4.1

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

* Re: [PATCH] omap : nand : fix subpage ecc issue with prefetch
  2011-05-02 11:10 ` Kishore Kadiyala
@ 2011-05-05 14:20   ` Vimal Singh
  -1 siblings, 0 replies; 10+ messages in thread
From: Vimal Singh @ 2011-05-05 14:20 UTC (permalink / raw)
  To: Kishore Kadiyala; +Cc: linux-omap, linux-mtd, bdefaria

Hi Artem,

Can you please give a look on this patch?
This patch fixes is required for anyone who wants to use this driver
without using HW ECC.

-- Vimal

On Mon, May 2, 2011 at 4:40 PM, Kishore Kadiyala
<kishore.kadiyala@ti.com> wrote:
> For prefetch engine, read and write  got broken in commit '2c01946c'.
> We never hit a scenario of not getting 'gpmc_prefetch_enable'
> call success.
> When reading/writing a subpage with a non divisible by 4 ecc number
> of bytes, the mis-aligned bytes gets handled first before enabling
> the Prefetch engine, then it reads/writes rest of the bytes.
>
> Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
> Signed-off-by: Vimal Singh <vimal.newwork@gmail.com>
> Reported-by: Bryan DE FARIA <bdefaria@adeneo-embedded.com>
> ---
>  drivers/mtd/nand/omap2.c |   12 +++++-------
>  1 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
> index da9a351..2c8040f 100644
> --- a/drivers/mtd/nand/omap2.c
> +++ b/drivers/mtd/nand/omap2.c
> @@ -263,11 +263,10 @@ static void omap_read_buf_pref(struct mtd_info *mtd, u_char *buf, int len)
>        if (ret) {
>                /* PFPW engine is busy, use cpu copy method */
>                if (info->nand.options & NAND_BUSWIDTH_16)
> -                       omap_read_buf16(mtd, buf, len);
> +                       omap_read_buf16(mtd, (u_char *)p, len);
>                else
> -                       omap_read_buf8(mtd, buf, len);
> +                       omap_read_buf8(mtd, (u_char *)p, len);
>        } else {
> -               p = (u32 *) buf;
>                do {
>                        r_count = gpmc_read_status(GPMC_PREFETCH_FIFO_CNT);
>                        r_count = r_count >> 2;
> @@ -293,7 +292,7 @@ static void omap_write_buf_pref(struct mtd_info *mtd,
>                                                struct omap_nand_info, mtd);
>        uint32_t w_count = 0;
>        int i = 0, ret = 0;
> -       u16 *p;
> +       u16 *p = (u16 *)buf;
>        unsigned long tim, limit;
>
>        /* take care of subpage writes */
> @@ -309,11 +308,10 @@ static void omap_write_buf_pref(struct mtd_info *mtd,
>        if (ret) {
>                /* PFPW engine is busy, use cpu copy method */
>                if (info->nand.options & NAND_BUSWIDTH_16)
> -                       omap_write_buf16(mtd, buf, len);
> +                       omap_write_buf16(mtd, (u_char *)p, len);
>                else
> -                       omap_write_buf8(mtd, buf, len);
> +                       omap_write_buf8(mtd, (u_char *)p, len);
>        } else {
> -               p = (u16 *) buf;
>                while (len) {
>                        w_count = gpmc_read_status(GPMC_PREFETCH_FIFO_CNT);
>                        w_count = w_count >> 1;
> --
> 1.7.4.1
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] omap : nand : fix subpage ecc issue with prefetch
@ 2011-05-05 14:20   ` Vimal Singh
  0 siblings, 0 replies; 10+ messages in thread
From: Vimal Singh @ 2011-05-05 14:20 UTC (permalink / raw)
  To: Kishore Kadiyala; +Cc: bdefaria, linux-omap, linux-mtd

Hi Artem,

Can you please give a look on this patch?
This patch fixes is required for anyone who wants to use this driver
without using HW ECC.

-- Vimal

On Mon, May 2, 2011 at 4:40 PM, Kishore Kadiyala
<kishore.kadiyala@ti.com> wrote:
> For prefetch engine, read and write  got broken in commit '2c01946c'.
> We never hit a scenario of not getting 'gpmc_prefetch_enable'
> call success.
> When reading/writing a subpage with a non divisible by 4 ecc number
> of bytes, the mis-aligned bytes gets handled first before enabling
> the Prefetch engine, then it reads/writes rest of the bytes.
>
> Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
> Signed-off-by: Vimal Singh <vimal.newwork@gmail.com>
> Reported-by: Bryan DE FARIA <bdefaria@adeneo-embedded.com>
> ---
>  drivers/mtd/nand/omap2.c |   12 +++++-------
>  1 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
> index da9a351..2c8040f 100644
> --- a/drivers/mtd/nand/omap2.c
> +++ b/drivers/mtd/nand/omap2.c
> @@ -263,11 +263,10 @@ static void omap_read_buf_pref(struct mtd_info *mtd, u_char *buf, int len)
>        if (ret) {
>                /* PFPW engine is busy, use cpu copy method */
>                if (info->nand.options & NAND_BUSWIDTH_16)
> -                       omap_read_buf16(mtd, buf, len);
> +                       omap_read_buf16(mtd, (u_char *)p, len);
>                else
> -                       omap_read_buf8(mtd, buf, len);
> +                       omap_read_buf8(mtd, (u_char *)p, len);
>        } else {
> -               p = (u32 *) buf;
>                do {
>                        r_count = gpmc_read_status(GPMC_PREFETCH_FIFO_CNT);
>                        r_count = r_count >> 2;
> @@ -293,7 +292,7 @@ static void omap_write_buf_pref(struct mtd_info *mtd,
>                                                struct omap_nand_info, mtd);
>        uint32_t w_count = 0;
>        int i = 0, ret = 0;
> -       u16 *p;
> +       u16 *p = (u16 *)buf;
>        unsigned long tim, limit;
>
>        /* take care of subpage writes */
> @@ -309,11 +308,10 @@ static void omap_write_buf_pref(struct mtd_info *mtd,
>        if (ret) {
>                /* PFPW engine is busy, use cpu copy method */
>                if (info->nand.options & NAND_BUSWIDTH_16)
> -                       omap_write_buf16(mtd, buf, len);
> +                       omap_write_buf16(mtd, (u_char *)p, len);
>                else
> -                       omap_write_buf8(mtd, buf, len);
> +                       omap_write_buf8(mtd, (u_char *)p, len);
>        } else {
> -               p = (u16 *) buf;
>                while (len) {
>                        w_count = gpmc_read_status(GPMC_PREFETCH_FIFO_CNT);
>                        w_count = w_count >> 1;
> --
> 1.7.4.1
>
>

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

* Re: [PATCH] omap : nand : fix subpage ecc issue with prefetch
  2011-05-02 11:10 ` Kishore Kadiyala
@ 2011-05-05 18:48   ` Artem Bityutskiy
  -1 siblings, 0 replies; 10+ messages in thread
From: Artem Bityutskiy @ 2011-05-05 18:48 UTC (permalink / raw)
  To: Kishore Kadiyala; +Cc: linux-omap, linux-mtd, vimal.newwork, bdefaria

On Mon, 2011-05-02 at 16:40 +0530, Kishore Kadiyala wrote:
> For prefetch engine, read and write  got broken in commit '2c01946c'.
> We never hit a scenario of not getting 'gpmc_prefetch_enable'
> call success.
> When reading/writing a subpage with a non divisible by 4 ecc number
> of bytes, the mis-aligned bytes gets handled first before enabling
> the Prefetch engine, then it reads/writes rest of the bytes.
> 
> Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
> Signed-off-by: Vimal Singh <vimal.newwork@gmail.com>
> Reported-by: Bryan DE FARIA <bdefaria@adeneo-embedded.com>

This needs a better commit message with more explanation and analysis of
the problem and how it was fixed.This commit message is not very
understandable. And then it needs also:

Cc: stable@kernel.org [2.6.36+]

Right? And then we could send it upstream.

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

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] omap : nand : fix subpage ecc issue with prefetch
@ 2011-05-05 18:48   ` Artem Bityutskiy
  0 siblings, 0 replies; 10+ messages in thread
From: Artem Bityutskiy @ 2011-05-05 18:48 UTC (permalink / raw)
  To: Kishore Kadiyala; +Cc: bdefaria, vimal.newwork, linux-omap, linux-mtd

On Mon, 2011-05-02 at 16:40 +0530, Kishore Kadiyala wrote:
> For prefetch engine, read and write  got broken in commit '2c01946c'.
> We never hit a scenario of not getting 'gpmc_prefetch_enable'
> call success.
> When reading/writing a subpage with a non divisible by 4 ecc number
> of bytes, the mis-aligned bytes gets handled first before enabling
> the Prefetch engine, then it reads/writes rest of the bytes.
> 
> Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
> Signed-off-by: Vimal Singh <vimal.newwork@gmail.com>
> Reported-by: Bryan DE FARIA <bdefaria@adeneo-embedded.com>

This needs a better commit message with more explanation and analysis of
the problem and how it was fixed.This commit message is not very
understandable. And then it needs also:

Cc: stable@kernel.org [2.6.36+]

Right? And then we could send it upstream.

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

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

* Re: [PATCH] omap : nand : fix subpage ecc issue with prefetch
  2011-05-05 18:48   ` Artem Bityutskiy
@ 2011-05-06  7:30     ` Vimal Singh
  -1 siblings, 0 replies; 10+ messages in thread
From: Vimal Singh @ 2011-05-06  7:30 UTC (permalink / raw)
  To: dedekind1; +Cc: Kishore Kadiyala, linux-omap, linux-mtd, bdefaria

On Fri, May 6, 2011 at 12:18 AM, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> On Mon, 2011-05-02 at 16:40 +0530, Kishore Kadiyala wrote:
>> For prefetch engine, read and write  got broken in commit '2c01946c'.
>> We never hit a scenario of not getting 'gpmc_prefetch_enable'
>> call success.
>> When reading/writing a subpage with a non divisible by 4 ecc number
>> of bytes, the mis-aligned bytes gets handled first before enabling
>> the Prefetch engine, then it reads/writes rest of the bytes.
>>
>> Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
>> Signed-off-by: Vimal Singh <vimal.newwork@gmail.com>
>> Reported-by: Bryan DE FARIA <bdefaria@adeneo-embedded.com>
>
> This needs a better commit message with more explanation and analysis of
> the problem and how it was fixed.This commit message is not very
> understandable. And then it needs also:

How about a commit log like this:

When reading/writing a subpage (When HW ECC is not available/enable)
for number of bytes not aligned to 4, the mis-aligned bytes gets
handled first (by cpu copy mathod) before enabling the Prefetch
engin to/from 'p' (start of buffer 'buf').
Then it reads/writes rest of the bytes with the help of Prefetch
engine, if available, or again by cpu copy mathod. Currnetly,
reading/writing of rest of bytes, is not done correctly. Its trying to
read/write again to/from begining of buffer 'buf', overwriting the
mis-aligned bytes.

For prefetch engine read and write it got broken in commit '2c01946c'.
And we never hit the scenario of not getting 'gpmc_prefetch_enable'
call sucess. So, problem did not get caught up.

This patch fixes the issue.

> Cc: stable@kernel.org [2.6.36+]
>
> Right? And then we could send it upstream.

Yes, sure. I think kishore can take care of adding this in 'cc'
while posting next time.

-- 
Regards,
Vimal Singh
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] omap : nand : fix subpage ecc issue with prefetch
@ 2011-05-06  7:30     ` Vimal Singh
  0 siblings, 0 replies; 10+ messages in thread
From: Vimal Singh @ 2011-05-06  7:30 UTC (permalink / raw)
  To: dedekind1; +Cc: bdefaria, linux-mtd, linux-omap, Kishore Kadiyala

On Fri, May 6, 2011 at 12:18 AM, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> On Mon, 2011-05-02 at 16:40 +0530, Kishore Kadiyala wrote:
>> For prefetch engine, read and write  got broken in commit '2c01946c'.
>> We never hit a scenario of not getting 'gpmc_prefetch_enable'
>> call success.
>> When reading/writing a subpage with a non divisible by 4 ecc number
>> of bytes, the mis-aligned bytes gets handled first before enabling
>> the Prefetch engine, then it reads/writes rest of the bytes.
>>
>> Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
>> Signed-off-by: Vimal Singh <vimal.newwork@gmail.com>
>> Reported-by: Bryan DE FARIA <bdefaria@adeneo-embedded.com>
>
> This needs a better commit message with more explanation and analysis of
> the problem and how it was fixed.This commit message is not very
> understandable. And then it needs also:

How about a commit log like this:

When reading/writing a subpage (When HW ECC is not available/enable)
for number of bytes not aligned to 4, the mis-aligned bytes gets
handled first (by cpu copy mathod) before enabling the Prefetch
engin to/from 'p' (start of buffer 'buf').
Then it reads/writes rest of the bytes with the help of Prefetch
engine, if available, or again by cpu copy mathod. Currnetly,
reading/writing of rest of bytes, is not done correctly. Its trying to
read/write again to/from begining of buffer 'buf', overwriting the
mis-aligned bytes.

For prefetch engine read and write it got broken in commit '2c01946c'.
And we never hit the scenario of not getting 'gpmc_prefetch_enable'
call sucess. So, problem did not get caught up.

This patch fixes the issue.

> Cc: stable@kernel.org [2.6.36+]
>
> Right? And then we could send it upstream.

Yes, sure. I think kishore can take care of adding this in 'cc'
while posting next time.

-- 
Regards,
Vimal Singh

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

* Re: [PATCH] omap : nand : fix subpage ecc issue with prefetch
  2011-05-06  7:30     ` Vimal Singh
@ 2011-05-06 18:56       ` Artem Bityutskiy
  -1 siblings, 0 replies; 10+ messages in thread
From: Artem Bityutskiy @ 2011-05-06 18:56 UTC (permalink / raw)
  To: Vimal Singh; +Cc: Kishore Kadiyala, linux-omap, linux-mtd, bdefaria

On Fri, 2011-05-06 at 13:00 +0530, Vimal Singh wrote:
> On Fri, May 6, 2011 at 12:18 AM, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> > On Mon, 2011-05-02 at 16:40 +0530, Kishore Kadiyala wrote:
> >> For prefetch engine, read and write  got broken in commit '2c01946c'.
> >> We never hit a scenario of not getting 'gpmc_prefetch_enable'
> >> call success.
> >> When reading/writing a subpage with a non divisible by 4 ecc number
> >> of bytes, the mis-aligned bytes gets handled first before enabling
> >> the Prefetch engine, then it reads/writes rest of the bytes.
> >>
> >> Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
> >> Signed-off-by: Vimal Singh <vimal.newwork@gmail.com>
> >> Reported-by: Bryan DE FARIA <bdefaria@adeneo-embedded.com>
> >
> > This needs a better commit message with more explanation and analysis of
> > the problem and how it was fixed.This commit message is not very
> > understandable. And then it needs also:
> 
> How about a commit log like this:

Looks better, thanks. Waiting for the new patch.

> 
> When reading/writing a subpage (When HW ECC is not available/enable)
> for number of bytes not aligned to 4, the mis-aligned bytes gets
> handled first (by cpu copy mathod) before enabling the Prefetch
> engin to/from 'p' (start of buffer 'buf').
> Then it reads/writes rest of the bytes with the help of Prefetch
> engine, if available, or again by cpu copy mathod. Currnetly,
> reading/writing of rest of bytes, is not done correctly. Its trying to
> read/write again to/from begining of buffer 'buf', overwriting the
> mis-aligned bytes.
> 
> For prefetch engine read and write it got broken in commit '2c01946c'.
> And we never hit the scenario of not getting 'gpmc_prefetch_enable'
> call sucess. So, problem did not get caught up.
> 
> This patch fixes the issue.

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

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] omap : nand : fix subpage ecc issue with prefetch
@ 2011-05-06 18:56       ` Artem Bityutskiy
  0 siblings, 0 replies; 10+ messages in thread
From: Artem Bityutskiy @ 2011-05-06 18:56 UTC (permalink / raw)
  To: Vimal Singh; +Cc: bdefaria, linux-mtd, linux-omap, Kishore Kadiyala

On Fri, 2011-05-06 at 13:00 +0530, Vimal Singh wrote:
> On Fri, May 6, 2011 at 12:18 AM, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> > On Mon, 2011-05-02 at 16:40 +0530, Kishore Kadiyala wrote:
> >> For prefetch engine, read and write  got broken in commit '2c01946c'.
> >> We never hit a scenario of not getting 'gpmc_prefetch_enable'
> >> call success.
> >> When reading/writing a subpage with a non divisible by 4 ecc number
> >> of bytes, the mis-aligned bytes gets handled first before enabling
> >> the Prefetch engine, then it reads/writes rest of the bytes.
> >>
> >> Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
> >> Signed-off-by: Vimal Singh <vimal.newwork@gmail.com>
> >> Reported-by: Bryan DE FARIA <bdefaria@adeneo-embedded.com>
> >
> > This needs a better commit message with more explanation and analysis of
> > the problem and how it was fixed.This commit message is not very
> > understandable. And then it needs also:
> 
> How about a commit log like this:

Looks better, thanks. Waiting for the new patch.

> 
> When reading/writing a subpage (When HW ECC is not available/enable)
> for number of bytes not aligned to 4, the mis-aligned bytes gets
> handled first (by cpu copy mathod) before enabling the Prefetch
> engin to/from 'p' (start of buffer 'buf').
> Then it reads/writes rest of the bytes with the help of Prefetch
> engine, if available, or again by cpu copy mathod. Currnetly,
> reading/writing of rest of bytes, is not done correctly. Its trying to
> read/write again to/from begining of buffer 'buf', overwriting the
> mis-aligned bytes.
> 
> For prefetch engine read and write it got broken in commit '2c01946c'.
> And we never hit the scenario of not getting 'gpmc_prefetch_enable'
> call sucess. So, problem did not get caught up.
> 
> This patch fixes the issue.

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

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

end of thread, other threads:[~2011-05-06 18:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-02 11:10 [PATCH] omap : nand : fix subpage ecc issue with prefetch Kishore Kadiyala
2011-05-02 11:10 ` Kishore Kadiyala
2011-05-05 14:20 ` Vimal Singh
2011-05-05 14:20   ` Vimal Singh
2011-05-05 18:48 ` Artem Bityutskiy
2011-05-05 18:48   ` Artem Bityutskiy
2011-05-06  7:30   ` Vimal Singh
2011-05-06  7:30     ` Vimal Singh
2011-05-06 18:56     ` Artem Bityutskiy
2011-05-06 18:56       ` Artem Bityutskiy

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.