One question about the useage of pci_dev->resource[]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



All,

I want to confirm something for the pci_dev->resource[].

As in the definition in the pci.h, this resource array is divided into
several parts.
    0-5  for standard PCI resources
    6    for ROM resource
    7-10 for bridge resource( if no iov )


1. For P2P bridge, 0-5 is left empty?
2. If so, in code pci_setup_device(), I think it set the wrong resource.
   It call pci_read_bases(dev, 2, PCI_ROM_ADDRESS1), for a p2p bridge. 
   And in pci_read_bases(), BAR information is retrieved and set to
   pci_dev->resource[0|1].
3. If pci_setup_device() just set first two resource, the child bus will
   point to empty resource.
   In pci_alloc_child_bus(), child->resource[0-3] will be point to
   bridge->resource[7-10], which is not set in pci_setup_device().
4. Another question is, is there any convention for pci_bus->resource[].
   [0] for io, [1] for mem, [2] for prefetch?

-- 
Richard Yang
Help you, Help me

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux