pci_walk_bridge(9)
π pci_walk_bridge(9) π
okay so this is a page straight out of the Kernel API Manual, and honestly? it's lowkey iconic. it's pci_walk_bridge, and bestie, it's about walking bridges that might be AER affected. no cap. let's get into it πΈ
β¨ SYNOPSIS β¨
void pci_walk_bridge (struct pci_dev *bridge , int (*cb)(struct pci_dev
*, void *) , void *userdata );
like yes, that's the whole signature, and yes it's giving function-pointer-in-the-argument-list realness π
π ARGUMENTS π
bridgeβ the bridge in question π«Ά and heads up, this "bridge" might not be a bridge-bridge: it could be a Port, an RCEC, or an RCiEP. so like, keep that in mind.cbβ the callback π¦ it gets called for each device found. it's your little function, your moment to shine.userdataβ an arbitrary pointer that gets passed straight to the callback. literally whatever you want, bestie, it's your vibe to define.
π DESCRIPTION π
so here's the tea β if the device you hand over is a bridge, then we walk the subordinate bus, including any bridged devices on buses under this bus. and then β this is the important part β we call the provided callback on each device found β¨
but wait, there's a second scenario π if the device you provided has no subordinate bus β e.g., an RCEC or an RCiEP β then we just call the callback on the device itself. simple as that. no walking required, we're staying home π π
π₯ SEE ALSO π₯
- Kernel file
./drivers/pci/pcie/err.cβ go read it, iykyk π
and that's the page, bestie!! π this beauty lives in ./drivers/pci/pcie, dated October 2026, and it's pci_walk_bridge(9) forever and always π periodt π
β¨
π¦ 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