All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix mtdblock / mtdpart / mtdconcat
@ 2003-06-23  0:00 Russell King
  2003-06-23  7:19 ` David Woodhouse
  2003-06-25 12:43   ` David Woodhouse
  0 siblings, 2 replies; 13+ messages in thread
From: Russell King @ 2003-06-23  0:00 UTC (permalink / raw)
  To: Linux Kernel List, David Woodhouse

Dirtily disable ECC support; it doesn't work when mtdpart is layered
on top of mtdconcat on top of CFI flash.

There is probably a better fix, but that's for someone else to find.

--- orig/drivers/mtd/mtdpart.c	Sat Jun 14 22:33:58 2003
+++ linux/drivers/mtd/mtdpart.c	Mon Jun 23 00:55:04 2003
@@ -55,12 +55,12 @@
 		len = 0;
 	else if (from + len > mtd->size)
 		len = mtd->size - from;
-	if (part->master->read_ecc == NULL)	
+//	if (part->master->read_ecc == NULL)	
 		return part->master->read (part->master, from + part->offset, 
 					len, retlen, buf);
-	else
-		return part->master->read_ecc (part->master, from + part->offset, 
-					len, retlen, buf, NULL, &mtd->oobinfo);
+//	else
+//		return part->master->read_ecc (part->master, from + part->offset, 
+//					len, retlen, buf, NULL, &mtd->oobinfo);
 }
 
 static int part_point (struct mtd_info *mtd, loff_t from, size_t len, 
@@ -134,12 +134,12 @@
 		len = 0;
 	else if (to + len > mtd->size)
 		len = mtd->size - to;
-	if (part->master->write_ecc == NULL)	
+//	if (part->master->write_ecc == NULL)	
 		return part->master->write (part->master, to + part->offset, 
 					len, retlen, buf);
-	else
-		return part->master->write_ecc (part->master, to + part->offset, 
-					len, retlen, buf, NULL, &mtd->oobinfo);
+//	else
+//		return part->master->write_ecc (part->master, to + part->offset, 
+//					len, retlen, buf, NULL, &mtd->oobinfo);
 							
 }
 

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


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

* Re: [PATCH] Fix mtdblock / mtdpart / mtdconcat
  2003-06-23  0:00 [PATCH] Fix mtdblock / mtdpart / mtdconcat Russell King
@ 2003-06-23  7:19 ` David Woodhouse
  2003-06-23  7:22   ` Russell King
  2003-06-25 12:43   ` David Woodhouse
  1 sibling, 1 reply; 13+ messages in thread
From: David Woodhouse @ 2003-06-23  7:19 UTC (permalink / raw)
  To: Russell King; +Cc: Linux Kernel List, David Woodhouse

On Mon, 2003-06-23 at 01:00, Russell King wrote:
> Dirtily disable ECC support; it doesn't work when mtdpart is layered
> on top of mtdconcat on top of CFI flash.

Please define "doesn't work".

-- 
dwmw2

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

* Re: [PATCH] Fix mtdblock / mtdpart / mtdconcat
  2003-06-23  7:19 ` David Woodhouse
@ 2003-06-23  7:22   ` Russell King
  2003-06-23  7:32     ` David Woodhouse
  0 siblings, 1 reply; 13+ messages in thread
From: Russell King @ 2003-06-23  7:22 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Linux Kernel List, David Woodhouse

On Mon, Jun 23, 2003 at 08:19:09AM +0100, David Woodhouse wrote:
> On Mon, 2003-06-23 at 01:00, Russell King wrote:
> > Dirtily disable ECC support; it doesn't work when mtdpart is layered
> > on top of mtdconcat on top of CFI flash.
> 
> Please define "doesn't work".

Remember those errors I reported to you last night?  That "doesn't work".

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


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

