SCO OpenServer
pci_search(D3oddi)
pci_search --
search PCI buses for a device matching specified fields
Synopsis
#include <sys/pci.h>
int pci_search(unsigned short vend_id, unsigned short dev_id,
unsigned short base_class, unsigned short sub_class,
unsigned short index, struct pci_devinfo infptr);
Description
The
pci_search( )
function searches a system's PCI
buses for devices that match any or all of the input parameters.
Arguments
vend_id-
Vendor identification of the device.
dev_id-
Device identification of the device.
base_class-
Base class code of the device.
sub_class-
Sub class code of the device.
index-
Number of devices to skip.
An index value of n returns details
about the nth device matching the input parameters.
Index numbering begins at 0.
infptr-
Pointer to the
pci_devinfo(D4oddi)
structure in which to return the results.
Any of the input parameters except index may be wildcards.
A wildcard is specified using the value 0xFFFF.
Return values
A return value of 1 indicates success, and that the
pci_devinfo structure is valid.
0 indicates a matching device could not be found.
Usage
Context and synchronization
Initialization
context
Hardware applicability
PCI bus.
Version applicability
oddi:
3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp
SVR5 DDI compatibility
DDI drivers access PCI configuration information
through the resource manager database.
Use the
cm_getval(D3)
function to access information
supported by the parameters documented on the
cm_params(D5)
manual page and function such as
cm_read_devconfig(D3)
and
cm_write_devconfig(D3)
to access other configuration information.
Note that DDI drivers cannot access
all the PCI configuration information
that SCO OpenServer 5 drivers can access.
References
pci(D4oddi),
pci(HW)
pci_buspresent(D3oddi),
pci_read(D3oddi),
pci_specialcycle(D3oddi),
.LR pci_write D3oddi
``PCI'' in HDK Technical Reference
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005