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()
936 p_mngr->ilt_shadow = NULL; in qed_ilt_shadow_free()
990 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_ilt_shadow_alloc() local
991 struct qed_ilt_client_cfg *clients = p_mngr->clients; in qed_ilt_shadow_alloc()
997 p_mngr->ilt_shadow = kcalloc(size, sizeof(struct phys_mem_desc), in qed_ilt_shadow_alloc()
999 if (!p_mngr->ilt_shadow) { in qed_ilt_shadow_alloc()
1015 for (k = 0; k < p_mngr->vf_count; k++) { in qed_ilt_shadow_alloc()
1036 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cid_map_free() local
1040 bitmap_free(p_mngr->acquired[type].cid_map); in qed_cid_map_free()
1041 p_mngr->acquired[type].max_count = 0; in qed_cid_map_free()
1042 p_mngr->acquired[type].start_cid = 0; in qed_cid_map_free()
1045 bitmap_free(p_mngr->acquired_vf[type][vf].cid_map); in qed_cid_map_free()
1046 p_mngr->acquired_vf[type][vf].max_count = 0; in qed_cid_map_free()
1047 p_mngr->acquired_vf[type][vf].start_cid = 0; in qed_cid_map_free()
1077 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cid_map_alloc() local
1082 struct qed_conn_type_cfg *p_cfg = &p_mngr->conn_cfg[type]; in qed_cid_map_alloc()
1086 p_map = &p_mngr->acquired[type]; in qed_cid_map_alloc()
1093 p_map = &p_mngr->acquired_vf[type][vf]; in qed_cid_map_alloc()
1114 struct qed_cxt_mngr *p_mngr; in qed_cxt_mngr_alloc() local
1117 p_mngr = kzalloc(sizeof(*p_mngr), GFP_KERNEL); in qed_cxt_mngr_alloc()
1118 if (!p_mngr) in qed_cxt_mngr_alloc()
1122 clients = p_mngr->clients; in qed_cxt_mngr_alloc()
1148 p_mngr->clients[i].p_size.val = ILT_DEFAULT_HW_P_SIZE; in qed_cxt_mngr_alloc()
1150 p_mngr->conn_ctx_size = CONN_CXT_SIZE(p_hwfn); in qed_cxt_mngr_alloc()
1153 p_mngr->task_type_size[0] = TYPE0_TASK_CXT_SIZE(p_hwfn); in qed_cxt_mngr_alloc()
1154 p_mngr->task_type_size[1] = TYPE1_TASK_CXT_SIZE(p_hwfn); in qed_cxt_mngr_alloc()
1157 p_mngr->vf_count = p_hwfn->cdev->p_iov_info->total_vfs; in qed_cxt_mngr_alloc()
1158 p_mngr->first_vf_in_pf = in qed_cxt_mngr_alloc()
1162 mutex_init(&p_mngr->mutex); in qed_cxt_mngr_alloc()
1165 p_hwfn->p_cxt_mngr = p_mngr; in qed_cxt_mngr_alloc()
1211 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_mngr_setup() local
1220 p_cfg = &p_mngr->conn_cfg[type]; in qed_cxt_mngr_setup()
1222 p_map = &p_mngr->acquired[type]; in qed_cxt_mngr_setup()
1230 p_map = &p_mngr->acquired_vf[type][vf]; in qed_cxt_mngr_setup()
1441 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_dq_init_pf() local
1444 dq_pf_max_cid += (p_mngr->conn_cfg[0].cid_count >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1447 dq_vf_max_cid += (p_mngr->conn_cfg[0].cids_per_vf >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1450 dq_pf_max_cid += (p_mngr->conn_cfg[1].cid_count >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1453 dq_vf_max_cid += (p_mngr->conn_cfg[1].cids_per_vf >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1456 dq_pf_max_cid += (p_mngr->conn_cfg[2].cid_count >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1459 dq_vf_max_cid += (p_mngr->conn_cfg[2].cids_per_vf >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1462 dq_pf_max_cid += (p_mngr->conn_cfg[3].cid_count >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1465 dq_vf_max_cid += (p_mngr->conn_cfg[3].cids_per_vf >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1468 dq_pf_max_cid += (p_mngr->conn_cfg[4].cid_count >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1471 dq_vf_max_cid += (p_mngr->conn_cfg[4].cids_per_vf >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1474 dq_pf_max_cid += (p_mngr->conn_cfg[5].cid_count >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1477 dq_vf_max_cid += (p_mngr->conn_cfg[5].cids_per_vf >> DQ_RANGE_SHIFT); in qed_dq_init_pf()
1574 struct qed_cxt_mngr *p_mngr; in qed_ilt_init_pf() local
1581 p_mngr = p_hwfn->p_cxt_mngr; in qed_ilt_init_pf()
1582 p_shdw = p_mngr->ilt_shadow; in qed_ilt_init_pf()
1589 line = clients[i].first.val - p_mngr->pf_start_line; in qed_ilt_init_pf()
1593 for (; line <= clients[i].last.val - p_mngr->pf_start_line; in qed_ilt_init_pf()
1619 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_src_init_pf() local
1624 qed_cxt_src_iids(p_mngr, &src_iids); in qed_src_init_pf()
1625 conn_num = src_iids.pf_cids + src_iids.per_vf_cids * p_mngr->vf_count; in qed_src_init_pf()
1660 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_tm_init_pf() local
1667 qed_cxt_tm_iids(p_hwfn, p_mngr, &tm_iids); in qed_tm_init_pf()
1672 for (i = 0; i < p_mngr->vf_count; i++) { in qed_tm_init_pf()
1704 for (i = 0; i < p_mngr->vf_count; i++) { in qed_tm_init_pf()
1757 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_prs_init_pf() local
1761 p_fcoe = &p_mngr->conn_cfg[PROTOCOLID_FCOE]; in qed_prs_init_pf()
1800 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in _qed_cxt_acquire_cid() local
1816 p_map = &p_mngr->acquired[type]; in _qed_cxt_acquire_cid()
1818 p_map = &p_mngr->acquired_vf[type][vfid]; in _qed_cxt_acquire_cid()
1855 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_test_cid_acquired() local
1861 *pp_map = &p_mngr->acquired[*p_type]; in qed_cxt_test_cid_acquired()
1863 *pp_map = &p_mngr->acquired_vf[*p_type][vfid]; in qed_cxt_test_cid_acquired()
1927 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_get_cid_info() local
1951 if (!p_mngr->ilt_shadow[line].virt_addr) in qed_cxt_get_cid_info()
1954 p_info->p_cxt = p_mngr->ilt_shadow[line].virt_addr + in qed_cxt_get_cid_info()
2127 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_get_tid_mem_info() local
2148 p_cli = &p_mngr->clients[ILT_CLI_CDUT]; in qed_cxt_get_tid_mem_info()
2152 p_seg_info = &p_mngr->conn_cfg[proto].tid_seg[seg]; in qed_cxt_get_tid_mem_info()
2163 p_info->blocks[i] = p_mngr->ilt_shadow[shadow_line].virt_addr; in qed_cxt_get_tid_mem_info()
2167 p_info->tid_size = p_mngr->task_type_size[p_seg_info->type]; in qed_cxt_get_tid_mem_info()
2451 struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; in qed_cxt_get_task_ctx() local
2475 p_cli = &p_mngr->clients[ILT_CLI_CDUT]; in qed_cxt_get_task_ctx()
2479 p_seg_info = &p_mngr->conn_cfg[proto].tid_seg[seg]; in qed_cxt_get_task_ctx()
2491 tid_size = p_mngr->task_type_size[p_seg_info->type]; in qed_cxt_get_task_ctx()
2498 p_mngr->pf_start_line; in qed_cxt_get_task_ctx()
2499 *pp_task_ctx = (u8 *)p_mngr->ilt_shadow[ilt_idx].virt_addr + in qed_cxt_get_task_ctx()