Messages in this thread |  | | Date | Fri, 8 Dec 2000 15:51:28 +0300 | From | Ivan Kokshaysky <> | Subject | Re: PCI bridge setup weirdness |
| |
On Thu, Dec 07, 2000 at 10:46:08PM +0000, Russell King wrote: > It appears to be caused by the pci_read_bridge_bases code copying the > pointer to the resources instead of making a copy of the resources > themselves.
No, pci_read_bridge_bases() is obsoleted by new pci setup code. ;-) You have to set up bus resources properly in pcibios_fixup_bus(). For a single root bus configuration, you don't need to do anything with the root bus itself - its resources already point to ioport_resource and iomem_resource, which should be ok. For pci-pci bridges you have to add something like this:
struct pci_dev *bridge = bus->self;
if (bridge) { int i;
for(i=0; i<3; i++) { bus->resource[i] = &bridge->resource[PCI_BRIDGE_RESOURCES+i]; bus->resource[i]->name = bus->name; } bus->resource[0]->flags = pci_bridge_check_io(bridge); bus->resource[1]->flags = IORESOURCE_MEM; bus->resource[0]->end = ioport_resource.end; bus->resource[1]->end = iomem_resource.end; /* Turn off downstream PF memory address range by default */ bus->resource[2]->start = 1024*1024; bus->resource[2]->end = bus->resource[2]->start - 1; }
Check arch/alpha/kernel/pci.c:pcibios_fixup_bus() for reference.
Ivan. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |