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