Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: GPL-2.0-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  * Copyright (c) 2005-2014 Brocade Communications Systems, Inc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  * Copyright (c) 2014- QLogic Corporation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  * All rights reserved
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  * www.qlogic.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8)  * Linux driver for QLogic BR-series Fibre Channel Host Bus Adapter.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #ifndef __BFI_MS_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #define __BFI_MS_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) #include "bfi.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) #include "bfa_fc.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) #include "bfa_defs_svc.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) #pragma pack(1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) enum bfi_iocfc_h2i_msgs {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 	BFI_IOCFC_H2I_CFG_REQ		= 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 	BFI_IOCFC_H2I_SET_INTR_REQ	= 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 	BFI_IOCFC_H2I_UPDATEQ_REQ	= 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 	BFI_IOCFC_H2I_FAA_QUERY_REQ	= 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	BFI_IOCFC_H2I_ADDR_REQ		= 5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) enum bfi_iocfc_i2h_msgs {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 	BFI_IOCFC_I2H_CFG_REPLY		= BFA_I2HM(1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 	BFI_IOCFC_I2H_UPDATEQ_RSP	= BFA_I2HM(3),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 	BFI_IOCFC_I2H_FAA_QUERY_RSP	= BFA_I2HM(4),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 	BFI_IOCFC_I2H_ADDR_MSG		= BFA_I2HM(5),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) struct bfi_iocfc_cfg_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 	u8	num_cqs;	/*  Number of CQs to be used	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 	u8	 sense_buf_len;	/*  SCSI sense length	    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 	u16	rsvd_1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 	u32	endian_sig;	/*  endian signature of host     */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	u8	rsvd_2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 	u8	single_msix_vec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 	u8	rsvd[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 	__be16	num_ioim_reqs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 	__be16	num_fwtio_reqs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 	 * Request and response circular queue base addresses, size and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 	 * shadow index pointers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 	union bfi_addr_u  req_cq_ba[BFI_IOC_MAX_CQS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 	union bfi_addr_u  req_shadow_ci[BFI_IOC_MAX_CQS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	__be16    req_cq_elems[BFI_IOC_MAX_CQS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 	union bfi_addr_u  rsp_cq_ba[BFI_IOC_MAX_CQS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	union bfi_addr_u  rsp_shadow_pi[BFI_IOC_MAX_CQS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 	__be16    rsp_cq_elems[BFI_IOC_MAX_CQS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 	union bfi_addr_u  stats_addr;	/*  DMA-able address for stats	  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 	union bfi_addr_u  cfgrsp_addr;	/*  config response dma address  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 	union bfi_addr_u  ioim_snsbase[BFI_IOIM_SNSBUF_SEGS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 					/*  IO sense buf base addr segments */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 	struct bfa_iocfc_intr_attr_s intr_attr; /*  IOC interrupt attributes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66)  * Boot target wwn information for this port. This contains either the stored
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67)  * or discovered boot target port wwns for the port.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) struct bfi_iocfc_bootwwns {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 	wwn_t		wwn[BFA_BOOT_BOOTLUN_MAX];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 	u8		nwwns;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	u8		rsvd[7];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76)  * Queue configuration response from firmware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) struct bfi_iocfc_qreg_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	u32	cpe_q_ci_off[BFI_IOC_MAX_CQS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 	u32	cpe_q_pi_off[BFI_IOC_MAX_CQS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	u32	cpe_qctl_off[BFI_IOC_MAX_CQS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 	u32	rme_q_ci_off[BFI_IOC_MAX_CQS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	u32	rme_q_pi_off[BFI_IOC_MAX_CQS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 	u32	rme_qctl_off[BFI_IOC_MAX_CQS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	u8	hw_qid[BFI_IOC_MAX_CQS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) struct bfi_iocfc_cfgrsp_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	struct bfa_iocfc_fwcfg_s	fwcfg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	struct bfa_iocfc_intr_attr_s	intr_attr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 	struct bfi_iocfc_bootwwns	bootwwns;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 	struct bfi_pbc_s		pbc_cfg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 	struct bfi_iocfc_qreg_s		qreg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97)  * BFI_IOCFC_H2I_CFG_REQ message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) struct bfi_iocfc_cfg_req_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	struct bfi_mhdr_s      mh;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	union bfi_addr_u      ioc_cfg_dma_addr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)  * BFI_IOCFC_I2H_CFG_REPLY message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) struct bfi_iocfc_cfg_reply_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	struct bfi_mhdr_s  mh;		/*  Common msg header	  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	u8	 cfg_success;	/*  cfg reply status	   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	u8	 lpu_bm;		/*  LPUs assigned for this IOC */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 	u8	 rsvd[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117)  * BFI_IOCFC_H2I_SET_INTR_REQ message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) struct bfi_iocfc_set_intr_req_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	struct bfi_mhdr_s mh;		/*  common msg header		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	u8		coalesce;	/*  enable intr coalescing	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	u8		rsvd[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	__be16	delay;		/*  delay timer 0..1125us	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	__be16	latency;	/*  latency timer 0..225us	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129)  * BFI_IOCFC_H2I_UPDATEQ_REQ message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) struct bfi_iocfc_updateq_req_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 	struct bfi_mhdr_s mh;		/*  common msg header		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 	u32 reqq_ba;		/*  reqq base addr		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 	u32 rspq_ba;		/*  rspq base addr		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	u32 reqq_sci;		/*  reqq shadow ci		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	u32 rspq_spi;		/*  rspq shadow pi		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141)  * BFI_IOCFC_I2H_UPDATEQ_RSP message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) struct bfi_iocfc_updateq_rsp_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 	struct bfi_mhdr_s mh;		/*  common msg header	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 	u8	status;			/*  updateq  status	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 	u8	rsvd[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151)  * H2I Messages
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) union bfi_iocfc_h2i_msg_u {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	struct bfi_mhdr_s		mh;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 	struct bfi_iocfc_cfg_req_s	cfg_req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 	struct bfi_iocfc_updateq_req_s updateq_req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 	u32 mboxmsg[BFI_IOC_MSGSZ];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162)  * I2H Messages
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) union bfi_iocfc_i2h_msg_u {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 	struct bfi_mhdr_s		mh;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 	struct bfi_iocfc_cfg_reply_s	cfg_reply;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 	struct bfi_iocfc_updateq_rsp_s updateq_rsp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 	u32 mboxmsg[BFI_IOC_MSGSZ];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172)  * BFI_IOCFC_H2I_FAA_ENABLE_REQ BFI_IOCFC_H2I_FAA_DISABLE_REQ message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) struct bfi_faa_en_dis_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 	struct bfi_mhdr_s mh;	/* common msg header    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) struct bfi_faa_addr_msg_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 	struct  bfi_mhdr_s mh;	/* common msg header	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 	u8	rsvd[4];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 	wwn_t	pwwn;		/* Fabric acquired PWWN	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 	wwn_t	nwwn;		/* Fabric acquired PWWN	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)  * BFI_IOCFC_H2I_FAA_QUERY_REQ message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) struct bfi_faa_query_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 	struct bfi_mhdr_s mh;	/* common msg header    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 	u8	faa_status;	/* FAA status           */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 	u8	addr_source;	/* PWWN source          */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 	u8	rsvd[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 	wwn_t	faa;		/* Fabric acquired PWWN	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197)  * BFI_IOCFC_I2H_FAA_ENABLE_RSP, BFI_IOCFC_I2H_FAA_DISABLE_RSP message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) struct bfi_faa_en_dis_rsp_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 	struct bfi_mhdr_s mh;	/* common msg header    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 	u8	status;		/* updateq  status      */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 	u8	rsvd[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206)  * BFI_IOCFC_I2H_FAA_QUERY_RSP message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) #define bfi_faa_query_rsp_t struct bfi_faa_query_s
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) enum bfi_fcport_h2i {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 	BFI_FCPORT_H2I_ENABLE_REQ		= (1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 	BFI_FCPORT_H2I_DISABLE_REQ		= (2),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 	BFI_FCPORT_H2I_SET_SVC_PARAMS_REQ	= (3),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 	BFI_FCPORT_H2I_STATS_GET_REQ		= (4),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 	BFI_FCPORT_H2I_STATS_CLEAR_REQ		= (5),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) enum bfi_fcport_i2h {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 	BFI_FCPORT_I2H_ENABLE_RSP		= BFA_I2HM(1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 	BFI_FCPORT_I2H_DISABLE_RSP		= BFA_I2HM(2),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 	BFI_FCPORT_I2H_SET_SVC_PARAMS_RSP	= BFA_I2HM(3),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 	BFI_FCPORT_I2H_STATS_GET_RSP		= BFA_I2HM(4),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 	BFI_FCPORT_I2H_STATS_CLEAR_RSP		= BFA_I2HM(5),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 	BFI_FCPORT_I2H_EVENT			= BFA_I2HM(6),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 	BFI_FCPORT_I2H_TRUNK_SCN		= BFA_I2HM(7),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 	BFI_FCPORT_I2H_ENABLE_AEN		= BFA_I2HM(8),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 	BFI_FCPORT_I2H_DISABLE_AEN		= BFA_I2HM(9),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233)  * Generic REQ type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) struct bfi_fcport_req_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 	struct bfi_mhdr_s  mh;		/*  msg header			    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 	u32	   msgtag;	/*  msgtag for reply		    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241)  * Generic RSP type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) struct bfi_fcport_rsp_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 	struct bfi_mhdr_s  mh;		/*  common msg header		    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) 	u8		   status;	/*  port enable status		    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) 	u8		   rsvd[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) 	struct	bfa_port_cfg_s port_cfg;/* port configuration	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) 	u32	msgtag;			/* msgtag for reply	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252)  * BFI_FCPORT_H2I_ENABLE_REQ
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) struct bfi_fcport_enable_req_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) 	struct bfi_mhdr_s  mh;		/*  msg header			    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 	u32	   rsvd1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) 	wwn_t		   nwwn;	/*  node wwn of physical port	    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) 	wwn_t		   pwwn;	/*  port wwn of physical port	    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) 	struct bfa_port_cfg_s port_cfg; /*  port configuration	    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 	union bfi_addr_u   stats_dma_addr; /*  DMA address for stats	    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) 	u32	   msgtag;	/*  msgtag for reply		    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) 	u8	use_flash_cfg;	/* get prot cfg from flash */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) 	u8	rsvd2[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267)  * BFI_FCPORT_H2I_SET_SVC_PARAMS_REQ
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) struct bfi_fcport_set_svc_params_req_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) 	struct bfi_mhdr_s  mh;		/*  msg header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) 	__be16	   tx_bbcredit;	/*  Tx credits */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) 	u8	rsvd[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276)  * BFI_FCPORT_I2H_EVENT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) struct bfi_fcport_event_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) 	struct bfi_mhdr_s	mh;	/*  common msg header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) 	struct bfa_port_link_s	link_state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284)  * BFI_FCPORT_I2H_TRUNK_SCN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) struct bfi_fcport_trunk_link_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) 	wwn_t			trunk_wwn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) 	u8			fctl;		/* bfa_trunk_link_fctl_t */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) 	u8			state;		/* bfa_trunk_link_state_t */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) 	u8			speed;		/* bfa_port_speed_t */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) 	u8			rsvd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) 	__be32		deskew;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) #define BFI_FCPORT_MAX_LINKS	2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) struct bfi_fcport_trunk_scn_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) 	struct bfi_mhdr_s	mh;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) 	u8			trunk_state;	/* bfa_trunk_state_t */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) 	u8			trunk_speed;	/* bfa_port_speed_t */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) 	u8			rsvd_a[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) 	struct bfi_fcport_trunk_link_s tlink[BFI_FCPORT_MAX_LINKS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305)  * fcport H2I message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) union bfi_fcport_h2i_msg_u {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) 	struct bfi_mhdr_s			*mhdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) 	struct bfi_fcport_enable_req_s		*penable;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) 	struct bfi_fcport_req_s			*pdisable;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) 	struct bfi_fcport_set_svc_params_req_s	*psetsvcparams;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) 	struct bfi_fcport_req_s			*pstatsget;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) 	struct bfi_fcport_req_s			*pstatsclear;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317)  * fcport I2H message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) union bfi_fcport_i2h_msg_u {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) 	struct bfi_msg_s			*msg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) 	struct bfi_fcport_rsp_s			*penable_rsp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) 	struct bfi_fcport_rsp_s			*pdisable_rsp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) 	struct bfi_fcport_rsp_s			*psetsvcparams_rsp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) 	struct bfi_fcport_rsp_s			*pstatsget_rsp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) 	struct bfi_fcport_rsp_s			*pstatsclear_rsp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) 	struct bfi_fcport_event_s		*event;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) 	struct bfi_fcport_trunk_scn_s		*trunk_scn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) enum bfi_fcxp_h2i {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) 	BFI_FCXP_H2I_SEND_REQ = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) enum bfi_fcxp_i2h {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) 	BFI_FCXP_I2H_SEND_RSP = BFA_I2HM(1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) #define BFA_FCXP_MAX_SGES	2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341)  * FCXP send request structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) struct bfi_fcxp_send_req_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) 	struct bfi_mhdr_s  mh;		/*  Common msg header		    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) 	__be16	fcxp_tag;	/*  driver request tag		    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) 	__be16	max_frmsz;	/*  max send frame size	    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) 	__be16	vf_id;		/*  vsan tag if applicable	    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) 	u16	rport_fw_hndl;	/*  FW Handle for the remote port  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) 	u8	 class;		/*  FC class used for req/rsp	    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) 	u8	 rsp_timeout;	/*  timeout in secs, 0-no response */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) 	u8	 cts;		/*  continue sequence		    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) 	u8	 lp_fwtag;	/*  lport tag			    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) 	struct fchs_s	fchs;	/*  request FC header structure    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) 	__be32	req_len;	/*  request payload length	    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) 	__be32	rsp_maxlen;	/*  max response length expected   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) 	struct bfi_alen_s req_alen;	/* request buffer	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) 	struct bfi_alen_s rsp_alen;	/* response buffer	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361)  * FCXP send response structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) struct bfi_fcxp_send_rsp_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) 	struct bfi_mhdr_s  mh;		/*  Common msg header		    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) 	__be16	fcxp_tag;	/*  send request tag		    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) 	u8	 req_status;	/*  request status		    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) 	u8	 rsvd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) 	__be32	rsp_len;	/*  actual response length	    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) 	__be32	residue_len;	/*  residual response length	    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) 	struct fchs_s	fchs;	/*  response FC header structure   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) enum bfi_uf_h2i {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) 	BFI_UF_H2I_BUF_POST = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) enum bfi_uf_i2h {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) 	BFI_UF_I2H_FRM_RCVD = BFA_I2HM(1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) #define BFA_UF_MAX_SGES	2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) struct bfi_uf_buf_post_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) 	struct bfi_mhdr_s  mh;		/*  Common msg header		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) 	u16	buf_tag;	/*  buffer tag			*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) 	__be16	buf_len;	/*  total buffer length	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) 	struct bfi_alen_s alen;	/* buffer address/len pair	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) struct bfi_uf_frm_rcvd_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) 	struct bfi_mhdr_s  mh;		/*  Common msg header		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) 	u16	buf_tag;	/*  buffer tag			*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) 	u16	rsvd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) 	u16	frm_len;	/*  received frame length	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) 	u16	xfr_len;	/*  tranferred length		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) enum bfi_lps_h2i_msgs {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) 	BFI_LPS_H2I_LOGIN_REQ	= 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) 	BFI_LPS_H2I_LOGOUT_REQ	= 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) 	BFI_LPS_H2I_N2N_PID_REQ = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) enum bfi_lps_i2h_msgs {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) 	BFI_LPS_I2H_LOGIN_RSP	= BFA_I2HM(1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) 	BFI_LPS_I2H_LOGOUT_RSP	= BFA_I2HM(2),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) 	BFI_LPS_I2H_CVL_EVENT	= BFA_I2HM(3),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) struct bfi_lps_login_req_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) 	struct bfi_mhdr_s  mh;		/*  common msg header		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) 	u8		bfa_tag;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) 	u8		alpa;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414) 	__be16		pdu_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) 	wwn_t		pwwn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416) 	wwn_t		nwwn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) 	u8		fdisc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) 	u8		auth_en;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) 	u8		lps_role;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) 	u8		bb_scn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) 	u32		vvl_flag;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) struct bfi_lps_login_rsp_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) 	struct bfi_mhdr_s  mh;		/*  common msg header		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426) 	u8		fw_tag;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) 	u8		status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) 	u8		lsrjt_rsn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429) 	u8		lsrjt_expl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430) 	wwn_t		port_name;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) 	wwn_t		node_name;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432) 	__be16		bb_credit;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) 	u8		f_port;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434) 	u8		npiv_en;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) 	u32	lp_pid:24;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) 	u32	auth_req:8;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437) 	mac_t		lp_mac;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) 	mac_t		fcf_mac;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) 	u8		ext_status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) 	u8		brcd_switch;	/*  attached peer is brcd switch */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) 	u8		bfa_tag;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) 	u8		rsvd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445) struct bfi_lps_logout_req_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) 	struct bfi_mhdr_s  mh;		/*  common msg header		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447) 	u8		fw_tag;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448) 	u8		rsvd[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449) 	wwn_t		port_name;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452) struct bfi_lps_logout_rsp_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453) 	struct bfi_mhdr_s  mh;		/*  common msg header		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454) 	u8		bfa_tag;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 455) 	u8		status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 456) 	u8		rsvd[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 457) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 458) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 459) struct bfi_lps_cvl_event_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 460) 	struct bfi_mhdr_s  mh;		/*  common msg header		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 461) 	u8		bfa_tag;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 462) 	u8		rsvd[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 463) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 464) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 465) struct bfi_lps_n2n_pid_req_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 466) 	struct bfi_mhdr_s	mh;	/*  common msg header		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 467) 	u8	fw_tag;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 468) 	u32	lp_pid:24;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 469) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 470) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 471) union bfi_lps_h2i_msg_u {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 472) 	struct bfi_mhdr_s		*msg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 473) 	struct bfi_lps_login_req_s	*login_req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 474) 	struct bfi_lps_logout_req_s	*logout_req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 475) 	struct bfi_lps_n2n_pid_req_s	*n2n_pid_req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 476) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 477) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 478) union bfi_lps_i2h_msg_u {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 479) 	struct bfi_msg_s		*msg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 480) 	struct bfi_lps_login_rsp_s	*login_rsp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 481) 	struct bfi_lps_logout_rsp_s	*logout_rsp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 482) 	struct bfi_lps_cvl_event_s	*cvl_event;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 483) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 484) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 485) enum bfi_rport_h2i_msgs {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 486) 	BFI_RPORT_H2I_CREATE_REQ = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 487) 	BFI_RPORT_H2I_DELETE_REQ = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 488) 	BFI_RPORT_H2I_SET_SPEED_REQ  = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 489) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 490) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 491) enum bfi_rport_i2h_msgs {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 492) 	BFI_RPORT_I2H_CREATE_RSP = BFA_I2HM(1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 493) 	BFI_RPORT_I2H_DELETE_RSP = BFA_I2HM(2),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 494) 	BFI_RPORT_I2H_QOS_SCN    = BFA_I2HM(3),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 495) 	BFI_RPORT_I2H_LIP_SCN_ONLINE =	BFA_I2HM(4),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 496) 	BFI_RPORT_I2H_LIP_SCN_OFFLINE = BFA_I2HM(5),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 497) 	BFI_RPORT_I2H_NO_DEV	= BFA_I2HM(6),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 498) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 499) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 500) struct bfi_rport_create_req_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 501) 	struct bfi_mhdr_s  mh;		/*  common msg header		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 502) 	u16	bfa_handle;	/*  host rport handle		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 503) 	__be16	max_frmsz;	/*  max rcv pdu size		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 504) 	u32	pid:24,	/*  remote port ID		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 505) 		lp_fwtag:8;	/*  local port tag		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 506) 	u32	local_pid:24,	/*  local port ID		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 507) 		cisc:8;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 508) 	u8	fc_class;	/*  supported FC classes	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 509) 	u8	vf_en;		/*  virtual fabric enable	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 510) 	u16	vf_id;		/*  virtual fabric ID		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 511) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 512) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 513) struct bfi_rport_create_rsp_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 514) 	struct bfi_mhdr_s  mh;		/*  common msg header		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 515) 	u8		status;		/*  rport creation status	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 516) 	u8		rsvd[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 517) 	u16	bfa_handle;	/*  host rport handle		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 518) 	u16	fw_handle;	/*  firmware rport handle	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 519) 	struct bfa_rport_qos_attr_s qos_attr;  /* QoS Attributes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 520) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 521) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 522) struct bfa_rport_speed_req_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 523) 	struct bfi_mhdr_s  mh;		/*  common msg header		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 524) 	u16	fw_handle;	/*  firmware rport handle	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 525) 	u8		speed;		/*  rport's speed via RPSC	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 526) 	u8		rsvd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 527) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 528) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 529) struct bfi_rport_delete_req_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 530) 	struct bfi_mhdr_s  mh;		/*  common msg header		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 531) 	u16	fw_handle;	/*  firmware rport handle	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 532) 	u16	rsvd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 533) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 534) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 535) struct bfi_rport_delete_rsp_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 536) 	struct bfi_mhdr_s  mh;		/*  common msg header		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 537) 	u16	bfa_handle;	/*  host rport handle		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 538) 	u8		status;		/*  rport deletion status	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 539) 	u8		rsvd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 540) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 541) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 542) struct bfi_rport_qos_scn_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 543) 	struct bfi_mhdr_s  mh;		/*  common msg header		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 544) 	u16	bfa_handle;	/*  host rport handle		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 545) 	u16	rsvd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 546) 	struct bfa_rport_qos_attr_s old_qos_attr;  /* Old QoS Attributes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 547) 	struct bfa_rport_qos_attr_s new_qos_attr;  /* New QoS Attributes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 548) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 549) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 550) struct bfi_rport_lip_scn_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 551) 	struct bfi_mhdr_s  mh;		/*!< common msg header	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 552) 	u16	bfa_handle;	/*!< host rport handle	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 553) 	u8		status;		/*!< scn online status	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 554) 	u8		rsvd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 555) 	struct bfa_fcport_loop_info_s	loop_info;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 556) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 557) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 558) union bfi_rport_h2i_msg_u {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 559) 	struct bfi_msg_s		*msg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 560) 	struct bfi_rport_create_req_s	*create_req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 561) 	struct bfi_rport_delete_req_s	*delete_req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 562) 	struct bfi_rport_speed_req_s	*speed_req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 563) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 564) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 565) union bfi_rport_i2h_msg_u {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 566) 	struct bfi_msg_s		*msg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 567) 	struct bfi_rport_create_rsp_s	*create_rsp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 568) 	struct bfi_rport_delete_rsp_s	*delete_rsp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 569) 	struct bfi_rport_qos_scn_s	*qos_scn_evt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 570) 	struct bfi_rport_lip_scn_s	*lip_scn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 571) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 572) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 573) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 574)  * Initiator mode I-T nexus interface defines.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 575)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 576) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 577) enum bfi_itn_h2i {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 578) 	BFI_ITN_H2I_CREATE_REQ = 1,	/*  i-t nexus creation */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 579) 	BFI_ITN_H2I_DELETE_REQ = 2,	/*  i-t nexus deletion */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 580) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 581) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 582) enum bfi_itn_i2h {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 583) 	BFI_ITN_I2H_CREATE_RSP = BFA_I2HM(1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 584) 	BFI_ITN_I2H_DELETE_RSP = BFA_I2HM(2),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 585) 	BFI_ITN_I2H_SLER_EVENT = BFA_I2HM(3),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 586) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 587) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 588) struct bfi_itn_create_req_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 589) 	struct bfi_mhdr_s  mh;		/*  common msg header		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 590) 	u16	fw_handle;	/*  f/w handle for itnim	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 591) 	u8	class;		/*  FC class for IO		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 592) 	u8	seq_rec;	/*  sequence recovery support	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 593) 	u8	msg_no;		/*  seq id of the msg		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 594) 	u8	role;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 595) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 596) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 597) struct bfi_itn_create_rsp_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 598) 	struct bfi_mhdr_s  mh;		/*  common msg header		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 599) 	u16	bfa_handle;	/*  bfa handle for itnim	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 600) 	u8	status;		/*  fcp request status		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 601) 	u8	seq_id;		/*  seq id of the msg		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 602) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 603) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 604) struct bfi_itn_delete_req_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 605) 	struct bfi_mhdr_s  mh;		/*  common msg header		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 606) 	u16	fw_handle;	/*  f/w itnim handle		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 607) 	u8	seq_id;		/*  seq id of the msg		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 608) 	u8	rsvd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 609) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 610) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 611) struct bfi_itn_delete_rsp_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 612) 	struct bfi_mhdr_s  mh;		/*  common msg header		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 613) 	u16	bfa_handle;	/*  bfa handle for itnim	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 614) 	u8	status;		/*  fcp request status		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 615) 	u8	seq_id;		/*  seq id of the msg		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 616) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 617) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 618) struct bfi_itn_sler_event_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 619) 	struct bfi_mhdr_s  mh;		/*  common msg header		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 620) 	u16	bfa_handle;	/*  bfa handle for itnim	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 621) 	u16	rsvd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 622) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 623) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 624) union bfi_itn_h2i_msg_u {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 625) 	struct bfi_itn_create_req_s *create_req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 626) 	struct bfi_itn_delete_req_s *delete_req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 627) 	struct bfi_msg_s	*msg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 628) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 629) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 630) union bfi_itn_i2h_msg_u {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 631) 	struct bfi_itn_create_rsp_s *create_rsp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 632) 	struct bfi_itn_delete_rsp_s *delete_rsp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 633) 	struct bfi_itn_sler_event_s *sler_event;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 634) 	struct bfi_msg_s	*msg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 635) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 636) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 637) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 638)  * Initiator mode IO interface defines.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 639)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 640) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 641) enum bfi_ioim_h2i {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 642) 	BFI_IOIM_H2I_IOABORT_REQ = 1,	/*  IO abort request	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 643) 	BFI_IOIM_H2I_IOCLEANUP_REQ = 2,	/*  IO cleanup request	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 644) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 645) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 646) enum bfi_ioim_i2h {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 647) 	BFI_IOIM_I2H_IO_RSP = BFA_I2HM(1),	/*  non-fp IO response	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 648) 	BFI_IOIM_I2H_IOABORT_RSP = BFA_I2HM(2),	/*  ABORT rsp	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 649) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 650) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 651) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 652)  * IO command DIF info
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 653)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 654) struct bfi_ioim_dif_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 655) 	u32	dif_info[4];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 656) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 657) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 658) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 659)  * FCP IO messages overview
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 660)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 661)  * @note
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 662)  * - Max CDB length supported is 64 bytes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 663)  * - SCSI Linked commands and SCSI bi-directional Commands not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 664)  *	supported.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 665)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 666)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 667) struct bfi_ioim_req_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 668) 	struct bfi_mhdr_s  mh;		/*  Common msg header		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 669) 	__be16	io_tag;		/*  I/O tag			 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 670) 	u16	rport_hdl;	/*  itnim/rport firmware handle */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 671) 	struct fcp_cmnd_s	cmnd;	/*  IO request info	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 672) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 673) 	/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 674) 	 * SG elements array within the IO request must be double word
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 675) 	 * aligned. This alignment is required to optimize SGM setup for the IO.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 676) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 677) 	struct bfi_sge_s	sges[BFI_SGE_INLINE_MAX];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 678) 	u8	io_timeout;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 679) 	u8	dif_en;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 680) 	u8	rsvd_a[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 681) 	struct bfi_ioim_dif_s  dif;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 682) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 683) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 684) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 685)  *	This table shows various IO status codes from firmware and their
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 686)  *	meaning. Host driver can use these status codes to further process
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 687)  *	IO completions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 688)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 689)  *	BFI_IOIM_STS_OK		: IO completed with error free SCSI &
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 690)  *					transport status.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 691)  *					 io-tag can be reused.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 692)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 693)  *	BFA_IOIM_STS_SCSI_ERR		: IO completed with scsi error.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 694)  *	- io-tag can be reused.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 695)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 696)  *	BFI_IOIM_STS_HOST_ABORTED	: IO was aborted successfully due to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 697)  *						host request.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 698)  *					- io-tag cannot be reused yet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 699)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 700)  *	BFI_IOIM_STS_ABORTED		: IO was aborted successfully
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 701)  *						internally by f/w.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 702)  *					- io-tag cannot be reused yet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 703)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 704)  *	BFI_IOIM_STS_TIMEDOUT	: IO timedout and ABTS/RRQ is happening
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 705)  *					in the firmware and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 706)  *					- io-tag cannot be reused yet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 707)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 708)  *	BFI_IOIM_STS_SQER_NEEDED	: Firmware could not recover the IO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 709)  *					  with sequence level error
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 710)  *	logic and hence host needs to retry
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 711)  *					  this IO with a different IO tag
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 712)  *					- io-tag cannot be used yet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 713)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 714)  *	BFI_IOIM_STS_NEXUS_ABORT	: Second Level Error Recovery from host
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 715)  *					  is required because 2 consecutive ABTS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 716)  *					  timedout and host needs logout and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 717)  *					  re-login with the target
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 718)  *					- io-tag cannot be used yet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 719)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 720)  *	BFI_IOIM_STS_UNDERRUN	: IO completed with SCSI status good,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 721)  *					  but the data tranferred is less than
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 722)  *					  the fcp data length in the command.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 723)  *					  ex. SCSI INQUIRY where transferred
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 724)  *					  data length and residue count in FCP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 725)  *					  response accounts for total fcp-dl
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 726)  *					  - io-tag can be reused.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 727)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 728)  *	BFI_IOIM_STS_OVERRUN	: IO completed with SCSI status good,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 729)  *					  but the data transerred is more than
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 730)  *					  fcp data length in the command. ex.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 731)  *					  TAPE IOs where blocks can of unequal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 732)  *					  lengths.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 733)  *					- io-tag can be reused.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 734)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 735)  *	BFI_IOIM_STS_RES_FREE	: Firmware has completed using io-tag
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 736)  *					  during abort process
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 737)  *					- io-tag can be reused.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 738)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 739)  *	BFI_IOIM_STS_PROTO_ERR	: Firmware detected a protocol error.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 740)  *					  ex target sent more data than
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 741)  *					  requested, or there was data frame
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 742)  *					  loss and other reasons
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 743)  *					- io-tag cannot be used yet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 744)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 745)  *	BFI_IOIM_STS_DIF_ERR	: Firwmare detected DIF error. ex: DIF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 746)  *					CRC err or Ref Tag err or App tag err.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 747)  *					- io-tag can be reused.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 748)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 749)  *	BFA_IOIM_STS_TSK_MGT_ABORT	: IO was aborted because of Task
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 750)  *					  Management command from the host
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 751)  *					  - io-tag can be reused.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 752)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 753)  *	BFI_IOIM_STS_UTAG		: Firmware does not know about this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 754)  *					  io_tag.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 755)  *					- io-tag can be reused.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 756)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 757) enum bfi_ioim_status {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 758) 	BFI_IOIM_STS_OK = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 759) 	BFI_IOIM_STS_HOST_ABORTED = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 760) 	BFI_IOIM_STS_ABORTED = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 761) 	BFI_IOIM_STS_TIMEDOUT = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 762) 	BFI_IOIM_STS_RES_FREE = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 763) 	BFI_IOIM_STS_SQER_NEEDED = 5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 764) 	BFI_IOIM_STS_PROTO_ERR = 6,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 765) 	BFI_IOIM_STS_UTAG = 7,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 766) 	BFI_IOIM_STS_PATHTOV = 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 767) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 768) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 769) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 770)  * I/O response message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 771)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 772) struct bfi_ioim_rsp_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 773) 	struct bfi_mhdr_s	mh;	/*  common msg header		*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 774) 	__be16	io_tag;		/*  completed IO tag		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 775) 	u16	bfa_rport_hndl;	/*  releated rport handle	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 776) 	u8	io_status;	/*  IO completion status	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 777) 	u8	reuse_io_tag;	/*  IO tag can be reused	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 778) 	u16	abort_tag;	/*  host abort request tag	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 779) 	u8		scsi_status;	/*  scsi status from target	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 780) 	u8		sns_len;	/*  scsi sense length		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 781) 	u8		resid_flags;	/*  IO residue flags		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 782) 	u8		rsvd_a;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 783) 	__be32	residue;	/*  IO residual length in bytes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 784) 	u32	rsvd_b[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 785) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 786) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 787) struct bfi_ioim_abort_req_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 788) 	struct bfi_mhdr_s  mh;	/*  Common msg header  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 789) 	__be16	io_tag;	/*  I/O tag	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 790) 	u16	abort_tag;	/*  unique request tag */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 791) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 792) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 793) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 794)  * Initiator mode task management command interface defines.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 795)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 796) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 797) enum bfi_tskim_h2i {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 798) 	BFI_TSKIM_H2I_TM_REQ	= 1, /*  task-mgmt command	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 799) 	BFI_TSKIM_H2I_ABORT_REQ = 2, /*  task-mgmt command	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 800) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 801) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 802) enum bfi_tskim_i2h {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 803) 	BFI_TSKIM_I2H_TM_RSP = BFA_I2HM(1),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 804) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 805) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 806) struct bfi_tskim_req_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 807) 	struct bfi_mhdr_s  mh;	/*  Common msg header	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 808) 	__be16	tsk_tag;	/*  task management tag	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 809) 	u16	itn_fhdl;	/*  itn firmware handle	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 810) 	struct 	scsi_lun lun;	/*  LU number	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 811) 	u8	tm_flags;	/*  see enum fcp_tm_cmnd	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 812) 	u8	t_secs;	/*  Timeout value in seconds	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 813) 	u8	rsvd[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 814) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 815) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 816) struct bfi_tskim_abortreq_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 817) 	struct bfi_mhdr_s  mh;	/*  Common msg header	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 818) 	__be16	tsk_tag;	/*  task management tag	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 819) 	u16	rsvd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 820) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 821) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 822) enum bfi_tskim_status {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 823) 	/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 824) 	 * Following are FCP-4 spec defined status codes,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 825) 	 * **DO NOT CHANGE THEM **
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 826) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 827) 	BFI_TSKIM_STS_OK	= 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 828) 	BFI_TSKIM_STS_NOT_SUPP = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 829) 	BFI_TSKIM_STS_FAILED	= 5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 830) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 831) 	/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 832) 	 * Defined by BFA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 833) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 834) 	BFI_TSKIM_STS_TIMEOUT  = 10,	/*  TM request timedout	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 835) 	BFI_TSKIM_STS_ABORTED  = 11,	/*  Aborted on host request */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 836) 	BFI_TSKIM_STS_UTAG     = 12,	/*  unknown tag for request */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 837) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 838) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 839) struct bfi_tskim_rsp_s {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 840) 	struct bfi_mhdr_s  mh;		/*  Common msg header		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 841) 	__be16	tsk_tag;	/*  task mgmt cmnd tag		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 842) 	u8	tsk_status;	/*  @ref bfi_tskim_status */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 843) 	u8	rsvd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 844) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 845) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 846) #pragma pack()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 847) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 848) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 849)  * Crossbow PCI MSI-X vector defines
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 850)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 851) enum {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 852) 	BFI_MSIX_CPE_QMIN_CB = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 853) 	BFI_MSIX_CPE_QMAX_CB = 7,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 854) 	BFI_MSIX_RME_QMIN_CB = 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 855) 	BFI_MSIX_RME_QMAX_CB = 15,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 856) 	BFI_MSIX_CB_MAX = 22,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 857) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 858) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 859) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 860)  * Catapult FC PCI MSI-X vector defines
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 861)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 862) enum {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 863) 	BFI_MSIX_LPU_ERR_CT = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 864) 	BFI_MSIX_CPE_QMIN_CT = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 865) 	BFI_MSIX_CPE_QMAX_CT = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 866) 	BFI_MSIX_RME_QMIN_CT = 5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 867) 	BFI_MSIX_RME_QMAX_CT = 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 868) 	BFI_MSIX_CT_MAX = 9,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 869) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 870) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 871) #endif /* __BFI_MS_H__ */