Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Define masks for subsystem vendor and subsystem ...
details: https://anonhg.NetBSD.org/src/rev/8199f1bbe1e1
branches: trunk
changeset: 761382:8199f1bbe1e1
user: dyoung <dyoung%NetBSD.org@localhost>
date: Wed Jan 26 00:49:56 2011 +0000
description:
Define masks for subsystem vendor and subsystem ID fields, plus a couple
of macros for extracting them.
diffstat:
sys/dev/pci/pcireg.h | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diffs (25 lines):
diff -r 0f45e1cf8df0 -r 8199f1bbe1e1 sys/dev/pci/pcireg.h
--- a/sys/dev/pci/pcireg.h Wed Jan 26 00:25:55 2011 +0000
+++ b/sys/dev/pci/pcireg.h Wed Jan 26 00:49:56 2011 +0000
@@ -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)
*/
Home |
Main Index |
Thread Index |
Old Index