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
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Error codes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCT_FCA_FAILURE (FCT_FAILURE | (uint64_t)0x0100000000000000)
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 (FCT_RPORT_SENT_REJECT | (((uint64_t)(reason)) << 8) | \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Event codes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * ELS OP codes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * BLS replies
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Name Service Command Codes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GCS_ID 0x0114 /* Get Class Of service */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NS_GNN_IP 0x0153 /* Get Node name 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 PRLI_BIT_TASK_RETRY_IDENT_REQUESTED 0x00000200
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * SCR function code
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * FCP_CNTL bits
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_CNTL_TASK_ATTR(fcp_cntl) ((((uint32_t)(fcp_cntl)) >> 16) & 7)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_CNTL_IS_TASK_MGMT(fcp_cntl) (((uint32_t)(fcp_cntl)) & 0xff00)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * SCSI STATUS BITS
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Well known addresses ...
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)))
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer * NB: FC_WWN_BUFLEN should be 64-bit aligned (divisible by 8).
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer#define FC_WWN_STRLEN (FC_WWN_BUFLEN - 1) /* add trailing null */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _FCT_DEFINES_H */