/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2016 Nexenta Systems, Inc. All rights reserved.
*/
#ifndef _FCT_H
#define _FCT_H
/*
* Definitions for common FC Target.
*/
#include <sys/stmf_defines.h>
#include <sys/fct_defines.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum fct_struct_id {
typedef struct fct_remote_port {
void *rp_fct_private;
void *rp_fca_private;
typedef struct fct_cmd {
void *cmd_fct_private;
void *cmd_fca_private;
void *cmd_specific;
/* During cmd porting this can be set to NULL */
/* To link cmds together for handling things like ABTS. */
/* During cmd posting this can be set to FCT_HANDLE_NONE */
} fct_cmd_t;
/*
* fcmd_cmd_handle: Bit definitions.
* 31 23 15 7 0
* +--------------+------------+------------+------------+
* | V |uniq_cntr |fca specific| cmd slot index |
* +--------------+------------+------------+------------+
* V = handle valid.
*/
enum fct_cmd_types {
};
typedef struct fct_els {
} fct_els_t;
typedef struct fct_sol_ct {
} fct_sol_ct_t;
typedef struct fct_rcvd_abts {
/*
* abts state
*/
#define ABTS_STATE_RECEIVED 0
typedef struct fct_port_attrs {
typedef struct fct_port_link_status {
typedef struct fct_dbuf_store {
void *fds_fct_private;
void *fds_fca_private;
typedef struct fct_local_port {
void *port_fct_private;
void *port_fca_private;
char *port_default_alias;
char *port_sym_node_name;
char *port_sym_port_name;
/* in milliseconds */
struct fct_flogi_xchg *fx);
void (*port_populate_hba_details)(
int port_fca_version;
/*
* Common struct used during FLOGI exchange.
*/
typedef struct fct_flogi_xchg {
typedef struct fct_link_info {
/*
* FCA sets this bit to indicate that fct does not need to do FLOGI
* because either FCA did the FLOGI or it determined that its a private
* loop. Setting this bit by FCA is optional.
*/
/* FCA sets this bit to indicate that it did FLOGI */
/* FCT sets this bit to indicate that it did FLOGI */
/* The fields below are only valid if someone did a successful flogi */
typedef struct fct_port_stat {
/*
* port topology
*/
#define PORT_TOPOLOGY_UNKNOWN 0
((li)->port_fct_flogi_done))
/*
* port speed
*/
#define PORT_SPEED_UNKNOWN 0
/*
* Abort commands
*/
/*
* FCT port states.
*/
#define FCT_STATE_OFFLINE 0
/*
* fct ctl commands. These should not conflict with stmf ctl commands
*/
/*
* IO flags for cmd flow.
*/
/*
* Fill CTIU preamble
*/
#ifdef lint
#else
do { \
x_payload[0] = 0x01; \
} while (0)
#endif
char *additional_info);
char *additional_info);
#ifdef __cplusplus
}
#endif
#endif /* _FCT_H */