pci_get_domain_bus_and_slot(9)
β¨ pci_get_domain_bus_and_slot(9) β¨
okay bestie, so this is a page from the Kernel API Manual and it's literally about pci_get_domain_bus_and_slot β like, the function that finds you a PCI device when you hand it a domain (segment), a bus, and a slot. she's a locator. she's a matchmaker. π
πΈ NAME πΈ
pci_get_domain_bus_and_slot β locate PCI device for a given PCI domain (segment), bus, and slot
no cap, that's the whole gig π
π¦ SYNOPSIS π¦
struct pci_dev * pci_get_domain_bus_and_slot (int domain , unsigned int
bus , unsigned int devfn );
three args, one pointer back. iconic signature tbh β¨
π ARGUMENTS π
domainβ the PCI domain/segment where your PCI device is living. it's giving "which neighborhood" π‘busβ the PCI bus where the PCI device you want resides. like the street inside that neighborhood πdevfnβ this one's doing double duty, bestie: it encodes the number of the PCI slot where your desired PCI device resides and the logical device number within that slot in case of multi-function devices. two facts, one argument. multitasking queen π
π₯ DESCRIPTION π₯
so basically: you give her a PCI domain, a bus, and a slot/function number, and the desired PCI device gets located in the list of PCI devices. she goes looking. π
if the device is found, its reference count is increased and this function returns a pointer to its data structure. π«Ά
β οΈ okay this part MATTERS, do not skip it: the caller must decrement the reference count by calling pci_dev_put. that's your responsibility, not hers. like returning your bestie's charger. π
and if no device is found? NULL is returned. that's it. she's not mad, she's just empty-handed π
π SEE ALSO π
- Kernel file
./drivers/pci/search.c pci_find_bus(9)pci_find_next_bus(9)pci_get_slot(9)pci_get_subsys(9)pci_get_device(9)pci_get_class(9)pci_get_base_class(9)pci_dev_present(9)
the whole friend group fr fr π―ββοΈ
and that's the page!! mwah π this little beauty lives in ./drivers/pci, dated October 2026, and yes she's still rocking the pci_get_domain_bus_and_slot(9) title like the main character she is. go forth, find your devices, and please remember pci_dev_put. i'm begging. ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms