mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
PCI: Document reason for using pci_is_root_bus()
Some code assumes "bus->self == NULL" means the bus is a root bus. This adds a comment explaining why this is incorrect ("virtual" buses added for SR-IOV have "bus->self == NULL" but are not root buses). No functional change. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
2ba29e270e
commit
77a0dfcd8a
1 changed files with 4 additions and 0 deletions
|
@ -470,6 +470,10 @@ struct pci_bus {
|
||||||
/*
|
/*
|
||||||
* Returns true if the pci bus is root (behind host-pci bridge),
|
* Returns true if the pci bus is root (behind host-pci bridge),
|
||||||
* false otherwise
|
* false otherwise
|
||||||
|
*
|
||||||
|
* Some code assumes that "bus->self == NULL" means that bus is a root bus.
|
||||||
|
* This is incorrect because "virtual" buses added for SR-IOV (via
|
||||||
|
* virtfn_add_bus()) have "bus->self == NULL" but are not root buses.
|
||||||
*/
|
*/
|
||||||
static inline bool pci_is_root_bus(struct pci_bus *pbus)
|
static inline bool pci_is_root_bus(struct pci_bus *pbus)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue