aboutsummaryrefslogtreecommitdiffstats
path: root/pci
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-06-30 16:21:36 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-30 16:21:36 -0700
commitdc49a952fd6cbbdce6aacd9f1efb3ace6f64c4bc (patch)
tree1ce208bd0a9c4a02596da4b95b6272625dd669b7 /pci
parenta5363843f6fde193b61d6b06779229390eb4071c (diff)
downloadpatches-dc49a952fd6cbbdce6aacd9f1efb3ace6f64c4bc.tar.gz
loads of new patches
Diffstat (limited to 'pci')
-rw-r--r--pci/msi-blacklist-pci-e-chipsets-depending-on-hypertransport-msi-capabality.patch102
-rw-r--r--pci/msi-drop-pci_msi_quirk.patch63
-rw-r--r--pci/msi-factorize-common-msi-detection-code-from-pci_enable_msi-and-msix.patch98
-rw-r--r--pci/msi-merge-existing-msi-disabling-quirks.patch72
-rw-r--r--pci/msi-rename-pci_cap_id_ht_irqconf-into-pci_cap_id_ht.patch43
-rw-r--r--pci/msi-stop-inheriting-bus-flags-and-check-root-chipset-bus-flags-instead.patch70
-rw-r--r--pci/pci-poper-prototype-for-arch-i386-pci-pcbios.c-pcibios_sort.patch42
7 files changed, 490 insertions, 0 deletions
diff --git a/pci/msi-blacklist-pci-e-chipsets-depending-on-hypertransport-msi-capabality.patch b/pci/msi-blacklist-pci-e-chipsets-depending-on-hypertransport-msi-capabality.patch
new file mode 100644
index 0000000000000..f8779cfdfc0eb
--- /dev/null
+++ b/pci/msi-blacklist-pci-e-chipsets-depending-on-hypertransport-msi-capabality.patch
@@ -0,0 +1,102 @@
+From owner-linux-pci@atrey.karlin.mff.cuni.cz Thu Jun 22 06:56:20 2006
+Date: Thu, 22 Jun 2006 09:56:01 -0400
+From: Brice Goglin <brice@myri.com>
+To: linux-pci@atrey.karlin.mff.cuni.cz
+Cc: linux-kernel@vger.kernel.org, Dave Olson <olson@unixfolk.com>
+Subject: [PATCH 3/6 v4] MSI: Blacklist PCI-E chipsets depending on Hypertransport MSI capabality
+Message-ID: <20060622135601.GA2416@myri.com>
+Content-Disposition: inline
+
+Introduce msi_ht_cap_enabled() to check the MSI capability in the
+Hypertransport configuration space.
+It is used in a generic quirk quirk_msi_ht_cap() to check whether
+MSI is enabled on hypertransport chipset, and a nVidia specific quirk
+quirk_nvidia_ck804_msi_ht_cap() where two 2 HT MSI mappings have to
+be checked.
+Both quirks set the PCI_BUS_FLAGS_NO_MSI flags when MSI is disabled.
+
+Signed-off-by: Brice Goglin <brice@myri.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/pci/quirks.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++
+ include/linux/pci_ids.h | 1
+ 2 files changed, 59 insertions(+)
+
+--- gregkh-2.6.orig/drivers/pci/quirks.c
++++ gregkh-2.6/drivers/pci/quirks.c
+@@ -1519,6 +1519,64 @@ static void __devinit quirk_disable_msi(
+ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_disable_msi);
+ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCNB_LE,
+ quirk_disable_msi);
++
++/* Go through the list of Hypertransport capabilities and
++ * return 1 if a HT MSI capability is found and enabled */
++static pci_bus_flags_t __devinit msi_ht_cap_enabled(struct pci_dev *dev)
++{
++ u8 pos;
++ for (pos = pci_find_capability(dev, PCI_CAP_ID_HT);
++ pos;
++ pos = pci_find_next_capability(dev, pos, PCI_CAP_ID_HT)) {
++ u32 cap_hdr;
++ /* MSI mapping section according to Hypertransport spec */
++ if (pci_read_config_dword(dev, pos, &cap_hdr) == 0
++ && (cap_hdr & 0xf8000000) == 0xa8000000 /* MSI mapping */) {
++ printk(KERN_INFO "PCI: Found HT MSI mapping on %s with capability %s\n",
++ pci_name(dev), cap_hdr & 0x10000 ? "enabled" : "disabled");
++ return (cap_hdr & 0x10000) != 0; /* MSI mapping cap enabled */
++ }
++ }
++ return 0;
++}
++
++/* Check the hypertransport MSI mapping to know whether MSI is enabled or not */
++static void __devinit quirk_msi_ht_cap(struct pci_dev *dev)
++{
++ if (!dev->subordinate)
++ return;
++
++ if (!msi_ht_cap_enabled(dev)) {
++ printk(KERN_WARNING "PCI: MSI quirk detected. "
++ "PCI_BUS_FLAGS_NO_MSI set for %s subordinate bus.\n",
++ pci_name(dev));
++ dev->subordinate->bus_flags |= PCI_BUS_FLAGS_NO_MSI;
++ }
++}
++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE, quirk_msi_ht_cap);
++
++/* The nVidia CK804 chipset may have 2 HT MSI mappings.
++ * MSI are supported if the MSI capability set in any of these mappings.
++ */
++static void __devinit quirk_nvidia_ck804_msi_ht_cap(struct pci_dev *dev)
++{
++ struct pci_dev *pdev;
++
++ if (!dev->subordinate)
++ return;
++
++ /* check HT MSI cap on this chipset and the root one.
++ * a single one having MSI is enough to be sure that MSI are supported.
++ */
++ pdev = pci_find_slot(dev->bus->number, 0);
++ if (!msi_ht_cap_enabled(dev) && !msi_ht_cap_enabled(pdev)) {
++ printk(KERN_WARNING "PCI: MSI quirk detected. "
++ "PCI_BUS_FLAGS_NO_MSI set for %s subordinate bus.\n",
++ pci_name(dev));
++ dev->subordinate->bus_flags |= PCI_BUS_FLAGS_NO_MSI;
++ }
++}
++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE, quirk_nvidia_ck804_msi_ht_cap);
+ #endif /* CONFIG_PCI_MSI */
+
+ EXPORT_SYMBOL(pcie_mch_quirk);
+--- gregkh-2.6.orig/include/linux/pci_ids.h
++++ gregkh-2.6/include/linux/pci_ids.h
+@@ -1406,6 +1406,7 @@
+ #define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009
+ #define PCI_DEVICE_ID_SERVERWORKS_GCNB_LE 0x0017
+ #define PCI_DEVICE_ID_SERVERWORKS_EPB 0x0103
++#define PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE 0x0132
+ #define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200
+ #define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201
+ #define PCI_DEVICE_ID_SERVERWORKS_CSB6 0x0203
diff --git a/pci/msi-drop-pci_msi_quirk.patch b/pci/msi-drop-pci_msi_quirk.patch
new file mode 100644
index 0000000000000..6e982cf2bee80
--- /dev/null
+++ b/pci/msi-drop-pci_msi_quirk.patch
@@ -0,0 +1,63 @@
+From owner-linux-pci@atrey.karlin.mff.cuni.cz Tue Jun 20 19:33:34 2006
+Date: Tue, 20 Jun 2006 22:33:18 -0400
+From: Brice Goglin <brice@myri.com>
+To: linux-pci@atrey.karlin.mff.cuni.cz
+Cc: linux-kernel@vger.kernel.org
+Subject: [PATCH 6/6] MSI: Drop pci_msi_quirk
+Message-ID: <20060621023317.GF16292@myri.com>
+Content-Disposition: inline
+
+pci_msi_quirk is not used anymore and using bus_flags should be preferred.
+Drop pci_msi_quirk completely.
+
+Signed-off-by: Brice Goglin <brice@myri.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/pci/msi.c | 7 -------
+ drivers/pci/pci.h | 6 ------
+ drivers/pci/quirks.c | 2 --
+ 3 files changed, 15 deletions(-)
+
+--- gregkh-2.6.orig/drivers/pci/msi.c
++++ gregkh-2.6/drivers/pci/msi.c
+@@ -352,13 +352,6 @@ static int msi_init(void)
+ if (!status)
+ return status;
+
+- if (pci_msi_quirk) {
+- pci_msi_enable = 0;
+- printk(KERN_WARNING "PCI: MSI quirk detected. MSI disabled.\n");
+- status = -EINVAL;
+- return status;
+- }
+-
+ status = msi_arch_init();
+ if (status < 0) {
+ pci_msi_enable = 0;
+--- gregkh-2.6.orig/drivers/pci/pci.h
++++ gregkh-2.6/drivers/pci/pci.h
+@@ -42,12 +42,6 @@ extern void pci_remove_legacy_files(stru
+ /* Lock for read/write access to pci device and bus lists */
+ extern struct rw_semaphore pci_bus_sem;
+
+-#ifdef CONFIG_X86_IO_APIC
+-extern int pci_msi_quirk;
+-#else
+-#define pci_msi_quirk 0
+-#endif
+-
+ #ifdef CONFIG_PCI_MSI
+ void disable_msi_mode(struct pci_dev *dev, int pos, int type);
+ void pci_no_msi(void);
+--- gregkh-2.6.orig/drivers/pci/quirks.c
++++ gregkh-2.6/drivers/pci/quirks.c
+@@ -576,8 +576,6 @@ static void __init quirk_ioapic_rmw(stru
+ }
+ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_ANY_ID, quirk_ioapic_rmw );
+
+-int pci_msi_quirk;
+-
+ #define AMD8131_revA0 0x01
+ #define AMD8131_revB0 0x11
+ #define AMD8131_MISC 0x40
diff --git a/pci/msi-factorize-common-msi-detection-code-from-pci_enable_msi-and-msix.patch b/pci/msi-factorize-common-msi-detection-code-from-pci_enable_msi-and-msix.patch
new file mode 100644
index 0000000000000..60c7e79a63d53
--- /dev/null
+++ b/pci/msi-factorize-common-msi-detection-code-from-pci_enable_msi-and-msix.patch
@@ -0,0 +1,98 @@
+From owner-linux-pci@atrey.karlin.mff.cuni.cz Tue Jun 20 19:32:49 2006
+Date: Tue, 20 Jun 2006 22:32:40 -0400
+From: Brice Goglin <brice@myri.com>
+To: linux-pci@atrey.karlin.mff.cuni.cz
+Cc: linux-kernel@vger.kernel.org
+Subject: [PATCH 4/6] MSI: Factorize common MSI detection code from pci_enable_msi() and msix()
+Message-ID: <20060621023239.GD16292@myri.com>
+Content-Disposition: inline
+
+pci_enable_msi() and pci_enable_msix() have to check same things
+before enabling MSI. Factorize this code in pci_msi_supported().
+
+Signed-off-by: Brice Goglin <brice@myri.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ drivers/pci/msi.c | 46 ++++++++++++++++++++++++++--------------------
+ 1 file changed, 26 insertions(+), 20 deletions(-)
+
+--- gregkh-2.6.orig/drivers/pci/msi.c
++++ gregkh-2.6/drivers/pci/msi.c
+@@ -902,6 +902,28 @@ static int msix_capability_init(struct p
+ }
+
+ /**
++ * pci_msi_supported - check whether MSI may be enabled on device
++ * @dev: pointer to the pci_dev data structure of MSI device function
++ *
++ * Check parent busses for MSI flags, or disable except
++ * if forced.
++ **/
++static
++int pci_msi_supported(struct pci_dev * dev)
++{
++ struct pci_bus *bus;
++
++ if (!pci_msi_enable || !dev || dev->no_msi)
++ return -1;
++
++ for (bus = dev->bus; bus; bus = bus->parent)
++ if (bus->bus_flags & PCI_BUS_FLAGS_NO_MSI)
++ return -1;
++
++ return 0;
++}
++
++/**
+ * pci_enable_msi - configure device's MSI capability structure
+ * @dev: pointer to the pci_dev data structure of MSI device function
+ *
+@@ -913,19 +935,11 @@ static int msix_capability_init(struct p
+ **/
+ int pci_enable_msi(struct pci_dev* dev)
+ {
+- struct pci_bus *bus;
+- int pos, temp, status = -EINVAL;
++ int pos, temp, status;
+ u16 control;
+
+- if (!pci_msi_enable || !dev)
+- return status;
+-
+- if (dev->no_msi)
+- return status;
+-
+- for (bus = dev->bus; bus; bus = bus->parent)
+- if (bus->bus_flags & PCI_BUS_FLAGS_NO_MSI)
+- return -EINVAL;
++ if (pci_msi_supported(dev) < 0)
++ return -EINVAL;
+
+ temp = dev->irq;
+
+@@ -1135,22 +1149,14 @@ static int reroute_msix_table(int head,
+ **/
+ int pci_enable_msix(struct pci_dev* dev, struct msix_entry *entries, int nvec)
+ {
+- struct pci_bus *bus;
+ int status, pos, nr_entries, free_vectors;
+ int i, j, temp;
+ u16 control;
+ unsigned long flags;
+
+- if (!pci_msi_enable || !dev || !entries)
++ if (!entries || pci_msi_supported(dev) < 0)
+ return -EINVAL;
+
+- if (dev->no_msi)
+- return -EINVAL;
+-
+- for (bus = dev->bus; bus; bus = bus->parent)
+- if (bus->bus_flags & PCI_BUS_FLAGS_NO_MSI)
+- return -EINVAL;
+-
+ status = msi_init();
+ if (status < 0)
+ return status;
diff --git a/pci/msi-merge-existing-msi-disabling-quirks.patch b/pci/msi-merge-existing-msi-disabling-quirks.patch
new file mode 100644
index 0000000000000..0a7512b7e3278
--- /dev/null
+++ b/pci/msi-merge-existing-msi-disabling-quirks.patch
@@ -0,0 +1,72 @@
+From owner-linux-pci@atrey.karlin.mff.cuni.cz Tue Jun 20 19:31:56 2006
+Date: Tue, 20 Jun 2006 22:31:42 -0400
+From: Brice Goglin <brice@myri.com>
+To: linux-pci@atrey.karlin.mff.cuni.cz
+Cc: linux-kernel@vger.kernel.org
+Subject: [PATCH 1/6] MSI: Merge existing MSI disabling quirks
+Message-ID: <20060621023141.GA16292@myri.com>
+Content-Disposition: inline
+
+Merge existing MSI disabling quirks into a generic one that we will
+use to blacklist all MSI-broken chipsets.
+By the way, print the bus id of the device.
+
+Signed-off-by: Brice Goglin <brice@myri.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/pci/quirks.c | 29 ++++++++++++++++-------------
+ 1 file changed, 16 insertions(+), 13 deletions(-)
+
+--- gregkh-2.6.orig/drivers/pci/quirks.c
++++ gregkh-2.6/drivers/pci/quirks.c
+@@ -586,12 +586,6 @@ static void __init quirk_amd_8131_ioapic
+ {
+ unsigned char revid, tmp;
+
+- if (dev->subordinate) {
+- printk(KERN_WARNING "PCI: MSI quirk detected. "
+- "PCI_BUS_FLAGS_NO_MSI set for subordinate bus.\n");
+- dev->subordinate->bus_flags |= PCI_BUS_FLAGS_NO_MSI;
+- }
+-
+ if (nr_ioapics == 0)
+ return;
+
+@@ -604,13 +598,6 @@ static void __init quirk_amd_8131_ioapic
+ }
+ }
+ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_amd_8131_ioapic);
+-
+-static void __init quirk_svw_msi(struct pci_dev *dev)
+-{
+- pci_msi_quirk = 1;
+- printk(KERN_WARNING "PCI: MSI quirk detected. pci_msi_quirk set.\n");
+-}
+-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCNB_LE, quirk_svw_msi );
+ #endif /* CONFIG_X86_IO_APIC */
+
+
+@@ -1518,6 +1505,22 @@ static void __devinit quirk_nvidia_ck804
+ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE,
+ quirk_nvidia_ck804_pcie_aer_ext_cap);
+
++#ifdef CONFIG_PCI_MSI
++/* Disable MSI on chipsets that are known to not support it */
++static void __devinit quirk_disable_msi(struct pci_dev *dev)
++{
++ if (dev->subordinate) {
++ printk(KERN_WARNING "PCI: MSI quirk detected. "
++ "PCI_BUS_FLAGS_NO_MSI set for %s subordinate bus.\n",
++ pci_name(dev));
++ dev->subordinate->bus_flags |= PCI_BUS_FLAGS_NO_MSI;
++ }
++}
++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_disable_msi);
++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCNB_LE,
++ quirk_disable_msi);
++#endif /* CONFIG_PCI_MSI */
++
+ EXPORT_SYMBOL(pcie_mch_quirk);
+ #ifdef CONFIG_HOTPLUG
+ EXPORT_SYMBOL(pci_fixup_device);
diff --git a/pci/msi-rename-pci_cap_id_ht_irqconf-into-pci_cap_id_ht.patch b/pci/msi-rename-pci_cap_id_ht_irqconf-into-pci_cap_id_ht.patch
new file mode 100644
index 0000000000000..5aecf55611855
--- /dev/null
+++ b/pci/msi-rename-pci_cap_id_ht_irqconf-into-pci_cap_id_ht.patch
@@ -0,0 +1,43 @@
+From owner-linux-pci@atrey.karlin.mff.cuni.cz Tue Jun 20 19:32:13 2006
+Date: Tue, 20 Jun 2006 22:32:02 -0400
+From: Brice Goglin <brice@myri.com>
+To: linux-pci@atrey.karlin.mff.cuni.cz
+Cc: linux-kernel@vger.kernel.org
+Subject: [PATCH 2/6] MSI: Rename PCI_CAP_ID_HT_IRQCONF into PCI_CAP_ID_HT
+Message-ID: <20060621023201.GB16292@myri.com>
+Content-Disposition: inline
+
+0x08 is the HT capability, while PCI_CAP_ID_HT_IRQCONF would be
+the subtype 0x80 that mpic_scan_ht_pic() uses.
+Rename PCI_CAP_ID_HT_IRQCONF into PCI_CAP_ID_HT.
+
+Signed-off-by: Brice Goglin <brice@myri.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/powerpc/sysdev/mpic.c | 2 +-
+ include/linux/pci_regs.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- gregkh-2.6.orig/arch/powerpc/sysdev/mpic.c
++++ gregkh-2.6/arch/powerpc/sysdev/mpic.c
+@@ -250,7 +250,7 @@ static void __init mpic_scan_ht_pic(stru
+ for (pos = readb(devbase + PCI_CAPABILITY_LIST); pos != 0;
+ pos = readb(devbase + pos + PCI_CAP_LIST_NEXT)) {
+ u8 id = readb(devbase + pos + PCI_CAP_LIST_ID);
+- if (id == PCI_CAP_ID_HT_IRQCONF) {
++ if (id == PCI_CAP_ID_HT) {
+ id = readb(devbase + pos + 3);
+ if (id == 0x80)
+ break;
+--- gregkh-2.6.orig/include/linux/pci_regs.h
++++ gregkh-2.6/include/linux/pci_regs.h
+@@ -196,7 +196,7 @@
+ #define PCI_CAP_ID_MSI 0x05 /* Message Signalled Interrupts */
+ #define PCI_CAP_ID_CHSWP 0x06 /* CompactPCI HotSwap */
+ #define PCI_CAP_ID_PCIX 0x07 /* PCI-X */
+-#define PCI_CAP_ID_HT_IRQCONF 0x08 /* HyperTransport IRQ Configuration */
++#define PCI_CAP_ID_HT 0x08 /* HyperTransport */
+ #define PCI_CAP_ID_VNDR 0x09 /* Vendor specific capability */
+ #define PCI_CAP_ID_SHPC 0x0C /* PCI Standard Hot-Plug Controller */
+ #define PCI_CAP_ID_EXP 0x10 /* PCI Express */
diff --git a/pci/msi-stop-inheriting-bus-flags-and-check-root-chipset-bus-flags-instead.patch b/pci/msi-stop-inheriting-bus-flags-and-check-root-chipset-bus-flags-instead.patch
new file mode 100644
index 0000000000000..1af95eb459797
--- /dev/null
+++ b/pci/msi-stop-inheriting-bus-flags-and-check-root-chipset-bus-flags-instead.patch
@@ -0,0 +1,70 @@
+From owner-linux-pci@atrey.karlin.mff.cuni.cz Tue Jun 20 19:33:00 2006
+Date: Tue, 20 Jun 2006 22:32:54 -0400
+From: Brice Goglin <brice@myri.com>
+To: linux-pci@atrey.karlin.mff.cuni.cz
+Cc: linux-kernel@vger.kernel.org
+Subject: [PATCH 5/6] MSI: Stop inheriting bus flags and check root chipset bus flags instead
+Message-ID: <20060621023253.GE16292@myri.com>
+Content-Disposition: inline
+
+Inheriting bus flags requires to set them during the PCI hierarchy is
+scanned, with EARLY or HEADER quirks. But the subordinate bus has not
+been set at this point, so the bus flags cannot be set.
+
+Signed-off-by: Brice Goglin <brice@myri.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/pci/msi.c | 13 +++++++++----
+ drivers/pci/probe.c | 2 +-
+ include/linux/pci.h | 2 +-
+ 3 files changed, 11 insertions(+), 6 deletions(-)
+
+--- gregkh-2.6.orig/drivers/pci/msi.c
++++ gregkh-2.6/drivers/pci/msi.c
+@@ -911,14 +911,19 @@ static int msix_capability_init(struct p
+ static
+ int pci_msi_supported(struct pci_dev * dev)
+ {
+- struct pci_bus *bus;
++ struct pci_dev *pdev;
+
+ if (!pci_msi_enable || !dev || dev->no_msi)
+ return -1;
+
+- for (bus = dev->bus; bus; bus = bus->parent)
+- if (bus->bus_flags & PCI_BUS_FLAGS_NO_MSI)
+- return -1;
++ /* find root complex for our device */
++ pdev = dev;
++ while (pdev->bus && pdev->bus->self)
++ pdev = pdev->bus->self;
++
++ /* check its bus flags */
++ if (pdev->subordinate->bus_flags & PCI_BUS_FLAGS_NO_MSI)
++ return -1;
+
+ return 0;
+ }
+--- gregkh-2.6.orig/drivers/pci/probe.c
++++ gregkh-2.6/drivers/pci/probe.c
+@@ -351,7 +351,7 @@ pci_alloc_child_bus(struct pci_bus *pare
+ child->parent = parent;
+ child->ops = parent->ops;
+ child->sysdata = parent->sysdata;
+- child->bus_flags = parent->bus_flags;
++ child->bus_flags = 0;
+ child->bridge = get_device(&bridge->dev);
+
+ child->class_dev.class = &pcibus_class;
+--- gregkh-2.6.orig/include/linux/pci.h
++++ gregkh-2.6/include/linux/pci.h
+@@ -241,7 +241,7 @@ struct pci_bus {
+ char name[48];
+
+ unsigned short bridge_ctl; /* manage NO_ISA/FBB/et al behaviors */
+- pci_bus_flags_t bus_flags; /* Inherited by child busses */
++ pci_bus_flags_t bus_flags;
+ struct device *bridge;
+ struct class_device class_dev;
+ struct bin_attribute *legacy_io; /* legacy I/O for this bus */
diff --git a/pci/pci-poper-prototype-for-arch-i386-pci-pcbios.c-pcibios_sort.patch b/pci/pci-poper-prototype-for-arch-i386-pci-pcbios.c-pcibios_sort.patch
new file mode 100644
index 0000000000000..c6d99e27edd6a
--- /dev/null
+++ b/pci/pci-poper-prototype-for-arch-i386-pci-pcbios.c-pcibios_sort.patch
@@ -0,0 +1,42 @@
+From bunk@stusta.de Wed Jun 28 09:54:50 2006
+Date: Wed, 28 Jun 2006 18:54:33 +0200
+From: Adrian Bunk <bunk@stusta.de>
+To: gregkh@suse.de
+Cc: linux-kernel@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz
+Subject: PCI: poper prototype for arch/i386/pci/pcbios.c:pcibios_sort()
+Message-ID: <20060628165433.GN13915@stusta.de>
+Content-Disposition: inline
+
+This patch adds a proper prototype for pcibios_sort() in
+arch/i386/pci/pci.h.
+
+Signed-off-by: Adrian Bunk <bunk@stusta.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ arch/i386/pci/common.c | 4 ----
+ arch/i386/pci/pci.h | 2 +-
+ 2 files changed, 1 insertion(+), 5 deletions(-)
+
+--- gregkh-2.6.orig/arch/i386/pci/common.c
++++ gregkh-2.6/arch/i386/pci/common.c
+@@ -17,10 +17,6 @@
+
+ #include "pci.h"
+
+-#ifdef CONFIG_PCI_BIOS
+-extern void pcibios_sort(void);
+-#endif
+-
+ unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 |
+ PCI_PROBE_MMCONF;
+
+--- gregkh-2.6.orig/arch/i386/pci/pci.h
++++ gregkh-2.6/arch/i386/pci/pci.h
+@@ -84,4 +84,4 @@ extern int pci_conf1_read(unsigned int s
+ extern void pci_direct_init(void);
+ extern void pci_pcbios_init(void);
+ extern void pci_mmcfg_init(void);
+-
++extern void pcibios_sort(void);