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 2017 Broadcom. All Rights Reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    4)  * The term "Broadcom" refers to Broadcom Limited and/or its subsidiaries.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    5)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    6)  * Contact Information:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    7)  * linux-drivers@broadcom.com
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    8)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300    9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   10) #ifndef BEISCSI_CMDS_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   11) #define BEISCSI_CMDS_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   13) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   14)  * The driver sends configuration and managements command requests to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   15)  * firmware in the BE. These requests are communicated to the processor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   16)  * using Work Request Blocks (WRBs) submitted to the MCC-WRB ring or via one
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   17)  * WRB inside a MAILBOX.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   18)  * The commands are serviced by the ARM processor in the OneConnect's MPU.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   19)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   20) struct be_sge {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   21) 	__le32 pa_lo;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   22) 	__le32 pa_hi;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   23) 	__le32 len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   24) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   26) struct be_mcc_wrb {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   27) 	u32 emb_sgecnt_special;	/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   28) 	/* bits 0 - embedded    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   29) 	/* bits 1 - 2 reserved	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   30) 	/* bits 3 - 7 sge count	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   31) 	/* bits 8 - 23 reserved	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   32) 	/* bits 24 - 31 special	*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   33) #define MCC_WRB_EMBEDDED_MASK 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   34) #define MCC_WRB_SGE_CNT_SHIFT 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   35) #define MCC_WRB_SGE_CNT_MASK 0x1F
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   36) 	u32 payload_length;	/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   37) 	u32 tag0;		/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   38) 	u32 tag1;		/* dword 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   39) 	u32 rsvd;		/* dword 4 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   40) 	union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   41) #define EMBED_MBX_MAX_PAYLOAD_SIZE  220
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   42) 		u8 embedded_payload[236];	/* used by embedded cmds */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   43) 		struct be_sge sgl[19];	/* used by non-embedded cmds */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   44) 	} payload;
^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) #define CQE_FLAGS_VALID_MASK (1 << 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   48) #define CQE_FLAGS_ASYNC_MASK (1 << 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   49) #define CQE_FLAGS_COMPLETED_MASK	(1 << 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   50) #define CQE_FLAGS_CONSUMED_MASK		(1 << 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   52) /* Completion Status */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   53) #define MCC_STATUS_SUCCESS 0x0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   54) #define MCC_STATUS_FAILED 0x1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   55) #define MCC_STATUS_ILLEGAL_REQUEST 0x2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   56) #define MCC_STATUS_ILLEGAL_FIELD 0x3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   57) #define MCC_STATUS_INSUFFICIENT_BUFFER 0x4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   58) #define MCC_STATUS_INVALID_LENGTH 0x74
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   60) #define CQE_STATUS_COMPL_MASK	0xFFFF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   61) #define CQE_STATUS_COMPL_SHIFT	0		/* bits 0 - 15 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   62) #define CQE_STATUS_EXTD_MASK	0xFFFF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   63) #define CQE_STATUS_EXTD_SHIFT	16		/* bits 31 - 16 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   64) #define CQE_STATUS_ADDL_MASK	0xFF00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   65) #define CQE_STATUS_ADDL_SHIFT	8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   66) #define CQE_STATUS_MASK		0xFF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   67) #define CQE_STATUS_WRB_MASK	0xFF0000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   68) #define CQE_STATUS_WRB_SHIFT	16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   69) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   70) #define BEISCSI_HOST_MBX_TIMEOUT (110 * 1000)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   71) #define BEISCSI_FW_MBX_TIMEOUT	100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   72) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   73) /* MBOX Command VER */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   74) #define MBX_CMD_VER1	0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   75) #define MBX_CMD_VER2	0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   76) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   77) struct be_mcc_compl {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   78) 	u32 status;		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   79) 	u32 tag0;		/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   80) 	u32 tag1;		/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   81) 	u32 flags;		/* dword 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   82) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   83) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   84) /********* Mailbox door bell *************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   85) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   86)  * Used for driver communication with the FW.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   87)  * The software must write this register twice to post any command. First,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   88)  * it writes the register with hi=1 and the upper bits of the physical address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   89)  * for the MAILBOX structure. Software must poll the ready bit until this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   90)  * is acknowledged. Then, sotware writes the register with hi=0 with the lower
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   91)  * bits in the address. It must poll the ready bit until the command is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   92)  * complete. Upon completion, the MAILBOX will contain a valid completion
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   93)  * queue entry.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   94)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   95) #define MPU_MAILBOX_DB_OFFSET	0x160
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   96) #define MPU_MAILBOX_DB_RDY_MASK	0x1	/* bit 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   97) #define MPU_MAILBOX_DB_HI_MASK	0x2	/* bit 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   98) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   99) /********** MPU semphore: used for SH & BE ******************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  100) #define SLIPORT_SOFTRESET_OFFSET		0x5c	/* CSR BAR offset */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  101) #define SLIPORT_SEMAPHORE_OFFSET_BEx		0xac	/* CSR BAR offset */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  102) #define SLIPORT_SEMAPHORE_OFFSET_SH		0x94	/* PCI-CFG offset */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  103) #define POST_STAGE_MASK				0x0000FFFF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  104) #define POST_ERROR_BIT				0x80000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  105) #define POST_ERR_RECOVERY_CODE_MASK		0xF000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  106) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  107) /* Soft Reset register masks */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  108) #define SLIPORT_SOFTRESET_SR_MASK		0x00000080	/* SR bit */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  109) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  110) /* MPU semphore POST stage values */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  111) #define POST_STAGE_AWAITING_HOST_RDY	0x1 /* FW awaiting goahead from host */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  112) #define POST_STAGE_HOST_RDY		0x2 /* Host has given go-ahed to FW */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  113) #define POST_STAGE_BE_RESET		0x3 /* Host wants to reset chip */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  114) #define POST_STAGE_ARMFW_RDY		0xC000 /* FW is done with POST */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  115) #define POST_STAGE_RECOVERABLE_ERR	0xE000 /* Recoverable err detected */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  116) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  117) /********** MCC door bell ************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  118) #define DB_MCCQ_OFFSET 0x140
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  119) #define DB_MCCQ_RING_ID_MASK 0xFFFF		/* bits 0 - 15 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  120) /* Number of entries posted */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  121) #define DB_MCCQ_NUM_POSTED_SHIFT 16		/* bits 16 - 29 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  122) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  123) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  124)  * When the async bit of mcc_compl is set, the last 4 bytes of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  125)  * mcc_compl is interpreted as follows:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  126)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  127) #define ASYNC_TRAILER_EVENT_CODE_SHIFT	8	/* bits 8 - 15 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  128) #define ASYNC_TRAILER_EVENT_CODE_MASK	0xFF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  129) #define ASYNC_EVENT_CODE_LINK_STATE	0x1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  130) #define ASYNC_EVENT_CODE_ISCSI		0x4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  131) #define ASYNC_EVENT_CODE_SLI		0x11
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  132) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  133) #define ASYNC_TRAILER_EVENT_TYPE_SHIFT	16	/* bits 16 - 23 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  134) #define ASYNC_TRAILER_EVENT_TYPE_MASK	0xFF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  135) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  136) /* iSCSI events */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  137) #define ASYNC_EVENT_NEW_ISCSI_TGT_DISC	0x4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  138) #define ASYNC_EVENT_NEW_ISCSI_CONN	0x5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  139) #define ASYNC_EVENT_NEW_TCP_CONN	0x7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  140) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  141) /* SLI events */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  142) #define ASYNC_SLI_EVENT_TYPE_MISCONFIGURED	0x9
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  143) #define ASYNC_SLI_LINK_EFFECT_VALID(le)		(le & 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  144) #define ASYNC_SLI_LINK_EFFECT_SEV(le)		((le >> 1)  & 0x03)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  145) #define ASYNC_SLI_LINK_EFFECT_STATE(le)		(le & 0x01)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  146) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  147) struct be_async_event_trailer {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  148) 	u32 code;
^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) enum {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  152) 	ASYNC_EVENT_LINK_DOWN = 0x0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  153) 	ASYNC_EVENT_LINK_UP = 0x1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  154) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  155) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  156) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  157)  * When the event code of an async trailer is link-state, the mcc_compl
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  158)  * must be interpreted as follows
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  159)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  160) struct be_async_event_link_state {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  161) 	u8 physical_port;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  162) 	u8 port_link_status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  163) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  164)  * ASYNC_EVENT_LINK_DOWN		0x0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  165)  * ASYNC_EVENT_LINK_UP			0x1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  166)  * ASYNC_EVENT_LINK_LOGICAL_DOWN	0x2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  167)  * ASYNC_EVENT_LINK_LOGICAL_UP		0x3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  168)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  169) #define BE_ASYNC_LINK_UP_MASK		0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  170) 	u8 port_duplex;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  171) 	u8 port_speed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  172) /* BE2ISCSI_LINK_SPEED_ZERO	0x00 - no link */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  173) #define BE2ISCSI_LINK_SPEED_10MBPS	0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  174) #define BE2ISCSI_LINK_SPEED_100MBPS	0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  175) #define BE2ISCSI_LINK_SPEED_1GBPS	0x03
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  176) #define BE2ISCSI_LINK_SPEED_10GBPS	0x04
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  177) #define BE2ISCSI_LINK_SPEED_25GBPS	0x06
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  178) #define BE2ISCSI_LINK_SPEED_40GBPS	0x07
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  179) 	u8 port_fault;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  180) 	u8 event_reason;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  181) 	u16 qos_link_speed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  182) 	u32 event_tag;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  183) 	struct be_async_event_trailer trailer;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  184) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  185) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  186) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  187)  * When async-trailer is SLI event, mcc_compl is interpreted as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  188)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  189) struct be_async_event_sli {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  190) 	u32 event_data1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  191) 	u32 event_data2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  192) 	u32 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  193) 	u32 trailer;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  194) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  195) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  196) struct be_mcc_mailbox {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  197) 	struct be_mcc_wrb wrb;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  198) 	struct be_mcc_compl compl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  199) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  200) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  201) /* Type of subsystems supported by FW */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  202) #define CMD_SUBSYSTEM_COMMON    0x1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  203) #define CMD_SUBSYSTEM_ISCSI     0x2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  204) #define CMD_SUBSYSTEM_ETH       0x3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  205) #define CMD_SUBSYSTEM_ISCSI_INI 0x6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  206) #define CMD_COMMON_TCP_UPLOAD   0x1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  207) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  208) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  209)  * List of common opcodes subsystem  CMD_SUBSYSTEM_COMMON
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  210)  * These opcodes are unique for each subsystem defined above
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  211)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  212) #define OPCODE_COMMON_CQ_CREATE				12
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  213) #define OPCODE_COMMON_EQ_CREATE				13
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  214) #define OPCODE_COMMON_MCC_CREATE			21
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  215) #define OPCODE_COMMON_MCC_CREATE_EXT			90
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  216) #define OPCODE_COMMON_ADD_TEMPLATE_HEADER_BUFFERS	24
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  217) #define OPCODE_COMMON_REMOVE_TEMPLATE_HEADER_BUFFERS	25
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  218) #define OPCODE_COMMON_GET_CNTL_ATTRIBUTES		32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  219) #define OPCODE_COMMON_GET_FW_VERSION			35
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  220) #define OPCODE_COMMON_MODIFY_EQ_DELAY			41
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  221) #define OPCODE_COMMON_FIRMWARE_CONFIG			42
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  222) #define OPCODE_COMMON_MCC_DESTROY			53
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  223) #define OPCODE_COMMON_CQ_DESTROY			54
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  224) #define OPCODE_COMMON_EQ_DESTROY			55
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  225) #define OPCODE_COMMON_QUERY_FIRMWARE_CONFIG		58
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  226) #define OPCODE_COMMON_FUNCTION_RESET			61
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  227) #define OPCODE_COMMON_GET_PORT_NAME			77
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  228) #define OPCODE_COMMON_SET_HOST_DATA			93
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  229) #define OPCODE_COMMON_SET_FEATURES			191
^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)  * LIST of opcodes that are common between Initiator and Target
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  233)  * used by CMD_SUBSYSTEM_ISCSI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  234)  * These opcodes are unique for each subsystem defined above
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  235)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  236) #define OPCODE_COMMON_ISCSI_CFG_POST_SGL_PAGES		2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  237) #define OPCODE_COMMON_ISCSI_CFG_REMOVE_SGL_PAGES        3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  238) #define OPCODE_COMMON_ISCSI_NTWK_GET_NIC_CONFIG		7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  239) #define OPCODE_COMMON_ISCSI_NTWK_SET_VLAN		14
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  240) #define OPCODE_COMMON_ISCSI_NTWK_CONFIG_STATELESS_IP_ADDR	17
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  241) #define OPCODE_COMMON_ISCSI_NTWK_REL_STATELESS_IP_ADDR	18
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  242) #define OPCODE_COMMON_ISCSI_NTWK_MODIFY_IP_ADDR		21
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  243) #define OPCODE_COMMON_ISCSI_NTWK_GET_DEFAULT_GATEWAY	22
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  244) #define OPCODE_COMMON_ISCSI_NTWK_MODIFY_DEFAULT_GATEWAY 23
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  245) #define OPCODE_COMMON_ISCSI_NTWK_GET_ALL_IF_ID		24
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  246) #define OPCODE_COMMON_ISCSI_NTWK_GET_IF_INFO		25
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  247) #define OPCODE_COMMON_ISCSI_SET_FRAGNUM_BITS_FOR_SGL_CRA 61
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  248) #define OPCODE_COMMON_ISCSI_DEFQ_CREATE                 64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  249) #define OPCODE_COMMON_ISCSI_DEFQ_DESTROY		65
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  250) #define OPCODE_COMMON_ISCSI_WRBQ_CREATE			66
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  251) #define OPCODE_COMMON_ISCSI_WRBQ_DESTROY		67
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  252) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  253) struct be_cmd_req_hdr {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  254) 	u8 opcode;		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  255) 	u8 subsystem;		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  256) 	u8 port_number;		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  257) 	u8 domain;		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  258) 	u32 timeout;		/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  259) 	u32 request_length;	/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  260) 	u8 version;		/* dword 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  261) 	u8 rsvd0[3];		/* dword 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  262) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  263) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  264) struct be_cmd_resp_hdr {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  265) 	u32 info;		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  266) 	u32 status;		/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  267) 	u32 response_length;	/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  268) 	u32 actual_resp_len;	/* dword 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  269) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  270) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  271) struct phys_addr {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  272) 	u32 lo;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  273) 	u32 hi;
^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) struct virt_addr {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  277) 	u32 lo;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  278) 	u32 hi;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  279) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  280) /**************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  281)  * BE Command definitions *
^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) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  285)  * Pseudo amap definition in which each bit of the actual structure is defined
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  286)  * as a byte - used to calculate offset/shift/mask of each field
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  287)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  288) struct amap_eq_context {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  289) 	u8 cidx[13];		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  290) 	u8 rsvd0[3];		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  291) 	u8 epidx[13];		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  292) 	u8 valid;		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  293) 	u8 rsvd1;		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  294) 	u8 size;		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  295) 	u8 pidx[13];		/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  296) 	u8 rsvd2[3];		/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  297) 	u8 pd[10];		/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  298) 	u8 count[3];		/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  299) 	u8 solevent;		/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  300) 	u8 stalled;		/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  301) 	u8 armed;		/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  302) 	u8 rsvd3[4];		/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  303) 	u8 func[8];		/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  304) 	u8 rsvd4;		/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  305) 	u8 delaymult[10];	/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  306) 	u8 rsvd5[2];		/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  307) 	u8 phase[2];		/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  308) 	u8 nodelay;		/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  309) 	u8 rsvd6[4];		/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  310) 	u8 rsvd7[32];		/* dword 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  311) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  312) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  313) struct be_cmd_req_eq_create {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  314) 	struct be_cmd_req_hdr hdr;	/* dw[4] */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  315) 	u16 num_pages;		/* sword */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  316) 	u16 rsvd0;		/* sword */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  317) 	u8 context[sizeof(struct amap_eq_context) / 8];	/* dw[4] */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  318) 	struct phys_addr pages[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  319) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  320) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  321) struct be_cmd_resp_eq_create {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  322) 	struct be_cmd_resp_hdr resp_hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  323) 	u16 eq_id;		/* sword */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  324) 	u16 rsvd0;		/* sword */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  325) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  326) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  327) struct be_set_eqd {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  328) 	u32 eq_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  329) 	u32 phase;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  330) 	u32 delay_multiplier;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  331) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  332) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  333) struct mgmt_chap_format {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  334) 	u32 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  335) 	u8  intr_chap_name[256];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  336) 	u8  intr_secret[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  337) 	u8  target_chap_name[256];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  338) 	u8  target_secret[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  339) 	u16 intr_chap_name_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  340) 	u16 intr_secret_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  341) 	u16 target_chap_name_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  342) 	u16 target_secret_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  343) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  344) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  345) struct mgmt_auth_method_format {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  346) 	u8	auth_method_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  347) 	u8	padding[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  348) 	struct	mgmt_chap_format chap;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  349) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  350) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  351) struct be_cmd_req_logout_fw_sess {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  352) 	struct be_cmd_req_hdr hdr;	/* dw[4] */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  353) 	uint32_t session_handle;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  354) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  355) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  356) struct be_cmd_resp_logout_fw_sess {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  357) 	struct be_cmd_resp_hdr hdr;	/* dw[4] */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  358) 	uint32_t session_status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  359) #define BE_SESS_STATUS_CLOSE		0x20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  360) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  361) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  362) struct mgmt_conn_login_options {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  363) 	u8 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  364) 	u8 header_digest;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  365) 	u8 data_digest;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  366) 	u8 rsvd0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  367) 	u32 max_recv_datasegment_len_ini;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  368) 	u32 max_recv_datasegment_len_tgt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  369) 	u32 tcp_mss;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  370) 	u32 tcp_window_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  371) 	struct	mgmt_auth_method_format auth_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  372) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  373) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  374) struct ip_addr_format {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  375) 	u16 size_of_structure;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  376) 	u8 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  377) 	u8 ip_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  378) #define BEISCSI_IP_TYPE_V4		0x1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  379) #define BEISCSI_IP_TYPE_STATIC_V4	0x3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  380) #define BEISCSI_IP_TYPE_DHCP_V4		0x5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  381) /* type v4 values < type v6 values */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  382) #define BEISCSI_IP_TYPE_V6		0x10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  383) #define BEISCSI_IP_TYPE_ROUTABLE_V6	0x30
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  384) #define BEISCSI_IP_TYPE_LINK_LOCAL_V6	0x50
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  385) #define BEISCSI_IP_TYPE_AUTO_V6		0x90
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  386) 	u8 addr[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  387) 	u32 rsvd0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  388) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  389) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  390) struct mgmt_conn_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  391) 	u32	connection_handle;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  392) 	u32	connection_status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  393) 	u16	src_port;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  394) 	u16	dest_port;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  395) 	u16	dest_port_redirected;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  396) 	u16	cid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  397) 	u32	estimated_throughput;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  398) 	struct	ip_addr_format	src_ipaddr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  399) 	struct	ip_addr_format	dest_ipaddr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  400) 	struct	ip_addr_format	dest_ipaddr_redirected;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  401) 	struct	mgmt_conn_login_options	negotiated_login_options;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  402) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  403) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  404) struct mgmt_session_login_options {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  405) 	u8	flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  406) 	u8	error_recovery_level;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  407) 	u16	rsvd0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  408) 	u32	first_burst_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  409) 	u32	max_burst_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  410) 	u16	max_connections;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  411) 	u16	max_outstanding_r2t;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  412) 	u16	default_time2wait;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  413) 	u16	default_time2retain;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  414) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  415) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  416) struct mgmt_session_info {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  417) 	u32	session_handle;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  418) 	u32	status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  419) 	u8	isid[6];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  420) 	u16	tsih;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  421) 	u32	session_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  422) 	u16	conn_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  423) 	u16	pad;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  424) 	u8	target_name[224];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  425) 	u8	initiator_iscsiname[224];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  426) 	struct	mgmt_session_login_options negotiated_login_options;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  427) 	struct	mgmt_conn_info	conn_list[1];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  428) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  429) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  430) struct be_cmd_get_session_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  431) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  432) 	u32 session_handle;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  433) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  434) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  435) struct be_cmd_get_session_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  436) 	struct be_cmd_resp_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  437) 	struct mgmt_session_info session_info;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  438) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  439) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  440) struct mac_addr {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  441) 	u16 size_of_structure;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  442) 	u8 addr[ETH_ALEN];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  443) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  444) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  445) struct be_cmd_get_boot_target_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  446) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  447) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  448) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  449) struct be_cmd_get_boot_target_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  450) 	struct be_cmd_resp_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  451) 	u32 boot_session_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  452) 	u32 boot_session_handle;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  453) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  454)  * FW returns 0xffffffff if it couldn't establish connection with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  455)  * configured boot target.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  456)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  457) #define BE_BOOT_INVALID_SHANDLE	0xffffffff
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  458) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  459) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  460) struct be_cmd_reopen_session_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  461) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  462) #define BE_REOPEN_ALL_SESSIONS  0x00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  463) #define BE_REOPEN_BOOT_SESSIONS 0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  464) #define BE_REOPEN_A_SESSION     0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  465) 	u16 reopen_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  466) 	u16 rsvd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  467) 	u32 session_handle;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  468) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  469) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  470) struct be_cmd_reopen_session_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  471) 	struct be_cmd_resp_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  472) 	u32 rsvd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  473) 	u32 session_handle;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  474) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  475) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  476) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  477) struct be_cmd_mac_query_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  478) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  479) 	u8 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  480) 	u8 permanent;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  481) 	u16 if_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  482) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  483) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  484) struct be_cmd_get_mac_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  485) 	struct be_cmd_resp_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  486) 	struct mac_addr mac;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  487) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  488) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  489) struct be_ip_addr_subnet_format {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  490) 	u16 size_of_structure;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  491) 	u8 ip_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  492) 	u8 ipv6_prefix_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  493) 	u8 addr[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  494) 	u8 subnet_mask[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  495) 	u32 rsvd0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  496) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  497) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  498) struct be_cmd_get_if_info_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  499) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  500) 	u32 interface_hndl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  501) 	u32 ip_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  502) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  503) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  504) struct be_cmd_get_if_info_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  505) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  506) 	u32 interface_hndl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  507) 	u32 vlan_priority;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  508) 	u32 ip_addr_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  509) 	u32 dhcp_state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  510) 	struct be_ip_addr_subnet_format ip_addr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  511) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  512) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  513) struct be_ip_addr_record {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  514) 	u32 action;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  515) 	u32 interface_hndl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  516) 	struct be_ip_addr_subnet_format ip_addr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  517) 	u32 status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  518) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  519) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  520) struct be_ip_addr_record_params {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  521) 	u32 record_entry_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  522) 	struct be_ip_addr_record ip_record;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  523) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  524) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  525) struct be_cmd_set_ip_addr_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  526) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  527) 	struct be_ip_addr_record_params ip_params;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  528) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  529) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  530) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  531) struct be_cmd_set_dhcp_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  532) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  533) 	u32 interface_hndl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  534) 	u32 ip_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  535) 	u32 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  536) 	u32 retry_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  537) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  538) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  539) struct be_cmd_rel_dhcp_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  540) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  541) 	u32 interface_hndl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  542) 	u32 ip_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  543) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  544) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  545) struct be_cmd_set_def_gateway_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  546) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  547) 	u32 action;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  548) 	struct ip_addr_format ip_addr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  549) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  550) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  551) struct be_cmd_get_def_gateway_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  552) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  553) 	u32 ip_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  554) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  555) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  556) struct be_cmd_get_def_gateway_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  557) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  558) 	struct ip_addr_format ip_addr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  559) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  560) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  561) #define BEISCSI_VLAN_DISABLE	0xFFFF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  562) struct be_cmd_set_vlan_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  563) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  564) 	u32 interface_hndl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  565) 	u32 vlan_priority;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  566) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  567) /******************** Create CQ ***************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  568) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  569)  * Pseudo amap definition in which each bit of the actual structure is defined
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  570)  * as a byte - used to calculate offset/shift/mask of each field
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  571)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  572) struct amap_cq_context {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  573) 	u8 cidx[11];		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  574) 	u8 rsvd0;		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  575) 	u8 coalescwm[2];	/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  576) 	u8 nodelay;		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  577) 	u8 epidx[11];		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  578) 	u8 rsvd1;		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  579) 	u8 count[2];		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  580) 	u8 valid;		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  581) 	u8 solevent;		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  582) 	u8 eventable;		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  583) 	u8 pidx[11];		/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  584) 	u8 rsvd2;		/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  585) 	u8 pd[10];		/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  586) 	u8 eqid[8];		/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  587) 	u8 stalled;		/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  588) 	u8 armed;		/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  589) 	u8 rsvd3[4];		/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  590) 	u8 func[8];		/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  591) 	u8 rsvd4[20];		/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  592) 	u8 rsvd5[32];		/* dword 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  593) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  594) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  595) struct amap_cq_context_v2 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  596) 	u8 rsvd0[12];   /* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  597) 	u8 coalescwm[2];    /* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  598) 	u8 nodelay;     /* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  599) 	u8 rsvd1[12];   /* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  600) 	u8 count[2];    /* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  601) 	u8 valid;       /* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  602) 	u8 rsvd2;       /* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  603) 	u8 eventable;   /* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  604) 	u8 eqid[16];    /* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  605) 	u8 rsvd3[15];   /* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  606) 	u8 armed;       /* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  607) 	u8 cqecount[16];/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  608) 	u8 rsvd4[16];   /* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  609) 	u8 rsvd5[32];   /* dword 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  610) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  611) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  612) struct be_cmd_req_cq_create {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  613) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  614) 	u16 num_pages;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  615) 	u8 page_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  616) 	u8 rsvd0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  617) 	u8 context[sizeof(struct amap_cq_context) / 8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  618) 	struct phys_addr pages[4];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  619) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  620) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  621) struct be_cmd_resp_cq_create {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  622) 	struct be_cmd_resp_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  623) 	u16 cq_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  624) 	u16 rsvd0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  625) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  626) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  627) /******************** Create MCCQ ***************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  628) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  629)  * Pseudo amap definition in which each bit of the actual structure is defined
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  630)  * as a byte - used to calculate offset/shift/mask of each field
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  631)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  632) struct amap_mcc_context {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  633) 	u8 con_index[14];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  634) 	u8 rsvd0[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  635) 	u8 ring_size[4];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  636) 	u8 fetch_wrb;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  637) 	u8 fetch_r2t;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  638) 	u8 cq_id[10];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  639) 	u8 prod_index[14];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  640) 	u8 fid[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  641) 	u8 pdid[9];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  642) 	u8 valid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  643) 	u8 rsvd1[32];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  644) 	u8 rsvd2[32];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  645) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  646) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  647) struct be_cmd_req_mcc_create_ext {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  648) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  649) 	u16 num_pages;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  650) 	u16 rsvd0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  651) 	u32 async_evt_bitmap;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  652) 	u8 context[sizeof(struct amap_mcc_context) / 8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  653) 	struct phys_addr pages[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  654) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  655) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  656) struct be_cmd_resp_mcc_create {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  657) 	struct be_cmd_resp_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  658) 	u16 id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  659) 	u16 rsvd0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  660) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  661) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  662) /******************** Q Destroy  ***************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  663) /* Type of Queue to be destroyed */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  664) enum {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  665) 	QTYPE_EQ = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  666) 	QTYPE_CQ,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  667) 	QTYPE_MCCQ,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  668) 	QTYPE_WRBQ,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  669) 	QTYPE_DPDUQ,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  670) 	QTYPE_SGL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  671) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  672) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  673) struct be_cmd_req_q_destroy {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  674) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  675) 	u16 id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  676) 	u16 bypass_flush;	/* valid only for rx q destroy */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  677) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  678) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  679) struct macaddr {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  680) 	u8 byte[ETH_ALEN];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  681) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  682) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  683) struct be_cmd_req_mcast_mac_config {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  684) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  685) 	u16 num_mac;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  686) 	u8 promiscuous;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  687) 	u8 interface_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  688) 	struct macaddr mac[32];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  689) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  690) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  691) static inline void *embedded_payload(struct be_mcc_wrb *wrb)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  692) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  693) 	return wrb->payload.embedded_payload;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  694) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  695) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  696) static inline struct be_sge *nonembedded_sgl(struct be_mcc_wrb *wrb)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  697) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  698) 	return &wrb->payload.sgl[0];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  699) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  700) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  701) /******************** Modify EQ Delay *******************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  702) struct be_cmd_req_modify_eq_delay {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  703) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  704) 	__le32 num_eq;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  705) 	struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  706) 		__le32 eq_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  707) 		__le32 phase;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  708) 		__le32 delay_multiplier;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  709) 	} delay[MAX_CPUS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  710) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  711) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  712) /******************** Get MAC ADDR *******************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  713) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  714) struct be_cmd_get_nic_conf_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  715) 	struct be_cmd_resp_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  716) 	u32 nic_port_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  717) 	u32 speed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  718) 	u32 max_speed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  719) 	u32 link_state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  720) 	u32 max_frame_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  721) 	u16 size_of_structure;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  722) 	u8 mac_address[ETH_ALEN];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  723) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  724) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  725) /******************** Get HBA NAME *******************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  726) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  727) struct be_cmd_hba_name {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  728) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  729) 	u16 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  730) 	u16 rsvd0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  731) 	u8 initiator_name[ISCSI_NAME_LEN];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  732) #define BE_INI_ALIAS_LEN 32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  733) 	u8 initiator_alias[BE_INI_ALIAS_LEN];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  734) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  735) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  736) /******************** COMMON SET HOST DATA *******************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  737) #define BE_CMD_SET_HOST_PARAM_ID	0x2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  738) #define BE_CMD_MAX_DRV_VERSION		0x30
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  739) struct be_sethost_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  740) 	u32 param_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  741) 	u32 param_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  742) 	u32 param_data[32];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  743) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  744) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  745) struct be_sethost_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  746) 	u32 rsvd0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  747) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  748) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  749) struct be_cmd_set_host_data {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  750) 	union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  751) 		struct be_cmd_req_hdr req_hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  752) 		struct be_cmd_resp_hdr resp_hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  753) 	} h;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  754) 	union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  755) 		struct be_sethost_req req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  756) 		struct be_sethost_resp resp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  757) 	} param;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  758) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  759) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  760) /******************** COMMON SET Features *******************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  761) #define BE_CMD_SET_FEATURE_UER	0x10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  762) #define BE_CMD_UER_SUPP_BIT	0x1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  763) struct be_uer_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  764) 	u32 uer;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  765) 	u32 rsvd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  766) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  767) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  768) struct be_uer_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  769) 	u32 uer;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  770) 	u16 ue2rp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  771) 	u16 ue2sr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  772) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  773) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  774) struct be_cmd_set_features {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  775) 	union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  776) 		struct be_cmd_req_hdr req_hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  777) 		struct be_cmd_resp_hdr resp_hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  778) 	} h;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  779) 	u32 feature;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  780) 	u32 param_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  781) 	union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  782) 		struct be_uer_req req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  783) 		struct be_uer_resp resp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  784) 		u32 rsvd[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  785) 	} param;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  786) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  787) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  788) int beiscsi_cmd_function_reset(struct beiscsi_hba *phba);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  789) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  790) int beiscsi_cmd_special_wrb(struct be_ctrl_info *ctrl, u32 load);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  791) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  792) int beiscsi_check_fw_rdy(struct beiscsi_hba *phba);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  793) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  794) int beiscsi_init_sliport(struct beiscsi_hba *phba);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  795) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  796) int beiscsi_cmd_iscsi_cleanup(struct beiscsi_hba *phba, unsigned short ulp_num);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  797) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  798) int beiscsi_detect_ue(struct beiscsi_hba *phba);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  799) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  800) int beiscsi_detect_tpe(struct beiscsi_hba *phba);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  801) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  802) int beiscsi_cmd_eq_create(struct be_ctrl_info *ctrl,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  803) 			  struct be_queue_info *eq, int eq_delay);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  804) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  805) int beiscsi_cmd_cq_create(struct be_ctrl_info *ctrl,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  806) 			  struct be_queue_info *cq, struct be_queue_info *eq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  807) 			  bool sol_evts, bool no_delay,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  808) 			  int num_cqe_dma_coalesce);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  809) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  810) int beiscsi_cmd_q_destroy(struct be_ctrl_info *ctrl, struct be_queue_info *q,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  811) 			  int type);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  812) int beiscsi_cmd_mccq_create(struct beiscsi_hba *phba,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  813) 			struct be_queue_info *mccq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  814) 			struct be_queue_info *cq);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  815) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  816) void free_mcc_wrb(struct be_ctrl_info *ctrl, unsigned int tag);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  817) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  818) int beiscsi_modify_eq_delay(struct beiscsi_hba *phba, struct be_set_eqd *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  819) 			    int num);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  820) int beiscsi_mccq_compl_wait(struct beiscsi_hba *phba,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  821) 			    unsigned int tag,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  822) 			    struct be_mcc_wrb **wrb,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  823) 			    struct be_dma_mem *mbx_cmd_mem);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  824) int __beiscsi_mcc_compl_status(struct beiscsi_hba *phba,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  825) 			       unsigned int tag,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  826) 			       struct be_mcc_wrb **wrb,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  827) 			       struct be_dma_mem *mbx_cmd_mem);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  828) struct be_mcc_wrb *wrb_from_mbox(struct be_dma_mem *mbox_mem);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  829) void be_mcc_notify(struct beiscsi_hba *phba, unsigned int tag);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  830) struct be_mcc_wrb *alloc_mcc_wrb(struct beiscsi_hba *phba,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  831) 				 unsigned int *ref_tag);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  832) void beiscsi_process_async_event(struct beiscsi_hba *phba,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  833) 				struct be_mcc_compl *compl);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  834) int beiscsi_process_mcc_compl(struct be_ctrl_info *ctrl,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  835) 			      struct be_mcc_compl *compl);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  836) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  837) int be_cmd_create_default_pdu_queue(struct be_ctrl_info *ctrl,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  838) 				    struct be_queue_info *cq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  839) 				    struct be_queue_info *dq, int length,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  840) 				    int entry_size, uint8_t is_header,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  841) 				    uint8_t ulp_num);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  842) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  843) int be_cmd_iscsi_post_template_hdr(struct be_ctrl_info *ctrl,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  844) 				    struct be_dma_mem *q_mem);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  845) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  846) int be_cmd_iscsi_remove_template_hdr(struct be_ctrl_info *ctrl);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  847) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  848) int be_cmd_iscsi_post_sgl_pages(struct be_ctrl_info *ctrl,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  849) 				struct be_dma_mem *q_mem, u32 page_offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  850) 				u32 num_pages);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  851) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  852) int be_cmd_wrbq_create(struct be_ctrl_info *ctrl, struct be_dma_mem *q_mem,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  853) 		       struct be_queue_info *wrbq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  854) 		       struct hwi_wrb_context *pwrb_context,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  855) 		       uint8_t ulp_num);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  856) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  857) /* Configuration Functions */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  858) int be_cmd_set_vlan(struct beiscsi_hba *phba, uint16_t vlan_tag);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  859) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  860) int beiscsi_check_supported_fw(struct be_ctrl_info *ctrl,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  861) 			       struct beiscsi_hba *phba);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  862) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  863) int beiscsi_get_fw_config(struct be_ctrl_info *ctrl, struct beiscsi_hba *phba);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  864) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  865) int beiscsi_get_port_name(struct be_ctrl_info *ctrl, struct beiscsi_hba *phba);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  866) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  867) int beiscsi_set_uer_feature(struct beiscsi_hba *phba);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  868) int beiscsi_set_host_data(struct beiscsi_hba *phba);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  869) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  870) struct be_default_pdu_context {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  871) 	u32 dw[4];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  872) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  873) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  874) struct amap_be_default_pdu_context {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  875) 	u8 dbuf_cindex[13];	/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  876) 	u8 rsvd0[3];		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  877) 	u8 ring_size[4];	/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  878) 	u8 ring_state[4];	/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  879) 	u8 rsvd1[8];		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  880) 	u8 dbuf_pindex[13];	/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  881) 	u8 rsvd2;		/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  882) 	u8 pci_func_id[8];	/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  883) 	u8 rx_pdid[9];		/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  884) 	u8 rx_pdid_valid;	/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  885) 	u8 default_buffer_size[16];	/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  886) 	u8 cq_id_recv[10];	/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  887) 	u8 rx_pdid_not_valid;	/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  888) 	u8 rsvd3[5];		/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  889) 	u8 rsvd4[32];		/* dword 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  890) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  891) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  892) struct amap_default_pdu_context_ext {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  893) 	u8 rsvd0[16];   /* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  894) 	u8 ring_size[4];    /* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  895) 	u8 rsvd1[12];   /* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  896) 	u8 rsvd2[22];   /* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  897) 	u8 rx_pdid[9];  /* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  898) 	u8 rx_pdid_valid;   /* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  899) 	u8 default_buffer_size[16]; /* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  900) 	u8 cq_id_recv[16];  /* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  901) 	u8 rsvd3[32];   /* dword 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  902) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  903) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  904) struct be_defq_create_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  905) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  906) 	u16 num_pages;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  907) 	u8 ulp_num;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  908) #define BEISCSI_DUAL_ULP_AWARE_BIT	0	/* Byte 3 - Bit 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  909) #define BEISCSI_BIND_Q_TO_ULP_BIT	1	/* Byte 3 - Bit 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  910) 	u8 dua_feature;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  911) 	struct be_default_pdu_context context;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  912) 	struct phys_addr pages[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  913) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  914) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  915) struct be_defq_create_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  916) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  917) 	u16 id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  918) 	u8 rsvd0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  919) 	u8 ulp_num;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  920) 	u32 doorbell_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  921) 	u16 register_set;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  922) 	u16 doorbell_format;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  923) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  924) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  925) struct be_post_template_pages_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  926) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  927) 	u16 num_pages;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  928) #define BEISCSI_TEMPLATE_HDR_TYPE_ISCSI	0x1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  929) 	u16 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  930) 	struct phys_addr scratch_pa;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  931) 	struct virt_addr scratch_va;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  932) 	struct virt_addr pages_va;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  933) 	struct phys_addr pages[16];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  934) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  935) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  936) struct be_remove_template_pages_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  937) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  938) 	u16 type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  939) 	u16 rsvd0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  940) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  941) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  942) struct be_post_sgl_pages_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  943) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  944) 	u16 num_pages;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  945) 	u16 page_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  946) 	u32 rsvd0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  947) 	struct phys_addr pages[26];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  948) 	u32 rsvd1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  949) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  950) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  951) struct be_wrbq_create_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  952) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  953) 	u16 num_pages;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  954) 	u8 ulp_num;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  955) 	u8 dua_feature;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  956) 	struct phys_addr pages[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  957) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  958) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  959) struct be_wrbq_create_resp {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  960) 	struct be_cmd_resp_hdr resp_hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  961) 	u16 cid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  962) 	u8 rsvd0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  963) 	u8 ulp_num;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  964) 	u32 doorbell_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  965) 	u16 register_set;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  966) 	u16 doorbell_format;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  967) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  968) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  969) #define SOL_CID_MASK		0x0000FFC0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  970) #define SOL_CODE_MASK		0x0000003F
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  971) #define SOL_WRB_INDEX_MASK	0x00FF0000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  972) #define SOL_CMD_WND_MASK	0xFF000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  973) #define SOL_RES_CNT_MASK	0x7FFFFFFF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  974) #define SOL_EXP_CMD_SN_MASK	0xFFFFFFFF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  975) #define SOL_HW_STS_MASK		0x000000FF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  976) #define SOL_STS_MASK		0x0000FF00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  977) #define SOL_RESP_MASK		0x00FF0000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  978) #define SOL_FLAGS_MASK		0x7F000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  979) #define SOL_S_MASK		0x80000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  980) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  981) struct sol_cqe {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  982) 	u32 dw[4];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  983) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  984) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  985) struct amap_sol_cqe {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  986) 	u8 hw_sts[8];		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  987) 	u8 i_sts[8];		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  988) 	u8 i_resp[8];		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  989) 	u8 i_flags[7];		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  990) 	u8 s;			/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  991) 	u8 i_exp_cmd_sn[32];	/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  992) 	u8 code[6];		/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  993) 	u8 cid[10];		/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  994) 	u8 wrb_index[8];	/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  995) 	u8 i_cmd_wnd[8];	/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  996) 	u8 i_res_cnt[31];	/* dword 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  997) 	u8 valid;		/* dword 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  998) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  999) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1000) #define SOL_ICD_INDEX_MASK	0x0003FFC0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1001) struct amap_sol_cqe_ring {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1002) 	u8 hw_sts[8];		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1003) 	u8 i_sts[8];		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1004) 	u8 i_resp[8];		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1005) 	u8 i_flags[7];		/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1006) 	u8 s;			/* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1007) 	u8 i_exp_cmd_sn[32];	/* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1008) 	u8 code[6];		/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1009) 	u8 icd_index[12];	/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1010) 	u8 rsvd[6];		/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1011) 	u8 i_cmd_wnd[8];	/* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1012) 	u8 i_res_cnt[31];	/* dword 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1013) 	u8 valid;		/* dword 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1014) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1015) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1016) struct amap_sol_cqe_v2 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1017) 	u8 hw_sts[8];   /* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1018) 	u8 i_sts[8];    /* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1019) 	u8 wrb_index[16];   /* dword 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1020) 	u8 i_exp_cmd_sn[32];    /* dword 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1021) 	u8 code[6]; /* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1022) 	u8 cmd_cmpl;    /* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1023) 	u8 rsvd0;   /* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1024) 	u8 i_cmd_wnd[8];    /* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1025) 	u8 cid[13]; /* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1026) 	u8 u;   /* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1027) 	u8 o;   /* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1028) 	u8 s;   /* dword 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1029) 	u8 i_res_cnt[31];   /* dword 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1030) 	u8 valid;   /* dword 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1031) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1032) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1033) struct common_sol_cqe {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1034) 	u32 exp_cmdsn;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1035) 	u32 res_cnt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1036) 	u16 wrb_index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1037) 	u16 cid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1038) 	u8 hw_sts;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1039) 	u8 cmd_wnd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1040) 	u8 res_flag; /* the s feild of structure */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1041) 	u8 i_resp; /* for skh if cmd_complete is set then i_sts is response */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1042) 	u8 i_flags; /* for skh or the u and o feilds */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1043) 	u8 i_sts; /* for skh if cmd_complete is not-set then i_sts is status */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1044) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1045) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1046) /*** iSCSI ack/driver message completions ***/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1047) struct amap_it_dmsg_cqe {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1048) 	u8 ack_num[32]; /* DWORD 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1049) 	u8 pdu_bytes_rcvd[32];  /* DWORD 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1050) 	u8 code[6]; /* DWORD 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1051) 	u8 cid[10]; /* DWORD 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1052) 	u8 wrb_idx[8];  /* DWORD 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1053) 	u8 rsvd0[8];    /* DWORD 2*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1054) 	u8 rsvd1[31];   /* DWORD 3*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1055) 	u8 valid;   /* DWORD 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1056) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1057) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1058) struct amap_it_dmsg_cqe_v2 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1059) 	u8 ack_num[32]; /* DWORD 0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1060) 	u8 pdu_bytes_rcvd[32];  /* DWORD 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1061) 	u8 code[6]; /* DWORD 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1062) 	u8 rsvd0[10];   /* DWORD 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1063) 	u8 wrb_idx[16]; /* DWORD 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1064) 	u8 rsvd1[16];   /* DWORD 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1065) 	u8 cid[13]; /* DWORD 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1066) 	u8 rsvd2[2];    /* DWORD 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1067) 	u8 valid;   /* DWORD 3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1068) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1069) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1070) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1071) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1072)  * Post WRB Queue Doorbell Register used by the host Storage
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1073)  * stack to notify the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1074)  * controller of a posted Work Request Block
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1075)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1076) #define DB_WRB_POST_CID_MASK		0xFFFF	/* bits 0 - 16 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1077) #define DB_DEF_PDU_WRB_INDEX_MASK	0xFF	/* bits 0 - 9 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1078) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1079) #define DB_DEF_PDU_WRB_INDEX_SHIFT	16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1080) #define DB_DEF_PDU_NUM_POSTED_SHIFT	24
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1081) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1082) struct fragnum_bits_for_sgl_cra_in {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1083) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1084) 	u32 num_bits;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1085) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1086) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1087) struct iscsi_cleanup_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1088) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1089) 	u16 chute;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1090) 	u8 hdr_ring_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1091) 	u8 data_ring_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1092) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1093) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1094) struct iscsi_cleanup_req_v1 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1095) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1096) 	u16 chute;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1097) 	u16 rsvd1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1098) 	u16 hdr_ring_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1099) 	u16 rsvd2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1100) 	u16 data_ring_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1101) 	u16 rsvd3;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1102) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1103) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1104) struct eq_delay {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1105) 	u32 eq_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1106) 	u32 phase;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1107) 	u32 delay_multiplier;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1108) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1109) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1110) struct be_eq_delay_params_in {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1111) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1112) 	u32 num_eq;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1113) 	struct eq_delay delay[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1114) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1115) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1116) struct tcp_connect_and_offload_in {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1117) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1118) 	struct ip_addr_format ip_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1119) 	u16 tcp_port;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1120) 	u16 cid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1121) 	u16 cq_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1122) 	u16 defq_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1123) 	struct phys_addr dataout_template_pa;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1124) 	u16 hdr_ring_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1125) 	u16 data_ring_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1126) 	u8 do_offload;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1127) 	u8 rsvd0[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1128) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1129) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1130) struct tcp_connect_and_offload_in_v1 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1131) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1132) 	struct ip_addr_format ip_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1133) 	u16 tcp_port;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1134) 	u16 cid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1135) 	u16 cq_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1136) 	u16 defq_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1137) 	struct phys_addr dataout_template_pa;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1138) 	u16 hdr_ring_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1139) 	u16 data_ring_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1140) 	u8 do_offload;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1141) 	u8 ifd_state;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1142) 	u8 rsvd0[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1143) 	u16 tcp_window_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1144) 	u8 tcp_window_scale_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1145) 	u8 rsvd1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1146) 	u32 tcp_mss:24;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1147) 	u8 rsvd2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1148) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1149) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1150) struct tcp_connect_and_offload_out {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1151) 	struct be_cmd_resp_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1152) 	u32 connection_handle;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1153) 	u16 cid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1154) 	u16 rsvd0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1155) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1156) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1157) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1158) #define DB_DEF_PDU_RING_ID_MASK	0x3FFF	/* bits 0 - 13 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1159) #define DB_DEF_PDU_CQPROC_MASK		0x3FFF	/* bits 16 - 29 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1160) #define DB_DEF_PDU_REARM_SHIFT		14
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1161) #define DB_DEF_PDU_EVENT_SHIFT		15
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1162) #define DB_DEF_PDU_CQPROC_SHIFT		16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1163) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1164) struct be_invalidate_connection_params_in {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1165) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1166) 	u32 session_handle;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1167) 	u16 cid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1168) 	u16 unused;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1169) #define BE_CLEANUP_TYPE_INVALIDATE	0x8001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1170) #define BE_CLEANUP_TYPE_ISSUE_TCP_RST	0x8002
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1171) 	u16 cleanup_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1172) 	u16 save_cfg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1173) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1174) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1175) struct be_invalidate_connection_params_out {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1176) 	u32 session_handle;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1177) 	u16 cid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1178) 	u16 unused;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1179) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1180) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1181) union be_invalidate_connection_params {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1182) 	struct be_invalidate_connection_params_in req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1183) 	struct be_invalidate_connection_params_out resp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1184) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1185) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1186) struct be_tcp_upload_params_in {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1187) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1188) 	u16 id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1189) #define BE_UPLOAD_TYPE_GRACEFUL		1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1190) /* abortive upload with reset */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1191) #define BE_UPLOAD_TYPE_ABORT_RESET	2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1192) /* abortive upload without reset */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1193) #define BE_UPLOAD_TYPE_ABORT		3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1194) /* abortive upload with reset, sequence number by driver */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1195) #define BE_UPLOAD_TYPE_ABORT_WITH_SEQ	4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1196) 	u16 upload_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1197) 	u32 reset_seq;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1198) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1199) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1200) struct be_tcp_upload_params_out {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1201) 	u32 dw[32];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1202) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1203) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1204) union be_tcp_upload_params {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1205) 	struct be_tcp_upload_params_in request;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1206) 	struct be_tcp_upload_params_out response;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1207) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1208) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1209) struct be_ulp_fw_cfg {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1210) #define BEISCSI_ULP_ISCSI_INI_MODE	0x10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1211) 	u32 ulp_mode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1212) 	u32 etx_base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1213) 	u32 etx_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1214) 	u32 sq_base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1215) 	u32 sq_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1216) 	u32 rq_base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1217) 	u32 rq_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1218) 	u32 dq_base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1219) 	u32 dq_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1220) 	u32 lro_base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1221) 	u32 lro_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1222) 	u32 icd_base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1223) 	u32 icd_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1224) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1225) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1226) struct be_ulp_chain_icd {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1227) 	u32 chain_base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1228) 	u32 chain_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1229) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1230) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1231) struct be_fw_cfg {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1232) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1233) 	u32 be_config_number;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1234) 	u32 asic_revision;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1235) 	u32 phys_port;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1236) #define BEISCSI_FUNC_ISCSI_INI_MODE	0x10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1237) #define BEISCSI_FUNC_DUA_MODE	0x800
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1238) 	u32 function_mode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1239) 	struct be_ulp_fw_cfg ulp[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1240) 	u32 function_caps;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1241) 	u32 cqid_base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1242) 	u32 cqid_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1243) 	u32 eqid_base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1244) 	u32 eqid_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1245) 	struct be_ulp_chain_icd chain_icd[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1246) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1247) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1248) struct be_cmd_get_all_if_id_req {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1249) 	struct be_cmd_req_hdr hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1250) 	u32 if_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1251) 	u32 if_hndl_list[1];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1252) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1253) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1254) struct be_cmd_get_port_name {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1255) 	union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1256) 		struct be_cmd_req_hdr req_hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1257) 		struct be_cmd_resp_hdr resp_hdr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1258) 	} h;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1259) 	union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1260) 		struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1261) 			u32 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1262) 		} req;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1263) 		struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1264) 			u32 port_names;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1265) 		} resp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1266) 	} p;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1267) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1268) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1269) #define ISCSI_OPCODE_SCSI_DATA_OUT		5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1270) #define OPCODE_COMMON_NTWK_LINK_STATUS_QUERY 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1271) #define OPCODE_COMMON_MODIFY_EQ_DELAY		41
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1272) #define OPCODE_COMMON_ISCSI_CLEANUP		59
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1273) #define	OPCODE_COMMON_TCP_UPLOAD		56
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1274) #define OPCODE_COMMON_ISCSI_TCP_CONNECT_AND_OFFLOAD 70
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1275) #define OPCODE_COMMON_ISCSI_ERROR_RECOVERY_INVALIDATE_COMMANDS 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1276) #define OPCODE_ISCSI_INI_CFG_GET_HBA_NAME	6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1277) #define OPCODE_ISCSI_INI_CFG_SET_HBA_NAME	7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1278) #define OPCODE_ISCSI_INI_SESSION_GET_A_SESSION  14
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1279) #define OPCODE_ISCSI_INI_SESSION_LOGOUT_TARGET	 24
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1280) #define OPCODE_ISCSI_INI_DRIVER_REOPEN_ALL_SESSIONS 36
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1281) #define OPCODE_ISCSI_INI_DRIVER_OFFLOAD_SESSION 41
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1282) #define OPCODE_ISCSI_INI_DRIVER_INVALIDATE_CONNECTION 42
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1283) #define OPCODE_ISCSI_INI_BOOT_GET_BOOT_TARGET	52
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1284) #define OPCODE_COMMON_WRITE_FLASH		96
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1285) #define OPCODE_COMMON_READ_FLASH		97
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1286) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1287) #define CMD_ISCSI_COMMAND_INVALIDATE		1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1288) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1289) #define INI_WR_CMD			1	/* Initiator write command */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1290) #define INI_TMF_CMD			2	/* Initiator TMF command */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1291) #define INI_NOPOUT_CMD			3	/* Initiator; Send a NOP-OUT */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1292) #define INI_RD_CMD			5	/* Initiator requesting to send
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1293) 						 * a read command
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1294) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1295) #define TGT_CTX_UPDT_CMD		7	/* Target context update */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1296) #define TGT_DM_CMD			11	/* Indicates that the bhs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1297) 						 * prepared by driver should not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1298) 						 * be touched.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1299) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1300) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1301) /* Returns the number of items in the field array. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1302) #define BE_NUMBER_OF_FIELD(_type_, _field_)	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1303) 	(sizeof_field(_type_, _field_)/sizeof((((_type_ *)0)->_field_[0])))\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1304) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1305) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1306)  * Different types of iSCSI completions to host driver for both initiator
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1307)  * and taget mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1308)  * of operation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1309)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1310) #define SOL_CMD_COMPLETE		1	/* Solicited command completed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1311) 						 * normally
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1312) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1313) #define SOL_CMD_KILLED_DATA_DIGEST_ERR  2	/* Solicited command got
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1314) 						 * invalidated internally due
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1315) 						 * to Data Digest error
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1316) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1317) #define CXN_KILLED_PDU_SIZE_EXCEEDS_DSL 3	/* Connection got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1318) 						 * internally
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1319) 						 * due to a received PDU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1320) 						 * size > DSL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1321) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1322) #define CXN_KILLED_BURST_LEN_MISMATCH   4	/* Connection got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1323) 						 * internally due ti received
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1324) 						 * PDU sequence size >
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1325) 						 * FBL/MBL.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1326) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1327) #define CXN_KILLED_AHS_RCVD		5	/* Connection got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1328) 						 * internally due to a received
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1329) 						 * PDU Hdr that has
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1330) 						 * AHS */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1331) #define CXN_KILLED_HDR_DIGEST_ERR	6	/* Connection got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1332) 						 * internally due to Hdr Digest
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1333) 						 * error
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1334) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1335) #define CXN_KILLED_UNKNOWN_HDR		7	/* Connection got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1336) 						 *  internally
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1337) 						 * due to a bad opcode in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1338) 						 * pdu hdr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1339) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1340) #define CXN_KILLED_STALE_ITT_TTT_RCVD	8	/* Connection got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1341) 						 * internally due to a received
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1342) 						 * ITT/TTT that does not belong
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1343) 						 * to this Connection
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1344) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1345) #define CXN_KILLED_INVALID_ITT_TTT_RCVD 9	/* Connection got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1346) 						 * internally due to received
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1347) 						 * ITT/TTT value > Max
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1348) 						 * Supported ITTs/TTTs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1349) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1350) #define CXN_KILLED_RST_RCVD		10	/* Connection got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1351) 						 * internally due to an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1352) 						 * incoming TCP RST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1353) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1354) #define CXN_KILLED_TIMED_OUT		11	/* Connection got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1355) 						 * internally due to timeout on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1356) 						 * tcp segment 12 retransmit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1357) 						 * attempts failed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1358) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1359) #define CXN_KILLED_RST_SENT		12	/* Connection got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1360) 						 * internally due to TCP RST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1361) 						 * sent by the Tx side
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1362) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1363) #define CXN_KILLED_FIN_RCVD		13	/* Connection got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1364) 						 * internally due to an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1365) 						 * incoming TCP FIN.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1366) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1367) #define CXN_KILLED_BAD_UNSOL_PDU_RCVD	14	/* Connection got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1368) 						 * internally due to bad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1369) 						 * unsolicited PDU Unsolicited
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1370) 						 * PDUs are PDUs with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1371) 						 * ITT=0xffffffff
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1372) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1373) #define CXN_KILLED_BAD_WRB_INDEX_ERROR	15	/* Connection got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1374) 						 * internally due to bad WRB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1375) 						 * index.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1376) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1377) #define CXN_KILLED_OVER_RUN_RESIDUAL	16	/* Command got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1378) 						 * internally due to received
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1379) 						 * command has residual
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1380) 						 * over run bytes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1381) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1382) #define CXN_KILLED_UNDER_RUN_RESIDUAL	17	/* Command got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1383) 						 * internally due to received
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1384) 						 * command has residual under
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1385) 						 * run bytes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1386) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1387) #define CMD_KILLED_INVALID_STATSN_RCVD	18	/* Command got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1388) 						 * internally due to a received
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1389) 						 * PDU has an invalid StatusSN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1390) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1391) #define CMD_KILLED_INVALID_R2T_RCVD	19	/* Command got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1392) 						 * internally due to a received
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1393) 						 * an R2T with some invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1394) 						 * fields in it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1395) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1396) #define CMD_CXN_KILLED_LUN_INVALID	20	/* Command got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1397) 						 * internally due to received
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1398) 						 * PDU has an invalid LUN.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1399) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1400) #define CMD_CXN_KILLED_ICD_INVALID	21	/* Command got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1401) 						 * internally due to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1402) 						 * corresponding ICD not in a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1403) 						 * valid state
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1404) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1405) #define CMD_CXN_KILLED_ITT_INVALID	22	/* Command got invalidated due
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1406) 						 *  to received PDU has an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1407) 						 *  invalid ITT.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1408) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1409) #define CMD_CXN_KILLED_SEQ_OUTOFORDER	23	/* Command got invalidated due
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1410) 						 * to received sequence buffer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1411) 						 * offset is out of order.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1412) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1413) #define CMD_CXN_KILLED_INVALID_DATASN_RCVD 24	/* Command got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1414) 						 * internally due to a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1415) 						 * received PDU has an invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1416) 						 * DataSN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1417) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1418) #define CXN_INVALIDATE_NOTIFY		25	/* Connection invalidation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1419) 						 * completion notify.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1420) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1421) #define CXN_INVALIDATE_INDEX_NOTIFY	26	/* Connection invalidation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1422) 						 * completion
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1423) 						 * with data PDU index.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1424) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1425) #define CMD_INVALIDATED_NOTIFY		27	/* Command invalidation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1426) 						 * completionnotifify.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1427) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1428) #define UNSOL_HDR_NOTIFY		28	/* Unsolicited header notify.*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1429) #define UNSOL_DATA_NOTIFY		29	/* Unsolicited data notify.*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1430) #define UNSOL_DATA_DIGEST_ERROR_NOTIFY	30	/* Unsolicited data digest
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1431) 						 * error notify.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1432) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1433) #define DRIVERMSG_NOTIFY		31	/* TCP acknowledge based
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1434) 						 * notification.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1435) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1436) #define CXN_KILLED_CMND_DATA_NOT_ON_SAME_CONN 32 /* Connection got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1437) 						  * internally due to command
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1438) 						  * and data are not on same
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1439) 						  * connection.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1440) 						  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1441) #define SOL_CMD_KILLED_DIF_ERR		33	/* Solicited command got
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1442) 						 *  invalidated internally due
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1443) 						 *  to DIF error
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1444) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1445) #define CXN_KILLED_SYN_RCVD		34	/* Connection got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1446) 						 * internally due to incoming
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1447) 						 * TCP SYN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1448) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1449) #define CXN_KILLED_IMM_DATA_RCVD	35	/* Connection got invalidated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1450) 						 * internally due to an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1451) 						 * incoming Unsolicited PDU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1452) 						 * that has immediate data on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1453) 						 * the cxn
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1454) 						 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1455) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1456) void be_wrb_hdr_prepare(struct be_mcc_wrb *wrb, u32 payload_len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1457) 			bool embedded, u8 sge_cnt);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1458) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1459) void be_cmd_hdr_prepare(struct be_cmd_req_hdr *req_hdr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1460) 			u8 subsystem, u8 opcode, u32 cmd_len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1461) #endif /* !BEISCSI_CMDS_H */