DragonFly BSD
DragonFly kernel List (threaded) for 2006-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: location of pci_get_* functions

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 13 Feb 2006 11:26:11 -0800 (PST)

: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.

    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.

					Matthew Dillon 

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]