summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/sys/pci_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/common/sys/pci_impl.h')
-rw-r--r--usr/src/uts/common/sys/pci_impl.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/usr/src/uts/common/sys/pci_impl.h b/usr/src/uts/common/sys/pci_impl.h
index e5fb73d135..3e492e52ed 100644
--- a/usr/src/uts/common/sys/pci_impl.h
+++ b/usr/src/uts/common/sys/pci_impl.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -124,6 +123,22 @@ extern int memlist_count(struct memlist *);
#endif /* __i386 || __amd64 */
/*
+ * Parent private data structure for PCI/PCI-X/PCIe devices.
+ */
+typedef struct pci_parent_data {
+ uint32_t pci_bdf; /* BDF for pci/pci-x/pcie */
+ uint8_t pci_sec_bus; /* PCIE2PCI bridge's secondary bus */
+ uint8_t pci_phfun; /* Phantom funs for pci-x/pcie */
+} pci_parent_data_t;
+
+#define PCI_GET_BDF(dip) \
+ ((pci_parent_data_t *)DEVI((dip))->devi_parent_data)->pci_bdf
+#define PCI_GET_SEC_BUS(dip) \
+ ((pci_parent_data_t *)DEVI((dip))->devi_parent_data)->pci_sec_bus
+#define PCI_GET_PHFUN(dip) \
+ ((pci_parent_data_t *)DEVI((dip))->devi_parent_data)->pci_phfun
+
+/*
* PCI capability related definitions.
*/