mirror of
https://github.com/xcat2/xNBA.git
synced 2024-12-14 15:21:32 +00:00
Added support for wildcard device/vendor ID matches
This commit is contained in:
parent
20c9fc407e
commit
5af4918356
@ -187,7 +187,10 @@ static int pci_probe ( struct pci_device *pci ) {
|
||||
for ( driver = pci_drivers ; driver < pci_drivers_end ; driver++ ) {
|
||||
for ( i = 0 ; i < driver->id_count ; i++ ) {
|
||||
id = &driver->ids[i];
|
||||
if ( ( id->vendor != pci->vendor ) ||
|
||||
if ( ( id->vendor != PCI_ANY_ID ) &&
|
||||
( id->vendor != pci->vendor ) )
|
||||
continue;
|
||||
if ( ( id->device != PCI_ANY_ID ) &&
|
||||
( id->device != pci->device ) )
|
||||
continue;
|
||||
pci->driver = driver;
|
||||
|
@ -239,6 +239,9 @@ struct pci_device_id {
|
||||
uint16_t device;
|
||||
};
|
||||
|
||||
/** Match-anything ID */
|
||||
#define PCI_ANY_ID 0xffff
|
||||
|
||||
/** A PCI device */
|
||||
struct pci_device {
|
||||
/** Generic device */
|
||||
|
Loading…
Reference in New Issue
Block a user