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
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Debugging, Error reporting, and tracing
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_LEVEL_1 0x00001 /* attach/detach PM CPR */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_LEVEL_3 0x00004 /* state change, discovery */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_LEVEL_4 0x00008 /* statec/devc to ULPs */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Log contents to system messages file
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_LEVEL_1 (FP_LEVEL_1 | FC_TRACE_LOG_MSG)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_LEVEL_2 (FP_LEVEL_2 | FC_TRACE_LOG_MSG)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_LEVEL_3 (FP_LEVEL_3 | FC_TRACE_LOG_MSG)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_LEVEL_4 (FP_LEVEL_4 | FC_TRACE_LOG_MSG)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_LEVEL_5 (FP_LEVEL_5 | FC_TRACE_LOG_MSG)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_LEVEL_6 (FP_LEVEL_6 | FC_TRACE_LOG_MSG)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_LEVEL_7 (FP_LEVEL_7 | FC_TRACE_LOG_MSG)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_LEVEL_8 (FP_LEVEL_8 | FC_TRACE_LOG_MSG)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_LEVEL_9 (FP_LEVEL_9 | FC_TRACE_LOG_MSG)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Log contents to trace buffer
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_BUF_LEVEL_1 (FP_LEVEL_1 | FC_TRACE_LOG_BUF)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_BUF_LEVEL_2 (FP_LEVEL_2 | FC_TRACE_LOG_BUF)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_BUF_LEVEL_3 (FP_LEVEL_3 | FC_TRACE_LOG_BUF)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_BUF_LEVEL_4 (FP_LEVEL_4 | FC_TRACE_LOG_BUF)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_BUF_LEVEL_5 (FP_LEVEL_5 | FC_TRACE_LOG_BUF)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_BUF_LEVEL_6 (FP_LEVEL_6 | FC_TRACE_LOG_BUF)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_BUF_LEVEL_7 (FP_LEVEL_7 | FC_TRACE_LOG_BUF)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_BUF_LEVEL_8 (FP_LEVEL_8 | FC_TRACE_LOG_BUF)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_BUF_LEVEL_9 (FP_LEVEL_9 | FC_TRACE_LOG_BUF)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Log contents to both system messages file and trace buffer
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_BUF_LEVEL_1 (FP_LEVEL_1 | FC_TRACE_LOG_BUF |\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_BUF_LEVEL_2 (FP_LEVEL_2 | FC_TRACE_LOG_BUF |\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_BUF_LEVEL_3 (FP_LEVEL_3 | FC_TRACE_LOG_BUF |\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_BUF_LEVEL_4 (FP_LEVEL_4 | FC_TRACE_LOG_BUF |\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_BUF_LEVEL_5 (FP_LEVEL_5 | FC_TRACE_LOG_BUF |\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_BUF_LEVEL_6 (FP_LEVEL_6 | FC_TRACE_LOG_BUF |\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_BUF_LEVEL_7 (FP_LEVEL_7 | FC_TRACE_LOG_BUF |\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_BUF_LEVEL_8 (FP_LEVEL_8 | FC_TRACE_LOG_BUF |\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_BUF_LEVEL_9 (FP_LEVEL_9 | FC_TRACE_LOG_BUF |\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Log contents to system messages file, console and trace buffer
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_BUF_CONSOLE_LEVEL_1 (FP_LEVEL_1 | FC_TRACE_LOG_BUF |\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_BUF_CONSOLE_LEVEL_2 (FP_LEVEL_2 | FC_TRACE_LOG_BUF |\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_BUF_CONSOLE_LEVEL_3 (FP_LEVEL_3 | FC_TRACE_LOG_BUF |\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_BUF_CONSOLE_LEVEL_4 (FP_LEVEL_4 | FC_TRACE_LOG_BUF |\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_BUF_CONSOLE_LEVEL_5 (FP_LEVEL_5 | FC_TRACE_LOG_BUF |\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_BUF_CONSOLE_LEVEL_6 (FP_LEVEL_6 | FC_TRACE_LOG_BUF |\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_BUF_CONSOLE_LEVEL_7 (FP_LEVEL_7 | FC_TRACE_LOG_BUF |\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_BUF_CONSOLE_LEVEL_8 (FP_LEVEL_8 | FC_TRACE_LOG_BUF |\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_MSG_BUF_CONSOLE_LEVEL_9 (FP_LEVEL_9 | FC_TRACE_LOG_BUF |\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_TRACE_DEFAULT (FC_TRACE_LOG_MASK | FP_LEVEL_1 |\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_TRACE_DEFAULT (FC_TRACE_LOG_MASK | FP_LEVEL_1 |\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_THEAD(x, y, z) fp_logq, x->fp_ibuf, fp_trace, y, z
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_NHEAD1(x, y) FP_THEAD(port, FP_BUF_LEVEL_##x, y)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_NHEAD2(x, y) FP_THEAD(port, FP_MSG_BUF_LEVEL_##x, y)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_NHEAD3(x, y) FP_THEAD(port, FP_MSG_BUF_CONSOLE_LEVEL_##x, y)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* This is used in about a dozen or so places in fp.c */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_IS_PKT_ERROR(pkt) (((pkt)->pkt_state != FC_PKT_SUCCESS) ||\
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * This is only used in fp_ns_init() and fp_fabric_online().
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Software restoration bit fields while doing (PM)SUSPEND/(PM)RESUME
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Used with the fp_restore field in the fc_local_port_t struct.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_RETRY_DELAY (3) /* E_D_TOV + 1 second */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_UNSOL_BUF_SIZE (sizeof (la_els_logi_t))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_CMDWAIT_DELAY (240) /* Enough time for all cmds to complt */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Values and macros used with fp_task and fp_last_task fields in
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * the fc_local_port_t struct. Also see fp_job_handler() for more info.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_CMD_PLOGI_RETAIN 0x01 /* Retain LOGIN */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_CMD_DELDEV_ON_ERROR 0x02 /* Remove device on error */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * cmd_dflags
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Values for fp_flag field in the fc_local_port_t struct */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FP_EXCL_BUSY 0x04 /* Exclusive operation in progress */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* message block/unblock'ing */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Driver message control
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int (*cmd_transport) (opaque_t fca_handle, fc_packet_t *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#if !defined(__lint)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", fp_cmd))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", soft_attach))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", fp_unsol_spec))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* __lint */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Procedure templates.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_attach(dev_info_t *dip, ddi_attach_cmd_t cmd);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_detach(dev_info_t *dip, ddi_detach_cmd_t cmd);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_getinfo(dev_info_t *dip, ddi_info_cmd_t cmd,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_power(dev_info_t *dip, int comp, int level);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_open(dev_t *devp, int flag, int otype, cred_t *credp);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_close(dev_t dev, int flag, int otype, cred_t *credp);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_ioctl(dev_t dev, int cmd, intptr_t data, int mode,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_resume_all(fc_local_port_t *port, fc_attach_cmd_t cmd);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_detach_handler(fc_local_port_t *port);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_suspend_handler(fc_local_port_t *port);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_suspend_all(fc_local_port_t *port);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_cache_constructor(void *buf, void *cdarg, int kmflags);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_cache_destructor(void *buf, void *cdarg);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic fp_cmd_t *fp_alloc_pkt(fc_local_port_t *port, int cmd_len,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int resp_len, int kmflags, fc_remote_port_t *pd);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_job_handler(fc_local_port_t *port);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_port_startup(fc_local_port_t *port, job_request_t *job);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_startup_done(opaque_t arg, uchar_t result);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_sendcmd(fc_local_port_t *port, fp_cmd_t *cmd,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_enque_cmd(fc_local_port_t *port, fp_cmd_t *cmd);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic uchar_t fp_get_nextclass(fc_local_port_t *port, uchar_t cur_class);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_is_class_supported(uint32_t cos, uchar_t tran_class);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic fp_cmd_t *fp_deque_cmd(fc_local_port_t *port);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_port_shutdown(fc_local_port_t *port, job_request_t *job);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_get_loopmap(fc_local_port_t *port, job_request_t *job);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_loop_online(fc_local_port_t *port, job_request_t *job,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_get_lilpmap(fc_local_port_t *port, fc_lilpmap_t *lilp_map);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_fabric_login(fc_local_port_t *port, uint32_t s_id,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_port_login(fc_local_port_t *port, uint32_t d_id,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte job_request_t *job, int cmd_flag, int sleep, fc_remote_port_t *pd,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_register_login(ddi_acc_handle_t *handle, fc_remote_port_t *pd,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_remote_port_offline(fc_remote_port_t *pd);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_unregister_login(fc_remote_port_t *pd);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_port_offline(fc_local_port_t *port, int notify);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_offline_timeout(void *port_handle);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_els_init(fp_cmd_t *cmd, uint32_t s_id, uint32_t d_id,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_xlogi_init(fc_local_port_t *port, fp_cmd_t *cmd, uint32_t s_id,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint32_t d_id, void (*intr) (), job_request_t *job, uchar_t ls_code);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_logo_init(fc_remote_port_t *pd, fp_cmd_t *cmd,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_adisc_init(fp_cmd_t *cmd, job_request_t *job);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_ulp_statec_cb(fc_local_port_t *port, uint32_t state,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte fc_portmap_t *changelist, uint32_t listlen, uint32_t alloc_len, int sleep);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_ulp_devc_cb(fc_local_port_t *port, fc_portmap_t *changelist,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint32_t listlen, uint32_t alloc_len, int sleep, int sync);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_plogi_group(fc_local_port_t *port, job_request_t *job);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_ns_init(fc_local_port_t *port, job_request_t *job, int sleep);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_ns_fini(fc_local_port_t *port, job_request_t *job);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_ns_reg(fc_local_port_t *port, fc_remote_port_t *pd,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint16_t cmd_code, job_request_t *job, int polled, int sleep);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_common_intr(fc_packet_t *pkt, int iodone);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_send_rnid(fc_local_port_t *port, intptr_t data, int mode,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_get_rnid(fc_local_port_t *port, intptr_t data, int mode,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_set_rnid(fc_local_port_t *port, intptr_t data, int mode,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_statec_cb(opaque_t port_handle, uint32_t state);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_ns_scr(fc_local_port_t *port, job_request_t *job,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_ns_get_devcount(fc_local_port_t *port, job_request_t *job,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_fciocmd(fc_local_port_t *port, intptr_t data, int mode,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_copyout(void *from, void *to, size_t len, int mode);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_fcio_copyout(fcio_t *fcio, intptr_t data, int mode);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_p2p_online(fc_local_port_t *port, job_request_t *job);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_fillout_p2pmap(fc_local_port_t *port, fcio_t *fcio, int mode);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_fabric_online(fc_local_port_t *port, job_request_t *job);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_fillout_loopmap(fc_local_port_t *port, fcio_t *fcio, int mode);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_unsol_cb(opaque_t port_handle, fc_unsol_buf_t *buf,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_handle_unsol_buf(fc_local_port_t *port, fc_unsol_buf_t *buf,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_ba_rjt_init(fc_local_port_t *port, fp_cmd_t *cmd,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_els_rjt_init(fc_local_port_t *port, fp_cmd_t *cmd,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte fc_unsol_buf_t *buf, uchar_t action, uchar_t reason, job_request_t *job);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_els_acc_init(fc_local_port_t *port, fp_cmd_t *cmd,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_handle_unsol_logo(fc_local_port_t *port, fc_unsol_buf_t *buf,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_handle_unsol_prlo(fc_local_port_t *port, fc_unsol_buf_t *buf,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_unsol_resp_init(fc_packet_t *pkt, fc_unsol_buf_t *buf,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_i_handle_unsol_els(fc_local_port_t *port, fc_unsol_buf_t *buf);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_handle_unsol_plogi(fc_local_port_t *port, fc_unsol_buf_t *buf,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_handle_unsol_flogi(fc_local_port_t *port, fc_unsol_buf_t *buf,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_login_acc_init(fc_local_port_t *port, fp_cmd_t *cmd,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte fc_unsol_buf_t *buf, job_request_t *job, int sleep);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_handle_unsol_rscn(fc_local_port_t *port, fc_unsol_buf_t *buf,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_fillout_old_map_held(fc_portmap_t *map, fc_remote_port_t *pd,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_fillout_old_map(fc_portmap_t *map, fc_remote_port_t *pd,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_fillout_changed_map(fc_portmap_t *map, fc_remote_port_t *pd,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_fillout_new_nsmap(fc_local_port_t *port,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ddi_acc_handle_t *handle, fc_portmap_t *port_map, ns_resp_gan_t *gan_resp,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_remote_lip(fc_local_port_t *port, la_wwn_t *pwwn, int sleep,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_stuff_device_with_gan(ddi_acc_handle_t *handle,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_ns_query(fc_local_port_t *port, fctl_ns_req_t *ns_cmd,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_ct_init(fc_local_port_t *port, fp_cmd_t *cmd,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte fctl_ns_req_t *ns_cmd, uint16_t cmd_code, caddr_t cmd_buf,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint16_t cmd_len, uint16_t resp_len, job_request_t *job);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_gan_handler(fc_packet_t *pkt, fctl_ns_req_t *ns_cmd);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_ns_query_handler(fc_packet_t *pkt, fctl_ns_req_t *ns_cmd);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_handle_unsol_adisc(fc_local_port_t *port, fc_unsol_buf_t *buf,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_adisc_acc_init(fc_local_port_t *port, fp_cmd_t *cmd,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_load_ulp_modules(dev_info_t *dip, fc_local_port_t *port);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_logout(fc_local_port_t *port, fc_remote_port_t *pd,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_attach_ulps(fc_local_port_t *port, fc_attach_cmd_t cmd);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_ulp_notify(fc_local_port_t *port, uint32_t statec, int sleep);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_ns_getmap(fc_local_port_t *port, job_request_t *job,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte fc_portmap_t **map, uint32_t *len, uint32_t sid);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic fc_remote_port_t *fp_create_remote_port_by_ns(fc_local_port_t *port,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_check_perms(uchar_t open_flag, uint16_t ioctl_cmd);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_bind_callbacks(fc_local_port_t *port);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_retrieve_caps(fc_local_port_t *port);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_validate_area_domain(fc_local_port_t *port, uint32_t id,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_validate_rscn_page(fc_local_port_t *port, fc_affected_id_t *page,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte job_request_t *job, fctl_ns_req_t *ns_cmd, fc_portmap_t *listptr,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_ns_validate_device(fc_local_port_t *port, fc_remote_port_t *pd,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_validate_lilp_map(fc_lilpmap_t *lilp_map);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic void fp_printf(fc_local_port_t *port, int level, fp_mesg_dest_t dest,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int fc_errno, fc_packet_t *pkt, const char *fmt, ...);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_fcio_logout(fc_local_port_t *port, fcio_t *fcio,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic int fp_fcio_login(fc_local_port_t *port, fcio_t *fcio,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _FP_H */