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