kexts: pci: score driver matches, allow fallback class drivers
This commit is contained in:
@@ -40,15 +40,20 @@
|
||||
#define PCI_VALUE_PORT 0xCFC
|
||||
|
||||
#define PCI_NONE 0xFFFF
|
||||
#define PCI_CLASS_ANY 0xFF
|
||||
|
||||
#define PCI_SUBSYSTEM_KEXT_ID "net.doorstuck.socks.pci"
|
||||
|
||||
#define PCI_DEVICE_ID(vid, did) { .pci_vendor_id = (vid), .pci_device_id = (did) }
|
||||
#define PCI_DEVICE_ID_INVALID { .pci_vendor_id = PCI_NONE, .pci_device_id = PCI_NONE }
|
||||
#define PCI_DEVICE_ID(vid, did) { .pci_vendor_id = (vid), .pci_device_id = (did), .pci_class_id = PCI_CLASS_ANY, .pci_subclass_id = PCI_CLASS_ANY }
|
||||
#define PCI_CLASS_ID(cid, scid) { .pci_vendor_id = PCI_NONE, .pci_device_id = PCI_NONE, .pci_class_id = (cid), .pci_subclass_id = (scid) }
|
||||
#define PCI_DEVICE_ID_FULL(vid, did, cid, scid) { .pci_vendor_id = (vid), .pci_device_id = (did), .pci_class_id = (cid), .pci_subclass_id = (scid) }
|
||||
#define PCI_DEVICE_ID_INVALID PCI_DEVICE_ID_FULL(PCI_NONE, PCI_NONE, PCI_CLASS_ANY, PCI_CLASS_ANY)
|
||||
|
||||
struct pci_device_id {
|
||||
uint16_t pci_vendor_id;
|
||||
uint16_t pci_device_id;
|
||||
uint8_t pci_class_id;
|
||||
uint8_t pci_subclass_id;
|
||||
};
|
||||
|
||||
struct pci_device {
|
||||
|
||||
Reference in New Issue
Block a user