Lines Matching refs:cid_que

242 	if (hba && hba->cid_que.conn_cid_tbl[iscsi_cid]) {  in bnx2i_bind_conn_to_iscsi_cid()
248 hba->cid_que.conn_cid_tbl[iscsi_cid] = bnx2i_conn; in bnx2i_bind_conn_to_iscsi_cid()
261 if (!hba->cid_que.conn_cid_tbl) { in bnx2i_get_conn_from_id()
269 return hba->cid_que.conn_cid_tbl[iscsi_cid]; in bnx2i_get_conn_from_id()
281 if (!hba->cid_que.cid_free_cnt) in bnx2i_alloc_iscsi_cid()
284 idx = hba->cid_que.cid_q_cons_idx; in bnx2i_alloc_iscsi_cid()
285 hba->cid_que.cid_q_cons_idx++; in bnx2i_alloc_iscsi_cid()
286 if (hba->cid_que.cid_q_cons_idx == hba->cid_que.cid_q_max_idx) in bnx2i_alloc_iscsi_cid()
287 hba->cid_que.cid_q_cons_idx = 0; in bnx2i_alloc_iscsi_cid()
289 hba->cid_que.cid_free_cnt--; in bnx2i_alloc_iscsi_cid()
290 return hba->cid_que.cid_que[idx]; in bnx2i_alloc_iscsi_cid()
306 hba->cid_que.cid_free_cnt++; in bnx2i_free_iscsi_cid()
308 idx = hba->cid_que.cid_q_prod_idx; in bnx2i_free_iscsi_cid()
309 hba->cid_que.cid_que[idx] = iscsi_cid; in bnx2i_free_iscsi_cid()
310 hba->cid_que.conn_cid_tbl[iscsi_cid] = NULL; in bnx2i_free_iscsi_cid()
311 hba->cid_que.cid_q_prod_idx++; in bnx2i_free_iscsi_cid()
312 if (hba->cid_que.cid_q_prod_idx == hba->cid_que.cid_q_max_idx) in bnx2i_free_iscsi_cid()
313 hba->cid_que.cid_q_prod_idx = 0; in bnx2i_free_iscsi_cid()
332 hba->cid_que.cid_que_base = kmalloc(mem_size, GFP_KERNEL); in bnx2i_setup_free_cid_que()
333 if (!hba->cid_que.cid_que_base) in bnx2i_setup_free_cid_que()
338 hba->cid_que.conn_cid_tbl = kmalloc(mem_size, GFP_KERNEL); in bnx2i_setup_free_cid_que()
339 if (!hba->cid_que.conn_cid_tbl) { in bnx2i_setup_free_cid_que()
340 kfree(hba->cid_que.cid_que_base); in bnx2i_setup_free_cid_que()
341 hba->cid_que.cid_que_base = NULL; in bnx2i_setup_free_cid_que()
345 hba->cid_que.cid_que = (u32 *)hba->cid_que.cid_que_base; in bnx2i_setup_free_cid_que()
346 hba->cid_que.cid_q_prod_idx = 0; in bnx2i_setup_free_cid_que()
347 hba->cid_que.cid_q_cons_idx = 0; in bnx2i_setup_free_cid_que()
348 hba->cid_que.cid_q_max_idx = hba->max_active_conns; in bnx2i_setup_free_cid_que()
349 hba->cid_que.cid_free_cnt = hba->max_active_conns; in bnx2i_setup_free_cid_que()
352 hba->cid_que.cid_que[i] = i; in bnx2i_setup_free_cid_que()
353 hba->cid_que.conn_cid_tbl[i] = NULL; in bnx2i_setup_free_cid_que()
365 kfree(hba->cid_que.cid_que_base); in bnx2i_release_free_cid_que()
366 hba->cid_que.cid_que_base = NULL; in bnx2i_release_free_cid_que()
368 kfree(hba->cid_que.conn_cid_tbl); in bnx2i_release_free_cid_que()
369 hba->cid_que.conn_cid_tbl = NULL; in bnx2i_release_free_cid_que()
1806 if (bnx2i_adapter_ready(hba) || !hba->cid_que.cid_free_cnt) { in bnx2i_ep_connect()