From: Andi Kleen <ak@suse.de>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH] Add a global ide=off switch for drivers/ide
Date: Fri, 26 Oct 2007 01:22:02 +0200 [thread overview]
Message-ID: <200710260122.02663.ak@suse.de> (raw)
In-Reply-To: <200710252307.23323.bzolnier@gmail.com>
On Thursday 25 October 2007 23:07:23 Bartlomiej Zolnierkiewicz wrote:
> On Monday 15 October 2007, Andi Kleen wrote:
> >
> > Had a situation where drivers/ide was compiled in, but I wanted to turn
> > it off to let the drivers/ata drivers take over. I ended up using ide*=noprobe,
> > but that was somewhat clumpsy because I wasn't sure how many IDE interfaces
> > the machine really had.
> >
> > Add a global ide=off switch to handle this situation better.
>
> Overall looks OK but I think we should limit it to IDE built-in case
> (when IDE is modular it is all up to the user-space anyway).
Disagree. It's useful for the modular case too e.g. if you
have the ide modules in your initrd and you want to not load
them for some reason (e.g. debugging)
Besides adding so many ifdefs would be ugly in my opinion.
>
> > The patch is a little bigger because I tried to cover all modules.
>
> A few still needs to be covered:
> - drivers/scsi/ide-scsi.c (other directory)
> - drivers/ide/legacy/ide_platform.c (new driver)
> - drivers/ide/legacy/ide-cs.c (late_initcall)
> - drivers/ide/pci/sgiioc4.c (ditto, not a SFF-PCI driver)
Thanks I'll fix those.
> > I'm also not 100% sure ENODEV is the right error return for this
> > case, but I didn't come up with a better one.
>
> -EPERM? IMO it would be more appropriate (and easy to distinguish
> from the "real" -ENODEV).
Ok.
> > +int ide_off;
> > +EXPORT_SYMBOL(ide_off);
> > +
>
> _GPL?
>
> Please cover it with #ifdef/#endif CONFIG_BLK_DEV_IDE as it should be
> valid only when IDE is built-in.
>
> This way we don't pollute device/host drivers with CONFIG_BLK_DEV_IDE #ifdefs.
What CONFIG_BLK_DEV_IDE ifdefs? I added the check only to code that is already
conditional to this I believe and there were no additional ifdefs at all.
-Andi
next prev parent reply other threads:[~2007-10-25 23:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-15 10:43 [PATCH] Add a global ide=off switch for drivers/ide Andi Kleen
2007-10-25 21:07 ` Bartlomiej Zolnierkiewicz
2007-10-25 23:22 ` Andi Kleen [this message]
2007-10-26 0:05 ` 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=200710260122.02663.ak@suse.de \
--to=ak@suse.de \
--cc=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
/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).