fixed multi-function devices
This commit is contained in:
@@ -245,6 +245,8 @@ int16_t pci_find_device(uint16_t device_id, uint16_t vendor_id, int index)
|
|||||||
{
|
{
|
||||||
if (vendor_id == 0xffff ||
|
if (vendor_id == 0xffff ||
|
||||||
(PCI_VENDOR_ID(value) == vendor_id && PCI_DEVICE_ID(value) == device_id))
|
(PCI_VENDOR_ID(value) == vendor_id && PCI_DEVICE_ID(value) == device_id))
|
||||||
|
{
|
||||||
|
if (pos == index)
|
||||||
{
|
{
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
@@ -260,6 +262,7 @@ int16_t pci_find_device(uint16_t device_id, uint16_t vendor_id, int index)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return PCI_DEVICE_NOT_FOUND;
|
return PCI_DEVICE_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user