pci_get_base_class(9)
π
pci_get_base_class(9) β from the Kernel API Manual π
okay so bestie, this is the page for pci_get_base_class from the Kernel API Manual. It is literally the function that searches for a PCI device by matching against the base class code only. No cap. π
π NAME π
pci_get_base_class β searching for a PCI device by matching against the base class code only. That is the whole vibe: base class code only, no extra matching drama. β¨
β¨ SYNOPSIS β¨
struct pci_dev * pci_get_base_class (unsigned int class , struct pci_dev
*from );
π«Ά ARGUMENTS π«Ά
classβ search for a PCI device with this base class code.fromβ previous PCI device found in search, orNULLfor a new search.
π DESCRIPTION π
So the way this works is: it iterates through the list of known PCI devices. If a PCI device is found with a matching base class code, the reference count to the device is incremented. See pci_match_one_id to figure out how this works β no gatekeeping. π¦
A new search is initiated by passing NULL as the from argument. Otherwise, if from is not NULL, searches continue from the next device on the global list. And the reference count for from is always decremented if it is not NULL. Like, always always. Periodt. π
π₯ RETURN π₯
A pointer to a matched PCI device, NULL otherwise. That is it. That is the return. β¨
π SEE ALSO π
Kernel file ./drivers/pci/search.c and the whole friend group:
pci_find_bus(9)pci_find_next_bus(9)pci_get_slot(9)pci_get_domain_bus_and_slot(9)pci_get_subsys(9)pci_get_device(9)pci_get_class(9)pci_dev_present(9)
okay bye bestie, this page lives under source path ./drivers/pci, dated October 2026, and the manual page is pci_get_base_class(9) πβ¨
π¦ 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