did_impl.h revision 00d0963faf2e861a4aef6b1bf28f99a5b2b20755
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * CDDL HEADER START
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * The contents of this file are subject to the terms of the
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * Common Development and Distribution License (the "License").
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * You may not use this file except in compliance with the License.
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * or http://www.opensolaris.org/os/licensing.
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * See the License for the specific language governing permissions
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * and limitations under the License.
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * When distributing Covered Code, include this CDDL HEADER in each
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * If applicable, add the following below this CDDL HEADER, with the
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * fields enclosed by brackets "[]" replaced with your own identifying
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * information: Portions Copyright [yyyy] [name of copyright owner]
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * CDDL HEADER END
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * Use is subject to license terms.
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey#pragma ident "%Z%%M% %I% %E% SMI"
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * Slot name info is attached to devinfo nodes, compressed inside of
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * a "slot-names" property. When we dig this out we store each name
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * as an FMRI, along with the device number to which it applies.
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeytypedef struct slotnm {
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey topo_mod_t *snm_mod; /* module that allocated the slot name */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey int snm_dev; /* device on the bus that implements the slot */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey char *snm_label; /* label describing the slot */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * Private data stored with a tnode_t. We collect slot-name info from
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * di_nodes that describe buses, but then don't use it until we get to
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * a tnode_t actually describing a function of a device. We also use
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * this struct to pass around bus, dev, function info so that doesn't
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey * have to be re-computed.
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskeytypedef struct did {
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey struct did *dp_next; /* for chaining in a hash bucket */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey struct did *dp_link; /* for chaining to related did_t */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey struct did *dp_chain; /* for chaining to another chain of did_ts */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey struct did_hash *dp_hash; /* the hash table where we reside */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey topo_mod_t *dp_mod; /* module that allocated the did private data */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey di_node_t dp_src; /* di_node_t from which the info was derived */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey int dp_refcnt; /* multiple nodes allowed to point at a did_t */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey uint_t dp_excap; /* PCI-Express capabilities */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey int dp_physlot; /* PCI-Express physical slot # */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey char *dp_physlot_label; /* PCI-Express slot implemented */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey int dp_dev; /* PCI device number on the above bus */
6ba597c56d749c61b4f783157f63196d7b2445f0Anurag S. Maskey int dp_fn; /* PCI function number of the above device */
} did_t;
typedef struct did_hash {
} did_hash_t;
#ifdef __cplusplus