* drivers/ide/ide.c question
@ 2004-12-16 6:38 vlobanov
2004-12-17 19:22 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 2+ messages in thread
From: vlobanov @ 2004-12-16 6:38 UTC (permalink / raw)
To: linux-ide
Hello,
I was reading through the ide_setup() function, specifically the portion
which scans through the "idex=" parameter options, and I have a
question. It might be silly (and if so, I apologize for the noise), but
I can't seem to grok it.
The comment pertaining to 'static const char *ide_words[] = { ... };'
states that indices -8, -9, and -10 are reserved, in order to ease the
hardcoding of the code that follows. However, as far as I can tell,
these indices are not used anywhere in a significant way --
In the check to ensure that the chipset is not redefined, only indices
(-11 ... -18) play any significant role. And in the big switch
statement, indices (-8 ... -10) are simply dropped into the bad_option
case.
So, what's so special about these indices? Is there any reason why -8
can't be used for other, possibly nefarious :), purposes?
The reason why I ask is that I want to try to fix bug 3907 in
bugzilla.kernel.org, and want to place the "nodma" option right next to
the "dma" option for clarity, but that would require replacing "minus8"
with "ata66" which the comment warns against ominously.
Thanks in advance,
Vadim Lobanov
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: drivers/ide/ide.c question
2004-12-16 6:38 drivers/ide/ide.c question vlobanov
@ 2004-12-17 19:22 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2004-12-17 19:22 UTC (permalink / raw)
To: vlobanov; +Cc: linux-ide
On Wed, 15 Dec 2004 22:38:25 -0800 (PST), vlobanov
<vlobanov@speakeasy.net> wrote:
> Hello,
>
> I was reading through the ide_setup() function, specifically the portion
> which scans through the "idex=" parameter options, and I have a
> question. It might be silly (and if so, I apologize for the noise), but
> I can't seem to grok it.
>
> The comment pertaining to 'static const char *ide_words[] = { ... };'
> states that indices -8, -9, and -10 are reserved, in order to ease the
> hardcoding of the code that follows. However, as far as I can tell,
> these indices are not used anywhere in a significant way --
>
> In the check to ensure that the chipset is not redefined, only indices
> (-11 ... -18) play any significant role. And in the big switch
> statement, indices (-8 ... -10) are simply dropped into the bad_option
> case.
>
> So, what's so special about these indices? Is there any reason why -8
> can't be used for other, possibly nefarious :), purposes?
The only special thing about hard-coded indexes is that if you have
something like this in the ide_words[] table:
"autotune", "noautotune", "minus8", "swapdata", "bswap",
and if i.e. you delete "minus8" from the table you have to
change numbers used by "swapdata", "bswap" etc. or instead
put NULL in place of "minus8".
> The reason why I ask is that I want to try to fix bug 3907 in
> bugzilla.kernel.org, and want to place the "nodma" option right next to
> the "dma" option for clarity, but that would require replacing "minus8"
> with "ata66" which the comment warns against ominously.
Is there a valid reason for adding a new parameter to the IDE core
which should belong to specific host drivers? This option won't work
with some of drivers without modificating them anyway.
Could you just fix documentation instead?
Thanks.
> Thanks in advance,
> Vadim Lobanov
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-12-17 19:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-16 6:38 drivers/ide/ide.c question vlobanov
2004-12-17 19:22 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).