[Previous]
[Contents]
[Next]

_CA_PCI_Find_Class()

find devices that have a specific Class Code

Synopsis:

#include <sys/pci.h>
int _CA_PCI_Find_Class( unsigned long ClassCode,
                        unsigned index,
                        unsigned *busnum,
                        unsigned *devfuncnum );

Description:

This function determines the location of the nth PCI device or function that has the specified class code.

The arguments are as follows:

ClassCode
the class of device or function sought
index
the index (n) of the device or function sought
busnum
the bus number, in the range [0...255]
devfuncnum
the Device or Function number of the nth device or function of the given class. The device number is in bits 7 through 3, and the function number in bits 2 through 0.

Note: You can find all the devices having the same class code by making successive calls to this function, starting with an index of 0, and incrementing it until PCI_DEVICE_NOT_FOUND is returned.

Returns:

PCI_SUCCESS
the device or function was found
PCI_DEVICE_NOT_FOUND
the device or function was not found

Classification:

Intel

Safety:
Interrupt handler No
Signal handler No
Thread No

Caveats:

When you use the _CA_PCI_... functions:

See also:

_CA_PCI_BIOS_Present(), _CA_PCI_Find_Device(), _CA_PCI_GenerateSpecialCycle(), _CA_PCI_Read_Config_Byte(), _CA_PCI_Read_Config_DWord(), _CA_PCI_Read_Config_Word(), _CA_PCI_Write_Config_Byte(), _CA_PCI_Write_Config_DWord(), _CA_PCI_Write_Config_Word()


[Previous]
[Contents]
[Next]