diff options
Diffstat (limited to 'drivers/scsi/be2iscsi/be_cmds.h')
| -rw-r--r-- | drivers/scsi/be2iscsi/be_cmds.h | 431 | 
1 files changed, 378 insertions, 53 deletions
diff --git a/drivers/scsi/be2iscsi/be_cmds.h b/drivers/scsi/be2iscsi/be_cmds.h index 5218de4ab35..cc7405c0eca 100644 --- a/drivers/scsi/be2iscsi/be_cmds.h +++ b/drivers/scsi/be2iscsi/be_cmds.h @@ -1,5 +1,5 @@  /** - * Copyright (C) 2005 - 2010 ServerEngines + * Copyright (C) 2005 - 2013 Emulex   * All rights reserved.   *   * This program is free software; you can redistribute it and/or @@ -8,11 +8,11 @@   * Public License is included in this distribution in the file called COPYING.   *   * Contact Information: - * linux-drivers@serverengines.com + * linux-drivers@emulex.com   * - * ServerEngines - * 209 N. Fair Oaks Ave - * Sunnyvale, CA 94085 + * Emulex + * 3333 Susan Street + * Costa Mesa, CA 92626   */  #ifndef BEISCSI_CMDS_H @@ -23,7 +23,7 @@   * firmware in the BE. These requests are communicated to the processor   * using Work Request Blocks (WRBs) submitted to the MCC-WRB ring or via one   * WRB inside a MAILBOX. - * The commands are serviced by the ARM processor in the BladeEngine's MPU. + * The commands are serviced by the ARM processor in the OneConnect's MPU.   */  struct be_sge {  	u32 pa_lo; @@ -40,6 +40,7 @@ struct be_mcc_wrb {  	u32 tag1;		/* dword 3 */  	u32 rsvd;		/* dword 4 */  	union { +#define EMBED_MBX_MAX_PAYLOAD_SIZE  220  		u8 embedded_payload[236];	/* used by embedded cmds */  		struct be_sge sgl[19];	/* used by non-embedded cmds */  	} payload; @@ -52,11 +53,26 @@ struct be_mcc_wrb {  /* Completion Status */  #define MCC_STATUS_SUCCESS 0x0 +#define MCC_STATUS_FAILED 0x1 +#define MCC_STATUS_ILLEGAL_REQUEST 0x2 +#define MCC_STATUS_ILLEGAL_FIELD 0x3 +#define MCC_STATUS_INSUFFICIENT_BUFFER 0x4  #define CQE_STATUS_COMPL_MASK 0xFFFF  #define CQE_STATUS_COMPL_SHIFT 0	/* bits 0 - 15 */  #define CQE_STATUS_EXTD_MASK 0xFFFF  #define CQE_STATUS_EXTD_SHIFT 16		/* bits 0 - 15 */ +#define CQE_STATUS_ADDL_MASK	0xFF00 +#define CQE_STATUS_MASK	0xFF +#define CQE_STATUS_ADDL_SHIFT	0x08 +#define CQE_STATUS_WRB_MASK	0xFF0000 +#define CQE_STATUS_WRB_SHIFT	16 +#define BEISCSI_HOST_MBX_TIMEOUT (110 * 1000) +#define BEISCSI_FW_MBX_TIMEOUT	100 + +/* MBOX Command VER */ +#define MBX_CMD_VER1	0x01 +#define MBX_CMD_VER2	0x02  struct be_mcc_compl {  	u32 status;		/* dword 0 */ @@ -88,7 +104,7 @@ struct be_mcc_compl {  /********** MCC door bell ************/  #define DB_MCCQ_OFFSET 0x140 -#define DB_MCCQ_RING_ID_MASK 0x7FF		/* bits 0 - 10 */ +#define DB_MCCQ_RING_ID_MASK 0xFFFF		/* bits 0 - 15 */  /* Number of entries posted */  #define DB_MCCQ_NUM_POSTED_SHIFT 16		/* bits 16 - 29 */ @@ -108,7 +124,8 @@ struct be_async_event_trailer {  enum {  	ASYNC_EVENT_LINK_DOWN = 0x0, -	ASYNC_EVENT_LINK_UP = 0x1 +	ASYNC_EVENT_LINK_UP = 0x1, +	ASYNC_EVENT_LOGICAL = 0x2  };  /** @@ -120,6 +137,9 @@ struct be_async_event_link_state {  	u8 port_link_status;  	u8 port_duplex;  	u8 port_speed; +#define BEISCSI_PHY_LINK_FAULT_NONE	0x00 +#define BEISCSI_PHY_LINK_FAULT_LOCAL	0x01 +#define BEISCSI_PHY_LINK_FAULT_REMOTE	0x02  	u8 port_fault;  	u8 rsvd0[7];  	struct be_async_event_trailer trailer; @@ -144,6 +164,8 @@ struct be_mcc_mailbox {  #define OPCODE_COMMON_CQ_CREATE				12  #define OPCODE_COMMON_EQ_CREATE				13  #define OPCODE_COMMON_MCC_CREATE			21 +#define OPCODE_COMMON_ADD_TEMPLATE_HEADER_BUFFERS	24 +#define OPCODE_COMMON_REMOVE_TEMPLATE_HEADER_BUFFERS	25  #define OPCODE_COMMON_GET_CNTL_ATTRIBUTES		32  #define OPCODE_COMMON_GET_FW_VERSION			35  #define OPCODE_COMMON_MODIFY_EQ_DELAY			41 @@ -163,7 +185,8 @@ struct be_mcc_mailbox {  #define OPCODE_COMMON_ISCSI_CFG_REMOVE_SGL_PAGES        3  #define OPCODE_COMMON_ISCSI_NTWK_GET_NIC_CONFIG		7  #define OPCODE_COMMON_ISCSI_NTWK_SET_VLAN		14 -#define OPCODE_COMMON_ISCSI_NTWK_CONFIGURE_STATELESS_IP_ADDR	17 +#define OPCODE_COMMON_ISCSI_NTWK_CONFIG_STATELESS_IP_ADDR	17 +#define OPCODE_COMMON_ISCSI_NTWK_REL_STATELESS_IP_ADDR	18  #define OPCODE_COMMON_ISCSI_NTWK_MODIFY_IP_ADDR		21  #define OPCODE_COMMON_ISCSI_NTWK_GET_DEFAULT_GATEWAY	22  #define OPCODE_COMMON_ISCSI_NTWK_MODIFY_DEFAULT_GATEWAY 23 @@ -182,7 +205,8 @@ struct be_cmd_req_hdr {  	u8 domain;		/* dword 0 */  	u32 timeout;		/* dword 1 */  	u32 request_length;	/* dword 2 */ -	u32 rsvd0;		/* dword 3 */ +	u8 version;		/* dword 3 */ +	u8 rsvd0[3];		/* dword 3 */  };  struct be_cmd_resp_hdr { @@ -197,6 +221,10 @@ struct phys_addr {  	u32 hi;  }; +struct virt_addr { +	u32 lo; +	u32 hi; +};  /**************************   * BE Command definitions *   **************************/ @@ -244,6 +272,12 @@ struct be_cmd_resp_eq_create {  	u16 rsvd0;		/* sword */  } __packed; +struct be_set_eqd { +	u32 eq_id; +	u32 phase; +	u32 delay_multiplier; +} __packed; +  struct mgmt_chap_format {  	u32 flags;  	u8  intr_chap_name[256]; @@ -274,15 +308,15 @@ struct mgmt_conn_login_options {  	struct	mgmt_auth_method_format auth_data;  } __packed; -struct ip_address_format { +struct ip_addr_format {  	u16 size_of_structure;  	u8 reserved;  	u8 ip_type; -	u8 ip_address[16]; +	u8 addr[16];  	u32 rsvd0;  } __packed; -struct	mgmt_conn_info { +struct mgmt_conn_info {  	u32	connection_handle;  	u32	connection_status;  	u16	src_port; @@ -290,9 +324,9 @@ struct	mgmt_conn_info {  	u16	dest_port_redirected;  	u16	cid;  	u32	estimated_throughput; -	struct	ip_address_format	src_ipaddr; -	struct	ip_address_format	dest_ipaddr; -	struct	ip_address_format	dest_ipaddr_redirected; +	struct	ip_addr_format	src_ipaddr; +	struct	ip_addr_format	dest_ipaddr; +	struct	ip_addr_format	dest_ipaddr_redirected;  	struct	mgmt_conn_login_options	negotiated_login_options;  } __packed; @@ -322,43 +356,138 @@ struct mgmt_session_info {  	struct	mgmt_conn_info	conn_list[1];  } __packed; -struct  be_cmd_req_get_session { +struct be_cmd_get_session_req {  	struct be_cmd_req_hdr hdr;  	u32 session_handle;  } __packed; -struct  be_cmd_resp_get_session { +struct be_cmd_get_session_resp {  	struct be_cmd_resp_hdr hdr;  	struct mgmt_session_info session_info;  } __packed;  struct mac_addr { -	u16 size_of_struct; +	u16 size_of_structure;  	u8 addr[ETH_ALEN];  } __packed; -struct be_cmd_req_get_boot_target { +struct be_cmd_get_boot_target_req {  	struct be_cmd_req_hdr hdr;  } __packed; -struct be_cmd_resp_get_boot_target { +struct be_cmd_get_boot_target_resp {  	struct be_cmd_resp_hdr hdr;  	u32  boot_session_count;  	int  boot_session_handle;  }; -struct be_cmd_req_mac_query { +struct be_cmd_reopen_session_req { +	struct be_cmd_req_hdr hdr; +#define BE_REOPEN_ALL_SESSIONS  0x00 +#define BE_REOPEN_BOOT_SESSIONS 0x01 +#define BE_REOPEN_A_SESSION     0x02 +	u16 reopen_type; +	u16 rsvd; +	u32 session_handle; +} __packed; + +struct be_cmd_reopen_session_resp { +	struct be_cmd_resp_hdr hdr; +	u32 rsvd; +	u32 session_handle; +} __packed; + + +struct be_cmd_mac_query_req {  	struct be_cmd_req_hdr hdr;  	u8 type;  	u8 permanent;  	u16 if_id;  } __packed; -struct be_cmd_resp_mac_query { +struct be_cmd_get_mac_resp {  	struct be_cmd_resp_hdr hdr;  	struct mac_addr mac;  }; +struct be_ip_addr_subnet_format { +	u16 size_of_structure; +	u8 ip_type; +	u8 ipv6_prefix_length; +	u8 addr[16]; +	u8 subnet_mask[16]; +	u32 rsvd0; +} __packed; + +struct be_cmd_get_if_info_req { +	struct be_cmd_req_hdr hdr; +	u32 interface_hndl; +	u32 ip_type; +} __packed; + +struct be_cmd_get_if_info_resp { +	struct be_cmd_req_hdr hdr; +	u32 interface_hndl; +	u32 vlan_priority; +	u32 ip_addr_count; +	u32 dhcp_state; +	struct be_ip_addr_subnet_format ip_addr; +} __packed; + +struct be_ip_addr_record { +	u32 action; +	u32 interface_hndl; +	struct be_ip_addr_subnet_format ip_addr; +	u32 status; +} __packed; + +struct be_ip_addr_record_params { +	u32 record_entry_count; +	struct be_ip_addr_record ip_record; +} __packed; + +struct be_cmd_set_ip_addr_req { +	struct be_cmd_req_hdr hdr; +	struct be_ip_addr_record_params ip_params; +} __packed; + + +struct be_cmd_set_dhcp_req { +	struct be_cmd_req_hdr hdr; +	u32 interface_hndl; +	u32 ip_type; +	u32 flags; +	u32 retry_count; +} __packed; + +struct be_cmd_rel_dhcp_req { +	struct be_cmd_req_hdr hdr; +	u32 interface_hndl; +	u32 ip_type; +} __packed; + +struct be_cmd_set_def_gateway_req { +	struct be_cmd_req_hdr hdr; +	u32 action; +	struct ip_addr_format ip_addr; +} __packed; + +struct be_cmd_get_def_gateway_req { +	struct be_cmd_req_hdr hdr; +	u32 ip_type; +} __packed; + +struct be_cmd_get_def_gateway_resp { +	struct be_cmd_req_hdr hdr; +	struct ip_addr_format ip_addr; +} __packed; + +#define BEISCSI_VLAN_DISABLE	0xFFFF +struct be_cmd_set_vlan_req { +	struct be_cmd_req_hdr hdr; +	u32 interface_hndl; +	u32 vlan_priority; +} __packed;  /******************** Create CQ ***************************/  /**   * Pseudo amap definition in which each bit of the actual structure is defined @@ -387,10 +516,28 @@ struct amap_cq_context {  	u8 rsvd5[32];		/* dword 3 */  } __packed; +struct amap_cq_context_v2 { +	u8 rsvd0[12];   /* dword 0 */ +	u8 coalescwm[2];    /* dword 0 */ +	u8 nodelay;     /* dword 0 */ +	u8 rsvd1[12];   /* dword 0 */ +	u8 count[2];    /* dword 0 */ +	u8 valid;       /* dword 0 */ +	u8 rsvd2;       /* dword 0 */ +	u8 eventable;   /* dword 0 */ +	u8 eqid[16];    /* dword 1 */ +	u8 rsvd3[15];   /* dword 1 */ +	u8 armed;       /* dword 1 */ +	u8 cqecount[16];/* dword 2 */ +	u8 rsvd4[16];   /* dword 2 */ +	u8 rsvd5[32];   /* dword 3 */ +}; +  struct be_cmd_req_cq_create {  	struct be_cmd_req_hdr hdr;  	u16 num_pages; -	u16 rsvd0; +	u8 page_size; +	u8 rsvd0;  	u8 context[sizeof(struct amap_cq_context) / 8];  	struct phys_addr pages[4];  } __packed; @@ -482,14 +629,14 @@ struct be_cmd_req_modify_eq_delay {  		u32 eq_id;  		u32 phase;  		u32 delay_multiplier; -	} delay[8]; +	} delay[MAX_CPUS];  } __packed;  /******************** Get MAC ADDR *******************/  #define ETH_ALEN	6 -struct be_cmd_req_get_mac_addr { +struct be_cmd_get_nic_conf_req {  	struct be_cmd_req_hdr hdr;  	u32 nic_port_count;  	u32 speed; @@ -501,7 +648,7 @@ struct be_cmd_req_get_mac_addr {  	u32 rsvd[23];  }; -struct be_cmd_resp_get_mac_addr { +struct be_cmd_get_nic_conf_resp {  	struct be_cmd_resp_hdr hdr;  	u32 nic_port_count;  	u32 speed; @@ -513,6 +660,39 @@ struct be_cmd_resp_get_mac_addr {  	u32 rsvd[23];  }; +#define BEISCSI_ALIAS_LEN 32 + +struct be_cmd_hba_name { +	struct be_cmd_req_hdr hdr; +	u16 flags; +	u16 rsvd0; +	u8 initiator_name[ISCSI_NAME_LEN]; +	u8 initiator_alias[BEISCSI_ALIAS_LEN]; +} __packed; + +struct be_cmd_ntwk_link_status_req { +	struct be_cmd_req_hdr hdr; +	u32 rsvd0; +} __packed; + +/*** Port Speed Values ***/ +#define BE2ISCSI_LINK_SPEED_ZERO	0x00 +#define BE2ISCSI_LINK_SPEED_10MBPS	0x01 +#define BE2ISCSI_LINK_SPEED_100MBPS	0x02 +#define BE2ISCSI_LINK_SPEED_1GBPS	0x03 +#define BE2ISCSI_LINK_SPEED_10GBPS	0x04 +struct be_cmd_ntwk_link_status_resp { +	struct be_cmd_resp_hdr hdr; +	u8 phys_port; +	u8 mac_duplex; +	u8 mac_speed; +	u8 mac_fault; +	u8 mgmt_mac_duplex; +	u8 mgmt_mac_speed; +	u16 qos_link_speed; +	u32 logical_link_speed; +} __packed; +  int beiscsi_cmd_eq_create(struct be_ctrl_info *ctrl,  			  struct be_queue_info *eq, int eq_delay); @@ -530,15 +710,19 @@ int beiscsi_cmd_mccq_create(struct beiscsi_hba *phba,  int be_poll_mcc(struct be_ctrl_info *ctrl);  int mgmt_check_supported_fw(struct be_ctrl_info *ctrl,  				      struct beiscsi_hba *phba); -unsigned int be_cmd_get_mac_addr(struct beiscsi_hba *phba); -unsigned int beiscsi_get_boot_target(struct beiscsi_hba *phba); -unsigned int beiscsi_get_session_info(struct beiscsi_hba *phba, -				  u32 boot_session_handle, -				  struct be_dma_mem *nonemb_cmd); +unsigned int be_cmd_get_initname(struct beiscsi_hba *phba); +unsigned int be_cmd_get_port_speed(struct beiscsi_hba *phba);  void free_mcc_tag(struct be_ctrl_info *ctrl, unsigned int tag); + +int be_cmd_modify_eq_delay(struct beiscsi_hba *phba, struct be_set_eqd *, +			    int num); +int beiscsi_mccq_compl(struct beiscsi_hba *phba, +			uint32_t tag, struct be_mcc_wrb **wrb, +			struct be_dma_mem *mbx_cmd_mem);  /*ISCSI Functuions */  int be_cmd_fw_initialize(struct be_ctrl_info *ctrl); +int be_cmd_fw_uninit(struct be_ctrl_info *ctrl);  struct be_mcc_wrb *wrb_from_mbox(struct be_dma_mem *mbox_mem);  struct be_mcc_wrb *wrb_from_mccq(struct beiscsi_hba *phba); @@ -555,17 +739,30 @@ int be_mbox_notify(struct be_ctrl_info *ctrl);  int be_cmd_create_default_pdu_queue(struct be_ctrl_info *ctrl,  				    struct be_queue_info *cq,  				    struct be_queue_info *dq, int length, -				    int entry_size); +				    int entry_size, uint8_t is_header, +				    uint8_t ulp_num); + +int be_cmd_iscsi_post_template_hdr(struct be_ctrl_info *ctrl, +				    struct be_dma_mem *q_mem); + +int be_cmd_iscsi_remove_template_hdr(struct be_ctrl_info *ctrl);  int be_cmd_iscsi_post_sgl_pages(struct be_ctrl_info *ctrl,  				struct be_dma_mem *q_mem, u32 page_offset,  				u32 num_pages); +int beiscsi_cmd_reset_function(struct beiscsi_hba *phba); +  int be_cmd_wrbq_create(struct be_ctrl_info *ctrl, struct be_dma_mem *q_mem, -		       struct be_queue_info *wrbq); +		       struct be_queue_info *wrbq, +		       struct hwi_wrb_context *pwrb_context, +		       uint8_t ulp_num);  bool is_link_state_evt(u32 trailer); +/* Configuration Functions */ +int be_cmd_set_vlan(struct beiscsi_hba *phba, uint16_t vlan_tag); +  struct be_default_pdu_context {  	u32 dw[4];  } __packed; @@ -588,11 +785,25 @@ struct amap_be_default_pdu_context {  	u8 rsvd4[32];		/* dword 3 */  } __packed; +struct amap_default_pdu_context_ext { +	u8 rsvd0[16];   /* dword 0 */ +	u8 ring_size[4];    /* dword 0 */ +	u8 rsvd1[12];   /* dword 0 */ +	u8 rsvd2[22];   /* dword 1 */ +	u8 rx_pdid[9];  /* dword 1 */ +	u8 rx_pdid_valid;   /* dword 1 */ +	u8 default_buffer_size[16]; /* dword 2 */ +	u8 cq_id_recv[16];  /* dword 2 */ +	u8 rsvd3[32];   /* dword 3 */ +} __packed; +  struct be_defq_create_req {  	struct be_cmd_req_hdr hdr;  	u16 num_pages;  	u8 ulp_num; -	u8 rsvd0; +#define BEISCSI_DUAL_ULP_AWARE_BIT	0	/* Byte 3 - Bit 0 */ +#define BEISCSI_BIND_Q_TO_ULP_BIT	1	/* Byte 3 - Bit 1 */ +	u8 dua_feature;  	struct be_default_pdu_context context;  	struct phys_addr pages[8];  } __packed; @@ -600,6 +811,27 @@ struct be_defq_create_req {  struct be_defq_create_resp {  	struct be_cmd_req_hdr hdr;  	u16 id; +	u8 rsvd0; +	u8 ulp_num; +	u32 doorbell_offset; +	u16 register_set; +	u16 doorbell_format; +} __packed; + +struct be_post_template_pages_req { +	struct be_cmd_req_hdr hdr; +	u16 num_pages; +#define BEISCSI_TEMPLATE_HDR_TYPE_ISCSI	0x1 +	u16 type; +	struct phys_addr scratch_pa; +	struct virt_addr scratch_va; +	struct virt_addr pages_va; +	struct phys_addr pages[16]; +} __packed; + +struct be_remove_template_pages_req { +	struct be_cmd_req_hdr hdr; +	u16 type;  	u16 rsvd0;  } __packed; @@ -616,14 +848,18 @@ struct be_wrbq_create_req {  	struct be_cmd_req_hdr hdr;  	u16 num_pages;  	u8 ulp_num; -	u8 rsvd0; +	u8 dua_feature;  	struct phys_addr pages[8];  } __packed;  struct be_wrbq_create_resp {  	struct be_cmd_resp_hdr resp_hdr;  	u16 cid; -	u16 rsvd0; +	u8 rsvd0; +	u8 ulp_num; +	u32 doorbell_offset; +	u16 register_set; +	u16 doorbell_format;  } __packed;  #define SOL_CID_MASK		0x0000FFC0 @@ -673,6 +909,59 @@ struct amap_sol_cqe_ring {  	u8 valid;		/* dword 3 */  } __packed; +struct amap_sol_cqe_v2 { +	u8 hw_sts[8];   /* dword 0 */ +	u8 i_sts[8];    /* dword 0 */ +	u8 wrb_index[16];   /* dword 0 */ +	u8 i_exp_cmd_sn[32];    /* dword 1 */ +	u8 code[6]; /* dword 2 */ +	u8 cmd_cmpl;    /* dword 2 */ +	u8 rsvd0;   /* dword 2 */ +	u8 i_cmd_wnd[8];    /* dword 2 */ +	u8 cid[13]; /* dword 2 */ +	u8 u;   /* dword 2 */ +	u8 o;   /* dword 2 */ +	u8 s;   /* dword 2 */ +	u8 i_res_cnt[31];   /* dword 3 */ +	u8 valid;   /* dword 3 */ +} __packed; + +struct common_sol_cqe { +	u32 exp_cmdsn; +	u32 res_cnt; +	u16 wrb_index; +	u16 cid; +	u8 hw_sts; +	u8 cmd_wnd; +	u8 res_flag; /* the s feild of structure */ +	u8 i_resp; /* for skh if cmd_complete is set then i_sts is response */ +	u8 i_flags; /* for skh or the u and o feilds */ +	u8 i_sts; /* for skh if cmd_complete is not-set then i_sts is status */ +}; + +/*** iSCSI ack/driver message completions ***/ +struct amap_it_dmsg_cqe { +	u8 ack_num[32]; /* DWORD 0 */ +	u8 pdu_bytes_rcvd[32];  /* DWORD 1 */ +	u8 code[6]; /* DWORD 2 */ +	u8 cid[10]; /* DWORD 2 */ +	u8 wrb_idx[8];  /* DWORD 2 */ +	u8 rsvd0[8];    /* DWORD 2*/ +	u8 rsvd1[31];   /* DWORD 3*/ +	u8 valid;   /* DWORD 3 */ +} __packed; + +struct amap_it_dmsg_cqe_v2 { +	u8 ack_num[32]; /* DWORD 0 */ +	u8 pdu_bytes_rcvd[32];  /* DWORD 1 */ +	u8 code[6]; /* DWORD 2 */ +	u8 rsvd0[10];   /* DWORD 2 */ +	u8 wrb_idx[16]; /* DWORD 2 */ +	u8 rsvd1[16];   /* DWORD 3 */ +	u8 cid[13]; /* DWORD 3 */ +	u8 rsvd2[2];    /* DWORD 3 */ +	u8 valid;   /* DWORD 3 */ +} __packed;  /** @@ -680,7 +969,7 @@ struct amap_sol_cqe_ring {   * stack to notify the   * controller of a posted Work Request Block   */ -#define DB_WRB_POST_CID_MASK		0x3FF	/* bits 0 - 9 */ +#define DB_WRB_POST_CID_MASK		0xFFFF	/* bits 0 - 16 */  #define DB_DEF_PDU_WRB_INDEX_MASK	0xFF	/* bits 0 - 9 */  #define DB_DEF_PDU_WRB_INDEX_SHIFT	16 @@ -713,7 +1002,7 @@ struct be_eq_delay_params_in {  struct tcp_connect_and_offload_in {  	struct be_cmd_req_hdr hdr; -	struct ip_address_format ip_address; +	struct ip_addr_format ip_address;  	u16 tcp_port;  	u16 cid;  	u16 cq_id; @@ -725,6 +1014,26 @@ struct tcp_connect_and_offload_in {  	u8 rsvd0[3];  } __packed; +struct tcp_connect_and_offload_in_v1 { +	struct be_cmd_req_hdr hdr; +	struct ip_addr_format ip_address; +	u16 tcp_port; +	u16 cid; +	u16 cq_id; +	u16 defq_id; +	struct phys_addr dataout_template_pa; +	u16 hdr_ring_id; +	u16 data_ring_id; +	u8 do_offload; +	u8 ifd_state; +	u8 rsvd0[2]; +	u16 tcp_window_size; +	u8 tcp_window_scale_count; +	u8 rsvd1; +	u32 tcp_mss:24; +	u8 rsvd2; +} __packed; +  struct tcp_connect_and_offload_out {  	struct be_cmd_resp_hdr hdr;  	u32 connection_handle; @@ -738,8 +1047,8 @@ struct be_mcc_wrb_context {  	int *users_final_status;  } __packed; -#define DB_DEF_PDU_RING_ID_MASK		0x3FF	/* bits 0 - 9 */ -#define DB_DEF_PDU_CQPROC_MASK		0x3FFF	/* bits 0 - 9 */ +#define DB_DEF_PDU_RING_ID_MASK	0x3FFF	/* bits 0 - 13 */ +#define DB_DEF_PDU_CQPROC_MASK		0x3FFF	/* bits 16 - 29 */  #define DB_DEF_PDU_REARM_SHIFT		14  #define DB_DEF_PDU_EVENT_SHIFT		15  #define DB_DEF_PDU_CQPROC_SHIFT		16 @@ -765,6 +1074,7 @@ union tcp_upload_params {  } __packed;  struct be_ulp_fw_cfg { +#define BEISCSI_ULP_ISCSI_INI_MODE	0x10  	u32 ulp_mode;  	u32 etx_base;  	u32 etx_count; @@ -780,23 +1090,36 @@ struct be_ulp_fw_cfg {  	u32 icd_count;  }; +struct be_ulp_chain_icd { +	u32 chain_base; +	u32 chain_count; +}; +  struct be_fw_cfg {  	struct be_cmd_req_hdr hdr;  	u32 be_config_number;  	u32 asic_revision;  	u32 phys_port; +#define BEISCSI_FUNC_ISCSI_INI_MODE	0x10 +#define BEISCSI_FUNC_DUA_MODE	0x800  	u32 function_mode;  	struct be_ulp_fw_cfg ulp[2];  	u32 function_caps; +	u32 cqid_base; +	u32 cqid_count; +	u32 eqid_base; +	u32 eqid_count; +	struct be_ulp_chain_icd chain_icd[2];  } __packed; -struct be_all_if_id { +struct be_cmd_get_all_if_id_req {  	struct be_cmd_req_hdr hdr;  	u32 if_count;  	u32 if_hndl_list[1];  } __packed;  #define ISCSI_OPCODE_SCSI_DATA_OUT		5 +#define OPCODE_COMMON_NTWK_LINK_STATUS_QUERY 5  #define OPCODE_COMMON_MODIFY_EQ_DELAY		41  #define OPCODE_COMMON_ISCSI_CLEANUP		59  #define	OPCODE_COMMON_TCP_UPLOAD		56 @@ -805,9 +1128,12 @@ struct be_all_if_id {  #define OPCODE_ISCSI_INI_CFG_GET_HBA_NAME	6  #define OPCODE_ISCSI_INI_CFG_SET_HBA_NAME	7  #define OPCODE_ISCSI_INI_SESSION_GET_A_SESSION  14 +#define OPCODE_ISCSI_INI_DRIVER_REOPEN_ALL_SESSIONS 36  #define OPCODE_ISCSI_INI_DRIVER_OFFLOAD_SESSION 41  #define OPCODE_ISCSI_INI_DRIVER_INVALIDATE_CONNECTION 42  #define OPCODE_ISCSI_INI_BOOT_GET_BOOT_TARGET	52 +#define OPCODE_COMMON_WRITE_FLASH		96 +#define OPCODE_COMMON_READ_FLASH		97  /* --- CMD_ISCSI_INVALIDATE_CONNECTION_TYPE --- */  #define CMD_ISCSI_COMMAND_INVALIDATE		1 @@ -857,8 +1183,6 @@ struct be_all_if_id {  #define CONNECTION_UPLOAD_ABORT_WITH_SEQ 4	/* Abortive upload with reset,  						 * sequence number by driver  */ -/* Returns byte size of given field with a structure. */ -  /* Returns the number of items in the field array. */  #define BE_NUMBER_OF_FIELD(_type_, _field_)	\  	(FIELD_SIZEOF(_type_, _field_)/sizeof((((_type_ *)0)->_field_[0])))\ @@ -877,7 +1201,7 @@ struct be_all_if_id {  						 */  #define CXN_KILLED_PDU_SIZE_EXCEEDS_DSL 3	/* Connection got invalidated  						 * internally -						 * due to a recieved PDU +						 * due to a received PDU  						 * size > DSL  						 */  #define CXN_KILLED_BURST_LEN_MISMATCH   4	/* Connection got invalidated @@ -886,7 +1210,7 @@ struct be_all_if_id {  						 * FBL/MBL.  						 */  #define CXN_KILLED_AHS_RCVD		5	/* Connection got invalidated -						 * internally due to a recieved +						 * internally due to a received  						 * PDU Hdr that has  						 * AHS */  #define CXN_KILLED_HDR_DIGEST_ERR	6	/* Connection got invalidated @@ -899,12 +1223,12 @@ struct be_all_if_id {  						 * pdu hdr  						 */  #define CXN_KILLED_STALE_ITT_TTT_RCVD	8	/* Connection got invalidated -						 * internally due to a recieved +						 * internally due to a received  						 * ITT/TTT that does not belong  						 * to this Connection  						 */  #define CXN_KILLED_INVALID_ITT_TTT_RCVD 9	/* Connection got invalidated -						 * internally due to recieved +						 * internally due to received  						 * ITT/TTT value > Max  						 * Supported ITTs/TTTs  						 */ @@ -936,21 +1260,21 @@ struct be_all_if_id {  						 * index.  						 */  #define CXN_KILLED_OVER_RUN_RESIDUAL	16	/* Command got invalidated -						 * internally due to recived +						 * internally due to received  						 * command has residual  						 * over run bytes.  						 */  #define CXN_KILLED_UNDER_RUN_RESIDUAL	17	/* Command got invalidated -						 * internally due to recived +						 * internally due to received  						 * command has residual under  						 * run bytes.  						 */  #define CMD_KILLED_INVALID_STATSN_RCVD	18	/* Command got invalidated -						 * internally due to a recieved +						 * internally due to a received  						 * PDU has an invalid StatusSN  						 */  #define CMD_KILLED_INVALID_R2T_RCVD	19	/* Command got invalidated -						 * internally due to a recieved +						 * internally due to a received  						 * an R2T with some invalid  						 * fields in it  						 */ @@ -973,7 +1297,7 @@ struct be_all_if_id {  						 */  #define CMD_CXN_KILLED_INVALID_DATASN_RCVD 24	/* Command got invalidated  						 * internally due to a -						 * recieved PDU has an invalid +						 * received PDU has an invalid  						 * DataSN  						 */  #define CXN_INVALIDATE_NOTIFY		25	/* Connection invalidation @@ -1023,4 +1347,5 @@ void be_wrb_hdr_prepare(struct be_mcc_wrb *wrb, int payload_len,  void be_cmd_hdr_prepare(struct be_cmd_req_hdr *req_hdr,  			u8 subsystem, u8 opcode, int cmd_len); +void be2iscsi_fail_session(struct iscsi_cls_session *cls_session);  #endif /* !BEISCSI_CMDS_H */  | 
