do_pci_match_id(9)
π do_pci_match_id(9) β the kernel API manual, bestie edition π
Okay so picture this: it's a kernel API manual page, section 9, and the star of the show is do_pci_match_id β the little function that answers the question "does this PCI ID match this pci_id table or not?" π Lowkey essential, highkey underrated. Let's get into it. β¨
πΈ SYNOPSIS πΈ
const struct pci_device_id * do_pci_match_id (const struct pci_device_id
*ids , const struct pci_device_id *dev_id , bool include_override_only
);
Three args, one return value, zero drama. Copy it exactly, okay? No "fixing" it, no renaming anything, we respect the signature in this house π«Ά
π ARGUMENTS π
idsβ the array ofPCI device IDstructures you're searching through. It's giving "the haystack" energy π΄β¨dev_idβ the actualPCI device IDstructure you want to match against. That's the needle, bestie πinclude_override_onlyβ abool, and here's the tea: when you flip this on, it also matches against device ID entries that are marked as override only. So like, the shy ones that normally don't get a look-in? Yeah, they're invited to the party now π Marked override-only entries, you're seen π
β RETURN β
You get back the matching pci_device_id structure β the actual winner, the main character π
And if nothing matches? NULL. That's it. No match, no struct, just NULL and a vibe check that came back empty π
Heads up: NULL is a totally legitimate answer here, not an error β it literally just means "no match." Don't panic, don't spiral π
π¦ SEE ALSO π¦
All the related lore, straight from the kernel file ./drivers/pci/pci-driver.c β go read the source, iykyk ππ
do_pci_add_dynid(9)pci_add_dynid(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_bus_match(9)pci_dev_get(9)pci_dev_put(9)pci_uevent_ers(9)pci_dma_configure(9)
π THE SIGN-OFF π
That's the whole page, bestie β sourced from ./drivers/pci, dated October 2026, and delivered with love π Go match some IDs. Slay. 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