location of pci_get_* functions

Matthew Dillon dillon at apollo.backplane.com
Mon Feb 13 11:27:43 PST 2006


:
:Ok, I'm feeling very dense. Where are the pci_get_* functions (e.g.
:pci_get_devid, pci_get_vendor, ...) defined? A 'grep -r pci_get_devid
:/usr/src' shows all the places this is used, but nothing about the
:definitions. tnx.
:
:---chuck

    It took me HOURS to find those when I first needed to locate them,
    months ago.

    The answer is:  They are #define'd macros which concactenate
    the 'pci_get' with '_vendor', and so forth.

    Look on line 209 of sys/bus/pci/pcivar.h.

    Note that DragonFly's PCI assessors work someone differently then
    FreeBSD's.  I tried to normalize the functions.  It's very confusing
    either way because there are actually three PCI device layers (or more,
    even).  There's the PCI bus, the PCI slot (which can contain multiple
    devices), and the PCI device.

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>





More information about the Kernel mailing list