fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#if !defined(_BIT_FIELDS_LTOH) && !defined(_BIT_FIELDS_HTOL)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#error One of _BIT_FIELDS_LTOH or _BIT_FIELDS_HTOL must be defined
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _BIT_FIELDS_LTOH */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Local port topology definitions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fp/fctl use these a lot with the fp_topology field in the fc_port_t struct,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * but use is not limited to fp_topology. These are also understood by ULPs.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Macros used with the preceeding topology #defines.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fp/fctl use these a lot with the fp_topology field in the fc_port_t struct,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * but use is not limited to fp_topology. These are also understood by ULPs.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_IS_TOP_SWITCH(t) (((t) == FC_TOP_FABRIC) ||\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fc_remote_port state (map_state) definitions.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Used with the pd_state field in the fc_remote_port_t struct.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PORT_DEVICE_INVALID 0 /* State when created or login failed */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Firmware, FCode revision field lengths
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint32_t ct_cmdrsp : 16, /* command/response code */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _BIT_FIELDS_LTOH */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* World Wide Name format */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _BIT_FIELDS_LTOH */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Values for naa_id
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* FC_WWN_SIZE */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _BIT_FIELDS_LTOH */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Login Payload. */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte fc_ct_header_t ns_resp_hdr; /* for the curious */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte fc_ct_header_t ns_resp_hdr; /* for the curious */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _SYSCALL32 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Link Error Parameters in the RLS Accept payload */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint32_t rls_sig_loss; /* loss of signal count */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint32_t rls_prim_seq_err; /* primitive seq error */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint32_t rls_invalid_crc; /* invalid CRC count */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* RLS Payload. */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* RLS accept payload */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte fc_rls_acc_t rls_link_params; /* link error status block */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Node Id Parameters in the RNID Get/Set Accept/Request payload */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint32_t num_attached; /* number of attached nodes */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint16_t topo_flags; /* topology discovery flags */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* RNID get data format flag */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCIO_CFLAGS_RNID_GET_GENERAL_TOPOLOGY 0xDF
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* RNID maximum data length - common data(16) + specific data(252) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* RNID Payload. */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * ELS RNID header
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * - cmn_len can be 0 or 16 - if it is 0 then specific data starts at
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * offset 8 else specific data starts at offset 24 in the RNID els response
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#if !defined(__lint)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", fc_ns_cmd))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", ct_header))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", la_els_logi))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", la_wwn))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", fc_rls_acc_params))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", la_els_rls))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", la_els_rls_acc))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", fc_rnid_params))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", la_els_rnid))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", la_els_rnid_acc))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* __lint */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _FC_APPIF_H */