sys/bus/pci/pci.c
/* Find a device_t by vendor/device ID */
Find a device_t by vendor/device ID
Find a device_t by vendor / device ID
device_t
pci_find_device(uint16_t vendor, uint16_t device)
{
	struct pci_devinfo *dinfo;
	STAILQ_FOREACH(dinfo, &pci_devq, pci_links) {
		if ((dinfo->cfg.vendor == vendor) &&
		    (dinfo->cfg.device == device)) {
			return (dinfo->cfg.dev);
		}
	}
	return (NULL);
}
device_t pci_find_device ( uint16_t vendor , uint16_t device ) { struct pci_devinfo * dinfo ; STAILQ_FOREACH ( dinfo , & pci_devq , pci_links ) { if ( ( dinfo -> cfg . vendor == vendor ) && ( dinfo -> cfg . device == device ) ) { return ( dinfo -> cfg . dev ) ; } } return ( NULL ) ; }
Find a device_t by vendor/device ID
Find a device_t by vendor / device ID