4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
30 * Sun DDI hotplug support definitions
40 * Typedef of generic hotplug state machine for Hotplug Connection (CN)
43 DDI_HP_CN_STATE_EMPTY
= 0x1000, /* Empty */
44 DDI_HP_CN_STATE_PRESENT
= 0x2000, /* A Device Present */
45 DDI_HP_CN_STATE_POWERED
= 0x3000, /* Powered */
46 DDI_HP_CN_STATE_ENABLED
= 0x4000, /* Enabled */
47 DDI_HP_CN_STATE_PORT_EMPTY
= 0x5000, /* PORT Empty */
48 DDI_HP_CN_STATE_PORT_PRESENT
= 0x6000, /* A Device Node Present */
49 DDI_HP_CN_STATE_OFFLINE
= 0x7000, /* Driver not attached */
50 DDI_HP_CN_STATE_ATTACHED
= 0x8000, /* Device driver attached */
51 DDI_HP_CN_STATE_MAINTENANCE
= 0x9000, /* Device in maintenance */
52 DDI_HP_CN_STATE_ONLINE
= 0xa000 /* Device is ready */
58 * Typedef for Hotplug Connection (CN) types.
61 DDI_HP_CN_TYPE_VIRTUAL_PORT
= 0x1, /* Virtual Hotplug Port */
62 DDI_HP_CN_TYPE_PCI
= 0x2, /* PCI bus slot */
63 DDI_HP_CN_TYPE_PCIE
= 0x3 /* PCI Express slot */
66 #define DDI_HP_CN_TYPE_STR_PORT "Virtual-Port"
68 * The value set to ddi_hp_cn_info_t->cn_num_dpd_on in the case of the
69 * connection does not depend on any other connections.
71 #define DDI_HP_CN_NUM_NONE -1
76 * Hotplug Connection (CN) information structure
78 typedef struct ddi_hp_cn_info
{
79 char *cn_name
; /* Name of the Connection */
85 * Depend-on connection number;
86 * The connection number on which this connection is depending on.
87 * If this connection does not depend on any other connections
88 * under the same parent node, then it's cn_num_dpd_on is set to
93 ddi_hp_cn_type_t cn_type
; /* Type: Port, PCI, PCIE, ... */
96 * Description string for types of Connection. Set by bus software
97 * and read by users only.
101 * The child device of this Port.
102 * It is NULL if this is a Connector.
104 dev_info_t
*cn_child
;
106 ddi_hp_cn_state_t cn_state
; /* Hotplug Connection state */
107 time32_t cn_last_change
; /* Last time state changed. */
110 typedef struct ddi_hp_property
{
115 #if defined(_SYSCALL32)
116 typedef struct ddi_hp_property32
{
117 caddr32_t nvlist_buf
;
119 } ddi_hp_property32_t
;
126 #endif /* _SYS_DDI_HP_H */