All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] parisc/PCI: lba: fix: convert to pci_create_root_bus() for correct root bus resources
@ 2013-05-30 14:10 Helge Deller
  2013-05-30 18:04 ` Bjorn Helgaas
  2013-05-31 22:24 ` [PATCH] parisc/PCI: lba: fix: convert to pci_create_root_bus() for correct root bus resources (v2) Helge Deller
  0 siblings, 2 replies; 9+ messages in thread
From: Helge Deller @ 2013-05-30 14:10 UTC (permalink / raw)
  To: linux-parisc, James Bottomley; +Cc: Bjorn Helgaas

This commit dc7dce280a26d069ad5a58bf3da86e5e83415c65
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.

forgot to set the IORESOURCE_BUS bus flag which 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>

diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c
index 2ef7103..29f3d7d 100644
--- a/drivers/parisc/lba_pci.c
+++ b/drivers/parisc/lba_pci.c
@@ -1494,7 +1494,7 @@ lba_driver_probe(struct parisc_device *dev)
 
 	pci_add_resource_offset(&resources, &lba_dev->hba.io_space,
 				HBA_PORT_BASE(lba_dev->hba.hba_num));
-	if (lba_dev->hba.elmmio_space.start)
+	if (lba_dev->hba.elmmio_space.flags)
 		pci_add_resource_offset(&resources, &lba_dev->hba.elmmio_space,
 					lba_dev->hba.lmmio_space_offset);
 	if (lba_dev->hba.lmmio_space.flags)
@@ -1503,6 +1503,7 @@ lba_driver_probe(struct parisc_device *dev)
 	if (lba_dev->hba.gmmio_space.flags)
 		pci_add_resource(&resources, &lba_dev->hba.gmmio_space);
 
+	lba_dev->hba.bus_num.flags = IORESOURCE_BUS;
 	pci_add_resource(&resources, &lba_dev->hba.bus_num);
 
 	dev->dev.platform_data = lba_dev;

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-06-01 22:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-30 14:10 [PATCH] parisc/PCI: lba: fix: convert to pci_create_root_bus() for correct root bus resources Helge Deller
2013-05-30 18:04 ` Bjorn Helgaas
2013-05-30 19:47   ` Helge Deller
2013-05-30 21:12     ` Bjorn Helgaas
2013-05-30 21:40       ` Helge Deller
2013-05-31 20:46         ` Helge Deller
2013-05-31 21:25           ` Bjorn Helgaas
2013-06-01 22:03             ` Helge Deller
2013-05-31 22:24 ` [PATCH] parisc/PCI: lba: fix: convert to pci_create_root_bus() for correct root bus resources (v2) Helge Deller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.