Skip to content

Commit b204a4d

Browse files
committed
parisc/PCI: lba: fix: convert to pci_create_root_bus() for correct root bus resources (v2)
commit dc7dce2 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>
1 parent b47d493 commit b204a4d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎drivers/parisc/lba_pci.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ lba_fixup_bus(struct pci_bus *bus)
668668
BUG();
669669
}
670670

671-
if (ldev->hba.elmmio_space.start) {
671+
if (ldev->hba.elmmio_space.flags) {
672672
err = request_resource(&iomem_resource,
673673
&(ldev->hba.elmmio_space));
674674
if (err < 0) {
@@ -993,15 +993,15 @@ lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
993993

994994
case PAT_LMMIO:
995995
/* used to fix up pre-initialized MEM BARs */
996-
if (!lba_dev->hba.lmmio_space.start) {
996+
if (!lba_dev->hba.lmmio_space.flags) {
997997
sprintf(lba_dev->hba.lmmio_name,
998998
"PCI%02x LMMIO",
999999
(int)lba_dev->hba.bus_num.start);
10001000
lba_dev->hba.lmmio_space_offset = p->start -
10011001
io->start;
10021002
r = &lba_dev->hba.lmmio_space;
10031003
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) {
10051005
sprintf(lba_dev->hba.elmmio_name,
10061006
"PCI%02x ELMMIO",
10071007
(int)lba_dev->hba.bus_num.start);
@@ -1495,7 +1495,7 @@ lba_driver_probe(struct parisc_device *dev)
14951495

14961496
pci_add_resource_offset(&resources, &lba_dev->hba.io_space,
14971497
HBA_PORT_BASE(lba_dev->hba.hba_num));
1498-
if (lba_dev->hba.elmmio_space.start)
1498+
if (lba_dev->hba.elmmio_space.flags)
14991499
pci_add_resource_offset(&resources, &lba_dev->hba.elmmio_space,
15001500
lba_dev->hba.lmmio_space_offset);
15011501
if (lba_dev->hba.lmmio_space.flags)

0 commit comments

Comments
 (0)