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 #ifndef _SYS_FIBRE_CHANNEL_IMPL_FC_FLA_H 27*7836SJohn.Forte@Sun.COM #define _SYS_FIBRE_CHANNEL_IMPL_FC_FLA_H 28*7836SJohn.Forte@Sun.COM 29*7836SJohn.Forte@Sun.COM 30*7836SJohn.Forte@Sun.COM #include <sys/note.h> 31*7836SJohn.Forte@Sun.COM 32*7836SJohn.Forte@Sun.COM #ifdef __cplusplus 33*7836SJohn.Forte@Sun.COM extern "C" { 34*7836SJohn.Forte@Sun.COM #endif 35*7836SJohn.Forte@Sun.COM 36*7836SJohn.Forte@Sun.COM #if !defined(_BIT_FIELDS_LTOH) && !defined(_BIT_FIELDS_HTOL) 37*7836SJohn.Forte@Sun.COM #error One of _BIT_FIELDS_LTOH or _BIT_FIELDS_HTOL must be defined 38*7836SJohn.Forte@Sun.COM #endif /* _BIT_FIELDS_LTOH */ 39*7836SJohn.Forte@Sun.COM 40*7836SJohn.Forte@Sun.COM /* 41*7836SJohn.Forte@Sun.COM * Fabric Loop timers; Double check them with standards 42*7836SJohn.Forte@Sun.COM */ 43*7836SJohn.Forte@Sun.COM #define FLA_RR_TOV 2 44*7836SJohn.Forte@Sun.COM 45*7836SJohn.Forte@Sun.COM /* 46*7836SJohn.Forte@Sun.COM * SCR registration function codes 47*7836SJohn.Forte@Sun.COM */ 48*7836SJohn.Forte@Sun.COM #define FC_SCR_FABRIC_REGISTRATION 0x01 49*7836SJohn.Forte@Sun.COM #define FC_SCR_NPORT_REGISTRATION 0x02 50*7836SJohn.Forte@Sun.COM #define FC_SCR_FULL_REGISTRATION 0x03 51*7836SJohn.Forte@Sun.COM #define FC_SCR_CLEAR_REGISTRATION 0xFF 52*7836SJohn.Forte@Sun.COM 53*7836SJohn.Forte@Sun.COM /* 54*7836SJohn.Forte@Sun.COM * Address format of affected D_ID in RSCN Payload 55*7836SJohn.Forte@Sun.COM */ 56*7836SJohn.Forte@Sun.COM #define FC_RSCN_PORT_ADDRESS 0x00 57*7836SJohn.Forte@Sun.COM #define FC_RSCN_AREA_ADDRESS 0x01 58*7836SJohn.Forte@Sun.COM #define FC_RSCN_DOMAIN_ADDRESS 0x02 59*7836SJohn.Forte@Sun.COM #define FC_RSCN_FABRIC_ADDRESS 0x03 60*7836SJohn.Forte@Sun.COM 61*7836SJohn.Forte@Sun.COM #define FC_RSCN_ADDRESS_MASK 0x03 62*7836SJohn.Forte@Sun.COM 63*7836SJohn.Forte@Sun.COM /* 64*7836SJohn.Forte@Sun.COM * State Change Registration 65*7836SJohn.Forte@Sun.COM */ 66*7836SJohn.Forte@Sun.COM typedef struct scr_request { 67*7836SJohn.Forte@Sun.COM ls_code_t ls_code; 68*7836SJohn.Forte@Sun.COM 69*7836SJohn.Forte@Sun.COM #if defined(_BIT_FIELDS_LTOH) 70*7836SJohn.Forte@Sun.COM uint32_t scr_func : 8, 71*7836SJohn.Forte@Sun.COM scr_rsvd : 24; 72*7836SJohn.Forte@Sun.COM #else 73*7836SJohn.Forte@Sun.COM uint32_t scr_rsvd : 24, 74*7836SJohn.Forte@Sun.COM scr_func : 8; 75*7836SJohn.Forte@Sun.COM #endif /* _BIT_FIELDS_LTOH */ 76*7836SJohn.Forte@Sun.COM 77*7836SJohn.Forte@Sun.COM } fc_scr_req_t; 78*7836SJohn.Forte@Sun.COM 79*7836SJohn.Forte@Sun.COM typedef struct scr_response { 80*7836SJohn.Forte@Sun.COM uint32_t scr_acc; 81*7836SJohn.Forte@Sun.COM } fc_scr_resp_t; 82*7836SJohn.Forte@Sun.COM 83*7836SJohn.Forte@Sun.COM typedef struct rscn_payload { 84*7836SJohn.Forte@Sun.COM uchar_t rscn_code; 85*7836SJohn.Forte@Sun.COM uchar_t rscn_len; 86*7836SJohn.Forte@Sun.COM uint16_t rscn_payload_len; 87*7836SJohn.Forte@Sun.COM } fc_rscn_t; 88*7836SJohn.Forte@Sun.COM 89*7836SJohn.Forte@Sun.COM typedef struct affected_id { 90*7836SJohn.Forte@Sun.COM #if defined(_BIT_FIELDS_LTOH) 91*7836SJohn.Forte@Sun.COM uint32_t aff_d_id : 24, 92*7836SJohn.Forte@Sun.COM aff_format : 8; 93*7836SJohn.Forte@Sun.COM #else 94*7836SJohn.Forte@Sun.COM uint32_t aff_format : 8, 95*7836SJohn.Forte@Sun.COM aff_d_id : 24; 96*7836SJohn.Forte@Sun.COM #endif /* _BIT_FIELDS_LTOH */ 97*7836SJohn.Forte@Sun.COM 98*7836SJohn.Forte@Sun.COM } fc_affected_id_t; 99*7836SJohn.Forte@Sun.COM 100*7836SJohn.Forte@Sun.COM typedef struct linit_req { 101*7836SJohn.Forte@Sun.COM ls_code_t ls_code; 102*7836SJohn.Forte@Sun.COM uchar_t rsvd; 103*7836SJohn.Forte@Sun.COM uchar_t func; 104*7836SJohn.Forte@Sun.COM uchar_t lip_b3; 105*7836SJohn.Forte@Sun.COM uchar_t lip_b4; 106*7836SJohn.Forte@Sun.COM } fc_linit_req_t; 107*7836SJohn.Forte@Sun.COM 108*7836SJohn.Forte@Sun.COM typedef struct linit_resp { 109*7836SJohn.Forte@Sun.COM ls_code_t ls_code; 110*7836SJohn.Forte@Sun.COM #if defined(_BIT_FIELDS_LTOH) 111*7836SJohn.Forte@Sun.COM uint32_t status: 8, 112*7836SJohn.Forte@Sun.COM rsvd : 24; 113*7836SJohn.Forte@Sun.COM #else 114*7836SJohn.Forte@Sun.COM uint32_t rsvd : 24, 115*7836SJohn.Forte@Sun.COM status : 8; 116*7836SJohn.Forte@Sun.COM #endif /* _BIT_FIELDS_LTOH */ 117*7836SJohn.Forte@Sun.COM 118*7836SJohn.Forte@Sun.COM } fc_linit_resp_t; 119*7836SJohn.Forte@Sun.COM 120*7836SJohn.Forte@Sun.COM typedef struct loop_status_req { 121*7836SJohn.Forte@Sun.COM ls_code_t ls_code; 122*7836SJohn.Forte@Sun.COM } fc_lsts_req_t; 123*7836SJohn.Forte@Sun.COM 124*7836SJohn.Forte@Sun.COM typedef struct loop_status_resp { 125*7836SJohn.Forte@Sun.COM ls_code_t lsts_ls_code; 126*7836SJohn.Forte@Sun.COM uchar_t lsts_rsvd1; 127*7836SJohn.Forte@Sun.COM uchar_t lsts_failed_rx; 128*7836SJohn.Forte@Sun.COM uchar_t lsts_fla_rev; 129*7836SJohn.Forte@Sun.COM uchar_t lsts_state; 130*7836SJohn.Forte@Sun.COM uchar_t lsts_pub_bitmap[16]; 131*7836SJohn.Forte@Sun.COM uchar_t lsts_priv_bitmap[16]; 132*7836SJohn.Forte@Sun.COM uchar_t lsts_lilp_length; 133*7836SJohn.Forte@Sun.COM uchar_t lsts_lilp_map[127]; 134*7836SJohn.Forte@Sun.COM } fc_lsts_resp_t; 135*7836SJohn.Forte@Sun.COM 136*7836SJohn.Forte@Sun.COM #if !defined(__lint) 137*7836SJohn.Forte@Sun.COM _NOTE(SCHEME_PROTECTS_DATA("unique per request", scr_response)) 138*7836SJohn.Forte@Sun.COM _NOTE(SCHEME_PROTECTS_DATA("unique per request", scr_request)) 139*7836SJohn.Forte@Sun.COM _NOTE(SCHEME_PROTECTS_DATA("unique per request", rscn_payload)) 140*7836SJohn.Forte@Sun.COM _NOTE(SCHEME_PROTECTS_DATA("unique per request", linit_req)) 141*7836SJohn.Forte@Sun.COM _NOTE(SCHEME_PROTECTS_DATA("unique per request", linit_resp)) 142*7836SJohn.Forte@Sun.COM _NOTE(SCHEME_PROTECTS_DATA("unique per request", loop_status_resp)) 143*7836SJohn.Forte@Sun.COM _NOTE(SCHEME_PROTECTS_DATA("unique per request", loop_status_req)) 144*7836SJohn.Forte@Sun.COM #endif /* __lint */ 145*7836SJohn.Forte@Sun.COM 146*7836SJohn.Forte@Sun.COM #ifdef __cplusplus 147*7836SJohn.Forte@Sun.COM } 148*7836SJohn.Forte@Sun.COM #endif 149*7836SJohn.Forte@Sun.COM 150*7836SJohn.Forte@Sun.COM #endif /* _SYS_FIBRE_CHANNEL_IMPL_FC_FLA_H */ 151