Re: PROBLEM: Devices behind PCI Express-to-PCI bridge not mapped

From: Ivan Kokshaysky
Date: Wed Jun 08 2005 - 17:42:33 EST


On Wed, Jun 08, 2005 at 07:34:09PM +0200, Andreas Koch wrote:
> However, after pci_assign_unassigned_resources() has been called, the
> MEM and PREFETCH regions of the bridge 0000:00:1e.0 (bridge 1) _remain_
> invalid at 0x00000000.

I believe it was _IO_ and PREFETCH (unused windows of that bridge).
Indeed, IO at 0 is fatal...

Here is additional patch which ensures unused windows of the transparent
bridge are disabled.

Ivan.

--- linux/drivers/pci/setup-bus.c~ Sun Jun 5 18:37:57 2005
+++ linux/drivers/pci/setup-bus.c Thu Jun 9 01:28:42 2005
@@ -156,7 +156,7 @@ pci_setup_bridge(struct pci_bus *bus)

/* Set up the top and bottom of the PCI I/O segment for this bus. */
pcibios_resource_to_bus(bridge, &region, &b_res[0]);
- if (b_res[0].flags & IORESOURCE_IO) {
+ if ((b_res[0].flags & IORESOURCE_IO) && (region.end > region.start)) {
pci_read_config_dword(bridge, PCI_IO_BASE, &l);
l &= 0xffff0000;
l |= (region.start >> 8) & 0x00f0;
@@ -182,7 +182,7 @@ pci_setup_bridge(struct pci_bus *bus)
/* Set up the top and bottom of the PCI Memory segment
for this bus. */
pcibios_resource_to_bus(bridge, &region, &b_res[1]);
- if (b_res[1].flags & IORESOURCE_MEM) {
+ if ((b_res[1].flags & IORESOURCE_MEM) && (region.end > region.start)) {
l = (region.start >> 16) & 0xfff0;
l |= region.end & 0xfff00000;
DBG(KERN_INFO " MEM window: %08lx-%08lx\n",
@@ -201,7 +201,8 @@ pci_setup_bridge(struct pci_bus *bus)

/* Set up PREF base/limit. */
pcibios_resource_to_bus(bridge, &region, &b_res[2]);
- if (b_res[2].flags & IORESOURCE_PREFETCH) {
+ if ((b_res[2].flags & IORESOURCE_PREFETCH) &&
+ (region.end > region.start)) {
l = (region.start >> 16) & 0xfff0;
l |= region.end & 0xfff00000;
DBG(KERN_INFO " PREFETCH window: %08lx-%08lx\n",
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/