public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* number mtd partitions on 16 limits?
@ 2006-11-13 10:06 hermes33
  2006-11-13 10:12 ` Artem Bityutskiy
  2006-11-13 10:25 ` Timo Lindhorst
  0 siblings, 2 replies; 7+ messages in thread
From: hermes33 @ 2006-11-13 10:06 UTC (permalink / raw)
  To: linux-mtd

Dear all,

I need more than 16 mtd partitions on a omap1610 (arm) with kernel 2.4.20. 
I create 16 partitions. All ok, 'cat /proc/mtd' show mtd0 to mtd15. 
I create 17 partitions. 'cat /proc/mtd' show only mtd0 to mtd15. 
It seems to give a limit with 16 partitions. 
Where can I change that? can someone help me?

Best regards

Robert










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

* Re: number mtd partitions on 16 limits?
  2006-11-13 10:06 number mtd partitions on 16 limits? hermes33
@ 2006-11-13 10:12 ` Artem Bityutskiy
  2006-11-13 10:30   ` Vitaly Wool
  2006-11-13 10:25 ` Timo Lindhorst
  1 sibling, 1 reply; 7+ messages in thread
From: Artem Bityutskiy @ 2006-11-13 10:12 UTC (permalink / raw)
  To: hermes33; +Cc: linux-mtd

Hi,

On Mon, 2006-11-13 at 11:06 +0100, hermes33@freenet.de wrote:
> I need more than 16 mtd partitions on a omap1610 (arm) with kernel 2.4.20. 
> I create 16 partitions. All ok, 'cat /proc/mtd' show mtd0 to mtd15. 
> I create 17 partitions. 'cat /proc/mtd' show only mtd0 to mtd15. 
> It seems to give a limit with 16 partitions. 
> Where can I change that? can someone help me?

This is because of
#define MAX_MTD_DEVICES 16
at include/linux/mtd/mtd.h. Increase this macro. I guess it is harmless
to make it 32, feel free to send a patch.

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

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

* Re: number mtd partitions on 16 limits?
  2006-11-13 10:06 number mtd partitions on 16 limits? hermes33
  2006-11-13 10:12 ` Artem Bityutskiy
@ 2006-11-13 10:25 ` Timo Lindhorst
  2006-11-13 11:46   ` Artem Bityutskiy
  1 sibling, 1 reply; 7+ messages in thread
From: Timo Lindhorst @ 2006-11-13 10:25 UTC (permalink / raw)
  To: hermes33; +Cc: linux-mtd

Hi Robert,

> I need more than 16 mtd partitions on a omap1610 (arm) with kernel 2.4.20. 
> I create 16 partitions. All ok, 'cat /proc/mtd' show mtd0 to mtd15. 
> I create 17 partitions. 'cat /proc/mtd' show only mtd0 to mtd15. 
> It seems to give a limit with 16 partitions. 
> Where can I change that? can someone help me?

I think this patch fixes that.

Kind regards,
Timo

Subject: [PATCH] set MAX_MTD_DEVICES to 64
From: Timo Lindhorst <lindhors@vnet.ibm.com>
Signed-off-by: Timo Lindhost <lindhors@vnet.ibm.com>
---
  include/linux/mtd/mtd.h |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

--- ubi-2.6.orig/include/linux/mtd/mtd.h
+++ ubi-2.6/include/linux/mtd/mtd.h
@@ -23,7 +23,7 @@

  #define MTD_CHAR_MAJOR 90
  #define MTD_BLOCK_MAJOR 31
-#define MAX_MTD_DEVICES 16
+#define MAX_MTD_DEVICES 64

  #define MTD_ERASE_PENDING              0x01
  #define MTD_ERASING            0x02

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

* Re: number mtd partitions on 16 limits?
  2006-11-13 10:12 ` Artem Bityutskiy
@ 2006-11-13 10:30   ` Vitaly Wool
  0 siblings, 0 replies; 7+ messages in thread
From: Vitaly Wool @ 2006-11-13 10:30 UTC (permalink / raw)
  To: dedekind; +Cc: hermes33, linux-mtd