* Re: [PATCH] Fix mtdblock / mtdpart / mtdconcat
  2003-06-23  7:22   ` Russell King
@ 2003-06-23  7:32     ` David Woodhouse
  2003-06-23  8:00       ` Russell King
  0 siblings, 1 reply; 13+ messages in thread
From: David Woodhouse @ 2003-06-23  7:32 UTC (permalink / raw)
  To: Russell King; +Cc: Linux Kernel List

On Mon, 2003-06-23 at 08:22, Russell King wrote:
> On Mon, Jun 23, 2003 at 08:19:09AM +0100, David Woodhouse wrote:
> > On Mon, 2003-06-23 at 01:00, Russell King wrote:
> > > Dirtily disable ECC support; it doesn't work when mtdpart is layered
> > > on top of mtdconcat on top of CFI flash.
> > 
> > Please define "doesn't work".
> 
> Remember those errors I reported to you last night?  That "doesn't work".

/me reads the scrollback.... oh, I see.

You'd do better to disable it in mtdconcat not mtdpart.

-- 
dwmw2

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

* Re: [PATCH] Fix mtdblock / mtdpart / mtdconcat
  2003-06-23  7:32     ` David Woodhouse
@ 2003-06-23  8:00       ` Russell King
  0 siblings, 0 replies; 13+ messages in thread
From: Russell King @ 2003-06-23  8:00 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Linux Kernel List

On Mon, Jun 23, 2003 at 08:32:41AM +0100, David Woodhouse wrote:
> On Mon, 2003-06-23 at 08:22, Russell King wrote:
> > On Mon, Jun 23, 2003 at 08:19:09AM +0100, David Woodhouse wrote:
> > > On Mon, 2003-06-23 at 01:00, Russell King wrote:
> > > > Dirtily disable ECC support; it doesn't work when mtdpart is layered
> > > > on top of mtdconcat on top of CFI flash.
> > > 
> > > Please define "doesn't work".
> > 
> > Remember those errors I reported to you last night?  That "doesn't work".
> 
> /me reads the scrollback.... oh, I see.
> 
> You'd do better to disable it in mtdconcat not mtdpart.

As I said in the original mail, its a quick and dirty hack.  I have
little interest in finding a better solution at present - I have more
pressing things that need my attention at present.

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


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

* Re: [PATCH] Fix mtdblock / mtdpart / mtdconcat
  2003-06-23  0:00 [PATCH] Fix mtdblock / mtdpart / mtdconcat Russell King
@ 2003-06-25 12:43   ` David Woodhouse
  2003-06-25 12:43   ` David Woodhouse
  1 sibling, 0 replies; 13+ messages in thread
From: David Woodhouse @ 2003-06-25 12:43 UTC (permalink / raw)
  To: Russell King; +Cc: linux-mtd, Linux Kernel List

On Mon, 2003-06-23 at 01:00, Russell King wrote:
> Dirtily disable ECC support; it doesn't work when mtdpart is layered
> on top of mtdconcat on top of CFI flash.
> 
> There is probably a better fix, but that's for someone else to find.

I had to run 'indent' on mtdconcat.c before I could stand to even look
for it, so I haven't attached the patch here -- but could you try v1.6
from CVS, which should refrain from pretending to have ecc/oob access
functions of none of the subdevices have them, and hence fix the problem
you observed.

-- 
dwmw2

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

* Re: [PATCH] Fix mtdblock / mtdpart / mtdconcat
@ 2003-06-25 12:43   ` David Woodhouse
  0 siblings, 0 replies; 13+ messages in thread
From: David Woodhouse @ 2003-06-25 12:43 UTC (permalink / raw)
  To: Russell King; +Cc: Linux Kernel List, linux-mtd

On Mon, 2003-06-23 at 01:00, Russell King wrote:
> Dirtily disable ECC support; it doesn't work when mtdpart is layered
> on top of mtdconcat on top of CFI flash.
> 
> There is probably a better fix, but that's for someone else to find.

I had to run 'indent' on mtdconcat.c before I could stand to even look
for it, so I haven't attached the patch here -- but could you try v1.6
from CVS, which should refrain from pretending to have ecc/oob access
functions of none of the subdevices have them, and hence fix the problem
you observed.

-- 
dwmw2

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

* Re: [PATCH] Fix mtdblock / mtdpart / mtdconcat
  2003-06-25 12:43   ` David Woodhouse
@ 2003-06-29 20:34     ` Russell King
  -1 siblings, 0 replies; 13+ messages in thread
From: Russell King @ 2003-06-29 20:34 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd, Linux Kernel List

