lkml.org 
[lkml]   [2002]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: 2.5.5[01]]: Xircom Cardbus broken (PCI resource collisions)
From
Date
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? ;)
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:31    [W:1.114 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site