[parisc-linux-cvs] linux-2.6 jejb

James Bottomley James.Bottomley at steeleye.com
Sun Dec 21 20:13:12 MST 2003


On Sun, 2003-12-21 at 19:42, Grant Grundler wrote:
> On Sun, Dec 21, 2003 at 04:14:16PM -0700, James Bottomley wrote:
> > Log message:
> > Finally get PCMCIA working on the B180
> 
> awesome!
> That's too cool!

Thanks...

> BTW, I still have a change to dino_fixup_bus() in my local tree
> that I don't know for sure if it's correct:
> -                 for(i = 0; i < PCI_NUM_RESOURCES; i++) {
> +                 for(i = 0; i < PCI_BRIDGE_RESOURCES; i++) {
> 
> That chunk of code doesn't "feel" right even though it may be.
> This bit is code is dealing with a PCI-PCI Bridge...seems like
> we shouldn't be messing with Bridge Resources (index > 6) unless
> it's to "F-Extend" or otherwise adjust PCI-PCI Bridge resources.

This has to be done.  The code is actualy reassigning all the resources
and rebuilding the PCI window.  The bridge resources must be reassigned
as well, since they lie within the window and become the parent
resources of the children on the bridged bus.

> What has me nervous (but haven't worked out yet) are the following
> lines in drivers/pci:
>         align = (resno < PCI_BRIDGE_RESOURCES) ? size : res->start;
> or
> 	r_align = (i < PCI_BRIDGE_RESOURCES) ? r_align + 1 : r->start;
> 
> PCI uses >= PCI_BRIDGE_RESOURCES of this bridge to parent the resources
> available on the secondary pci_bus.
> See drivers/pci/probe.c:pci_read_bridge_bases() line 163.
> Thus the alignment seems to be consistently handled different for
> PCI Bridge resources than for other resources. And the dino
> code treats them all the same.

Actually, it doesn't; that's the quirk mentioned in the comment.  The
thing I'm cheating on possibly is that I'm assuming no non-bridge
resources (i.e. < PCI_BRIDGE_RESOURCES) actually exist.  I believe this
to be true, but if it makes you feel happier, the for loop can run from
PCI_BRIDGE_RESOURCES to PCI_NUM_RESOURCES.

James




More information about the parisc-linux-cvs mailing list