4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright (c) 1999-2000 by Sun Microsystems, Inc.
24 * All rights reserved.
27 #ifndef _MONTECARLO_SYS_HSCIMPL_H
28 #define _MONTECARLO_SYS_HSCIMPL_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
36 #include <sys/types.h>
37 #include <sys/hotplug/hpctrl.h>
42 #define HSC_ENABLED 0x1 /* if not enabled, slot unmanaged */
43 #define HSC_AUTOCFG 0x2 /* if set, ENUM# events will be sent */
44 #define HSC_REGISTERED HSC_ENABLED
45 #define HSC_ALARM_CARD_PRES 0x4 /* Alarm Card on this slot */
46 #define HSC_BOARD_TYPE_HS 0x8
47 #define HSC_BOARD_TYPE_UNKNOWN 0x10
48 #define HSC_SLOT_ENABLED 0x20
49 #define HSC_SLOT_BAD_STATE 0x40 /* Surprise Removal on this slot */
50 #define HSC_ENUM_FAILED 0x80 /* Could not Enumerate this slot */
51 #define HSC_SCB_HOTSWAPPED 0x100 /* slot status change due to SCB swap */
52 #define HSC_HOTSWAP_MODE_BASIC 0
53 #define HSC_HOTSWAP_MODE_FULL 1
56 typedef struct hsc_slot_state
{
61 typedef struct hsc_slot_table
{
68 typedef struct hsc_prom_slot_table
{
73 } hsc_prom_slot_table_t
;
75 typedef struct hsc_state
{
80 struct hsc_slot
*hsp_last
; /* last board plugged in. */
81 hsc_slot_table_t
*slot_table_prop
;
85 ddi_iblock_cookie_t enum_iblock
;
87 int n_registered_occupants
;
92 * This struct describes a HS slot known to us. It maintains
93 * all the state associated with the slot.
94 * Slots are placed on a linked list.
96 typedef struct hsc_slot
{
97 struct hsc_slot
*hs_next
;
99 void *hs_hpchandle
; /* HPC (scsb) handle */
102 * The hs_slot_number identifies the plysical slot.
103 * It should match with the documentation.
107 hpc_slot_info_t hs_info
;
109 hpc_board_type_t hs_board_type
;
111 * We only have 2 LEDs/slot on MonteCarlo, so we map them
112 * to the ACTIVE and FAULT ones.
113 * ACTIVE will be set when a board is in the slot, and has
116 hpc_led_state_t hs_active_led_state
;
117 hpc_led_state_t hs_fault_led_state
;
120 * hs_slot_handle is useful for supporting ENUM#
121 * (when we need to inform the nexus of the event).
123 hpc_slot_t hs_slot_handle
;
127 boolean_t hs_board_configured
;
128 boolean_t hs_board_configuring
;
129 boolean_t hs_board_unconfiguring
;
130 boolean_t hs_board_healthy
;
133 * The hs_slot_state is useful for HW-connection control
135 hpc_slot_state_t hs_slot_state
;
136 hsc_state_t
*hsc
; /* pointer to our controller device */
139 /* state values in our control structure */
140 #define HSC_ENUM_ENABLED 1
141 #define HSC_ATTACHED 2
142 #define HSC_SCB_CONNECTED 4
148 #endif /* _MONTECARLO_SYS_HSCIMPL_H */