1*7836SJohn.Forte@Sun.COM /* 2*7836SJohn.Forte@Sun.COM * CDDL HEADER START 3*7836SJohn.Forte@Sun.COM * 4*7836SJohn.Forte@Sun.COM * The contents of this file are subject to the terms of the 5*7836SJohn.Forte@Sun.COM * Common Development and Distribution License (the "License"). 6*7836SJohn.Forte@Sun.COM * You may not use this file except in compliance with the License. 7*7836SJohn.Forte@Sun.COM * 8*7836SJohn.Forte@Sun.COM * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*7836SJohn.Forte@Sun.COM * or http://www.opensolaris.org/os/licensing. 10*7836SJohn.Forte@Sun.COM * See the License for the specific language governing permissions 11*7836SJohn.Forte@Sun.COM * and limitations under the License. 12*7836SJohn.Forte@Sun.COM * 13*7836SJohn.Forte@Sun.COM * When distributing Covered Code, include this CDDL HEADER in each 14*7836SJohn.Forte@Sun.COM * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*7836SJohn.Forte@Sun.COM * If applicable, add the following below this CDDL HEADER, with the 16*7836SJohn.Forte@Sun.COM * fields enclosed by brackets "[]" replaced with your own identifying 17*7836SJohn.Forte@Sun.COM * information: Portions Copyright [yyyy] [name of copyright owner] 18*7836SJohn.Forte@Sun.COM * 19*7836SJohn.Forte@Sun.COM * CDDL HEADER END 20*7836SJohn.Forte@Sun.COM */ 21*7836SJohn.Forte@Sun.COM /* 22*7836SJohn.Forte@Sun.COM * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23*7836SJohn.Forte@Sun.COM * Use is subject to license terms. 24*7836SJohn.Forte@Sun.COM */ 25*7836SJohn.Forte@Sun.COM 26*7836SJohn.Forte@Sun.COM /* 27*7836SJohn.Forte@Sun.COM * A5X00 Library definitions 28*7836SJohn.Forte@Sun.COM */ 29*7836SJohn.Forte@Sun.COM 30*7836SJohn.Forte@Sun.COM /* 31*7836SJohn.Forte@Sun.COM * I18N message number ranges 32*7836SJohn.Forte@Sun.COM * This file: 16000 - 16499 33*7836SJohn.Forte@Sun.COM * Shared common messages: 1 - 1999 34*7836SJohn.Forte@Sun.COM */ 35*7836SJohn.Forte@Sun.COM 36*7836SJohn.Forte@Sun.COM #ifndef _A5K_H 37*7836SJohn.Forte@Sun.COM #define _A5K_H 38*7836SJohn.Forte@Sun.COM 39*7836SJohn.Forte@Sun.COM 40*7836SJohn.Forte@Sun.COM #ifdef __cplusplus 41*7836SJohn.Forte@Sun.COM extern "C" { 42*7836SJohn.Forte@Sun.COM #endif 43*7836SJohn.Forte@Sun.COM 44*7836SJohn.Forte@Sun.COM 45*7836SJohn.Forte@Sun.COM /* Defines */ 46*7836SJohn.Forte@Sun.COM #define ENCLOSURE_PROD_ID "SENA" 47*7836SJohn.Forte@Sun.COM #define ENCLOSURE_PROD_NAME "Network Array" 48*7836SJohn.Forte@Sun.COM #define MAX_DRIVES_PER_BOX 22 49*7836SJohn.Forte@Sun.COM #define MAX_DRIVES_DAK 12 50*7836SJohn.Forte@Sun.COM #define L_WWN_LENGTH 16 51*7836SJohn.Forte@Sun.COM #define BOX_ID_MASK 0x60 52*7836SJohn.Forte@Sun.COM #define BOX_ID 0x0d 53*7836SJohn.Forte@Sun.COM #define ALT_BOX_ID 0x10 54*7836SJohn.Forte@Sun.COM 55*7836SJohn.Forte@Sun.COM #define MAX_IB_ELEMENTS 50 56*7836SJohn.Forte@Sun.COM #define MAX_VEND_SPECIFIC_ENC 216 57*7836SJohn.Forte@Sun.COM #define MAX_POSSIBLE_ELEMENTS 255 58*7836SJohn.Forte@Sun.COM 59*7836SJohn.Forte@Sun.COM #define SET_RQST_INSRT 0 60*7836SJohn.Forte@Sun.COM #define SET_RQST_RMV 1 61*7836SJohn.Forte@Sun.COM #define OVERALL_STATUS 2 62*7836SJohn.Forte@Sun.COM #define SET_FAULT 3 63*7836SJohn.Forte@Sun.COM #define SET_DRV_ON 4 64*7836SJohn.Forte@Sun.COM #define INSERT_DEVICE 106 65*7836SJohn.Forte@Sun.COM #define REMOVE_DEVICE 114 66*7836SJohn.Forte@Sun.COM /* device specific identification for display, etc */ 67*7836SJohn.Forte@Sun.COM #define DAK_OFF_NAME "Daktari official" /* inq response, prod ident */ 68*7836SJohn.Forte@Sun.COM #define DAK_PROD_STR "SUNWGS INT FCBPL" 69*7836SJohn.Forte@Sun.COM #define UNDEF_ENC_TYPE 2 70*7836SJohn.Forte@Sun.COM #define DAK_ENC_TYPE 1 71*7836SJohn.Forte@Sun.COM #define SENA_ENC_TYPE 0 72*7836SJohn.Forte@Sun.COM 73*7836SJohn.Forte@Sun.COM 74*7836SJohn.Forte@Sun.COM /* Page defines */ 75*7836SJohn.Forte@Sun.COM #define L_PAGE_PAGE_LIST 0x00 /* Supported pages page */ 76*7836SJohn.Forte@Sun.COM #define L_PAGE_CONFIG 0x01 /* Configuration page */ 77*7836SJohn.Forte@Sun.COM #define L_PAGE_1 L_PAGE_CONFIG 78*7836SJohn.Forte@Sun.COM #define L_PAGE_ENCL_CTL 0x02 /* Enclosure Control page */ 79*7836SJohn.Forte@Sun.COM #define L_PAGE_ENCL_STATUS 0x02 /* Enclosure status page */ 80*7836SJohn.Forte@Sun.COM #define L_PAGE_2 L_PAGE_ENCL_STATUS 81*7836SJohn.Forte@Sun.COM #define L_PAGE_STRING 0x04 82*7836SJohn.Forte@Sun.COM #define L_PAGE_4 L_PAGE_STRING 83*7836SJohn.Forte@Sun.COM #define L_PAGE_7 0x07 /* Element Descriptor Page */ 84*7836SJohn.Forte@Sun.COM 85*7836SJohn.Forte@Sun.COM #define L_MAX_POSSIBLE_PAGES 255 86*7836SJohn.Forte@Sun.COM #define L_MAX_SENAIB_PAGES 8 87*7836SJohn.Forte@Sun.COM 88*7836SJohn.Forte@Sun.COM /* 89*7836SJohn.Forte@Sun.COM * FRU types internal and external (host SES type) 90*7836SJohn.Forte@Sun.COM */ 91*7836SJohn.Forte@Sun.COM #define ELM_TYP_NONE 0x0 /* Unspecified */ 92*7836SJohn.Forte@Sun.COM #define ELM_TYP_DD 0x01 /* Disk Drive - device */ 93*7836SJohn.Forte@Sun.COM #define ELM_TYP_PS 0x02 /* Power Supply */ 94*7836SJohn.Forte@Sun.COM #define ELM_TYP_FT 0x03 /* Fan Tray - cooling element */ 95*7836SJohn.Forte@Sun.COM #define ELM_TYP_TS 0x04 /* Temperature Sensors */ 96*7836SJohn.Forte@Sun.COM #define ELM_TYP_FP 0x0c /* FPM screen - display */ 97*7836SJohn.Forte@Sun.COM #define ELM_TYP_KP 0x0d /* keypad on FPM - keypad device */ 98*7836SJohn.Forte@Sun.COM #define ELM_TYP_FL 0x0f /* Fibre Link module - SCSI port/trancvr */ 99*7836SJohn.Forte@Sun.COM #define ELM_TYP_LN 0x10 /* Language */ 100*7836SJohn.Forte@Sun.COM #define ELM_TYP_SP 0x11 /* Serial Port - communicaion port */ 101*7836SJohn.Forte@Sun.COM #define ELM_TYP_MB 0x80 /* Motherboard/Centerplane */ 102*7836SJohn.Forte@Sun.COM #define ELM_TYP_IB 0x81 /* IB(ESI) - controller electronics */ 103*7836SJohn.Forte@Sun.COM #define ELM_TYP_BP 0x82 /* BackPlane */ 104*7836SJohn.Forte@Sun.COM #define ELM_TYP_LO 0xa0 /* Loop Configuration */ 105*7836SJohn.Forte@Sun.COM #define ELM_TYP_OR 0xa2 /* Orientation */ 106*7836SJohn.Forte@Sun.COM 107*7836SJohn.Forte@Sun.COM #define S_HI_SPEED 0x5 108*7836SJohn.Forte@Sun.COM 109*7836SJohn.Forte@Sun.COM /* code (status code) definitions */ 110*7836SJohn.Forte@Sun.COM #define S_OK 0x01 111*7836SJohn.Forte@Sun.COM #define S_CRITICAL 0x02 112*7836SJohn.Forte@Sun.COM #define S_NONCRITICAL 0x03 113*7836SJohn.Forte@Sun.COM #define S_NOT_INSTALLED 0x05 114*7836SJohn.Forte@Sun.COM #define S_NOT_AVAILABLE 0x07 115*7836SJohn.Forte@Sun.COM 116*7836SJohn.Forte@Sun.COM /* String codes. */ 117*7836SJohn.Forte@Sun.COM #define L_WWN 0x01 118*7836SJohn.Forte@Sun.COM #define L_PASSWORD 0x02 119*7836SJohn.Forte@Sun.COM #define L_ENCL_NAME 0x03 120*7836SJohn.Forte@Sun.COM #define L_BOX_ID 0x04 121*7836SJohn.Forte@Sun.COM #define L_AUTO_LIP 0x05 122*7836SJohn.Forte@Sun.COM 123*7836SJohn.Forte@Sun.COM /* Loop states */ 124*7836SJohn.Forte@Sun.COM #define L_NO_LOOP 0x80 /* drive not accessable */ 125*7836SJohn.Forte@Sun.COM #define L_INVALID_WWN 0x100 126*7836SJohn.Forte@Sun.COM #define L_INVALID_MAP 0x200 127*7836SJohn.Forte@Sun.COM #define L_NO_PATH_FOUND 0x400 128*7836SJohn.Forte@Sun.COM 129*7836SJohn.Forte@Sun.COM /* d_state_flags definitions */ 130*7836SJohn.Forte@Sun.COM #define L_OK 0x00 /* NOTE: Must be zero. */ 131*7836SJohn.Forte@Sun.COM #define L_NOT_READY 0x01 132*7836SJohn.Forte@Sun.COM #define L_NOT_READABLE 0x02 133*7836SJohn.Forte@Sun.COM #define L_SPUN_DWN_D 0x04 134*7836SJohn.Forte@Sun.COM #define L_RESERVED 0x08 135*7836SJohn.Forte@Sun.COM #define L_OPEN_FAIL 0x10 136*7836SJohn.Forte@Sun.COM #define L_NO_LABEL 0x20 137*7836SJohn.Forte@Sun.COM #define L_SCSI_ERR 0x40 138*7836SJohn.Forte@Sun.COM 139*7836SJohn.Forte@Sun.COM /* Values used by the l_led function */ 140*7836SJohn.Forte@Sun.COM #define L_LED_STATUS 0x00 141*7836SJohn.Forte@Sun.COM #define L_LED_RQST_IDENTIFY 0x01 142*7836SJohn.Forte@Sun.COM #define L_LED_ON 0x02 143*7836SJohn.Forte@Sun.COM #define L_LED_OFF 0x04 144*7836SJohn.Forte@Sun.COM 145*7836SJohn.Forte@Sun.COM /* Structure definitions */ 146*7836SJohn.Forte@Sun.COM typedef struct box_list_struct { 147*7836SJohn.Forte@Sun.COM uchar_t prod_id_s[17]; /* NULL terminated string */ 148*7836SJohn.Forte@Sun.COM uchar_t b_name[33]; /* NULL terminated string */ 149*7836SJohn.Forte@Sun.COM char logical_path[MAXNAMELEN]; 150*7836SJohn.Forte@Sun.COM char b_physical_path[MAXNAMELEN]; 151*7836SJohn.Forte@Sun.COM char b_node_wwn_s[17]; /* NULL terminated string */ 152*7836SJohn.Forte@Sun.COM uchar_t b_node_wwn[8]; 153*7836SJohn.Forte@Sun.COM char b_port_wwn_s[17]; /* NULL terminated string */ 154*7836SJohn.Forte@Sun.COM uchar_t b_port_wwn[8]; 155*7836SJohn.Forte@Sun.COM struct box_list_struct *box_prev; 156*7836SJohn.Forte@Sun.COM struct box_list_struct *box_next; 157*7836SJohn.Forte@Sun.COM } Box_list; 158*7836SJohn.Forte@Sun.COM 159*7836SJohn.Forte@Sun.COM 160*7836SJohn.Forte@Sun.COM typedef struct path_struct { 161*7836SJohn.Forte@Sun.COM char *p_physical_path; 162*7836SJohn.Forte@Sun.COM char *argv; 163*7836SJohn.Forte@Sun.COM int slot_valid; /* Slot valid flag. */ 164*7836SJohn.Forte@Sun.COM int slot; 165*7836SJohn.Forte@Sun.COM int f_flag; /* Front/rear flag. 1 = front */ 166*7836SJohn.Forte@Sun.COM int ib_path_flag; 167*7836SJohn.Forte@Sun.COM } Path_struct; 168*7836SJohn.Forte@Sun.COM 169*7836SJohn.Forte@Sun.COM 170*7836SJohn.Forte@Sun.COM /* 171*7836SJohn.Forte@Sun.COM * Page 0 172*7836SJohn.Forte@Sun.COM */ 173*7836SJohn.Forte@Sun.COM typedef struct ib_page_0 { 174*7836SJohn.Forte@Sun.COM uchar_t page_code; 175*7836SJohn.Forte@Sun.COM uchar_t sub_enclosures; 176*7836SJohn.Forte@Sun.COM ushort_t page_len; 177*7836SJohn.Forte@Sun.COM uchar_t sup_page_codes[0x100]; 178*7836SJohn.Forte@Sun.COM } IB_page_0; 179*7836SJohn.Forte@Sun.COM 180*7836SJohn.Forte@Sun.COM /* 181*7836SJohn.Forte@Sun.COM * Page 1 182*7836SJohn.Forte@Sun.COM * Configuration page 183*7836SJohn.Forte@Sun.COM */ 184*7836SJohn.Forte@Sun.COM typedef struct type_desc_hdr { 185*7836SJohn.Forte@Sun.COM uchar_t type; 186*7836SJohn.Forte@Sun.COM uchar_t num; 187*7836SJohn.Forte@Sun.COM uchar_t sub_id; 188*7836SJohn.Forte@Sun.COM uchar_t text_len; 189*7836SJohn.Forte@Sun.COM } Type_desc_hdr; 190*7836SJohn.Forte@Sun.COM 191*7836SJohn.Forte@Sun.COM typedef struct type_desc_text { 192*7836SJohn.Forte@Sun.COM uchar_t text_element[256]; 193*7836SJohn.Forte@Sun.COM } Type_desc_text; 194*7836SJohn.Forte@Sun.COM 195*7836SJohn.Forte@Sun.COM typedef struct ib_page_config { 196*7836SJohn.Forte@Sun.COM uchar_t page_code; 197*7836SJohn.Forte@Sun.COM uchar_t sub_enclosures; 198*7836SJohn.Forte@Sun.COM ushort_t page_len; 199*7836SJohn.Forte@Sun.COM uint_t gen_code; 200*7836SJohn.Forte@Sun.COM /* Enclosure descriptor header */ 201*7836SJohn.Forte@Sun.COM uchar_t enc_res; 202*7836SJohn.Forte@Sun.COM uchar_t enc_sub_id; 203*7836SJohn.Forte@Sun.COM uchar_t enc_num_elem; 204*7836SJohn.Forte@Sun.COM uchar_t enc_len; 205*7836SJohn.Forte@Sun.COM /* Enclosure descriptor */ 206*7836SJohn.Forte@Sun.COM uchar_t enc_node_wwn[8]; 207*7836SJohn.Forte@Sun.COM uchar_t vend_id[8]; 208*7836SJohn.Forte@Sun.COM uchar_t prod_id[16]; 209*7836SJohn.Forte@Sun.COM uchar_t prod_revision[4]; 210*7836SJohn.Forte@Sun.COM uchar_t res[MAX_VEND_SPECIFIC_ENC]; 211*7836SJohn.Forte@Sun.COM Type_desc_hdr type_hdr[MAX_IB_ELEMENTS]; 212*7836SJohn.Forte@Sun.COM Type_desc_text text[MAX_IB_ELEMENTS]; 213*7836SJohn.Forte@Sun.COM } IB_page_config; 214*7836SJohn.Forte@Sun.COM 215*7836SJohn.Forte@Sun.COM 216*7836SJohn.Forte@Sun.COM /* 217*7836SJohn.Forte@Sun.COM * Page 2 218*7836SJohn.Forte@Sun.COM * Enclosure status/control page 219*7836SJohn.Forte@Sun.COM */ 220*7836SJohn.Forte@Sun.COM /* 221*7836SJohn.Forte@Sun.COM * Loop Configuration. 222*7836SJohn.Forte@Sun.COM */ 223*7836SJohn.Forte@Sun.COM typedef struct loop_element_status { 224*7836SJohn.Forte@Sun.COM uchar_t : 1, /* reserved */ 225*7836SJohn.Forte@Sun.COM prd_fail : 1, 226*7836SJohn.Forte@Sun.COM : 2, /* reserved */ 227*7836SJohn.Forte@Sun.COM code : 4; 228*7836SJohn.Forte@Sun.COM uchar_t : 8; /* reserved */ 229*7836SJohn.Forte@Sun.COM uchar_t : 8; /* reserved */ 230*7836SJohn.Forte@Sun.COM uchar_t : 7, /* reserved */ 231*7836SJohn.Forte@Sun.COM split : 1; 232*7836SJohn.Forte@Sun.COM } Loop_elem_st; 233*7836SJohn.Forte@Sun.COM 234*7836SJohn.Forte@Sun.COM /* 235*7836SJohn.Forte@Sun.COM * Language 236*7836SJohn.Forte@Sun.COM */ 237*7836SJohn.Forte@Sun.COM typedef struct language_element_status { 238*7836SJohn.Forte@Sun.COM uchar_t : 1, /* reserved */ 239*7836SJohn.Forte@Sun.COM prd_fail : 1, 240*7836SJohn.Forte@Sun.COM : 2, /* reserved */ 241*7836SJohn.Forte@Sun.COM code : 4; 242*7836SJohn.Forte@Sun.COM uchar_t : 8; /* reserved */ 243*7836SJohn.Forte@Sun.COM ushort_t language_code; 244*7836SJohn.Forte@Sun.COM } Lang_elem_st; 245*7836SJohn.Forte@Sun.COM 246*7836SJohn.Forte@Sun.COM /* 247*7836SJohn.Forte@Sun.COM * Tranceiver status 248*7836SJohn.Forte@Sun.COM */ 249*7836SJohn.Forte@Sun.COM typedef struct trans_element_status { 250*7836SJohn.Forte@Sun.COM uchar_t : 1, /* reserved */ 251*7836SJohn.Forte@Sun.COM prd_fail : 1, 252*7836SJohn.Forte@Sun.COM : 2, /* reserved */ 253*7836SJohn.Forte@Sun.COM code : 4; 254*7836SJohn.Forte@Sun.COM uchar_t : 8; /* reserved */ 255*7836SJohn.Forte@Sun.COM uchar_t : 7, 256*7836SJohn.Forte@Sun.COM report : 1; 257*7836SJohn.Forte@Sun.COM uchar_t : 3, /* reserved */ 258*7836SJohn.Forte@Sun.COM disabled : 1, 259*7836SJohn.Forte@Sun.COM : 2, 260*7836SJohn.Forte@Sun.COM lol : 1, 261*7836SJohn.Forte@Sun.COM lsr_fail : 1; 262*7836SJohn.Forte@Sun.COM } Trans_elem_st; 263*7836SJohn.Forte@Sun.COM 264*7836SJohn.Forte@Sun.COM /* 265*7836SJohn.Forte@Sun.COM * ESI Controller status 266*7836SJohn.Forte@Sun.COM */ 267*7836SJohn.Forte@Sun.COM typedef struct ctlr_element_status { 268*7836SJohn.Forte@Sun.COM uchar_t : 1, /* reserved */ 269*7836SJohn.Forte@Sun.COM prd_fail : 1, 270*7836SJohn.Forte@Sun.COM : 2, /* reserved */ 271*7836SJohn.Forte@Sun.COM code : 4; 272*7836SJohn.Forte@Sun.COM uchar_t : 8; /* reserved */ 273*7836SJohn.Forte@Sun.COM uchar_t : 7, /* reserved */ 274*7836SJohn.Forte@Sun.COM report : 1; 275*7836SJohn.Forte@Sun.COM uchar_t : 4, /* reserved */ 276*7836SJohn.Forte@Sun.COM overtemp_alart : 1, 277*7836SJohn.Forte@Sun.COM : 1, /* reserved */ 278*7836SJohn.Forte@Sun.COM ib_loop_1_fail : 1, 279*7836SJohn.Forte@Sun.COM ib_loop_0_fail : 1; 280*7836SJohn.Forte@Sun.COM } Ctlr_elem_st; 281*7836SJohn.Forte@Sun.COM 282*7836SJohn.Forte@Sun.COM /* 283*7836SJohn.Forte@Sun.COM * Backplane status 284*7836SJohn.Forte@Sun.COM */ 285*7836SJohn.Forte@Sun.COM typedef struct bp_element_status { 286*7836SJohn.Forte@Sun.COM uchar_t select : 1, 287*7836SJohn.Forte@Sun.COM prd_fail : 1, 288*7836SJohn.Forte@Sun.COM : 2, /* reserved */ 289*7836SJohn.Forte@Sun.COM code : 4; 290*7836SJohn.Forte@Sun.COM uchar_t : 8; /* reserved */ 291*7836SJohn.Forte@Sun.COM uchar_t : 8; /* reserved */ 292*7836SJohn.Forte@Sun.COM uchar_t : 3, /* reserved */ 293*7836SJohn.Forte@Sun.COM disabled : 1, 294*7836SJohn.Forte@Sun.COM en_bypass_a : 1, /* Not in Spec. */ 295*7836SJohn.Forte@Sun.COM en_bypass_b : 1, /* Not in Spec. */ 296*7836SJohn.Forte@Sun.COM byp_a_enabled : 1, 297*7836SJohn.Forte@Sun.COM byp_b_enabled : 1; 298*7836SJohn.Forte@Sun.COM 299*7836SJohn.Forte@Sun.COM } Bp_elem_st; 300*7836SJohn.Forte@Sun.COM 301*7836SJohn.Forte@Sun.COM /* 302*7836SJohn.Forte@Sun.COM * Temperature sensor status 303*7836SJohn.Forte@Sun.COM */ 304*7836SJohn.Forte@Sun.COM typedef struct temp_element_status { 305*7836SJohn.Forte@Sun.COM uchar_t : 1, /* reserved */ 306*7836SJohn.Forte@Sun.COM prd_fail : 1, 307*7836SJohn.Forte@Sun.COM : 2, /* reserved */ 308*7836SJohn.Forte@Sun.COM code : 4; 309*7836SJohn.Forte@Sun.COM uchar_t : 8; /* reserved */ 310*7836SJohn.Forte@Sun.COM char degrees; 311*7836SJohn.Forte@Sun.COM uchar_t : 4, /* reserved */ 312*7836SJohn.Forte@Sun.COM ot_fail : 1, 313*7836SJohn.Forte@Sun.COM ot_warn : 1, 314*7836SJohn.Forte@Sun.COM ut_fail : 1, 315*7836SJohn.Forte@Sun.COM ut_warn : 1; 316*7836SJohn.Forte@Sun.COM } Temp_elem_st; 317*7836SJohn.Forte@Sun.COM 318*7836SJohn.Forte@Sun.COM typedef struct fan_element_status { 319*7836SJohn.Forte@Sun.COM uchar_t : 1, /* reserved */ 320*7836SJohn.Forte@Sun.COM prd_fail : 1, 321*7836SJohn.Forte@Sun.COM : 2, /* reserved */ 322*7836SJohn.Forte@Sun.COM code : 4; 323*7836SJohn.Forte@Sun.COM uchar_t : 8; /* reserved */ 324*7836SJohn.Forte@Sun.COM uchar_t : 8; /* reserved */ 325*7836SJohn.Forte@Sun.COM uchar_t : 1, /* reserved */ 326*7836SJohn.Forte@Sun.COM fail : 1, 327*7836SJohn.Forte@Sun.COM rqsted_on : 1, 328*7836SJohn.Forte@Sun.COM : 2, 329*7836SJohn.Forte@Sun.COM speed : 3; 330*7836SJohn.Forte@Sun.COM } Fan_elem_st; 331*7836SJohn.Forte@Sun.COM 332*7836SJohn.Forte@Sun.COM 333*7836SJohn.Forte@Sun.COM typedef struct ps_element_status { 334*7836SJohn.Forte@Sun.COM uchar_t : 1, /* reserved */ 335*7836SJohn.Forte@Sun.COM prd_fail : 1, 336*7836SJohn.Forte@Sun.COM : 1, /* reserved */ 337*7836SJohn.Forte@Sun.COM swap : 1, 338*7836SJohn.Forte@Sun.COM code : 4; 339*7836SJohn.Forte@Sun.COM uchar_t : 8; /* reserved */ 340*7836SJohn.Forte@Sun.COM uchar_t : 4, /* reserved */ 341*7836SJohn.Forte@Sun.COM dc_over : 1, 342*7836SJohn.Forte@Sun.COM dc_under : 1, 343*7836SJohn.Forte@Sun.COM dc_over_i : 1, 344*7836SJohn.Forte@Sun.COM : 1; /* reserved */ 345*7836SJohn.Forte@Sun.COM uchar_t : 1, /* reserved */ 346*7836SJohn.Forte@Sun.COM fail : 1, 347*7836SJohn.Forte@Sun.COM rqsted_on : 1, 348*7836SJohn.Forte@Sun.COM : 1, 349*7836SJohn.Forte@Sun.COM ovrtmp_fail : 1, 350*7836SJohn.Forte@Sun.COM temp_warn : 1, 351*7836SJohn.Forte@Sun.COM ac_fail : 1, 352*7836SJohn.Forte@Sun.COM dc_fail : 1; 353*7836SJohn.Forte@Sun.COM } Ps_elem_st; 354*7836SJohn.Forte@Sun.COM 355*7836SJohn.Forte@Sun.COM 356*7836SJohn.Forte@Sun.COM typedef struct device_element { 357*7836SJohn.Forte@Sun.COM uchar_t select : 1, 358*7836SJohn.Forte@Sun.COM prd_fail : 1, 359*7836SJohn.Forte@Sun.COM disable : 1, 360*7836SJohn.Forte@Sun.COM swap : 1, 361*7836SJohn.Forte@Sun.COM code : 4; 362*7836SJohn.Forte@Sun.COM uchar_t sel_id; /* Hard address */ 363*7836SJohn.Forte@Sun.COM uchar_t : 1, 364*7836SJohn.Forte@Sun.COM dont_remove : 1, 365*7836SJohn.Forte@Sun.COM : 2, 366*7836SJohn.Forte@Sun.COM rdy_to_ins : 1, 367*7836SJohn.Forte@Sun.COM rmv : 1, 368*7836SJohn.Forte@Sun.COM ident : 1, 369*7836SJohn.Forte@Sun.COM report : 1; 370*7836SJohn.Forte@Sun.COM uchar_t : 1, /* reserved */ 371*7836SJohn.Forte@Sun.COM fault : 1, 372*7836SJohn.Forte@Sun.COM fault_req : 1, 373*7836SJohn.Forte@Sun.COM dev_off : 1, 374*7836SJohn.Forte@Sun.COM en_bypass_a : 1, 375*7836SJohn.Forte@Sun.COM en_bypass_b : 1, 376*7836SJohn.Forte@Sun.COM bypass_a_en : 1, 377*7836SJohn.Forte@Sun.COM bypass_b_en : 1; 378*7836SJohn.Forte@Sun.COM } Dev_elem_st; 379*7836SJohn.Forte@Sun.COM 380*7836SJohn.Forte@Sun.COM 381*7836SJohn.Forte@Sun.COM typedef struct interconnect_assem_status { 382*7836SJohn.Forte@Sun.COM uchar_t : 4, /* reserved */ 383*7836SJohn.Forte@Sun.COM code : 4; 384*7836SJohn.Forte@Sun.COM uchar_t : 8; /* reserved */ 385*7836SJohn.Forte@Sun.COM uchar_t : 8; /* reserved */ 386*7836SJohn.Forte@Sun.COM uchar_t : 7, /* reserved */ 387*7836SJohn.Forte@Sun.COM eprom_fail : 1; 388*7836SJohn.Forte@Sun.COM } Interconnect_st; 389*7836SJohn.Forte@Sun.COM 390*7836SJohn.Forte@Sun.COM 391*7836SJohn.Forte@Sun.COM typedef struct ib_page_2 { 392*7836SJohn.Forte@Sun.COM uchar_t page_code; 393*7836SJohn.Forte@Sun.COM union { 394*7836SJohn.Forte@Sun.COM uchar_t res : 3, /* Reserved */ 395*7836SJohn.Forte@Sun.COM invop : 1, 396*7836SJohn.Forte@Sun.COM info : 1, 397*7836SJohn.Forte@Sun.COM non_crit : 1, 398*7836SJohn.Forte@Sun.COM crit : 1, 399*7836SJohn.Forte@Sun.COM unrec : 1; 400*7836SJohn.Forte@Sun.COM uchar_t ab_cond; 401*7836SJohn.Forte@Sun.COM } ui; 402*7836SJohn.Forte@Sun.COM ushort_t page_len; 403*7836SJohn.Forte@Sun.COM uint_t gen_code; 404*7836SJohn.Forte@Sun.COM uint_t element[MAX_POSSIBLE_ELEMENTS]; 405*7836SJohn.Forte@Sun.COM } IB_page_2; 406*7836SJohn.Forte@Sun.COM 407*7836SJohn.Forte@Sun.COM /* 408*7836SJohn.Forte@Sun.COM * Page 4 409*7836SJohn.Forte@Sun.COM * 410*7836SJohn.Forte@Sun.COM * String page. 411*7836SJohn.Forte@Sun.COM */ 412*7836SJohn.Forte@Sun.COM typedef struct page4_name { 413*7836SJohn.Forte@Sun.COM uchar_t page_code; 414*7836SJohn.Forte@Sun.COM uchar_t : 8; /* reserved */ 415*7836SJohn.Forte@Sun.COM ushort_t page_len; 416*7836SJohn.Forte@Sun.COM uchar_t string_code; 417*7836SJohn.Forte@Sun.COM uchar_t : 7, 418*7836SJohn.Forte@Sun.COM enable : 1; 419*7836SJohn.Forte@Sun.COM uchar_t : 8; /* reserved */ 420*7836SJohn.Forte@Sun.COM uchar_t : 8; /* reserved */ 421*7836SJohn.Forte@Sun.COM uchar_t name[32]; 422*7836SJohn.Forte@Sun.COM } Page4_name; 423*7836SJohn.Forte@Sun.COM 424*7836SJohn.Forte@Sun.COM 425*7836SJohn.Forte@Sun.COM typedef struct element_descriptor { 426*7836SJohn.Forte@Sun.COM uchar_t : 8; /* reserved */ 427*7836SJohn.Forte@Sun.COM uchar_t : 8; /* reserved */ 428*7836SJohn.Forte@Sun.COM ushort_t desc_len; 429*7836SJohn.Forte@Sun.COM uchar_t desc_string[0xff]; 430*7836SJohn.Forte@Sun.COM } Elem_desc; 431*7836SJohn.Forte@Sun.COM 432*7836SJohn.Forte@Sun.COM 433*7836SJohn.Forte@Sun.COM typedef struct ib_page_7 { 434*7836SJohn.Forte@Sun.COM uchar_t page_code; 435*7836SJohn.Forte@Sun.COM uchar_t : 8; /* reserved */ 436*7836SJohn.Forte@Sun.COM ushort_t page_len; 437*7836SJohn.Forte@Sun.COM uint_t gen_code; 438*7836SJohn.Forte@Sun.COM Elem_desc element_desc[MAX_POSSIBLE_ELEMENTS]; 439*7836SJohn.Forte@Sun.COM } IB_page_7; 440*7836SJohn.Forte@Sun.COM 441*7836SJohn.Forte@Sun.COM 442*7836SJohn.Forte@Sun.COM /* structure for IB */ 443*7836SJohn.Forte@Sun.COM typedef struct ib_state_struct { 444*7836SJohn.Forte@Sun.COM uchar_t enclosure_name[33]; /* extra character is NULL */ 445*7836SJohn.Forte@Sun.COM IB_page_0 p0; 446*7836SJohn.Forte@Sun.COM IB_page_config config; /* Enclosure configuration page */ 447*7836SJohn.Forte@Sun.COM IB_page_2 p2_s; /* Enclosure status page */ 448*7836SJohn.Forte@Sun.COM IB_page_7 p7_s; /* Element descriptor page */ 449*7836SJohn.Forte@Sun.COM int res; 450*7836SJohn.Forte@Sun.COM int box_id; 451*7836SJohn.Forte@Sun.COM struct dlist *ib_multipath_list; 452*7836SJohn.Forte@Sun.COM } Ib_state; 453*7836SJohn.Forte@Sun.COM 454*7836SJohn.Forte@Sun.COM 455*7836SJohn.Forte@Sun.COM /* Individual SENA drive state */ 456*7836SJohn.Forte@Sun.COM typedef struct l_disk_state_struct { 457*7836SJohn.Forte@Sun.COM Dev_elem_st ib_status; 458*7836SJohn.Forte@Sun.COM int l_state_flag; /* Loop State */ 459*7836SJohn.Forte@Sun.COM struct g_disk_state_struct g_disk_state; 460*7836SJohn.Forte@Sun.COM } L_disk_state; 461*7836SJohn.Forte@Sun.COM 462*7836SJohn.Forte@Sun.COM /* 463*7836SJohn.Forte@Sun.COM * State of the Photon 464*7836SJohn.Forte@Sun.COM */ 465*7836SJohn.Forte@Sun.COM typedef struct l_state_struct { 466*7836SJohn.Forte@Sun.COM Ib_state ib_tbl; /* state of controller */ 467*7836SJohn.Forte@Sun.COM 468*7836SJohn.Forte@Sun.COM int total_num_drv; 469*7836SJohn.Forte@Sun.COM struct l_disk_state_struct drv_front[MAX_DRIVES_PER_BOX/2]; 470*7836SJohn.Forte@Sun.COM struct l_disk_state_struct drv_rear[MAX_DRIVES_PER_BOX/2]; 471*7836SJohn.Forte@Sun.COM } L_state; 472*7836SJohn.Forte@Sun.COM 473*7836SJohn.Forte@Sun.COM 474*7836SJohn.Forte@Sun.COM /* 475*7836SJohn.Forte@Sun.COM * Function Prototypes for the functions defined in libg_fc 476*7836SJohn.Forte@Sun.COM * These are the functions that will be visible to an end user 477*7836SJohn.Forte@Sun.COM * They are all CONTRACT PRIVATE 478*7836SJohn.Forte@Sun.COM */ 479*7836SJohn.Forte@Sun.COM 480*7836SJohn.Forte@Sun.COM #if defined(__STDC__) 481*7836SJohn.Forte@Sun.COM 482*7836SJohn.Forte@Sun.COM extern int l_chk_null_wwn(Path_struct *, char *, L_state *, int); 483*7836SJohn.Forte@Sun.COM extern int l_convert_name(char *, char **, struct path_struct **, int); 484*7836SJohn.Forte@Sun.COM extern int l_dev_pwr_up_down(char *, struct path_struct *, int, int, int); 485*7836SJohn.Forte@Sun.COM extern int l_device_present(char *, int, gfc_map_t *, int, char **); 486*7836SJohn.Forte@Sun.COM extern int l_download(char *, char *, int, int); 487*7836SJohn.Forte@Sun.COM extern int l_duplicate_names(Box_list *, char *, char *, int); 488*7836SJohn.Forte@Sun.COM extern int l_encl_status_page_funcs(int, char *, int, char *, 489*7836SJohn.Forte@Sun.COM struct l_state_struct *, int, int, int); 490*7836SJohn.Forte@Sun.COM extern int l_format_ifp_status_msg(char *, int, int); 491*7836SJohn.Forte@Sun.COM extern int l_format_fc_status_msg(char *, int, int); 492*7836SJohn.Forte@Sun.COM extern void l_free_box_list(struct box_list_struct **); 493*7836SJohn.Forte@Sun.COM extern int l_free_lstate(L_state **); 494*7836SJohn.Forte@Sun.COM extern int l_get_allses(char *, struct box_list_struct *, struct dlist **, 495*7836SJohn.Forte@Sun.COM int); 496*7836SJohn.Forte@Sun.COM extern int l_get_box_list(struct box_list_struct **, int); 497*7836SJohn.Forte@Sun.COM extern int l_get_disk_element_index(struct l_state_struct *, int *, int *); 498*7836SJohn.Forte@Sun.COM extern int l_get_disk_port_status(char *, struct l_disk_state_struct *, 499*7836SJohn.Forte@Sun.COM int, int); 500*7836SJohn.Forte@Sun.COM extern int l_get_disk_status(char *, struct l_disk_state_struct *, 501*7836SJohn.Forte@Sun.COM WWN_list *, int); 502*7836SJohn.Forte@Sun.COM extern void l_get_drive_name(char *, int, int, char *); 503*7836SJohn.Forte@Sun.COM extern int l_get_envsen(char *, uchar_t *, int, int); 504*7836SJohn.Forte@Sun.COM extern int l_get_envsen_page(int, uchar_t *, int, uchar_t, int); 505*7836SJohn.Forte@Sun.COM extern int l_get_ib_status(char *, struct l_state_struct *, int); 506*7836SJohn.Forte@Sun.COM extern int l_get_individual_state(char *, struct l_disk_state_struct *, 507*7836SJohn.Forte@Sun.COM Ib_state *, int, struct box_list_struct *, 508*7836SJohn.Forte@Sun.COM struct wwn_list_struct *, int); 509*7836SJohn.Forte@Sun.COM extern int l_get_port(char *, int *, int); 510*7836SJohn.Forte@Sun.COM extern int l_get_ses_path(char *, char *, gfc_map_t *, int); 511*7836SJohn.Forte@Sun.COM extern int l_get_slot(struct path_struct *, L_state *, int); 512*7836SJohn.Forte@Sun.COM extern int l_get_status(char *, struct l_state_struct *, int); 513*7836SJohn.Forte@Sun.COM extern int l_led(struct path_struct *, int, struct device_element *, int); 514*7836SJohn.Forte@Sun.COM extern int l_make_node(char *, int, char *, gfc_map_t *, int); 515*7836SJohn.Forte@Sun.COM extern int l_new_name(char *, char *); 516*7836SJohn.Forte@Sun.COM extern int l_offline_photon(struct hotplug_disk_list *, 517*7836SJohn.Forte@Sun.COM struct wwn_list_struct *, int, int); 518*7836SJohn.Forte@Sun.COM extern int l_get_enc_type(L_inquiry inq); 519*7836SJohn.Forte@Sun.COM extern int l_pho_pwr_up_down(char *, char *, int, int, int); 520*7836SJohn.Forte@Sun.COM 521*7836SJohn.Forte@Sun.COM #else /* __STDC__ */ 522*7836SJohn.Forte@Sun.COM 523*7836SJohn.Forte@Sun.COM 524*7836SJohn.Forte@Sun.COM extern int l_chk_null_wwn(); 525*7836SJohn.Forte@Sun.COM extern int l_convert_name(); 526*7836SJohn.Forte@Sun.COM extern int l_dev_pwr_up_down(); 527*7836SJohn.Forte@Sun.COM extern int l_device_present(); 528*7836SJohn.Forte@Sun.COM extern int l_download(); 529*7836SJohn.Forte@Sun.COM extern int l_duplicate_names(); 530*7836SJohn.Forte@Sun.COM extern int l_encl_status_page_funcs(); 531*7836SJohn.Forte@Sun.COM extern int l_format_fc_status_msg(); 532*7836SJohn.Forte@Sun.COM extern int l_format_ifp_status_msg(); 533*7836SJohn.Forte@Sun.COM extern void l_free_box_list(); 534*7836SJohn.Forte@Sun.COM extern int l_free_lstate(); 535*7836SJohn.Forte@Sun.COM extern int l_get_allses(); 536*7836SJohn.Forte@Sun.COM extern int l_get_box_list(); 537*7836SJohn.Forte@Sun.COM extern int l_get_disk_element_index(); 538*7836SJohn.Forte@Sun.COM extern int l_get_disk_port_status(); 539*7836SJohn.Forte@Sun.COM extern int l_get_disk_status(); 540*7836SJohn.Forte@Sun.COM extern void l_get_drive_name(); 541*7836SJohn.Forte@Sun.COM extern int l_get_envsen(); 542*7836SJohn.Forte@Sun.COM extern int l_get_envsen_page(); 543*7836SJohn.Forte@Sun.COM extern int l_get_ib_status(); 544*7836SJohn.Forte@Sun.COM extern int l_get_individual_state(); 545*7836SJohn.Forte@Sun.COM extern int l_get_port(); 546*7836SJohn.Forte@Sun.COM extern int l_get_ses_path(); 547*7836SJohn.Forte@Sun.COM extern int l_get_slot(); 548*7836SJohn.Forte@Sun.COM extern int l_get_status(); 549*7836SJohn.Forte@Sun.COM extern int l_led(); 550*7836SJohn.Forte@Sun.COM extern int l_make_node(); 551*7836SJohn.Forte@Sun.COM extern int l_new_name(); 552*7836SJohn.Forte@Sun.COM extern int l_offline_photon(); 553*7836SJohn.Forte@Sun.COM extern int l_pho_pwr_up_down(); 554*7836SJohn.Forte@Sun.COM extern int l_get_enc_type(); 555*7836SJohn.Forte@Sun.COM 556*7836SJohn.Forte@Sun.COM #endif /* __STDC__ */ 557*7836SJohn.Forte@Sun.COM 558*7836SJohn.Forte@Sun.COM #ifdef __cplusplus 559*7836SJohn.Forte@Sun.COM } 560*7836SJohn.Forte@Sun.COM #endif 561*7836SJohn.Forte@Sun.COM 562*7836SJohn.Forte@Sun.COM #endif /* _A5K_H */ 563