Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/include/linux/pci.h
Show First 20 Lines • Show All 1,052 Lines • ▼ Show 20 Lines | while (cur != NULL && (cur->vendor || cur->device)) { | ||||
if (pci_find_device(cur->vendor, cur->device) != NULL) { | if (pci_find_device(cur->vendor, cur->device) != NULL) { | ||||
return (1); | return (1); | ||||
} | } | ||||
cur++; | cur++; | ||||
} | } | ||||
return (0); | return (0); | ||||
} | } | ||||
static __inline void | |||||
pci_dev_put(struct pci_dev *pdev) | |||||
{ | |||||
if (pdev != NULL) | |||||
put_device(&pdev->dev); /* == pdev */ | |||||
} | |||||
static __inline int | |||||
pci_domain_nr(struct pci_bus *bus) | |||||
{ | |||||
/* XXX should we assert that it is 0? */ | |||||
kib: Why this comment ? Why is 0 significant for drivers ? | |||||
bdragonUnsubmitted Done Inline ActionsIIRC, On POWER8 / POWER9, each pci slot on the board has its own root complex, which makes it a separate domain, so, no, you should not assert that it is 0. Intel machines tend to stick everything on one root complex. bdragon: IIRC, On POWER8 / POWER9, each pci slot on the board has its own root complex, which makes it a… | |||||
return (bus->domain); | |||||
} | |||||
#endif /* _LINUX_PCI_H_ */ | #endif /* _LINUX_PCI_H_ */ |
Why this comment ? Why is 0 significant for drivers ?