/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2005-2014 Brocade Communications Systems, Inc. * Copyright (c) 2014- QLogic Corporation. * All rights reserved * www.qlogic.com * * Linux driver for QLogic BR-series Fibre Channel Host Bus Adapter. */ #ifndef __BFI_MS_H__ #define __BFI_MS_H__ #include "bfi.h" #include "bfa_fc.h" #include "bfa_defs_svc.h" #pragma pack(1) enum bfi_iocfc_h2i_msgs { … }; enum bfi_iocfc_i2h_msgs { … }; struct bfi_iocfc_cfg_s { … }; /* * Boot target wwn information for this port. This contains either the stored * or discovered boot target port wwns for the port. */ struct bfi_iocfc_bootwwns { … }; /** * Queue configuration response from firmware */ struct bfi_iocfc_qreg_s { … }; struct bfi_iocfc_cfgrsp_s { … }; /* * BFI_IOCFC_H2I_CFG_REQ message */ struct bfi_iocfc_cfg_req_s { … }; /* * BFI_IOCFC_I2H_CFG_REPLY message */ struct bfi_iocfc_cfg_reply_s { … }; /* * BFI_IOCFC_H2I_SET_INTR_REQ message */ struct bfi_iocfc_set_intr_req_s { … }; /* * BFI_IOCFC_H2I_UPDATEQ_REQ message */ struct bfi_iocfc_updateq_req_s { … }; /* * BFI_IOCFC_I2H_UPDATEQ_RSP message */ struct bfi_iocfc_updateq_rsp_s { … }; /* * H2I Messages */ bfi_iocfc_h2i_msg_u; /* * I2H Messages */ bfi_iocfc_i2h_msg_u; /* * BFI_IOCFC_H2I_FAA_ENABLE_REQ BFI_IOCFC_H2I_FAA_DISABLE_REQ message */ struct bfi_faa_en_dis_s { … }; struct bfi_faa_addr_msg_s { … }; /* * BFI_IOCFC_H2I_FAA_QUERY_REQ message */ struct bfi_faa_query_s { … }; /* * BFI_IOCFC_I2H_FAA_ENABLE_RSP, BFI_IOCFC_I2H_FAA_DISABLE_RSP message */ struct bfi_faa_en_dis_rsp_s { … }; /* * BFI_IOCFC_I2H_FAA_QUERY_RSP message */ #define bfi_faa_query_rsp_t … enum bfi_fcport_h2i { … }; enum bfi_fcport_i2h { … }; /* * Generic REQ type */ struct bfi_fcport_req_s { … }; /* * Generic RSP type */ struct bfi_fcport_rsp_s { … }; /* * BFI_FCPORT_H2I_ENABLE_REQ */ struct bfi_fcport_enable_req_s { … }; /* * BFI_FCPORT_H2I_SET_SVC_PARAMS_REQ */ struct bfi_fcport_set_svc_params_req_s { … }; /* * BFI_FCPORT_I2H_EVENT */ struct bfi_fcport_event_s { … }; /* * BFI_FCPORT_I2H_TRUNK_SCN */ struct bfi_fcport_trunk_link_s { … }; #define BFI_FCPORT_MAX_LINKS … struct bfi_fcport_trunk_scn_s { … }; /* * fcport H2I message */ bfi_fcport_h2i_msg_u; /* * fcport I2H message */ bfi_fcport_i2h_msg_u; enum bfi_fcxp_h2i { … }; enum bfi_fcxp_i2h { … }; #define BFA_FCXP_MAX_SGES … /* * FCXP send request structure */ struct bfi_fcxp_send_req_s { … }; /* * FCXP send response structure */ struct bfi_fcxp_send_rsp_s { … }; enum bfi_uf_h2i { … }; enum bfi_uf_i2h { … }; #define BFA_UF_MAX_SGES … struct bfi_uf_buf_post_s { … }; struct bfi_uf_frm_rcvd_s { … }; enum bfi_lps_h2i_msgs { … }; enum bfi_lps_i2h_msgs { … }; struct bfi_lps_login_req_s { … }; struct bfi_lps_login_rsp_s { … }; struct bfi_lps_logout_req_s { … }; struct bfi_lps_logout_rsp_s { … }; struct bfi_lps_cvl_event_s { … }; struct bfi_lps_n2n_pid_req_s { … }; bfi_lps_h2i_msg_u; bfi_lps_i2h_msg_u; enum bfi_rport_h2i_msgs { … }; enum bfi_rport_i2h_msgs { … }; struct bfi_rport_create_req_s { … }; struct bfi_rport_create_rsp_s { … }; struct bfa_rport_speed_req_s { … }; struct bfi_rport_delete_req_s { … }; struct bfi_rport_delete_rsp_s { … }; struct bfi_rport_qos_scn_s { … }; struct bfi_rport_lip_scn_s { … }; bfi_rport_h2i_msg_u; bfi_rport_i2h_msg_u; /* * Initiator mode I-T nexus interface defines. */ enum bfi_itn_h2i { … }; enum bfi_itn_i2h { … }; struct bfi_itn_create_req_s { … }; struct bfi_itn_create_rsp_s { … }; struct bfi_itn_delete_req_s { … }; struct bfi_itn_delete_rsp_s { … }; struct bfi_itn_sler_event_s { … }; bfi_itn_h2i_msg_u; bfi_itn_i2h_msg_u; /* * Initiator mode IO interface defines. */ enum bfi_ioim_h2i { … }; enum bfi_ioim_i2h { … }; /* * IO command DIF info */ struct bfi_ioim_dif_s { … }; /* * FCP IO messages overview * * @note * - Max CDB length supported is 64 bytes. * - SCSI Linked commands and SCSI bi-directional Commands not * supported. * */ struct bfi_ioim_req_s { … }; /* * This table shows various IO status codes from firmware and their * meaning. Host driver can use these status codes to further process * IO completions. * * BFI_IOIM_STS_OK : IO completed with error free SCSI & * transport status. * io-tag can be reused. * * BFA_IOIM_STS_SCSI_ERR : IO completed with scsi error. * - io-tag can be reused. * * BFI_IOIM_STS_HOST_ABORTED : IO was aborted successfully due to * host request. * - io-tag cannot be reused yet. * * BFI_IOIM_STS_ABORTED : IO was aborted successfully * internally by f/w. * - io-tag cannot be reused yet. * * BFI_IOIM_STS_TIMEDOUT : IO timedout and ABTS/RRQ is happening * in the firmware and * - io-tag cannot be reused yet. * * BFI_IOIM_STS_SQER_NEEDED : Firmware could not recover the IO * with sequence level error * logic and hence host needs to retry * this IO with a different IO tag * - io-tag cannot be used yet. * * BFI_IOIM_STS_NEXUS_ABORT : Second Level Error Recovery from host * is required because 2 consecutive ABTS * timedout and host needs logout and * re-login with the target * - io-tag cannot be used yet. * * BFI_IOIM_STS_UNDERRUN : IO completed with SCSI status good, * but the data tranferred is less than * the fcp data length in the command. * ex. SCSI INQUIRY where transferred * data length and residue count in FCP * response accounts for total fcp-dl * - io-tag can be reused. * * BFI_IOIM_STS_OVERRUN : IO completed with SCSI status good, * but the data transerred is more than * fcp data length in the command. ex. * TAPE IOs where blocks can of unequal * lengths. * - io-tag can be reused. * * BFI_IOIM_STS_RES_FREE : Firmware has completed using io-tag * during abort process * - io-tag can be reused. * * BFI_IOIM_STS_PROTO_ERR : Firmware detected a protocol error. * ex target sent more data than * requested, or there was data frame * loss and other reasons * - io-tag cannot be used yet. * * BFI_IOIM_STS_DIF_ERR : Firwmare detected DIF error. ex: DIF * CRC err or Ref Tag err or App tag err. * - io-tag can be reused. * * BFA_IOIM_STS_TSK_MGT_ABORT : IO was aborted because of Task * Management command from the host * - io-tag can be reused. * * BFI_IOIM_STS_UTAG : Firmware does not know about this * io_tag. * - io-tag can be reused. */ enum bfi_ioim_status { … }; /* * I/O response message */ struct bfi_ioim_rsp_s { … }; struct bfi_ioim_abort_req_s { … }; /* * Initiator mode task management command interface defines. */ enum bfi_tskim_h2i { … }; enum bfi_tskim_i2h { … }; struct bfi_tskim_req_s { … }; struct bfi_tskim_abortreq_s { … }; enum bfi_tskim_status { … }; struct bfi_tskim_rsp_s { … }; #pragma pack() /* * Crossbow PCI MSI-X vector defines */ enum { … }; /* * Catapult FC PCI MSI-X vector defines */ enum { … }; #endif /* __BFI_MS_H__ */