From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: vlobanov <vlobanov@speakeasy.net>
Cc: linux-ide@vger.kernel.org
Subject: Re: drivers/ide/ide.c question
Date: Fri, 17 Dec 2004 20:22:35 +0100 [thread overview]
Message-ID: <58cb370e04121711226a83e7a2@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0412152228380.22022@shell3.speakeasy.net>
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
prev parent reply other threads:[~2004-12-17 19:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-16 6:38 drivers/ide/ide.c question vlobanov
2004-12-17 19:22 ` Bartlomiej Zolnierkiewicz [this message]
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=58cb370e04121711226a83e7a2@mail.gmail.com \
--to=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=vlobanov@speakeasy.net \
/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;
as well as URLs for NNTP newsgroup(s).