Lines Matching refs:p_mngr

121 static void qed_cxt_cdu_iids(struct qed_cxt_mngr *p_mngr,  in qed_cxt_cdu_iids()  argument
127 iids->pf_cids += p_mngr->conn_cfg[type].cid_count; in qed_cxt_cdu_iids()
128 iids->per_vf_cids += p_mngr->conn_cfg[type].cids_per_vf; in qed_cxt_cdu_iids()
138 static void qed_cxt_src_iids(struct qed_cxt_mngr *p_mngr, in qed_cxt_src_iids() argument
147 iids->pf_cids += p_mngr->conn_cfg[i].cid_count; in qed_cxt_src_iids()
148 iids->per_vf_cids += p_mngr->conn_cfg[i].cids_per_vf; in qed_cxt_src_iids()
152 iids->pf_cids += p_mngr->arfs_count; in qed_cxt_src_iids()
165 struct qed_cxt_mngr *p_mngr, in qed_cxt_tm_iids() argument
179 struct qed_conn_type_cfg *p_cfg = &p_mngr->conn_cfg[i]; in qed_cxt_tm_iids()
225 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_qm_iids() local
231 iids->cids += p_mngr->conn_cfg[type].cid_count; in qed_cxt_qm_iids()
232 vf_cids += p_mngr->conn_cfg[type].cids_per_vf; in qed_cxt_qm_iids()
234 segs = p_mngr->conn_cfg[type].tid_seg; in qed_cxt_qm_iids()
249 iids->tids += vf_tids * p_mngr->vf_count; in qed_cxt_qm_iids()
283 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_get_ilt_page_size() local
284 struct qed_ilt_client_cfg *p_cli = &p_mngr->clients[ilt_client]; in qed_cxt_get_ilt_page_size()
360 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_set_proto_tid_count() local
361 struct qed_tid_seg *p_seg = &p_mngr->conn_cfg[proto].tid_seg[seg]; in qed_cxt_set_proto_tid_count()
458 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_cfg_ilt_compute() local
473 p_mngr->pf_start_line = RESC_START(p_hwfn, QED_ILT); in qed_cxt_cfg_ilt_compute()
485 p_cli = qed_cxt_set_cli(&p_mngr->clients[ILT_CLI_CDUC]); in qed_cxt_cfg_ilt_compute()
487 curr_line = p_mngr->pf_start_line; in qed_cxt_cfg_ilt_compute()
493 qed_cxt_cdu_iids(p_mngr, &cdu_iids); in qed_cxt_cfg_ilt_compute()
518 for (i = 1; i < p_mngr->vf_count; i++) in qed_cxt_cfg_ilt_compute()
523 p_cli = qed_cxt_set_cli(&p_mngr->clients[ILT_CLI_CDUT]); in qed_cxt_cfg_ilt_compute()
533 total = p_seg->count * p_mngr->task_type_size[p_seg->type]; in qed_cxt_cfg_ilt_compute()
535 p_mngr->task_type_size[p_seg->type]); in qed_cxt_cfg_ilt_compute()
572 total = p_seg->count * p_mngr->task_type_size[p_seg->type]; in qed_cxt_cfg_ilt_compute()
576 p_mngr->task_type_size[p_seg->type]); in qed_cxt_cfg_ilt_compute()
591 total = p_seg->count * p_mngr->task_type_size[p_seg->type]; in qed_cxt_cfg_ilt_compute()
596 p_mngr->task_type_size[p_seg->type]); in qed_cxt_cfg_ilt_compute()
609 task_size = p_mngr->task_type_size[p_seg->type]; in qed_cxt_cfg_ilt_compute()
619 for (i = 1; i < p_mngr->vf_count; i++) { in qed_cxt_cfg_ilt_compute()
631 p_cli = qed_cxt_set_cli(&p_mngr->clients[ILT_CLI_QM]); in qed_cxt_cfg_ilt_compute()
656 p_cli = qed_cxt_set_cli(&p_mngr->clients[ILT_CLI_SRC]); in qed_cxt_cfg_ilt_compute()
657 qed_cxt_src_iids(p_mngr, &src_iids); in qed_cxt_cfg_ilt_compute()
663 total = src_iids.pf_cids + src_iids.per_vf_cids * p_mngr->vf_count; in qed_cxt_cfg_ilt_compute()
681 p_cli = qed_cxt_set_cli(&p_mngr->clients[ILT_CLI_TM]); in qed_cxt_cfg_ilt_compute()
682 qed_cxt_tm_iids(p_hwfn, p_mngr, &tm_iids); in qed_cxt_cfg_ilt_compute()
705 for (i = 1; i < p_mngr->vf_count; i++) in qed_cxt_cfg_ilt_compute()
714 p_cli = qed_cxt_set_cli(&p_mngr->clients[ILT_CLI_TSDM]); in qed_cxt_cfg_ilt_compute()
737 struct qed_cxt_mngr *p_mngr; in qed_cxt_cfg_ilt_compute_excess() local
751 p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_cfg_ilt_compute_excess()
752 p_cli = &p_mngr->clients[ILT_CLI_CDUT]; in qed_cxt_cfg_ilt_compute_excess()
760 elem_size = p_mngr->task_type_size[p_seg->type]; in qed_cxt_cfg_ilt_compute_excess()
821 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_src_t2_alloc() local
838 qed_cxt_src_iids(p_mngr, &src_iids); in qed_cxt_src_t2_alloc()
839 conn_num = src_iids.pf_cids + src_iids.per_vf_cids * p_mngr->vf_count; in qed_cxt_src_t2_alloc()
844 p_t2 = &p_mngr->src_t2; in qed_cxt_src_t2_alloc()
921 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_ilt_shadow_free() local
926 for (i = 0; p_mngr->ilt_shadow && i < ilt_size; i++) { in qed_ilt_shadow_free()
927 struct phys_mem_desc *p_dma = &p_mngr->ilt_shadow[i]; in qed_ilt_shadow_free()
935 kfree(p_mngr->ilt_shadow); in qed_ilt_shadow_free()
989 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_ilt_shadow_alloc() local
990 struct qed_ilt_client_cfg *clients = p_mngr->clients; in qed_ilt_shadow_alloc()
996 p_mngr->ilt_shadow = kcalloc(size, sizeof(struct phys_mem_desc), in qed_ilt_shadow_alloc()
998 if (!p_mngr->ilt_shadow) { in qed_ilt_shadow_alloc()
1014 for (k = 0; k < p_mngr->vf_count; k++) { in qed_ilt_shadow_alloc()
1035 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cid_map_free() local
1039 bitmap_free(p_mngr->acquired[type].cid_map); in qed_cid_map_free()
1040 p_mngr->acquired[type].max_count = 0; in qed_cid_map_free()
1041 p_mngr->acquired[type].start_cid = 0; in qed_cid_map_free()
1044 bitmap_free(p_mngr->acquired_vf[type][vf].cid_map); in qed_cid_map_free()
1045 p_mngr->acquired_vf[type][vf].max_count = 0; in qed_cid_map_free()
1046 p_mngr->acquired_vf[type][vf].start_cid = 0; in qed_cid_map_free()
1076 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cid_map_alloc() local
1081 struct qed_conn_type_cfg *p_cfg = &p_mngr->conn_cfg[type]; in qed_cid_map_alloc()
1085 p_map = &p_mngr->acquired[type]; in qed_cid_map_alloc()
1092 p_map = &p_mngr->acquired_vf[type][vf]; in qed_cid_map_alloc()
1113 struct qed_cxt_mngr *p_mngr; in qed_cxt_mngr_alloc() local
1116 p_mngr = kzalloc(sizeof(*p_mngr), GFP_KERNEL); in qed_cxt_mngr_alloc()
1117 if (!p_mngr) in qed_cxt_mngr_alloc()
1121 clients = p_mngr->clients; in qed_cxt_mngr_alloc()
1147 p_mngr->clients[i].p_size.val = ILT_DEFAULT_HW_P_SIZE; in qed_cxt_mngr_alloc()
1149 p_mngr->conn_ctx_size = CONN_CXT_SIZE(p_hwfn); in qed_cxt_mngr_alloc()
1152 p_mngr->task_type_size[0] = TYPE0_TASK_CXT_SIZE(p_hwfn); in qed_cxt_mngr_alloc()
1153 p_mngr->task_type_size[1] = TYPE1_TASK_CXT_SIZE(p_hwfn); in qed_cxt_mngr_alloc()
1156 p_mngr->vf_count = p_hwfn->cdev->p_iov_info->total_vfs; in qed_cxt_mngr_alloc()
1157 p_mngr->first_vf_in_pf = in qed_cxt_mngr_alloc()
1161 mutex_init(&p_mngr->mutex); in qed_cxt_mngr_alloc()
1164 p_hwfn->p_cxt_mngr = p_mngr; in qed_cxt_mngr_alloc()
1210 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_mngr_setup() local
1219 p_cfg = &p_mngr->conn_cfg[type]; in qed_cxt_mngr_setup()
1221 p_map = &p_mngr->acquired[type]; in qed_cxt_mngr_setup()
1229 p_map = &p_mngr->acquired_vf[type][vf]; in qed_cxt_mngr_setup()
1440 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_dq_init_pf() local
1443 dq_pf_max_cid += (p_mngr->conn_cfg[0].cid_count >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1446 dq_vf_max_cid += (p_mngr->conn_cfg[0].cids_per_vf >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1449 dq_pf_max_cid += (p_mngr->conn_cfg[1].cid_count >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1452 dq_vf_max_cid += (p_mngr->conn_cfg[1].cids_per_vf >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1455 dq_pf_max_cid += (p_mngr->conn_cfg[2].cid_count >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1458 dq_vf_max_cid += (p_mngr->conn_cfg[2].cids_per_vf >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1461 dq_pf_max_cid += (p_mngr->conn_cfg[3].cid_count >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1464 dq_vf_max_cid += (p_mngr->conn_cfg[3].cids_per_vf >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1467 dq_pf_max_cid += (p_mngr->conn_cfg[4].cid_count >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1470 dq_vf_max_cid += (p_mngr->conn_cfg[4].cids_per_vf >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1473 dq_pf_max_cid += (p_mngr->conn_cfg[5].cid_count >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1476 dq_vf_max_cid += (p_mngr->conn_cfg[5].cids_per_vf >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1573 struct qed_cxt_mngr *p_mngr; in qed_ilt_init_pf() local
1580 p_mngr = p_hwfn->p_cxt_mngr; in qed_ilt_init_pf()
1581 p_shdw = p_mngr->ilt_shadow; in qed_ilt_init_pf()
1588 line = clients[i].first.val - p_mngr->pf_start_line; in qed_ilt_init_pf()
1592 for (; line <= clients[i].last.val - p_mngr->pf_start_line; in qed_ilt_init_pf()
1618 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_src_init_pf() local
1623 qed_cxt_src_iids(p_mngr, &src_iids); in qed_src_init_pf()
1624 conn_num = src_iids.pf_cids + src_iids.per_vf_cids * p_mngr->vf_count; in qed_src_init_pf()
1659 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_tm_init_pf() local
1666 qed_cxt_tm_iids(p_hwfn, p_mngr, &tm_iids); in qed_tm_init_pf()
1671 for (i = 0; i < p_mngr->vf_count; i++) { in qed_tm_init_pf()
1703 for (i = 0; i < p_mngr->vf_count; i++) { in qed_tm_init_pf()
1756 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_prs_init_pf() local
1760 p_fcoe = &p_mngr->conn_cfg[PROTOCOLID_FCOE]; in qed_prs_init_pf()
1799 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in _qed_cxt_acquire_cid() local
1815 p_map = &p_mngr->acquired[type]; in _qed_cxt_acquire_cid()
1817 p_map = &p_mngr->acquired_vf[type][vfid]; in _qed_cxt_acquire_cid()
1854 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_test_cid_acquired() local
1860 *pp_map = &p_mngr->acquired[*p_type]; in qed_cxt_test_cid_acquired()
1862 *pp_map = &p_mngr->acquired_vf[*p_type][vfid]; in qed_cxt_test_cid_acquired()
1926 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_get_cid_info() local
1950 if (!p_mngr->ilt_shadow[line].virt_addr) in qed_cxt_get_cid_info()
1953 p_info->p_cxt = p_mngr->ilt_shadow[line].virt_addr + in qed_cxt_get_cid_info()
2126 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_get_tid_mem_info() local
2147 p_cli = &p_mngr->clients[ILT_CLI_CDUT]; in qed_cxt_get_tid_mem_info()
2151 p_seg_info = &p_mngr->conn_cfg[proto].tid_seg[seg]; in qed_cxt_get_tid_mem_info()
2162 p_info->blocks[i] = p_mngr->ilt_shadow[shadow_line].virt_addr; in qed_cxt_get_tid_mem_info()
2166 p_info->tid_size = p_mngr->task_type_size[p_seg_info->type]; in qed_cxt_get_tid_mem_info()
2450 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_get_task_ctx() local
2474 p_cli = &p_mngr->clients[ILT_CLI_CDUT]; in qed_cxt_get_task_ctx()
2478 p_seg_info = &p_mngr->conn_cfg[proto].tid_seg[seg]; in qed_cxt_get_task_ctx()
2490 tid_size = p_mngr->task_type_size[p_seg_info->type]; in qed_cxt_get_task_ctx()
2497 p_mngr->pf_start_line; in qed_cxt_get_task_ctx()
2498 *pp_task_ctx = (u8 *)p_mngr->ilt_shadow[ilt_idx].virt_addr + in qed_cxt_get_task_ctx()