fcp.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1995,1997-1998 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _SYS_FC4_FCP_H
#define _SYS_FC4_FCP_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Frame format and protocol definitions for transferring
* commands and data between a SCSI initiator and target
* using an FC4 serial link interface.
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* FCP Device Data Frame Information Categories
*/
/*
* FCP SCSI Control structure
*/
typedef struct fcp_cntl {
} fcp_cntl_t;
/*
* FCP SCSI Control Tagged Queueing types - cntl_qtype
*/
#define FCP_QTYPE_SIMPLE 0 /* simple queueing */
/*
* FCP SCSI Entity Address
*
* ent_addr_0 is always the first and highest layer of
* the hierarchy. The depth of the hierarchy of addressing,
* up to a maximum of four layers, is arbitrary and
* device-dependent.
*/
typedef struct fcp_ent_addr {
/*
* Maximum size of SCSI cdb in FCP SCSI command
*/
#define FCP_CDB_SIZE 16
#define FCP_LUN_SIZE 8
/*
* FCP SCSI command payload
*/
typedef struct fcp_cmd {
int fcp_data_len; /* data length */
} fcp_cmd_t;
/*
* FCP SCSI status
*/
typedef struct fcp_status {
} fcp_status_t;
/*
* FCP SCSI Response Payload
*/
typedef struct fcp_rsp {
union {
}fcp_u;
/*
* 'm' bytes of scsi response info follow
* 'n' bytes of scsi sense info follow
*/
} fcp_rsp_t;
#define FCP_MAX_RSP_IU_SIZE 256
/*
* FCP RSP_INFO field format
*/
struct fcp_rsp_info {
};
/* RSP_CODE definitions */
#define FCP_NO_FAILURE 0x0
#define FCP_DL_LEN_MISMATCH 0x1
#define FCP_CMND_INVALID 0x2
#define FCP_DATA_RO_MISMATCH 0x3
#define FCP_TASK_MGMT_NOT_SUPPTD 0x4
#define FCP_TASK_MGMT_FAILED 0x5
/*
* FCP SCSI_ XFER_RDY Payload
*/
typedef struct fcp_xfer_rdy {
/*
* FCP PRLI Payload
*/
struct fcp_prli {
};
/*
* FCP PRLI ACC Payload
*/
struct fcp_prli_acc {
};
#ifdef __cplusplus
}
#endif
#endif /* _SYS_FC4_FCP_H */