Re: [2/3] Use insert_resource in pci_claim_resource

From: Matthew Wilcox
Date: Fri Mar 19 2004 - 09:53:53 EST


On Fri, Mar 19, 2004 at 09:56:00AM +0000, Russell King wrote:
> I think we want to preserve the existing behaviour rather than change
> it. We really do want to request the device resource against its
> immediate parent because that is the way PCI works - if a devices
> resources don't fall within the parent bus resources, we want to
> know about it.
>
> May I suggest that ia64 sets the parent bus resources appropriately,
> which should relieve this problem (iow, pci_root_bus->resource[0..3])?
> If pci_find_parent_resource() is returning the wrong thing, its likely
> that other users of this function will also be getting the wrong answer.

I see what's going on ... pci_read_bridge_bases() returns immediately
because this is the root bus. So we need to point the root bus resources
elsewhere ... this looks doable.

But I do think insert_resource is the right call to make. If the device has
the wrong resources, that means something's gone awfully wrong earlier in
the pci code.

--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
-
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/