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
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Frame format and protocol definitions for transferring
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * commands and data between a SCSI initiator and target
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * using an FC4 serial link interface.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * this file originally taken from fc4/fcp.h
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * FCP Device Data Frame Information Categories
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_SCSI_DATA 0x01 /* frame contains SCSI data */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_SCSI_CMD 0x02 /* frame contains SCSI command */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_SCSI_RSP 0x03 /* frame contains SCSI response */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_SCSI_XFER_RDY 0x05 /* frame contains xfer rdy block */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fcp SCSI control structure
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t cntl_qtype : 3, /* tagged queueing type */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t cntl_write_data : 1, /* initiator write */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#error one of _BIT_FIELDS_HTOL or _BIT_FIELDS_LTOH must be defined
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fcp SCSI control tagged queueing types - cntl_qtype
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCP_QTYPE_ORDERED 2 /* ordered queueing */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fcp SCSI entity address
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * ent_addr_0 is always the first and highest layer of
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * the hierarchy. The depth of the hierarchy of addressing,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * up to a maximum of four layers, is arbitrary and
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * device-dependent.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * maximum size of SCSI cdb in fcp SCSI command
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * FCP SCSI command payload
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte fcp_ent_addr_t fcp_ent_addr; /* entity address */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fcp SCSI status
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t rsp_len_set : 1, /* response_len non-zero */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fcp SCSI response payload
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint32_t fcp_response_len; /* response data length */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * 'm' bytes of scsi response info follow
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * 'n' bytes of scsi sense info follow
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* MAde 256 for sonoma as it wants to give tons of sense info */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fcp rsp_info field format
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * rsp_code definitions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fcp scsi_xfer_rdy payload
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* THIS_NEEDED_YET */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fcp PRLI payload
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fcp PRLI ACC payload
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_UB_FCP_CDB_FLAG 0x0001 /* UB has valid cdb */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_UB_FCP_PORT_LOGOUT 0x0002 /* Port logout UB */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_UB_FCP_ABORT_TASK 0x0004 /* Abort task UB */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_UB_FCP_BUS_RESET 0x0008 /* Bus reset UB */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_UB_FCP_CMD_DONE 0x8000 /* Work on this UB is done */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_UB_FCP_OOB_CMD (FC_UB_FCP_PORT_LOGOUT | FC_UB_FCP_ABORT_TASK \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte | FC_UB_FCP_BUS_RESET) /* Out-of-band traget cmds */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#if !defined(__lint)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* __lint */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * FC4 type setttings for Name Server registration.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _FCP_H */