diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c index 6274cd2..e1c863c 100644 --- a/arch/parisc/kernel/drivers.c +++ b/arch/parisc/kernel/drivers.c @@ -36,6 +36,7 @@ #include #include #include +#include /* for is_pdc_pat() */ #include /* See comments in include/asm-parisc/pci.h */ @@ -315,7 +316,23 @@ static void get_node_path(struct device *dev, struct hardware_path *path) while (dev != &root) { if (is_pci_dev(dev)) { unsigned int devfn = to_pci_dev(dev)->devfn; - path->bc[i--] = PCI_SLOT(devfn) | (PCI_FUNC(devfn)<< 5); + + if (is_pdc_pat()) { + /* This is broken. But A500 GET_INITIATOR call + * works with this for devices behind a + * PCI-PCI Bridge. *sigh* + */ + path->bc[i--] = PCI_SLOT(devfn); + path->bc[i--] = PCI_FUNC(devfn); + } else { + /* Workstations supported PCI-PCI bridges + * before servers did and forgot to include + * a seperate bc[] field for PCI Bridge + * Function. We kludged one into SLOT byte. + */ + path->bc[i--] = PCI_SLOT(devfn) + | (PCI_FUNC(devfn)<< 5); + } } else if (dev->bus == &parisc_bus_type) { path->bc[i--] = to_parisc_device(dev)->hw_path; }