fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
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 *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * or http://www.opensolaris.org/os/licensing.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
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 *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifndef _FCT_DEFINES_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define _FCT_DEFINES_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern "C" {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef stmf_status_t fct_status_t;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Error codes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCT_SUCCESS STMF_SUCCESS
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCT_FAILURE STMF_TARGET_FAILURE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCT_FCA_FAILURE (FCT_FAILURE | (uint64_t)0x0100000000000000)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCT_BUSY STMF_BUSY
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCT_ABORT_SUCCESS STMF_ABORT_SUCCESS
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCT_ABORTED STMF_ABORTED
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCT_NOT_FOUND STMF_NOT_FOUND
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCT_TIMEOUT STMF_TIMEOUT
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCT_WORKER_STUCK (FCT_FAILURE | STMF_FSC(1))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCT_ALLOC_FAILURE (FCT_FAILURE | STMF_FSC(2))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCT_LOCAL_PORT_OFFLINE (FCT_FAILURE | STMF_FSC(3))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCT_NO_XCHG_RESOURCE (FCT_FAILURE | STMF_FSC(4))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCT_NOT_LOGGED_IN (FCT_FAILURE | STMF_FSC(5))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCT_ABTS_RECEIVED (FCT_FAILURE | STMF_FSC(6))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCT_RPORT_SENT_REJECT (FCT_FAILURE | STMF_FSC(7))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCT_REJECT_STATUS(reason, expln) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (FCT_RPORT_SENT_REJECT | (((uint64_t)(reason)) << 8) | \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ((uint64_t)(expln)))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Event codes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCT_EVENT_LINK_UP 0x01
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCT_EVENT_LINK_DOWN 0x02
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCT_EVENT_LINK_RESET 0x03
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCT_EVENT_ADAPTER_FATAL 0x04
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * ELS OP codes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ELS_OP_LSRJT 0x01
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ELS_OP_ACC 0x02
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ELS_OP_PLOGI 0x03
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ELS_OP_FLOGI 0x04
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ELS_OP_LOGO 0x05
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ELS_OP_ABTX 0x06
c946faca5d4627284fb79c6b04e652b471034495allan#define ELS_OP_RLS 0x0f
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ELS_OP_ECHO 0x10
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ELS_OP_REC 0x13
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ELS_OP_SRR 0x14
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ELS_OP_PRLI 0x20
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ELS_OP_PRLO 0x21
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ELS_OP_SCN 0x22
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ELS_OP_TPRLO 0x24
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ELS_OP_PDISC 0x50
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ELS_OP_ADISC 0x52
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ELS_OP_RSCN 0x61
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ELS_OP_SCR 0x62
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ELS_OP_RNID 0x78
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * BLS replies
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define BLS_OP_BA_ACC 0x84
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define BLS_OP_BA_RJT 0x85
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Name Service Command Codes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GA_NXT 0x0100 /* Get All next */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GPN_ID 0x0112 /* Get Port Name */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GNN_ID 0x0113 /* Get Node Name */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GCS_ID 0x0114 /* Get Class Of service */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GFT_ID 0x0117 /* Get FC-4 Types */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GSPN_ID 0x0118 /* Get Sym Port name */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GPT_ID 0x011A /* Get Port Type */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GID_PN 0x0121 /* Get port id for PN */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GID_NN 0x0131 /* Get port id for NN */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GIP_NN 0x0135 /* Get IP address */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GIPA_NN 0x0136 /* Get I.P.A */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GSNN_NN 0x0139 /* Get Sym Node name */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GNN_IP 0x0153 /* Get Node name for IP */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GIPA_IP 0x0156 /* Get I.P.A for IP */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GID_FT 0x0171 /* Get port Id for FC-4 type */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GID_PT 0x01A1 /* Get port Id for type */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_RPN_ID 0x0212 /* Reg port name */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_RNN_ID 0x0213 /* Reg node name */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_RCS_ID 0x0214 /* Reg C.O.S */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_RFT_ID 0x0217 /* Reg FC-4 Types */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_RSPN_ID 0x0218 /* Reg Sym Port name */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_RPT_ID 0x021A /* Reg Port Type */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_RIP_NN 0x0235 /* Reg I.P address */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_RIPA_NN 0x0236 /* Reg I.P.A */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_RSNN_NN 0x0239 /* Reg Sym Node name */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_DA_ID 0x0300 /* De-Register all */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define CT_OP_RJT 0x8001
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define CT_OP_ACC 0x8002
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * PRLI bits
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PRLI_BIT_WRITE_XRDY_DISABLED 0x00000001
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PRLI_BIT_READ_XRDY_DISABLED 0x00000002
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PRLI_BIT_TARGET_FUNCTION 0x00000010
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PRLI_BIT_INITIATOR_FUNCTION 0x00000020
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PRLI_BIT_DATA_OVERLAY_ALLOWED 0x00000040
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PRLI_BIT_FCP_CONF_ALLOWED 0x00000080
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PRLI_BIT_RETRY 0x00000100
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PRLI_BIT_TASK_RETRY_IDENT_REQUESTED 0x00000200
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PRLI_BIT_REC_SUPPORT 0x00000400
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_NS_CLASSF 0x01
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_NS_CLASS1 0x02
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_NS_CLASS2 0x04
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_NS_CLASS3 0x08
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_NS_CLASS4 0x10
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_NS_CLASS5 0x20
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_NS_CLASS6 0x40
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * SCR function code
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_SCR_FABRIC_REGISTRATION 0x01
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_SCR_NPORT_REGISTRATION 0x02
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_SCR_FULL_REGISTRATION 0x03
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_SCR_CLEAR_REGISTRATION 0xFF
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * FCP_CNTL bits
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_CNTL_TASK_ATTR(fcp_cntl) ((((uint32_t)(fcp_cntl)) >> 16) & 7)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define TASK_ATTR_SIMPLE_Q 0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define TASK_ATTR_HEAD_OF_Q 1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define TASK_ATTR_ORDERED_Q 2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define TASK_ATTR_ACA_Q 4
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define TASK_ATTR_UNTAGGED 5
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_CNTL_IS_TASK_MGMT(fcp_cntl) (((uint32_t)(fcp_cntl)) & 0xff00)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_CNTL_TERMINATE_TASK 0x8000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_CNTL_CLEAR_ACA 0x4000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_CNTL_TARGET_RESET 0x2000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_CNTL_LUN_RESET 0x1000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_CNTL_CLEAR_TASK_SET 0x0400
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_CNTL_ABORT_TASK_SET 0x0200
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_CNTL_READ_DATA 0x2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_CNTL_WRITE_DATA 0x1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * SCSI STATUS BITS
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_BIDI_RESP 0x8000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_BIDI_UNDER 0x4000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_BIDI_OVER 0x2000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_CONF_REQ 0x1000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_RESID_UNDER 0x0800
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_RESID_OVER 0x0400
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_SNS_LEN_VALID 0x0200
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_RESP_LEN_VALID 0x0100
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Well known addresses ...
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NPORT_ID_DOM_CTLR_START 0xFFFC01
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NPORT_ID_DOM_CTLR_END 0xFFFCFE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FS_GENERAL_MULTICAST 0xFFFFF7
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FS_WELL_KNOWN_MULTICAST 0xFFFFF8
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FS_HUNT_GROUP 0xFFFFF9
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FS_MANAGEMENT_SERVER 0xFFFFFA
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FS_TIME_SERVER 0xFFFFFB
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FS_NAME_SERVER 0xFFFFFC
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FS_FABRIC_CONTROLLER 0xFFFFFD
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FS_FABRIC_F_PORT 0xFFFFFE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FS_BROADCAST 0xFFFFFF
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_WELL_KNOWN_START 0xFFFFF0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_WELL_KNOWN_END 0xFFFFFF
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_WELL_KNOWN_ADDR(x) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ((((x) >= FC_WELL_KNOWN_START) && ((x) <= FC_WELL_KNOWN_END)) ||\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (((x) >= NPORT_ID_DOM_CTLR_START) && ((x) <= NPORT_ID_DOM_CTLR_END)))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_WWN_LEN 8
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer/*
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * NB: FC_WWN_BUFLEN should be 64-bit aligned (divisible by 8).
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer */
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer#define FC_WWN_BUFLEN (FC_WWN_LEN * 3)
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer#define FC_WWN_STRLEN (FC_WWN_BUFLEN - 1) /* add trailing null */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestruct fct_cmd;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestruct fct_local_port;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestruct fct_els;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestruct fct_link_info;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestruct fct_flogi_xchg;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestruct fct_dbuf_store;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte}
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _FCT_DEFINES_H */