summaryrefslogtreecommitdiffstats
path: root/src/drivers
diff options
context:
space:
mode:
authorMichael Brown2007-01-08 04:23:38 +0100
committerMichael Brown2007-01-08 04:23:38 +0100
commit5af4918356a224735b7a2d5034d714e1ebedb49e (patch)
tree5f5f0f849e484cd0234b3b0691cb464ab445c5ca /src/drivers
parentRemove types and prototypes now provided in the undi*.h headers. (diff)
downloadipxe-5af4918356a224735b7a2d5034d714e1ebedb49e.tar.gz
ipxe-5af4918356a224735b7a2d5034d714e1ebedb49e.tar.xz
ipxe-5af4918356a224735b7a2d5034d714e1ebedb49e.zip
Added support for wildcard device/vendor ID matches
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/bus/pci.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/drivers/bus/pci.c b/src/drivers/bus/pci.c
index 0abc1e9cd..e7528e3ce 100644
--- a/src/drivers/bus/pci.c
+++ b/src/drivers/bus/pci.c
@@ -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;