Messages in this thread Patch in this message | | | Date | Thu, 8 Jul 2004 21:28:45 +0200 | From | Kronos <> | Subject | Re: Increasing IDE Channels |
| |
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. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |