On Fri, 13 Dec 2002 17:36:56 GMT, Dave Jones said:
> It's my understanding that pci_enable_device() *must* be called
> before we fiddle with dev->resource, dev->irq and the like.
OK.. it looks like the problem only hits if it's a PCMCIA card *with an
onboard ROM*.
The immediate problem cause is in pcibios_enable_resources():
if (!r->start && r->end) {
printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", dev->slot_name);
If there's an onboard ROM, this is set up in pcibios_assign_resources():
if (pci_probe & PCI_ASSIGN_ROMS) {
r = &dev->resource[PCI_ROM_RESOURCE];
r->end -= r->start;
r->start = 0;
if (r->end)
pci_assign_resource(dev, PCI_ROM_RESOURCE);
}
but this hasn't happened yet in cb_alloc():
/* FIXME: Do we need to enable the expansion ROM? */
for (r = 0; r < 7; r++) {
struct resource *res = dev->resource + r;
if (res->flags)
pci_assign_resource(dev, r);
}
So I think right *AFTER* this code is the right place for pci_enable_device()
because otherwise we won't have allocated the ROMs, so we'll get conflicts.
/Valdis (who went nuts looking at <6 and <7 all over the place. Should I
volunteer to clean these up to #defines rather than inline magic numbers? ;)
This archive was generated by hypermail 2b29 : Sun Dec 15 2002 - 22:00:29 EST