aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc
diff options
context:
space:
mode:
authorGrant Grundler <grundler@parisc-linux.org>2009-01-29 00:30:55 -0500
committerKyle McMartin <kyle@treachery.i.cabal.ca>2009-03-13 01:19:12 -0400
commit9785d646c10b0707412516ffe56b71b9eb18861f (patch)
tree1886076d2eff28dd97fa03a4df3d1a3ae76f43a6 /drivers/parisc
parentc1da90fd099531e9449019dc53a5a02a5eaef2b4 (diff)
parisc: fix wrong assumption about bus->self
Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> posted a patch series to linux-pci to fix a wrong assumption about pci_bus->self==NULL for all PCI host bus controllers. While PARISC platforms to not behave this way, I prefer to have the code consistent across architectures. The following patch replaces pci_bus->self with pci_bus->parent when used as a test to check for "root bus controller". Signed-off-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Diffstat (limited to 'drivers/parisc')
-rw-r--r--drivers/parisc/dino.c2
-rw-r--r--drivers/parisc/iosapic.c9
-rw-r--r--drivers/parisc/lba_pci.c4
3 files changed, 7 insertions, 8 deletions
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c
index d539d9df88e7..f79266cd00e5 100644
--- a/drivers/parisc/dino.c
+++ b/drivers/parisc/dino.c
@@ -587,7 +587,7 @@ dino_fixup_bus(struct pci_bus *bus)
587 bus->resource[i+1] = &res[i]; 587 bus->resource[i+1] = &res[i];
588 } 588 }
589 589
590 } else if(bus->self) { 590 } else if (bus->parent) {
591 int i; 591 int i;
592 592
593 pci_read_bridge_bases(bus); 593 pci_read_bridge_bases(bus);
diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c
index 0797659ee016..1cdfdea5d7ef 100644
--- a/drivers/parisc/iosapic.c
+++ b/drivers/parisc/iosapic.c
@@ -487,7 +487,7 @@ iosapic_xlate_pin(struct iosapic_info *isi, struct pci_dev *pcidev)
487 } 487 }
488 488
489 /* Check if pcidev behind a PPB */ 489 /* Check if pcidev behind a PPB */
490 if (NULL != pcidev->bus->self) { 490 if (pcidev->bus->parent) {
491 /* Convert pcidev INTR_PIN into something we 491 /* Convert pcidev INTR_PIN into something we
492 ** can lookup in the IRT. 492 ** can lookup in the IRT.
493 */ 493 */
@@ -523,10 +523,9 @@ iosapic_xlate_pin(struct iosapic_info *isi, struct pci_dev *pcidev)
523#endif /* PCI_BRIDGE_FUNCS */ 523#endif /* PCI_BRIDGE_FUNCS */
524 524
525 /* 525 /*
526 ** Locate the host slot the PPB nearest the Host bus 526 * Locate the host slot of the PPB.
527 ** adapter. 527 */
528 */ 528 while (p->parent->parent)
529 while (NULL != p->parent->self)
530 p = p->parent; 529 p = p->parent;
531 530
532 intr_slot = PCI_SLOT(p->self->devfn); 531 intr_slot = PCI_SLOT(p->self->devfn);
diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c
index d8233de8c75d..59fbbf128365 100644
--- a/drivers/parisc/lba_pci.c
+++ b/drivers/parisc/lba_pci.c
@@ -644,7 +644,7 @@ lba_fixup_bus(struct pci_bus *bus)
644 ** Properly Setup MMIO resources for this bus. 644 ** Properly Setup MMIO resources for this bus.
645 ** pci_alloc_primary_bus() mangles this. 645 ** pci_alloc_primary_bus() mangles this.
646 */ 646 */
647 if (bus->self) { 647 if (bus->parent) {
648 int i; 648 int i;
649 /* PCI-PCI Bridge */ 649 /* PCI-PCI Bridge */
650 pci_read_bridge_bases(bus); 650 pci_read_bridge_bases(bus);
@@ -802,7 +802,7 @@ lba_fixup_bus(struct pci_bus *bus)
802** Can't fixup here anyway....garr... 802** Can't fixup here anyway....garr...
803*/ 803*/
804 if (fbb_enable) { 804 if (fbb_enable) {
805 if (bus->self) { 805 if (bus->parent) {
806 u8 control; 806 u8 control;
807 /* enable on PPB */ 807 /* enable on PPB */
808 (void) pci_read_config_byte(bus->self, PCI_BRIDGE_CONTROL, &control); 808 (void) pci_read_config_byte(bus->self, PCI_BRIDGE_CONTROL, &control);