Artem Bityutskiy wrote:
> Hi,
>
> On Mon, 2006-11-13 at 11:06 +0100, hermes33@freenet.de wrote:
>   
>> I need more than 16 mtd partitions on a omap1610 (arm) with kernel 2.4.20. 
>> I create 16 partitions. All ok, 'cat /proc/mtd' show mtd0 to mtd15. 
>> I create 17 partitions. 'cat /proc/mtd' show only mtd0 to mtd15. 
>> It seems to give a limit with 16 partitions. 
>> Where can I change that? can someone help me?
>>     
>
> This is because of
> #define MAX_MTD_DEVICES 16
> at include/linux/mtd/mtd.h. Increase this macro. I guess it is harmless
> to make it 32, feel free to send a patch.
>
>   
I would however like to add that if you have more than 16 partitions in 
your system, you're likely to have problems with your design and not 
with MTD.

Vitaly

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

* Re: number mtd partitions on 16 limits?
  2006-11-13 10:25 ` Timo Lindhorst
@ 2006-11-13 11:46   ` Artem Bityutskiy
  2006-11-13 16:17     ` Timo Lindhorst
  0 siblings, 1 reply; 7+ messages in thread
From: Artem Bityutskiy @ 2006-11-13 11:46 UTC (permalink / raw)
  To: Timo Lindhorst; +Cc: hermes33, linux-mtd

On Mon, 2006-11-13 at 11:25 +0100, Timo Lindhorst wrote:
> I think this patch fixes that.

patching file include/linux/mtd/mtd.h
Hunk #1 FAILED at 23.
1 out of 1 hunk FAILED -- saving rejects to file
include/linux/mtd/mtd.h.rej

:-)

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

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

* Re: number mtd partitions on 16 limits?
  2006-11-13 11:46   ` Artem Bityutskiy
@ 2006-11-13 16:17     ` Timo Lindhorst
  2006-11-13 18:25       ` Artem Bityutskiy
  0 siblings, 1 reply; 7+ messages in thread
From: Timo Lindhorst @ 2006-11-13 16:17 UTC (permalink / raw)
  To: dedekind; +Cc: linux-mtd

I'm sorry, I forgot to check my mail client first.
I have tested this one, so it should work.

Kind regards,
Timo

[PATCH] [MTD] increase MAX_MTD_DEVICES in mtd.h

Increas MAX_MTD_DEVICES from 16 to 64.

Signed-off-by: Timo Lindhost <lindhors@linux.vnet.ibm.com>
---
 include/linux/mtd/mtd.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- ubi-2.6.orig/include/linux/mtd/mtd.h
+++ ubi-2.6/include/linux/mtd/mtd.h
@@ -23,7 +23,7 @@
 
 #define MTD_CHAR_MAJOR 90
 #define MTD_BLOCK_MAJOR 31
-#define MAX_MTD_DEVICES 16
+#define MAX_MTD_DEVICES 64
 
 #define MTD_ERASE_PENDING      	0x01
 #define MTD_ERASING		0x02

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

* Re: number mtd partitions on 16 limits?
  2006-11-13 16:17     ` Timo Lindhorst
@ 2006-11-13 18:25       ` Artem Bityutskiy
  0 siblings, 0 replies; 7+ messages in thread
From: Artem Bityutskiy @ 2006-11-13 18:25 UTC (permalink / raw)
  To: Timo Lindhorst; +Cc: linux-mtd

On Mon, 2006-11-13 at 17:17 +0100, Timo Lindhorst wrote:
> I'm sorry, I forgot to check my mail client first.
> I have tested this one, so it should work.
> 

I made a patch already, sorry, I should probably have mailed to you. But
anyway, it is trivial. Thanks.

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

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

end of thread, other threads:[~2006-11-13 18:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-13 10:06 number mtd partitions on 16 limits? hermes33
2006-11-13 10:12 ` Artem Bityutskiy
2006-11-13 10:30   ` Vitaly Wool
2006-11-13 10:25 ` Timo Lindhorst
2006-11-13 11:46   ` Artem Bityutskiy
2006-11-13 16:17     ` Timo Lindhorst
2006-11-13 18:25       ` Artem Bityutskiy

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