Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106239670
D45846.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D45846.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h
--- a/sys/compat/linuxkpi/common/include/linux/pci.h
+++ b/sys/compat/linuxkpi/common/include/linux/pci.h
@@ -1268,6 +1268,29 @@
return (0);
}
+static inline const struct pci_device_id *
+pci_match_id(const struct pci_device_id *ids, struct pci_dev *pdev)
+{
+ if (ids == NULL)
+ return (NULL);
+
+ for (;
+ ids->vendor != 0 || ids->subvendor != 0 || ids->class_mask != 0;
+ ids++)
+ if ((ids->vendor == PCI_ANY_ID ||
+ ids->vendor == pdev->vendor) &&
+ (ids->device == PCI_ANY_ID ||
+ ids->device == pdev->device) &&
+ (ids->subvendor == PCI_ANY_ID ||
+ ids->subvendor == pdev->subsystem_vendor) &&
+ (ids->subdevice == PCI_ANY_ID ||
+ ids->subdevice == pdev->subsystem_device) &&
+ ((ids->class ^ pdev->class) & ids->class_mask) == 0)
+ return (ids);
+
+ return (NULL);
+}
+
struct pci_dev *lkpi_pci_get_domain_bus_and_slot(int domain,
unsigned int bus, unsigned int devfn);
#define pci_get_domain_bus_and_slot(domain, bus, devfn) \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 28, 5:53 PM (7 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15625425
Default Alt Text
D45846.diff (1 KB)
Attached To
Mode
D45846: LinuxKPI: Add pci_match_id to linux/pci.h
Attached
Detach File
Event Timeline
Log In to Comment