pci_walk_bus(9)
π NAME π
okay bestie, this is the manual page for pci_walk_bus(9) in the Kernel API Manual β it's literally about walking devices on/under a bus and calling a callback. π¦ no cap.
β¨ SYNOPSIS β¨
void pci_walk_bus (struct pci_bus *top , int (*cb)(struct pci_dev *,
void *) , void *userdata );
π ARGUMENTS π
topβ the bus whose devices should be walked. πcbβ the callback to be called for each device found. πuserdataβ an arbitrary pointer to be passed to the callback. π«Ά
πΈ DESCRIPTION πΈ
So we walk the given bus, including any bridged devices on buses under this bus, and we call the provided callback on each device found. β¨
We check the return of cb each time. If it returns anything other than 0, we break out. π that's the whole rule, fr fr.
π SEE ALSO π
- π§ Kernel file
./drivers/pci/bus.c - π₯
pci_bus_alloc_resource(9) - β
pci_bus_add_device(9) - π
pci_bus_add_devices(9) - π¦
pci_walk_bus_reverse(9)
mwah π this page lives in ./drivers/pci, stamped October 2026, and it's pci_walk_bus(9) β bye bestie! π
π¦ 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