mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kronos <kronos@kronoz.cjb.net>
To: Timothy Miller <miller@techsource.com>
Cc: linux-kernel@vger.kernel.org, B.Zolnierkiewicz@elka.pw.edu.pl
Subject: Re: Increasing IDE Channels
Date: Thu, 8 Jul 2004 21:28:45 +0200	[thread overview]
Message-ID: <20040708192845.GA11493@dreamland.darkstar.lan> (raw)
In-Reply-To: <40ED9A6F.8020506@techsource.com>

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.

  reply	other threads:[~2004-07-08 19:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-07 22:56 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 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-07-07 22:20 John W. Ross
2004-07-07 22:41 ` Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040708192845.GA11493@dreamland.darkstar.lan \
    --to=kronos@kronoz.cjb.net \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miller@techsource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®