Re: PATCH 2.4.0 parisc PCI support

Jeff Garzik (jgarzik@mandrakesoft.com)
Fri, 02 Mar 2001 15:46:12 -0500


Grant Grundler wrote:
> Index: drivers/pci/pci.c
> ===================================================================
> RCS file: /home/cvs/parisc/linux/drivers/pci/pci.c,v
> retrieving revision 1.1.1.6
> diff -u -p -r1.1.1.6 pci.c
> --- pci.c 2001/01/09 16:57:56 1.1.1.6
> +++ pci.c 2001/03/02 18:44:59
> @@ -644,12 +645,16 @@ void __init pci_read_bridge_bases(struct
> } else {
> +
> /*
> - * Ugh. We don't know enough about this bridge. Just assume
> - * that it's entirely transparent.
> + * Either this is not a PCI-PCI bridge or it's not
> + * configured yet. Since this code only supports PCI-PCI
> + * bridge, we better not be called for any other type.
> + * Don't muck the resources since it will confuse the
> + * platform specific code which does that.
> */
> - printk("Unknown bridge resource %d: assuming transparent\n", 0);
> - child->resource[0] = child->parent->resource[0];
> + printk("PCI : ignoring %s PCI-PCI bridge (I/O BASE not configured)\n", child->self->slot_name);
> + return;
> }
>
> res = child->resource[1];
> @@ -664,8 +669,8 @@ void __init pci_read_bridge_bases(struct
> res->name = child->name;
> } else {
> /* See comment above. Same thing */
> - printk("Unknown bridge resource %d: assuming transparent\n", 1);
> - child->resource[1] = child->parent->resource[1];
> + printk("PCI : ignoring %s PCI-PCI bridge (MMIO base not configured)\n", child->self->slot_name);
> + return;
> }
>
> res = child->resource[2];
> @@ -690,11 +695,10 @@ void __init pci_read_bridge_bases(struct
> res->end = limit + 0xfffff;
> res->name = child->name;
> } else {
> - /* See comments above */
> - printk("Unknown bridge resource %d: assuming transparent\n", 2);
> - child->resource[2] = child->parent->resource[2];
> + /* Base > limit means the prefetchable mem is disabled.*/
> }

IIRC these "assuming transparent" lines were put in to -fix- PCI-PCI
bridges on at least some x86 boxes... I didn't really understand the
bridge code well enough at the time to comment one way or the other on
its correctness, but it definitely fixed some problems.

Jeff

-- 
Jeff Garzik       | "You see, in this world there's two kinds of
Building 1024     |  people, my friend: Those with loaded guns
MandrakeSoft      |  and those who dig. You dig."  --Blondie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/