[PATCH 2/2] ppc64: Arch hook to determine config space size

From: brking
Date: Fri Jan 28 2005 - 10:02:01 EST



When working with a PCI-X Mode 2 adapter on a PCI-X Mode 1 PPC64
system, the current code used to determine the config space size
of a device results in a PCI Master abort and an EEH error, resulting
in the device being taken offline. This patch adds a ppc64
override to query OF to determine if the system and PHB support
PCI-X mode 2.

Signed-off-by: Brian King <brking@xxxxxxxxxx>
---

linux-2.6.11-rc2-bk5-bjking1/arch/ppc64/kernel/pSeries_pci.c | 18 +++++++++++
1 files changed, 18 insertions(+)

diff -puN arch/ppc64/kernel/pSeries_pci.c~ppc64_arch_cfg_space_size arch/ppc64/kernel/pSeries_pci.c
--- linux-2.6.11-rc2-bk5/arch/ppc64/kernel/pSeries_pci.c~ppc64_arch_cfg_space_size 2005-01-27 16:57:03.000000000 -0600
+++ linux-2.6.11-rc2-bk5-bjking1/arch/ppc64/kernel/pSeries_pci.c 2005-01-27 16:57:48.000000000 -0600
@@ -583,3 +583,21 @@ static void fixup_winbond_82c105(struct
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105,
fixup_winbond_82c105);
+
+int pcibios_exp_cfg_space(struct pci_dev *dev)
+{
+ int *type;
+ struct device_node *dn;
+ struct pci_controller *hose = pci_bus_to_host(dev->bus);
+
+ if (!hose)
+ return 0;
+
+ dn = (struct device_node *) hose->arch_data;
+ type = (int *)get_property(dn, "ibm,pci-config-space-type", NULL);
+
+ if (type && *type == 1)
+ return 1;
+
+ return 0;
+}
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/