* Re: Increasing IDE Channels
@ 2004-07-07 22:56 Kronos
2004-07-08 15:58 ` Timothy Miller
0 siblings, 1 reply; 7+ messages in thread
From: Kronos @ 2004-07-07 22:56 UTC (permalink / raw)
To: linux-kernel; +Cc: programming
John W. Ross <programming@johnwross.com> ha scritto:
> Greetings,
>
> I've spent several days working to increase the number of IDE channels above
> the 10 allowed in the kernel.
[cut]
> Changed ide.h:
>
> IDE_NR_PORTS (10)
> to
> IDE_NR_PORTS (12)
>
> In major.h I added:
>
> #define IDE10_MAJOR 240
> #define IDE11_MAJOR 241
>
> in ide.c I changed
>
> static const u8 ide_hwif_to_major[] = { IDE0_MAJOR, IDE1_MAJOR,
> IDE2_MAJOR, IDE3_MAJOR,
> IDE4_MAJOR, IDE5_MAJOR,
> IDE6_MAJOR, IDE7_MAJOR,
> IDE8_MAJOR, IDE9_MAJOR };
>
> to :
>
> static const u8 ide_hwif_to_major[] = { IDE0_MAJOR, IDE1_MAJOR,
> IDE2_MAJOR, IDE3_MAJOR,
> IDE4_MAJOR, IDE5_MAJOR,
> IDE6_MAJOR, IDE7_MAJOR,
> IDE8_MAJOR, IDE9_MAJOR,
> IDE10_MAJOR, IDE11_MAJOR)
>
> 1.) Could someone please explain why there is a limit of 10 interfaces (is
> this something that I shouldn't even try)?
Because hwifs are statically allocated, see drivers/ide/ide.c:
ide_hwif_t ide_hwifs[MAX_HWIFS]; /* master data repository */
Also if names are ide0..ide9, the following would be ide: and ide; (see
init_hwif_data in drivers/ide/ide.c).
> 2.)What did I miss on moving to 12?
You can try and set MAX_HWIFS to 12 too (see include/asm-i386/ide.h),
but you may find other problems.
I don't know ide layer very much, I'm sorry but I can't help you more.
Luca
--
Home: http://kronoz.cjb.net
Non capisco tutta questa eccitazione per il Multitasking:
io sono anni che leggo in bagno.
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Increasing IDE Channels
2004-07-07 22:56 Increasing IDE Channels Kronos
@ 2004-07-08 15:58 ` Timothy Miller
2004-07-08 18:26 ` Kronos
0 siblings, 1 reply; 7+ messages in thread
From: Timothy Miller @ 2004-07-08 15:58 UTC (permalink / raw)
To: kronos; +Cc: linux-kernel, programming
Kronos wrote:
> John W. Ross <programming@johnwross.com> ha scritto:
>
> Because hwifs are statically allocated, see drivers/ide/ide.c:
>
> ide_hwif_t ide_hwifs[MAX_HWIFS]; /* master data repository */
>
> Also if names are ide0..ide9, the following would be ide: and ide; (see
> init_hwif_data in drivers/ide/ide.c).
>
Why wouldn't they be ide10 and ide11?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Increasing IDE Channels
2004-07-08 15:58 ` Timothy Miller
@ 2004-07-08 18:26 ` Kronos
2004-07-08 19:03 ` Timothy Miller
0 siblings, 1 reply; 7+ messages in thread
From: Kronos @ 2004-07-08 18:26 UTC (permalink / raw)
To: Timothy Miller; +Cc: linux-kernel
Il Thu, Jul 08, 2004 at 11:58:18AM -0400, Timothy Miller ha scritto:
> >Because hwifs are statically allocated, see drivers/ide/ide.c:
> >
> >ide_hwif_t ide_hwifs[MAX_HWIFS]; /* master data repository */
> >
> >Also if names are ide0..ide9, the following would be ide: and ide; (see
> >init_hwif_data in drivers/ide/ide.c).
> >
>
> Why wouldn't they be ide10 and ide11?
No:
static void init_hwif_data(ide_hwif_t *hwif, unsigned int index)
{
...
hwif->name[0] = 'i';
hwif->name[1] = 'd';
hwif->name[2] = 'e';
hwif->name[3] = '0' + index;
'0' + 10 is ':' and '0' + 11 is ';'
Luca
--
Home: http://kronoz.cjb.net
Porc i' mond che cio' sott i piedi!
V. Catozzo
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Increasing IDE Channels
2004-07-08 18:26 ` Kronos
@ 2004-07-08 19:03 ` Timothy Miller
2004-07-08 19:28 ` Kronos
0 siblings, 1 reply; 7+ messages in thread
From: Timothy Miller @ 2004-07-08 19:03 UTC (permalink / raw)
To: kronos; +Cc: linux-kernel
Kronos wrote:
> Il Thu, Jul 08, 2004 at 11:58:18AM -0400, Timothy Miller ha scritto:
>
>>>Because hwifs are statically allocated, see drivers/ide/ide.c:
>>>
>>>ide_hwif_t ide_hwifs[MAX_HWIFS]; /* master data repository */
>>>
>>>Also if names are ide0..ide9, the following would be ide: and ide; (see
>>>init_hwif_data in drivers/ide/ide.c).
>>>
>>
>>Why wouldn't they be ide10 and ide11?
>
>
> No:
>
> static void init_hwif_data(ide_hwif_t *hwif, unsigned int index)
> {
> ...
> hwif->name[0] = 'i';
> hwif->name[1] = 'd';
> hwif->name[2] = 'e';
> hwif->name[3] = '0' + index;
>
> '0' + 10 is ':' and '0' + 11 is ';'
>
> Luca
I understand WHY it's ':' and ';'. I still think it's a bug. Solaris
rolls from 9 to 10, 11, etc.
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Increasing IDE Channels
2004-07-08 19:03 ` Timothy Miller
@ 2004-07-08 19:28 ` Kronos
0 siblings, 0 replies; 7+ messages in thread
From: Kronos @ 2004-07-08 19:28 UTC (permalink / raw)
To: Timothy Miller; +Cc: linux-kernel, B.Zolnierkiewicz
Il Thu, Jul 08, 2004 at 03:03:11PM -0400, Timothy Miller ha scritto:
> Kronos wrote:
> >Il Thu, Jul 08, 2004 at 11:58:18AM -0400, Timothy Miller ha scritto:
> >
> >>>Because hwifs are statically allocated, see drivers/ide/ide.c:
> >>>
> >>>ide_hwif_t ide_hwifs[MAX_HWIFS]; /* master data repository */
> >>>
> >>>Also if names are ide0..ide9, the following would be ide: and ide; (see
> >>>init_hwif_data in drivers/ide/ide.c).
> >>>
> >>
> >>Why wouldn't they be ide10 and ide11?
> >
> >
> >No:
> >
> >static void init_hwif_data(ide_hwif_t *hwif, unsigned int index)
> >{
> > ...
> > hwif->name[0] = 'i';
> > hwif->name[1] = 'd';
> > hwif->name[2] = 'e';
> > hwif->name[3] = '0' + index;
> >
> >'0' + 10 is ':' and '0' + 11 is ';'
> >
> >Luca
>
>
> I understand WHY it's ':' and ';'. I still think it's a bug. Solaris
> rolls from 9 to 10, 11, etc.
Ah, I didn't understand your question ;) Vanilla kernel only allows for
10 hwif, so this isn't a big issue. ->name is an array of 6 chars
though, so it possible to have ideXX without changing the struct.
Bartlomiej what about the following patch:
--- linux-2.6/drivers/ide/ide.c~ 2004-06-16 18:02:11.000000000 +0200
+++ linux-2.6/drivers/ide/ide.c 2004-07-08 21:24:58.000000000 +0200
@@ -216,7 +216,12 @@
hwif->name[0] = 'i';
hwif->name[1] = 'd';
hwif->name[2] = 'e';
- hwif->name[3] = '0' + index;
+ if (index < 10) {
+ hwif->name[3] = '0' + index;
+ } else {
+ hwif->name[3] = '0' + index / 10;
+ hwif->name[4] = '0' + index % 10;
+ }
hwif->bus_state = BUSSTATE_ON;
Luca
--
Home: http://kronoz.cjb.net
Recursion n.:
See Recursion.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Increasing IDE Channels
@ 2004-07-07 22:20 John W. Ross
2004-07-07 22:41 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 7+ messages in thread
From: John W. Ross @ 2004-07-07 22:20 UTC (permalink / raw)
To: linux-kernel
Greetings,
I've spent several days working to increase the number of IDE channels above
the 10 allowed in the kernel. Ideally I would like to raise the limit to
14. (to accomidate the 2 interfaces on the motherboard and 6 cheap dual
channel ide cards) Although I've found some references to others who would
like to do this, I can find noone who has actually both accomplished the
task and mentioned their success. I decided to start small and try to get
up to 12. To do this I:
Changed ide.h:
IDE_NR_PORTS (10)
to
IDE_NR_PORTS (12)
In major.h I added:
#define IDE10_MAJOR 240
#define IDE11_MAJOR 241
in ide.c I changed
static const u8 ide_hwif_to_major[] = { IDE0_MAJOR, IDE1_MAJOR,
IDE2_MAJOR, IDE3_MAJOR,
IDE4_MAJOR, IDE5_MAJOR,
IDE6_MAJOR, IDE7_MAJOR,
IDE8_MAJOR, IDE9_MAJOR };
to :
static const u8 ide_hwif_to_major[] = { IDE0_MAJOR, IDE1_MAJOR,
IDE2_MAJOR, IDE3_MAJOR,
IDE4_MAJOR, IDE5_MAJOR,
IDE6_MAJOR, IDE7_MAJOR,
IDE8_MAJOR, IDE9_MAJOR,
IDE10_MAJOR, IDE11_MAJOR)
This was on a clean 2.6.7 kernel download. I then ran menuconfig and the
only change I made was to select the processor as AMD Athlon. After
compiling I still get the "too many ide interfaces, no room in table".
I'm certianly no kernel hacker at heart, so I may be trying to do the
impossible/impractical.
1.) Could someone please explain why there is a limit of 10 interfaces (is
this something that I shouldn't even try)?
2.)What did I miss on moving to 12?
3.) I could understand a limit of 12, as hda, hdb, hdc... hdw, hdx, would
only allow a possible 13th interface, but at 14 you would totally exhaust
the alphabet, but is that still relevant with the newer method of
enumerating partitions?
4.) Is there a kernel patch available already that I'm ignorant of?
5.) Are there references that I should review elsewhere?
6.) I generally use Mandrake but if there is another distribution patched to
allow additional interfaces pray tell.
Thank you for you time reading this, and for any help you may be able to
provide.
John
To respond, just click reply. The spammers will get the address regardless
of anything I do to prevent it!
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Increasing IDE Channels
2004-07-07 22:20 John W. Ross
@ 2004-07-07 22:41 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 7+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2004-07-07 22:41 UTC (permalink / raw)
To: John W. Ross; +Cc: linux-kernel
[ next time please use/cc linux-ide ML ]
On Thursday 08 of July 2004 00:20, John W. Ross wrote:
> Greetings,
Hi,
> Changed ide.h:
>
> IDE_NR_PORTS (10)
> to
> IDE_NR_PORTS (12)
You've changed the wrong define. Bump MAX_HWIFS in <asm/ide.h> instead.
> 1.) Could someone please explain why there is a limit of 10 interfaces (is
> this something that I shouldn't even try)?
- there are no more major numbers assigned for IDE
- for majority people of people it is enough
- IDE driver uses static data structures so higher number of interfaces
means more memory wasted (if you don't use all of them of course)
- nobody cared
> 2.)What did I miss on moving to 12?
It should work with MAX_HWIFS corrected.
> 3.) I could understand a limit of 12, as hda, hdb, hdc... hdw, hdx, would
> only allow a possible 13th interface, but at 14 you would totally exhaust
> the alphabet, but is that still relevant with the newer method of
> enumerating partitions?
What newer method are you talking about?
Regards,
Bartlomiej
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-07-08 19:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-07 22:56 Increasing IDE Channels Kronos
2004-07-08 15:58 ` Timothy Miller
2004-07-08 18:26 ` Kronos
2004-07-08 19:03 ` Timothy Miller
2004-07-08 19:28 ` Kronos
-- strict thread matches above, loose matches on Subject: below --
2004-07-07 22:20 John W. Ross
2004-07-07 22:41 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox