diff options
author | Helge Deller <deller@gmx.de> | 2013-05-31 18:24:58 -0400 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2013-06-01 08:44:25 -0400 |
commit | b204a4d2d4f2061659bb5c33f5a4013fb0f6ffbe (patch) | |
tree | 9f2f4deec31508581b8ed7d7da2f00f2da07d706 | |
parent | b47d4934e71d918814aee4a1d0211f81329b767e (diff) |
parisc/PCI: lba: fix: convert to pci_create_root_bus() for correct root bus resources (v2)
commit dc7dce280a
Author: Bjorn Helgaas <bhelgaas@google.com>
Date: Fri Oct 28 16:27:27 2011 -0600
parisc/PCI: lba: convert to pci_create_root_bus() for correct root bus
resources
Supply root bus resources to pci_create_root_bus() so they're correct
immediately. This fixes the problem of "early" and "header" quirks seeing
incorrect root bus resources.
added tests for elmmio_space.start while it should use
elmmio_space.flags. This for example led to incorrect resource
assignments and a non-working stifb framebuffer on most parisc machines.
LBA 10:1: PCI host bridge to bus 0000:01
pci_bus 0000:01: root bus resource [io 0x12000-0x13fff] (bus address [0x2000-0x3fff])
pci_bus 0000:01: root bus resource [mem 0xfffffffffa000000-0xfffffffffbffffff] (bus address [0xfa000000-0xfbffffff])
pci_bus 0000:01: root bus resource [mem 0xfffffffff4800000-0xfffffffff4ffffff] (bus address [0xf4800000-0xf4ffffff])
pci_bus 0000:01: root bus resource [??? 0x00000001 flags 0x0]
Signed-off-by: Helge Deller <deller@gmx.de>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r-- | drivers/parisc/lba_pci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c index 5d25038ef4b0..1f05913ae677 100644 --- a/drivers/parisc/lba_pci.c +++ b/drivers/parisc/lba_pci.c | |||
@@ -668,7 +668,7 @@ lba_fixup_bus(struct pci_bus *bus) | |||
668 | BUG(); | 668 | BUG(); |
669 | } | 669 | } |
670 | 670 | ||
671 | if (ldev->hba.elmmio_space.start) { | 671 | if (ldev->hba.elmmio_space.flags) { |
672 | err = request_resource(&iomem_resource, | 672 | err = request_resource(&iomem_resource, |
673 | &(ldev->hba.elmmio_space)); | 673 | &(ldev->hba.elmmio_space)); |
674 | if (err < 0) { | 674 | if (err < 0) { |
@@ -993,7 +993,7 @@ lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev) | |||
993 | 993 | ||
994 | case PAT_LMMIO: | 994 | case PAT_LMMIO: |
995 | /* used to fix up pre-initialized MEM BARs */ | 995 | /* used to fix up pre-initialized MEM BARs */ |
996 | if (!lba_dev->hba.lmmio_space.start) { | 996 | if (!lba_dev->hba.lmmio_space.flags) { |
997 | sprintf(lba_dev->hba.lmmio_name, | 997 | sprintf(lba_dev->hba.lmmio_name, |
998 | "PCI%02x LMMIO", | 998 | "PCI%02x LMMIO", |
999 | (int)lba_dev->hba.bus_num.start); | 999 | (int)lba_dev->hba.bus_num.start); |
@@ -1001,7 +1001,7 @@ lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev) | |||
1001 | io->start; | 1001 | io->start; |
1002 | r = &lba_dev->hba.lmmio_space; | 1002 | r = &lba_dev->hba.lmmio_space; |
1003 | r->name = lba_dev->hba.lmmio_name; | 1003 | r->name = lba_dev->hba.lmmio_name; |
1004 | } else if (!lba_dev->hba.elmmio_space.start) { | 1004 | } else if (!lba_dev->hba.elmmio_space.flags) { |
1005 | sprintf(lba_dev->hba.elmmio_name, | 1005 | sprintf(lba_dev->hba.elmmio_name, |
1006 | "PCI%02x ELMMIO", | 1006 | "PCI%02x ELMMIO", |
1007 | (int)lba_dev->hba.bus_num.start); | 1007 | (int)lba_dev->hba.bus_num.start); |
@@ -1495,7 +1495,7 @@ lba_driver_probe(struct parisc_device *dev) | |||
1495 | 1495 | ||
1496 | pci_add_resource_offset(&resources, &lba_dev->hba.io_space, | 1496 | pci_add_resource_offset(&resources, &lba_dev->hba.io_space, |
1497 | HBA_PORT_BASE(lba_dev->hba.hba_num)); | 1497 | HBA_PORT_BASE(lba_dev->hba.hba_num)); |
1498 | if (lba_dev->hba.elmmio_space.start) | 1498 | if (lba_dev->hba.elmmio_space.flags) |
1499 | pci_add_resource_offset(&resources, &lba_dev->hba.elmmio_space, | 1499 | pci_add_resource_offset(&resources, &lba_dev->hba.elmmio_space, |
1500 | lba_dev->hba.lmmio_space_offset); | 1500 | lba_dev->hba.lmmio_space_offset); |
1501 | if (lba_dev->hba.lmmio_space.flags) | 1501 | if (lba_dev->hba.lmmio_space.flags) |