pci_bus_match(9)
β¨ pci_bus_match β the matchmaker of the PCI world π
Okay bestie, so this one lives in the Kernel API Manual and it's literally the function that plays cupid between a PCI device and a driver's list of supported devices. Let's get into it π
πΈ SYNOPSIS πΈ
int pci_bus_match (struct device *dev , const struct device_driver *drv );
That's it, that's the whole vibe check β¨
π«Ά ARGUMENTS π«Ά
devβ the PCI device structure you're matching against, aka the main character we're trying to find a match for πdrvβ the device driver whose PCI device id structures we're gonna search through, like flipping through a driver's little black book π
π DESCRIPTION π
So here's the tea: a driver uses this to check whether a PCI device that's actually present in the system shows up in its list of supported devices. That's it, that's the whole job β no cap π§
And what does it hand back? The matching pci_device_id structure, or NULL if there's no match. So if it returns NULL, it's giving "we're not compatible, it's not you it's me" energy π
Like, think of it as the driver going "do I know you??" and the function going "yes bestie, here's the id struct" or "nope, never met them sorry" π
π¦ SEE ALSO π¦
Kernel file ./drivers/pci/pci-driver.c β the whole friend group lives here:
do_pci_add_dynid(9)pci_add_dynid(9)do_pci_match_id(9)pci_match_id(9)pci_match_device(9)new_id_store(9)remove_id_store(9)__pci_device_probe(9)pci_restore_standard_config(9)__pci_register_driver(9)pci_unregister_driver(9)pci_dev_driver(9)pci_dev_get(9)pci_dev_put(9)pci_uevent_ers(9)pci_dma_configure(9)
π SIGN-OFF π
This lil page is chillin' in ./drivers/pci and it's dated October 2026 β so yeah, future-iconic π« Obsessed, honestly. Go match some devices, bestie, you got this π«Άπβ
π¦ 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