fcio.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) 1998-1999 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _SYS_FC4_FCIO_H
#define _SYS_FC4_FCIO_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Include any headers you depend on.
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* ioctl definitions
*/
#define SF_NUM_ENTRIES_IN_MAP 127
#define IFPIOCGMAP SFIOCGMAP
#define IFPIO_FORCE_LIP FCIO_FORCE_LIP
#define IFPIO_LINKSTATUS FCIO_LINKSTATUS
typedef struct sf_al_addr_pair {
typedef struct sf_al_map {
short sf_count;
} sf_al_map_t;
struct rls_payload {
};
struct lilpmap {
};
struct socal_fm_version {
char *fcode_ver;
char *mcode_ver;
char *prom_ver;
};
/*
* kstat structures
*/
typedef struct sf_target_stats {
/*
* sf detected command timeouts,
* implies an ABTS
*/
/*
* SF task management(aborts,
* resets etc) failures
*/
/*
* SF_DATA length different from
* BURST_LEN
*/
/*
* unsolicited LOGOs recvd from
* target
*/
typedef struct sf_stats {
/*
* lip failures, ie, no ONLINE response
* after forcing lip
*/
/*
* failures
*/
/*
* pool, each chunk allows 128 packets
*/
} sf_stats_t;
/* SOCAL Host Adapter kstat structures. */
#define FC_STATUS_ENTRIES 256
struct fc_pstats {
};
/*
* Fibre Channel Response codes
*/
#define FCAL_STATUS_OK 0
#define FCAL_STATUS_P_RJT 2
#define FCAL_STATUS_F_RJT 3
#define FCAL_STATUS_P_BSY 4
#define FCAL_STATUS_F_BSY 5
#define FCAL_STATUS_ONLINE 0x10
#define FCAL_STATUS_ERR_OFFLINE 0x11
#define FCAL_STATUS_TIMEOUT 0x12
#define FCAL_STATUS_ERR_OVERRUN 0x13
#define FCAL_STATUS_LOOP_ONLINE 0x14
#define FCAL_STATUS_OLD_PORT 0x15
#define FCAL_STATUS_AL_PORT 0x16
#define FCAL_STATUS_MAX_XCHG_EXCEEDED 0x22
#define FCAL_STATUS_BAD_XID 0x23
#define FCAL_STATUS_XCHG_BUSY 0x24
#define FCAL_STATUS_BAD_POOL_ID 0x25
#define FCAL_STATUS_INSUFFICIENT_CQES 0x26
#define FCAL_STATUS_ALLOC_FAIL 0x27
#define FCAL_STATUS_BAD_SID 0x28
#define FCAL_STATUS_NO_SEQ_INIT 0x29
#define FCAL_STATUS_BAD_DID 0x2a
#define FCAL_STATUS_ABORTED 0x30
#define FCAL_STATUS_ABORT_FAILED 0x31
#define FCAL_STATUS_DIAG_BUSY 0x32
#define FCAL_STATUS_DIAG_INVALID 0x33
#define FCAL_STATUS_INCOMPLETE_DMA_ERR 0x34
#define FCAL_STATUS_CRC_ERR 0x35
#define FCAL_STATUS_OPEN_FAIL 0x36
#define FCAL_STATUS_ERROR 0x80
#define FCAL_STATUS_ONLINE_TIMEOUT 0x81
typedef struct socal_stats {
struct ifp_target_stats {
int logouts_recvd;
/*
* unsolicited LOGOs recvd from
* target
*/
int task_mgmt_failures;
int data_ro_mismatches;
int dl_len_mismatches;
};
typedef struct ifp_target_stats ifp_target_stats_t;
struct ifp_stats {
int version; /* version of this struct, >1 */
int lip_count; /* lips forced by ifp */
int ncmds; /* outstanding commands */
};
typedef struct ifp_stats ifp_stats_t;
/*
* Defines for the QLA21xx resp_status -- this is the command completion status
*/
#ifdef __cplusplus
}
#endif
#endif /* _SYS_FC4_FCIO_H */