1 /******************************************************************************* 2 * lm_l5if.h - L5 lm interface 3 ******************************************************************************/ 4 #ifndef _LM_L5IF_H 5 #define _LM_L5IF_H 6 7 8 9 //#include "57xx_iscsi_hsi_diag.h" 10 11 12 lm_status_t 13 lm_sc_alloc_resc( 14 IN struct _lm_device_t *pdev 15 ); 16 17 18 lm_status_t 19 lm_sc_clear_resc( 20 IN struct _lm_device_t *pdev 21 ); 22 23 lm_status_t 24 lm_sc_ooo_chain_establish( 25 IN struct _lm_device_t *pdev); 26 27 lm_status_t 28 lm_fc_clear_resc( 29 IN struct _lm_device_t *pdev 30 ); 31 32 33 /******************************************************************************* 34 * Description: 35 * 36 * Return: 37 ******************************************************************************/ 38 lm_status_t 39 lm_sc_clear_d0_resc( 40 IN struct _lm_device_t *pdev, 41 const u8_t cid 42 ); 43 44 lm_status_t 45 lm_sc_init( 46 IN struct _lm_device_t *pdev, 47 IN struct iscsi_kwqe_init1 *req1, 48 IN struct iscsi_kwqe_init2 *req2 49 ); 50 51 52 lm_status_t 53 lm_fc_clear_d0_resc( 54 IN struct _lm_device_t *pdev, 55 const u8_t cid 56 ); 57 58 lm_status_t 59 lm_fc_init( 60 IN struct _lm_device_t *pdev, 61 IN struct fcoe_kwqe_init1 *init1, 62 IN struct fcoe_kwqe_init2 *init2, 63 IN struct fcoe_kwqe_init3 *init3); 64 65 66 void 67 lm_fc_recycle_cid_cb( 68 struct _lm_device_t *pdev, 69 void *cookie, 70 s32_t cid); 71 72 73 void 74 lm_fc_comp_cb( 75 struct _lm_device_t *pdev, 76 struct sq_pending_command *pending); 77 78 79 lm_status_t 80 lm_fc_alloc_resc( 81 IN struct _lm_device_t *pdev); 82 83 84 /** 85 * @description 86 * Returns the max FCOE task supported. 87 * In oreder to know the max task enabled refer to 88 * pdev->params.max_fcoe_task 89 * @param pdev 90 * 91 * @return u32_t 92 */ 93 u32_t 94 lm_fc_max_fcoe_task_sup( 95 IN struct _lm_device_t *pdev); 96 97 lm_status_t 98 lm_sc_alloc_con_phys_mem( 99 IN struct _lm_device_t *pdev, 100 IN lm_iscsi_state_t *iscsi); 101 102 lm_status_t 103 lm_sc_alloc_con_resc( 104 IN struct _lm_device_t *pdev, 105 IN lm_iscsi_state_t *iscsi, 106 IN struct iscsi_kwqe_conn_offload1 *req1, 107 IN struct iscsi_kwqe_conn_offload2 *req2, 108 IN struct iscsi_kwqe_conn_offload3 *req3 109 ); 110 111 lm_status_t 112 lm_fc_alloc_con_resc( 113 IN struct _lm_device_t *pdev, 114 IN lm_fcoe_state_t *fcoe); 115 116 117 void lm_sc_free_con_phys_mem( 118 IN struct _lm_device_t *pdev, 119 IN lm_iscsi_state_t *iscsi 120 ); 121 122 lm_status_t 123 lm_sc_free_con_resc( 124 IN struct _lm_device_t *pdev, 125 IN lm_iscsi_state_t *iscsi 126 ); 127 128 lm_status_t 129 lm_fc_free_con_resc( 130 IN struct _lm_device_t *pdev, 131 IN lm_fcoe_state_t *fcoe); 132 133 134 void 135 lm_sc_init_sp_req_type( 136 IN struct _lm_device_t * pdev, 137 IN lm_iscsi_state_t * tcp, 138 IN lm_iscsi_slow_path_request_t * lm_req, 139 IN void * req_input_data 140 ); 141 142 143 144 lm_status_t 145 lm_sc_post_slow_path_request( 146 IN struct _lm_device_t *pdev, 147 IN lm_iscsi_state_t *iscsi, 148 IN lm_iscsi_slow_path_request_t *request 149 ); 150 151 152 153 lm_status_t 154 lm_sc_init_iscsi_state( 155 IN struct _lm_device_t *pdev, 156 IN lm_state_block_t *state_blk, 157 IN lm_iscsi_state_t *iscsi 158 ); 159 160 161 void 162 lm_sc_del_iscsi_state( 163 IN struct _lm_device_t *pdev, 164 IN lm_iscsi_state_t *iscsi 165 ); 166 167 void 168 lm_fc_del_fcoe_state( 169 struct _lm_device_t *pdev, 170 lm_fcoe_state_t *fcoe); 171 172 lm_status_t 173 lm_fc_init_fcoe_state( 174 struct _lm_device_t *pdev, 175 lm_state_block_t *state_blk, 176 lm_fcoe_state_t *fcoe); 177 178 179 lm_status_t lm_sc_init_iscsi_context( 180 IN struct _lm_device_t *pdev, 181 IN lm_iscsi_state_t *iscsi, 182 struct iscsi_kwqe_conn_offload1 *req1, 183 struct iscsi_kwqe_conn_offload2 *req2, 184 struct iscsi_kwqe_conn_offload3 *req3 185 ); 186 187 188 lm_status_t 189 lm_fc_init_fcoe_context( 190 IN struct _lm_device_t *pdev, 191 IN lm_fcoe_state_t *fcoe); 192 193 194 void 195 lm_sc_service_eq_intr( 196 IN struct _lm_device_t *pdev, 197 IN u8_t sb_idx 198 ); 199 200 void 201 lm_fc_service_eq_intr( 202 IN struct _lm_device_t *pdev, 203 IN u8_t sb_idx); 204 205 206 u8_t 207 lm_sc_is_eq_completion( 208 IN struct _lm_device_t *pdev, 209 IN u8_t sb_idx 210 ); 211 212 213 u8_t 214 lm_fc_is_eq_completion( 215 IN struct _lm_device_t *pdev, 216 IN u8_t sb_idx 217 ); 218 219 220 lm_status_t 221 lm_sc_complete_l4_ofld_request( 222 IN struct _lm_device_t *pdev, 223 IN struct iscsi_kcqe *kcqe 224 ); 225 226 227 lm_status_t 228 lm_sc_complete_l4_upload_request( 229 IN struct _lm_device_t *pdev, 230 IN u8_t op_code, 231 IN u32_t cid); 232 233 234 lm_status_t 235 lm_sc_complete_slow_path_request( 236 IN struct _lm_device_t *pdev, 237 IN struct iscsi_kcqe *kcqe 238 ); 239 240 241 lm_status_t 242 lm_fc_complete_slow_path_request( 243 IN struct _lm_device_t *pdev, 244 IN struct fcoe_kcqe *kcqe); 245 246 247 lm_status_t 248 lm_fc_post_offload_ramrod( 249 struct _lm_device_t *pdev, 250 lm_fcoe_state_t *fcoe); 251 252 lm_status_t 253 lm_fc_post_enable_ramrod( 254 struct _lm_device_t *pdev, 255 lm_fcoe_state_t *fcoe, 256 struct fcoe_kwqe_conn_enable_disable *enable); 257 258 lm_status_t 259 lm_fc_post_disable_ramrod( 260 struct _lm_device_t *pdev, 261 lm_fcoe_state_t *fcoe, 262 struct fcoe_kwqe_conn_enable_disable *destroy); 263 264 265 lm_status_t 266 lm_fc_post_destroy_ramrod( 267 struct _lm_device_t *pdev); 268 269 270 lm_status_t 271 lm_fc_post_stat_ramrod( 272 struct _lm_device_t *pdev, 273 struct fcoe_kwqe_stat *stat); 274 275 lm_status_t 276 lm_fc_post_terminate_ramrod( 277 struct _lm_device_t *pdev, 278 lm_fcoe_state_t *fcoe); 279 280 #endif /* _LM_L5IF_H */ 281