Module Name:    src
Committed By:   dyoung
Date:           Wed Jan 26 00:49:56 UTC 2011

Modified Files:
        src/sys/dev/pci: pcireg.h

Log Message:
Define masks for subsystem vendor and subsystem ID fields, plus a couple
of macros for extracting them.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/pci/pcireg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/pcireg.h
diff -u src/sys/dev/pci/pcireg.h:1.69 src/sys/dev/pci/pcireg.h:1.70
--- src/sys/dev/pci/pcireg.h:1.69	Mon Jan 10 12:23:21 2011
+++ src/sys/dev/pci/pcireg.h	Wed Jan 26 00:49:56 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcireg.h,v 1.69 2011/01/10 12:23:21 jmcneill Exp $	*/
+/*	$NetBSD: pcireg.h,v 1.70 2011/01/26 00:49:56 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1995, 1996, 1999, 2000
@@ -429,6 +429,15 @@
  */
 #define PCI_SUBSYS_ID_REG 0x2c
 
+#define	PCI_SUBSYS_VENDOR_MASK	__BITS(15, 0)
+#define	PCI_SUBSYS_ID_MASK		__BITS(31, 16)
+
+#define	PCI_SUBSYS_VENDOR(__subsys_id)	\
+    __SHIFTOUT(__subsys_id, PCI_SUBSYS_VENDOR_MASK)
+
+#define	PCI_SUBSYS_ID(__subsys_id)	\
+    __SHIFTOUT(__subsys_id, PCI_SUBSYS_ID_MASK)
+
 /*
  * Capabilities link list (PCI rev. 2.2)
  */

Reply via email to