Lines Matching refs:p_conn
252 struct qed_fcoe_conn *p_conn, in qed_sp_fcoe_conn_offload() argument
265 init_data.cid = p_conn->icid; in qed_sp_fcoe_conn_offload()
281 p_conn->physical_q0 = cpu_to_le16(physical_q0); in qed_sp_fcoe_conn_offload()
284 p_data->conn_id = cpu_to_le16(p_conn->conn_id); in qed_sp_fcoe_conn_offload()
285 DMA_REGPAIR_LE(p_data->sq_pbl_addr, p_conn->sq_pbl_addr); in qed_sp_fcoe_conn_offload()
286 DMA_REGPAIR_LE(p_data->sq_curr_page_addr, p_conn->sq_curr_page_addr); in qed_sp_fcoe_conn_offload()
287 DMA_REGPAIR_LE(p_data->sq_next_page_addr, p_conn->sq_next_page_addr); in qed_sp_fcoe_conn_offload()
288 DMA_REGPAIR_LE(p_data->xferq_pbl_addr, p_conn->xferq_pbl_addr); in qed_sp_fcoe_conn_offload()
289 DMA_REGPAIR_LE(p_data->xferq_curr_page_addr, p_conn->xferq_addr[0]); in qed_sp_fcoe_conn_offload()
290 DMA_REGPAIR_LE(p_data->xferq_next_page_addr, p_conn->xferq_addr[1]); in qed_sp_fcoe_conn_offload()
292 DMA_REGPAIR_LE(p_data->respq_pbl_addr, p_conn->confq_pbl_addr); in qed_sp_fcoe_conn_offload()
293 DMA_REGPAIR_LE(p_data->respq_curr_page_addr, p_conn->confq_addr[0]); in qed_sp_fcoe_conn_offload()
294 DMA_REGPAIR_LE(p_data->respq_next_page_addr, p_conn->confq_addr[1]); in qed_sp_fcoe_conn_offload()
296 p_data->dst_mac_addr_lo = cpu_to_le16(p_conn->dst_mac_addr_lo); in qed_sp_fcoe_conn_offload()
297 p_data->dst_mac_addr_mid = cpu_to_le16(p_conn->dst_mac_addr_mid); in qed_sp_fcoe_conn_offload()
298 p_data->dst_mac_addr_hi = cpu_to_le16(p_conn->dst_mac_addr_hi); in qed_sp_fcoe_conn_offload()
299 p_data->src_mac_addr_lo = cpu_to_le16(p_conn->src_mac_addr_lo); in qed_sp_fcoe_conn_offload()
300 p_data->src_mac_addr_mid = cpu_to_le16(p_conn->src_mac_addr_mid); in qed_sp_fcoe_conn_offload()
301 p_data->src_mac_addr_hi = cpu_to_le16(p_conn->src_mac_addr_hi); in qed_sp_fcoe_conn_offload()
303 tmp = cpu_to_le16(p_conn->tx_max_fc_pay_len); in qed_sp_fcoe_conn_offload()
305 tmp = cpu_to_le16(p_conn->e_d_tov_timer_val); in qed_sp_fcoe_conn_offload()
307 tmp = cpu_to_le16(p_conn->rec_tov_timer_val); in qed_sp_fcoe_conn_offload()
309 tmp = cpu_to_le16(p_conn->rx_max_fc_pay_len); in qed_sp_fcoe_conn_offload()
312 p_data->vlan_tag = cpu_to_le16(p_conn->vlan_tag); in qed_sp_fcoe_conn_offload()
313 p_data->s_id.addr_hi = p_conn->s_id.addr_hi; in qed_sp_fcoe_conn_offload()
314 p_data->s_id.addr_mid = p_conn->s_id.addr_mid; in qed_sp_fcoe_conn_offload()
315 p_data->s_id.addr_lo = p_conn->s_id.addr_lo; in qed_sp_fcoe_conn_offload()
316 p_data->max_conc_seqs_c3 = p_conn->max_conc_seqs_c3; in qed_sp_fcoe_conn_offload()
317 p_data->d_id.addr_hi = p_conn->d_id.addr_hi; in qed_sp_fcoe_conn_offload()
318 p_data->d_id.addr_mid = p_conn->d_id.addr_mid; in qed_sp_fcoe_conn_offload()
319 p_data->d_id.addr_lo = p_conn->d_id.addr_lo; in qed_sp_fcoe_conn_offload()
320 p_data->flags = p_conn->flags; in qed_sp_fcoe_conn_offload()
324 p_data->def_q_idx = p_conn->def_q_idx; in qed_sp_fcoe_conn_offload()
331 struct qed_fcoe_conn *p_conn, in qed_sp_fcoe_conn_destroy() argument
342 init_data.cid = p_conn->icid; in qed_sp_fcoe_conn_destroy()
355 p_conn->terminate_params); in qed_sp_fcoe_conn_destroy()
395 struct qed_fcoe_conn *p_conn = NULL; in qed_fcoe_allocate_connection() local
401 p_conn = in qed_fcoe_allocate_connection()
404 if (p_conn) { in qed_fcoe_allocate_connection()
405 list_del(&p_conn->list_entry); in qed_fcoe_allocate_connection()
407 *p_out_conn = p_conn; in qed_fcoe_allocate_connection()
412 p_conn = kzalloc(sizeof(*p_conn), GFP_KERNEL); in qed_fcoe_allocate_connection()
413 if (!p_conn) in qed_fcoe_allocate_connection()
418 &p_conn->xferq_pbl_addr, GFP_KERNEL); in qed_fcoe_allocate_connection()
421 p_conn->xferq_pbl_addr_virt_addr = p_addr; in qed_fcoe_allocate_connection()
423 for (i = 0; i < ARRAY_SIZE(p_conn->xferq_addr); i++) { in qed_fcoe_allocate_connection()
426 &p_conn->xferq_addr[i], GFP_KERNEL); in qed_fcoe_allocate_connection()
429 p_conn->xferq_addr_virt_addr[i] = p_addr; in qed_fcoe_allocate_connection()
431 p_addr = p_conn->xferq_pbl_addr_virt_addr; in qed_fcoe_allocate_connection()
432 ((dma_addr_t *)p_addr)[i] = p_conn->xferq_addr[i]; in qed_fcoe_allocate_connection()
437 &p_conn->confq_pbl_addr, GFP_KERNEL); in qed_fcoe_allocate_connection()
440 p_conn->confq_pbl_addr_virt_addr = p_addr; in qed_fcoe_allocate_connection()
442 for (i = 0; i < ARRAY_SIZE(p_conn->confq_addr); i++) { in qed_fcoe_allocate_connection()
445 &p_conn->confq_addr[i], GFP_KERNEL); in qed_fcoe_allocate_connection()
448 p_conn->confq_addr_virt_addr[i] = p_addr; in qed_fcoe_allocate_connection()
450 p_addr = p_conn->confq_pbl_addr_virt_addr; in qed_fcoe_allocate_connection()
451 ((dma_addr_t *)p_addr)[i] = p_conn->confq_addr[i]; in qed_fcoe_allocate_connection()
454 p_conn->free_on_delete = true; in qed_fcoe_allocate_connection()
455 *p_out_conn = p_conn; in qed_fcoe_allocate_connection()
461 p_conn->confq_pbl_addr_virt_addr, in qed_fcoe_allocate_connection()
462 p_conn->confq_pbl_addr); in qed_fcoe_allocate_connection()
463 for (i = 0; i < ARRAY_SIZE(p_conn->confq_addr); i++) in qed_fcoe_allocate_connection()
464 if (p_conn->confq_addr_virt_addr[i]) in qed_fcoe_allocate_connection()
467 p_conn->confq_addr_virt_addr[i], in qed_fcoe_allocate_connection()
468 p_conn->confq_addr[i]); in qed_fcoe_allocate_connection()
472 p_conn->xferq_pbl_addr_virt_addr, in qed_fcoe_allocate_connection()
473 p_conn->xferq_pbl_addr); in qed_fcoe_allocate_connection()
474 for (i = 0; i < ARRAY_SIZE(p_conn->xferq_addr); i++) in qed_fcoe_allocate_connection()
475 if (p_conn->xferq_addr_virt_addr[i]) in qed_fcoe_allocate_connection()
478 p_conn->xferq_addr_virt_addr[i], in qed_fcoe_allocate_connection()
479 p_conn->xferq_addr[i]); in qed_fcoe_allocate_connection()
481 kfree(p_conn); in qed_fcoe_allocate_connection()
486 struct qed_fcoe_conn *p_conn) in qed_fcoe_free_connection() argument
490 if (!p_conn) in qed_fcoe_free_connection()
493 if (p_conn->confq_pbl_addr_virt_addr) in qed_fcoe_free_connection()
496 p_conn->confq_pbl_addr_virt_addr, in qed_fcoe_free_connection()
497 p_conn->confq_pbl_addr); in qed_fcoe_free_connection()
499 for (i = 0; i < ARRAY_SIZE(p_conn->confq_addr); i++) { in qed_fcoe_free_connection()
500 if (!p_conn->confq_addr_virt_addr[i]) in qed_fcoe_free_connection()
504 p_conn->confq_addr_virt_addr[i], in qed_fcoe_free_connection()
505 p_conn->confq_addr[i]); in qed_fcoe_free_connection()
508 if (p_conn->xferq_pbl_addr_virt_addr) in qed_fcoe_free_connection()
511 p_conn->xferq_pbl_addr_virt_addr, in qed_fcoe_free_connection()
512 p_conn->xferq_pbl_addr); in qed_fcoe_free_connection()
514 for (i = 0; i < ARRAY_SIZE(p_conn->xferq_addr); i++) { in qed_fcoe_free_connection()
515 if (!p_conn->xferq_addr_virt_addr[i]) in qed_fcoe_free_connection()
519 p_conn->xferq_addr_virt_addr[i], in qed_fcoe_free_connection()
520 p_conn->xferq_addr[i]); in qed_fcoe_free_connection()
522 kfree(p_conn); in qed_fcoe_free_connection()
603 struct qed_fcoe_conn *p_conn = NULL; in qed_fcoe_free() local
609 p_conn = list_first_entry(&p_hwfn->p_fcoe_info->free_list, in qed_fcoe_free()
611 if (!p_conn) in qed_fcoe_free()
613 list_del(&p_conn->list_entry); in qed_fcoe_free()
614 qed_fcoe_free_connection(p_hwfn, p_conn); in qed_fcoe_free()
626 struct qed_fcoe_conn *p_conn = NULL; in qed_fcoe_acquire_connection() local
638 p_conn = p_in_conn; in qed_fcoe_acquire_connection()
640 rc = qed_fcoe_allocate_connection(p_hwfn, &p_conn); in qed_fcoe_acquire_connection()
649 p_conn->icid = icid; in qed_fcoe_acquire_connection()
650 p_conn->fw_cid = (p_hwfn->hw_info.opaque_fid << 16) | icid; in qed_fcoe_acquire_connection()
651 *p_out_conn = p_conn; in qed_fcoe_acquire_connection()
657 struct qed_fcoe_conn *p_conn) in qed_fcoe_release_connection() argument
660 list_add_tail(&p_conn->list_entry, &p_hwfn->p_fcoe_info->free_list); in qed_fcoe_release_connection()
661 qed_cxt_release_cid(p_hwfn, p_conn->icid); in qed_fcoe_release_connection()