All of lore.kernel.org
 help / color / mirror / Atom feed
From: Coywolf Qi Hunt <coywolf@gmail.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Adam Sampson <azz@us-lot.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-ide@vger.kernel.org,
	Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Subject: Re: PATCH: (Discussion) Stop IDE legacy ISA probes on PCI systems
Date: Tue, 28 Dec 2004 11:58:01 +0800	[thread overview]
Message-ID: <2cd57c90041227195893509d3@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0412271629270.2353@ppc970.osdl.org>

This should solve the problem. 

              coywolf


--- linux-2.6.10/include/asm-i386/ide.h 2004-10-19 05:53:13.000000000 +0800
+++ linux-2.6.10-cy/include/asm-i386/ide.h      2004-12-28
11:45:38.000000000 +0800
@@ -44,13 +44,18 @@ static __inline__ unsigned long ide_defa
        switch (index) {
                case 0: return 0x1f0;
                case 1: return 0x170;
-               case 2: return 0x1e8;
-               case 3: return 0x168;
-               case 4: return 0x1e0;
-               case 5: return 0x160;
-               default:
-                       return 0;
        }
+
+       if (pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL) == NULL) {
+               switch (index) {
+                       case 2: return 0x1e8;
+                       case 3: return 0x168;
+                       case 4: return 0x1e0;
+                       case 5: return 0x160;
+               }
+       }
+
+       return 0;
 }

 #define IDE_ARCH_OBSOLETE_INIT


On Mon, 27 Dec 2004 16:29:52 -0800 (PST), Linus Torvalds
<torvalds@osdl.org> wrote:
> 
> 
> On Mon, 27 Dec 2004, Adam Sampson wrote:
> >
> > I don't think that code will have the intended effect, unless your
> > GCC has some funny ideas about switch statements...
> 
> Indeed. That if-statement is unreachable and has no effect.
> 
>                 Linus
> -

-- 
Coywolf Qi Hunt
Homepage http://sosdg.org/~coywolf/

      reply	other threads:[~2004-12-28  3:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-27 14:13 PATCH: (Discussion) Stop IDE legacy ISA probes on PCI systems Alan Cox
2004-12-27 21:15 ` Adam Sampson
2004-12-27 22:15   ` Valdis.Kletnieks
2004-12-28  0:29   ` Linus Torvalds
2004-12-28  3:58     ` Coywolf Qi Hunt [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=2cd57c90041227195893509d3@mail.gmail.com \
    --to=coywolf@gmail.com \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=azz@us-lot.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.