Received: from milmhbs1.lsil.com (147.145.21.209) by coscas01.lsi.com
 (172.21.36.60) with Microsoft SMTP Server id 8.1.393.1; Sat, 20 Feb 2010
 04:32:26 -0700
Received: from mail1.lsil.com (mail1.lsil.com [147.145.40.21])	by
 milmhbs1.lsil.com (8.12.11/8.12.11) with ESMTP id o1KBWOgg032401	for
 <andy.sharp@lsi.com>; Sat, 20 Feb 2010 03:32:25 -0800
Received: from psmtp.com (na3sys009amx189.postini.com [74.125.149.170])	by
 mail1.lsil.com (8.12.11/8.12.11) with SMTP id o1KBWMex004812	for
 <andy.sharp@lsi.com>; Sat, 20 Feb 2010 03:32:23 -0800 (PST)
Received: from source ([78.24.191.182]) by na3sys009amx189.postini.com
 ([74.125.148.14]) with SMTP;	Sat, 20 Feb 2010 11:32:23 GMT
Received: from localhost.localdomain ([127.0.0.1]:44676 "EHLO
        eddie.linux-mips.org" rhost-flags-OK-OK-OK-FAIL)        by
 eddie.linux-mips.org with ESMTP id S1491922Ab0BTLcI (ORCPT
        <rfc822;andy.sharp@lsi.com>); Sat, 20 Feb 2010 12:32:08 +0100
Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 20 Feb 2010 12:31:50
 +0100 (CET)
Received: from localhost.localdomain ([127.0.0.1]:44672 "EHLO h5.dl5rb.org.uk"
        rhost-flags-OK-OK-OK-FAIL) by eddie.linux-mips.org with ESMTP
        id S1491850Ab0BTLbq (ORCPT <rfc822;linux-mips@linux-mips.org>);
        Sat, 20 Feb 2010 12:31:46 +0100
Received: from h5.dl5rb.org.uk (localhost.localdomain [127.0.0.1])        by
 h5.dl5rb.org.uk (8.14.3/8.14.3) with ESMTP id o1KBVcxr004265;        Sat, 20
 Feb 2010 12:31:40 +0100
Received: (from ralf@localhost)        by h5.dl5rb.org.uk
 (8.14.3/8.14.3/Submit) id o1KBVaUI004151;        Sat, 20 Feb 2010 12:31:36
 +0100
From: Ralf Baechle <ralf@linux-mips.org>
To: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>, Yoichi Yuasa
	<yuasa@linux-mips.org>, Bjorn Helgaas <bjorn.helgaas@hp.com>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Date: Sat, 20 Feb 2010 04:31:34 -0700
Subject: Reverting old hack
Thread-Topic: Reverting old hack
Thread-Index: AcqyIGDONB2yF5d3SPeLmHcQH+ocjA==
Message-ID: <20100220113134.GA27194@linux-mips.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-Exchange-Organization-AuthSource: coscas01.lsi.com
X-MS-Has-Attach:
X-Auto-Response-Suppress: All
X-MS-TNEF-Correlator:
x-scanned-by: MIMEDefang 2.39
errors-to: linux-mips-bounce@linux-mips.org
x-pstn-levels: (S:99.90000/99.90000 CV:99.9000 FC:95.5390 LC:95.5390
 R:95.9108 P:95.9108 M:97.0282 C:98.6951 )
x-pstn-settings: 3 (1.0000:1.0000) s cv gt3 gt2 gt1 r p m c 
x-pstn-addresses: from <ralf@linux-mips.org> [22/1] 
x-pstn-neptune: 0/0/0.00/0
user-agent: Mutt/1.5.20 (2009-08-17)
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

Below 9f7670e4ddd940d95e48997c2da51614e5fde2cf, an old hack which I
committed in December '07 I think mostly for Cobalt machines.  This is
now getting in the way - in fact the whole loop in
pcibios_fixup_device_resources() may have to go.  So I wonder if this
old hack is still necessary.  Only testing can answer so I'm going to
put a patch to revert this into the -queue tree for 2.6.34.

  Ralf

[MIPS] PCI: Make pcibios_fixup_device_resources ignore legacy resources.

There might be other reasons why a resource might be marked as fixed
such as a PCI UART holding the system console but until we use
IORESOURCE_PCI_FIXED that way also this will work.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index 589b745..6e6981f 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -242,6 +242,8 @@ static void pcibios_fixup_device_resources(struct pci_d=
ev *dev,
 	for (i =3D 0; i < PCI_NUM_RESOURCES; i++) {
 		if (!dev->resource[i].start)
 			continue;
+		if (dev->resource[i].flags & IORESOURCE_PCI_FIXED)
+			continue;
 		if (dev->resource[i].flags & IORESOURCE_IO)
 			offset =3D hose->io_offset;
 		else if (dev->resource[i].flags & IORESOURCE_MEM)

