pci_scan_slot(9)
π pci_scan_slot β from the Kernel API Manual, bestie π
Okay so picture this: you're deep in the kernel, you've got a PCI bus, and you need to know what's living in one specific slot. That's literally this function's whole job. Let's get into it β¨
πΈ NAME πΈ
pci_scan_slot β scan a PCI slot on a bus for devices π¦
β¨ SYNOPSIS β¨
int pci_scan_slot (struct pci_bus *bus , int devfn );
π ARGUMENTS π
busβ the PCI bus you wanna scan, bestie πdevfnβ the slot number to scan, and heads up: it must have zero function π (yes, that's a requirement, not a vibe suggestion)
π«Ά DESCRIPTION π«Ά
So what it does is: scan a PCI slot on the specified PCI bus for devices, and every device it discovers gets added to the bus->devices list. Iconic. π
Lowkey important: new devices will not have is_added set. Not me pointing that out so you don't get caught out later π
And the return value? The number of new devices found. That's it, that's the tea ββ¨
π§ SEE ALSO π§
Kernel file ./drivers/pci/probe.c, plus these absolute legends:
__pci_size_bars(9)__pci_read_base(9)pcie_get_link_speed(9)pci_ea_fixed_busnrs(9)pci_ext_cfg_is_aliased(9)pci_cfg_space_size_ext(9)pci_intx_mask_broken(9)pci_setup_device(9)pcie_relaxed_ordering_enabled(9)pci_release_dev(9)pci_scan_child_bus_extend(9)pci_scan_child_bus(9)pcibios_root_bridge_prepare(9)pci_rescan_bus_bridge_resize(9)pci_rescan_bus(9)
And that's the whole page, bestie π This lil masterpiece lives in ./drivers/pci, dated October 2026 β go forth and scan those slots, you've got this fr fr πβ
π¦ 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