On Wed, Jun 25, 2003 at 01:43:09PM +0100, David Woodhouse wrote:
> On Mon, 2003-06-23 at 01:00, Russell King wrote:
> > Dirtily disable ECC support; it doesn't work when mtdpart is layered
> > on top of mtdconcat on top of CFI flash.
> > 
> > There is probably a better fix, but that's for someone else to find.
> 
> I had to run 'indent' on mtdconcat.c before I could stand to even look
> for it, so I haven't attached the patch here -- but could you try v1.6
> from CVS, which should refrain from pretending to have ecc/oob access
> functions of none of the subdevices have them, and hence fix the problem
> you observed.

While looking over the changes between 1.5 and 1.6, I spotted this.  You
may want to fix this change:

-                   concat->mtd.eccsize != subdev[i]->eccsize) {
+                   concat->mtd.eccsize != subdev[i]->eccsize ||
+                   !concat->mtd.read_ecc != !concat->mtd.read_ecc ||
+                   !concat->mtd.write_ecc != !concat->mtd.write_ecc ||
+                   !concat->mtd.read_oob != !concat->mtd.read_oob ||
+                   !concat->mtd.write_oob != !concat->mtd.write_oob) {

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html

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

* Re: [PATCH] Fix mtdblock / mtdpart / mtdconcat
@ 2003-06-29 20:34     ` Russell King
  0 siblings, 0 replies; 13+ messages in thread
From: Russell King @ 2003-06-29 20:34 UTC (permalink / raw)
  To: David Woodhouse; +Cc: Linux Kernel List, linux-mtd

On Wed, Jun 25, 2003 at 01:43:09PM +0100, David Woodhouse wrote:
> On Mon, 2003-06-23 at 01:00, Russell King wrote:
> > Dirtily disable ECC support; it doesn't work when mtdpart is layered
> > on top of mtdconcat on top of CFI flash.
> > 
> > There is probably a better fix, but that's for someone else to find.
> 
> I had to run 'indent' on mtdconcat.c before I could stand to even look
> for it, so I haven't attached the patch here -- but could you try v1.6
> from CVS, which should refrain from pretending to have ecc/oob access
> functions of none of the subdevices have them, and hence fix the problem
> you observed.

While looking over the changes between 1.5 and 1.6, I spotted this.  You
may want to fix this change:

-                   concat->mtd.eccsize != subdev[i]->eccsize) {
+                   concat->mtd.eccsize != subdev[i]->eccsize ||
+                   !concat->mtd.read_ecc != !concat->mtd.read_ecc ||
+                   !concat->mtd.write_ecc != !concat->mtd.write_ecc ||
+                   !concat->mtd.read_oob != !concat->mtd.read_oob ||
+                   !concat->mtd.write_oob != !concat->mtd.write_oob) {

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


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

* Re: [PATCH] Fix mtdblock / mtdpart / mtdconcat
  2003-06-29 20:34     ` Russell King
@ 2003-06-29 21:27       ` David Woodhouse
  -1 siblings, 0 replies; 13+ messages in thread
From: David Woodhouse @ 2003-06-29 21:27 UTC (permalink / raw)
  To: Russell King; +Cc: linux-mtd, Linux Kernel List

On Sun, 2003-06-29 at 21:34, Russell King wrote:
> While looking over the changes between 1.5 and 1.6, I spotted this.  You
> may want to fix this change:
> 
> -                   concat->mtd.eccsize != subdev[i]->eccsize) {
> +                   concat->mtd.eccsize != subdev[i]->eccsize ||
> +                   !concat->mtd.read_ecc != !concat->mtd.read_ecc ||
> +                   !concat->mtd.write_ecc != !concat->mtd.write_ecc ||
> +                   !concat->mtd.read_oob != !concat->mtd.read_oob ||
> +                   !concat->mtd.write_oob != !concat->mtd.write_oob) {

Oops. Fixed in CVS.

-- 
dwmw2

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

* Re: [PATCH] Fix mtdblock / mtdpart / mtdconcat
@ 2003-06-29 21:27       ` David Woodhouse
  0 siblings, 0 replies; 13+ messages in thread
From: David Woodhouse @ 2003-06-29 21:27 UTC (permalink / raw)
  To: Russell King; +Cc: Linux Kernel List, linux-mtd

On Sun, 2003-06-29 at 21:34, Russell King wrote:
> While looking over the changes between 1.5 and 1.6, I spotted this.  You
> may want to fix this change:
> 
> -                   concat->mtd.eccsize != subdev[i]->eccsize) {
> +                   concat->mtd.eccsize != subdev[i]->eccsize ||
> +                   !concat->mtd.read_ecc != !concat->mtd.read_ecc ||
> +                   !concat->mtd.write_ecc != !concat->mtd.write_ecc ||
> +                   !concat->mtd.read_oob != !concat->mtd.read_oob ||
> +                   !concat->mtd.write_oob != !concat->mtd.write_oob) {

Oops. Fixed in CVS.

-- 
dwmw2


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

* Re: [PATCH] Fix mtdblock / mtdpart / mtdconcat
  2003-06-29 20:34     ` Russell King
@ 2003-06-30  6:08       ` David Woodhouse
  -1 siblings, 0 replies; 13+ messages in thread
From: David Woodhouse @ 2003-06-30  6:08 UTC (permalink / raw)
  To: Russell King; +Cc: linux-mtd, Linux Kernel List

On Sun, 2003-06-29 at 21:34, Russell King wrote:
> > could you try v1.6 from CVS, which should refrain from pretending to have
> > ecc/oob access functions of none of the subdevices have them, and hence 
> > fix the problem you observed.
> 
> While looking over the changes between 1.5 and 1.6, I spotted this.  You
> may want to fix this change:
> 
> -                   concat->mtd.eccsize != subdev[i]->eccsize) {
> +                   concat->mtd.eccsize != subdev[i]->eccsize ||
> +                   !concat->mtd.read_ecc != !concat->mtd.read_ecc ||
> +                   !concat->mtd.write_ecc != !concat->mtd.write_ecc ||
> +                   !concat->mtd.read_oob != !concat->mtd.read_oob ||
> +                   !concat->mtd.write_oob != !concat->mtd.write_oob) {

Hmmm. That'll optimise well :) 

But it shouldn't bite you -- aside from that does it actually fix the
problem you'd observed?

-- 
dwmw2

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

* Re: [PATCH] Fix mtdblock / mtdpart / mtdconcat
@ 2003-06-30  6:08       ` David Woodhouse
  0 siblings, 0 replies; 13+ messages in thread
From: David Woodhouse @ 2003-06-30  6:08 UTC (permalink / raw)
  To: Russell King; +Cc: linux-mtd, Linux Kernel List

On Sun, 2003-06-29 at 21:34, Russell King wrote:
> > could you try v1.6 from CVS, which should refrain from pretending to have
> > ecc/oob access functions of none of the subdevices have them, and hence 
> > fix the problem you observed.
> 
> While looking over the changes between 1.5 and 1.6, I spotted this.  You
> may want to fix this change:
> 
> -                   concat->mtd.eccsize != subdev[i]->eccsize) {
> +                   concat->mtd.eccsize != subdev[i]->eccsize ||
> +                   !concat->mtd.read_ecc != !concat->mtd.read_ecc ||
> +                   !concat->mtd.write_ecc != !concat->mtd.write_ecc ||
> +                   !concat->mtd.read_oob != !concat->mtd.read_oob ||
> +                   !concat->mtd.write_oob != !concat->mtd.write_oob) {

Hmmm. That'll optimise well :) 

But it shouldn't bite you -- aside from that does it actually fix the
problem you'd observed?

-- 
dwmw2



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

end of thread, other threads:[~2003-06-30  6:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-23  0:00 [PATCH] Fix mtdblock / mtdpart / mtdconcat Russell King
2003-06-23  7:19 ` David Woodhouse
2003-06-23  7:22   ` Russell King
2003-06-23  7:32     ` David Woodhouse
2003-06-23  8:00       ` Russell King
2003-06-25 12:43 ` David Woodhouse
2003-06-25 12:43   ` David Woodhouse
2003-06-29 20:34   ` Russell King
2003-06-29 20:34     ` Russell King
2003-06-29 21:27     ` David Woodhouse
2003-06-29 21:27       ` David Woodhouse
2003-06-30  6:08     ` David Woodhouse
2003-06-30  6:08       ` David Woodhouse

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.