summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2004-11-16 00:31:03 +0000
committerBrad Smith <brad@cvs.openbsd.org>2004-11-16 00:31:03 +0000
commit81580ca2db0ca9eabcfcdf02278db0ad87c092ad (patch)
treeb51d2bcb48fdc9bc2891be28fbc708d3d9ac28d8 /sys/dev
parentbe0e18ce4af4e5e9b0d2aa4a7a16f94de2a48b5f (diff)
add PCI_ID_CODE
From NetBSD
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/pcireg.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/pcireg.h b/sys/dev/pci/pcireg.h
index e5061ddd0b8..183fed2c545 100644
--- a/sys/dev/pci/pcireg.h
+++ b/sys/dev/pci/pcireg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcireg.h,v 1.26 2003/12/06 14:40:33 grange Exp $ */
+/* $OpenBSD: pcireg.h,v 1.27 2004/11/16 00:31:02 brad Exp $ */
/* $NetBSD: pcireg.h,v 1.26 2000/05/10 16:58:42 thorpej Exp $ */
/*
@@ -58,6 +58,10 @@ typedef u_int16_t pci_product_id_t;
#define PCI_PRODUCT(id) \
(((id) >> PCI_PRODUCT_SHIFT) & PCI_PRODUCT_MASK)
+#define PCI_ID_CODE(vid,pid) \
+ ((((vid) & PCI_VENDOR_MASK) << PCI_VENDOR_SHIFT) | \
+ (((pid) & PCI_PRODUCT_MASK) << PCI_PRODUCT_SHIFT))
+
/*
* Command and status register.
*/