p_hwfn            124 drivers/net/ethernet/qlogic/qed/qed.h #define ALIGNED_TYPE_SIZE(type_name, p_hwfn)				     \
p_hwfn            125 drivers/net/ethernet/qlogic/qed/qed.h 	((sizeof(type_name) + (u32)(1 << (p_hwfn->cdev->cache_shift)) - 1) & \
p_hwfn            126 drivers/net/ethernet/qlogic/qed/qed.h 	 ~((1 << (p_hwfn->cdev->cache_shift)) - 1))
p_hwfn            349 drivers/net/ethernet/qlogic/qed/qed.h #define IS_QED_MULTI_TC_ROCE(p_hwfn) (((p_hwfn)->hw_info.multi_tc_roce_en))
p_hwfn            800 drivers/net/ethernet/qlogic/qed/qed.h #define IRO (p_hwfn->cdev->iro_arr)
p_hwfn            915 drivers/net/ethernet/qlogic/qed/qed.h void qed_clean_wfq_db(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn            942 drivers/net/ethernet/qlogic/qed/qed.h u16 qed_get_cm_pq_idx(struct qed_hwfn *p_hwfn, u32 pq_flags);
p_hwfn            943 drivers/net/ethernet/qlogic/qed/qed.h u16 qed_get_cm_pq_idx_mcos(struct qed_hwfn *p_hwfn, u8 tc);
p_hwfn            944 drivers/net/ethernet/qlogic/qed/qed.h u16 qed_get_cm_pq_idx_vf(struct qed_hwfn *p_hwfn, u16 vf);
p_hwfn            945 drivers/net/ethernet/qlogic/qed/qed.h u16 qed_get_cm_pq_idx_ofld_mtc(struct qed_hwfn *p_hwfn, u8 tc);
p_hwfn            946 drivers/net/ethernet/qlogic/qed/qed.h u16 qed_get_cm_pq_idx_llt_mtc(struct qed_hwfn *p_hwfn, u8 tc);
p_hwfn            949 drivers/net/ethernet/qlogic/qed/qed.h void qed_db_recovery_dp(struct qed_hwfn *p_hwfn);
p_hwfn            950 drivers/net/ethernet/qlogic/qed/qed.h void qed_db_recovery_execute(struct qed_hwfn *p_hwfn);
p_hwfn            951 drivers/net/ethernet/qlogic/qed/qed.h bool qed_edpm_enabled(struct qed_hwfn *p_hwfn);
p_hwfn            976 drivers/net/ethernet/qlogic/qed/qed.h u32 qed_unzip_data(struct qed_hwfn *p_hwfn,
p_hwfn            979 drivers/net/ethernet/qlogic/qed/qed.h void qed_schedule_recovery_handler(struct qed_hwfn *p_hwfn);
p_hwfn            984 drivers/net/ethernet/qlogic/qed/qed.h void qed_slowpath_irq_sync(struct qed_hwfn *p_hwfn);
p_hwfn            993 drivers/net/ethernet/qlogic/qed/qed.h void qed_periodic_db_rec_start(struct qed_hwfn *p_hwfn);
p_hwfn            115 drivers/net/ethernet/qlogic/qed/qed_cxt.c #define CONN_CXT_SIZE(p_hwfn) \
p_hwfn            116 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	ALIGNED_TYPE_SIZE(union conn_context, p_hwfn)
p_hwfn            120 drivers/net/ethernet/qlogic/qed/qed_cxt.c #define TYPE0_TASK_CXT_SIZE(p_hwfn) \
p_hwfn            121 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	ALIGNED_TYPE_SIZE(union type0_task_context, p_hwfn)
p_hwfn            124 drivers/net/ethernet/qlogic/qed/qed_cxt.c #define TYPE1_TASK_CXT_SIZE(p_hwfn) sizeof(union type1_task_context)
p_hwfn            315 drivers/net/ethernet/qlogic/qed/qed_cxt.c static void qed_cxt_tm_iids(struct qed_hwfn *p_hwfn,
p_hwfn            373 drivers/net/ethernet/qlogic/qed/qed_cxt.c static void qed_cxt_qm_iids(struct qed_hwfn *p_hwfn,
p_hwfn            376 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
p_hwfn            402 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	DP_VERBOSE(p_hwfn, QED_MSG_ILT,
p_hwfn            407 drivers/net/ethernet/qlogic/qed/qed_cxt.c static struct qed_tid_seg *qed_cxt_tid_seg_info(struct qed_hwfn *p_hwfn,
p_hwfn            410 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_cfg = p_hwfn->p_cxt_mngr;
p_hwfn            422 drivers/net/ethernet/qlogic/qed/qed_cxt.c static void qed_cxt_set_srq_count(struct qed_hwfn *p_hwfn, u32 num_srqs)
p_hwfn            424 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr;
p_hwfn            429 drivers/net/ethernet/qlogic/qed/qed_cxt.c u32 qed_cxt_get_srq_count(struct qed_hwfn *p_hwfn)
p_hwfn            431 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr;
p_hwfn            437 drivers/net/ethernet/qlogic/qed/qed_cxt.c static void qed_cxt_set_proto_cid_count(struct qed_hwfn *p_hwfn,
p_hwfn            441 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr;
p_hwfn            449 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		u32 cxt_size = CONN_CXT_SIZE(p_hwfn);
p_hwfn            457 drivers/net/ethernet/qlogic/qed/qed_cxt.c u32 qed_cxt_get_proto_cid_count(struct qed_hwfn *p_hwfn,
p_hwfn            461 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		*vf_cid = p_hwfn->p_cxt_mngr->conn_cfg[type].cids_per_vf;
p_hwfn            463 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	return p_hwfn->p_cxt_mngr->conn_cfg[type].cid_count;
p_hwfn            466 drivers/net/ethernet/qlogic/qed/qed_cxt.c u32 qed_cxt_get_proto_cid_start(struct qed_hwfn *p_hwfn,
p_hwfn            469 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	return p_hwfn->p_cxt_mngr->acquired[type].start_cid;
p_hwfn            472 drivers/net/ethernet/qlogic/qed/qed_cxt.c u32 qed_cxt_get_proto_tid_count(struct qed_hwfn *p_hwfn,
p_hwfn            479 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		cnt += p_hwfn->p_cxt_mngr->conn_cfg[type].tid_seg[i].count;
p_hwfn            484 drivers/net/ethernet/qlogic/qed/qed_cxt.c static void qed_cxt_set_proto_tid_count(struct qed_hwfn *p_hwfn,
p_hwfn            489 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
p_hwfn            514 drivers/net/ethernet/qlogic/qed/qed_cxt.c static void qed_ilt_cli_adv_line(struct qed_hwfn *p_hwfn,
p_hwfn            529 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	DP_VERBOSE(p_hwfn, QED_MSG_ILT,
p_hwfn            536 drivers/net/ethernet/qlogic/qed/qed_cxt.c static u32 qed_ilt_get_dynamic_line_cnt(struct qed_hwfn *p_hwfn,
p_hwfn            539 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	u32 cid_count = p_hwfn->p_cxt_mngr->conn_cfg[PROTOCOLID_ROCE].cid_count;
p_hwfn            545 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC];
p_hwfn            548 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		    (u32) CONN_CXT_SIZE(p_hwfn);
p_hwfn            571 drivers/net/ethernet/qlogic/qed/qed_cxt.c int qed_cxt_cfg_ilt_compute(struct qed_hwfn *p_hwfn, u32 *line_count)
p_hwfn            573 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
p_hwfn            588 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	p_mngr->pf_start_line = RESC_START(p_hwfn, QED_ILT);
p_hwfn            590 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	DP_VERBOSE(p_hwfn, QED_MSG_ILT,
p_hwfn            592 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		   p_hwfn->my_id, p_hwfn->p_cxt_mngr->pf_start_line);
p_hwfn            607 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	total = cdu_iids.pf_cids * CONN_CXT_SIZE(p_hwfn);
p_hwfn            610 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			     total, CONN_CXT_SIZE(p_hwfn));
p_hwfn            612 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line, ILT_CLI_CDUC);
p_hwfn            615 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	p_blk->dynamic_line_cnt = qed_ilt_get_dynamic_line_cnt(p_hwfn,
p_hwfn            620 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	total = cdu_iids.per_vf_cids * CONN_CXT_SIZE(p_hwfn);
p_hwfn            623 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			     total, CONN_CXT_SIZE(p_hwfn));
p_hwfn            625 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line, ILT_CLI_CDUC);
p_hwfn            629 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
p_hwfn            638 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		p_seg = qed_cxt_tid_seg_info(p_hwfn, i);
p_hwfn            647 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
p_hwfn            653 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		p_seg = qed_cxt_tid_seg_info(p_hwfn, i);
p_hwfn            688 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
p_hwfn            694 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	p_seg = qed_cxt_tid_seg_info(p_hwfn, TASK_SEGMENT_VF);
p_hwfn            708 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
p_hwfn            722 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
p_hwfn            731 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
p_hwfn            735 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
p_hwfn            744 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_cxt_qm_iids(p_hwfn, &qm_iids);
p_hwfn            747 drivers/net/ethernet/qlogic/qed/qed_cxt.c 				   p_hwfn->qm_info.num_pqs,
p_hwfn            748 drivers/net/ethernet/qlogic/qed/qed_cxt.c 				   p_hwfn->qm_info.num_vf_pqs);
p_hwfn            750 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	DP_VERBOSE(p_hwfn,
p_hwfn            756 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		   p_hwfn->qm_info.num_pqs, p_hwfn->qm_info.num_vf_pqs, total);
p_hwfn            762 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line, ILT_CLI_QM);
p_hwfn            785 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
p_hwfn            792 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_cxt_tm_iids(p_hwfn, p_mngr, &tm_iids);
p_hwfn            799 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
p_hwfn            811 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
p_hwfn            816 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
p_hwfn            821 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	total = qed_cxt_get_srq_count(p_hwfn);
p_hwfn            829 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		qed_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
p_hwfn            834 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	*line_count = curr_line - p_hwfn->p_cxt_mngr->pf_start_line;
p_hwfn            836 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	if (curr_line - p_hwfn->p_cxt_mngr->pf_start_line >
p_hwfn            837 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	    RESC_NUM(p_hwfn, QED_ILT))
p_hwfn            843 drivers/net/ethernet/qlogic/qed/qed_cxt.c u32 qed_cxt_cfg_ilt_compute_excess(struct qed_hwfn *p_hwfn, u32 used_lines)
p_hwfn            852 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	available_lines = RESC_NUM(p_hwfn, QED_ILT);
p_hwfn            858 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	if (!QED_IS_RDMA_PERSONALITY(p_hwfn))
p_hwfn            861 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	p_mngr = p_hwfn->p_cxt_mngr;
p_hwfn            866 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		p_seg = qed_cxt_tid_seg_info(p_hwfn, i);
p_hwfn            877 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	DP_NOTICE(p_hwfn, "failed computing excess ILT lines\n");
p_hwfn            881 drivers/net/ethernet/qlogic/qed/qed_cxt.c static void qed_cxt_src_t2_free(struct qed_hwfn *p_hwfn)
p_hwfn            883 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
p_hwfn            891 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            900 drivers/net/ethernet/qlogic/qed/qed_cxt.c static int qed_cxt_src_t2_alloc(struct qed_hwfn *p_hwfn)
p_hwfn            902 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
p_hwfn            914 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	p_src = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_SRC];
p_hwfn            939 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		*p_virt = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, size,
p_hwfn            986 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_cxt_src_t2_free(p_hwfn);
p_hwfn           1008 drivers/net/ethernet/qlogic/qed/qed_cxt.c static void qed_ilt_shadow_free(struct qed_hwfn *p_hwfn)
p_hwfn           1010 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_ilt_client_cfg *p_cli = p_hwfn->p_cxt_mngr->clients;
p_hwfn           1011 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
p_hwfn           1020 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn           1028 drivers/net/ethernet/qlogic/qed/qed_cxt.c static int qed_ilt_blk_alloc(struct qed_hwfn *p_hwfn,
p_hwfn           1033 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_dma_mem *ilt_shadow = p_hwfn->p_cxt_mngr->ilt_shadow;
p_hwfn           1037 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	if (QED_IS_RDMA_PERSONALITY(p_hwfn) &&
p_hwfn           1049 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	    p_hwfn->p_cxt_mngr->pf_start_line + lines_to_skip;
p_hwfn           1057 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		p_virt = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, size,
p_hwfn           1066 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		DP_VERBOSE(p_hwfn, QED_MSG_ILT,
p_hwfn           1077 drivers/net/ethernet/qlogic/qed/qed_cxt.c static int qed_ilt_shadow_alloc(struct qed_hwfn *p_hwfn)
p_hwfn           1079 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
p_hwfn           1093 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	DP_VERBOSE(p_hwfn, QED_MSG_ILT,
p_hwfn           1100 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			rc = qed_ilt_blk_alloc(p_hwfn, p_blk, i, 0);
p_hwfn           1109 drivers/net/ethernet/qlogic/qed/qed_cxt.c 				rc = qed_ilt_blk_alloc(p_hwfn, p_blk, i, lines);
p_hwfn           1119 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_ilt_shadow_free(p_hwfn);
p_hwfn           1123 drivers/net/ethernet/qlogic/qed/qed_cxt.c static void qed_cid_map_free(struct qed_hwfn *p_hwfn)
p_hwfn           1125 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
p_hwfn           1142 drivers/net/ethernet/qlogic/qed/qed_cxt.c qed_cid_map_alloc_single(struct qed_hwfn *p_hwfn,
p_hwfn           1162 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	DP_VERBOSE(p_hwfn, QED_MSG_CXT,
p_hwfn           1169 drivers/net/ethernet/qlogic/qed/qed_cxt.c static int qed_cid_map_alloc(struct qed_hwfn *p_hwfn)
p_hwfn           1171 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
p_hwfn           1181 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		if (qed_cid_map_alloc_single(p_hwfn, type, start_cid,
p_hwfn           1188 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			if (qed_cid_map_alloc_single(p_hwfn, type,
p_hwfn           1201 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_cid_map_free(p_hwfn);
p_hwfn           1205 drivers/net/ethernet/qlogic/qed/qed_cxt.c int qed_cxt_mngr_alloc(struct qed_hwfn *p_hwfn)
p_hwfn           1245 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	p_mngr->task_type_size[0] = TYPE0_TASK_CXT_SIZE(p_hwfn);
p_hwfn           1246 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	p_mngr->task_type_size[1] = TYPE1_TASK_CXT_SIZE(p_hwfn);
p_hwfn           1248 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	if (p_hwfn->cdev->p_iov_info)
p_hwfn           1249 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		p_mngr->vf_count = p_hwfn->cdev->p_iov_info->total_vfs;
p_hwfn           1254 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	p_hwfn->p_cxt_mngr = p_mngr;
p_hwfn           1259 drivers/net/ethernet/qlogic/qed/qed_cxt.c int qed_cxt_tables_alloc(struct qed_hwfn *p_hwfn)
p_hwfn           1264 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	rc = qed_ilt_shadow_alloc(p_hwfn);
p_hwfn           1269 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	rc = qed_cxt_src_t2_alloc(p_hwfn);
p_hwfn           1274 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	rc = qed_cid_map_alloc(p_hwfn);
p_hwfn           1281 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_cxt_mngr_free(p_hwfn);
p_hwfn           1285 drivers/net/ethernet/qlogic/qed/qed_cxt.c void qed_cxt_mngr_free(struct qed_hwfn *p_hwfn)
p_hwfn           1287 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	if (!p_hwfn->p_cxt_mngr)
p_hwfn           1290 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_cid_map_free(p_hwfn);
p_hwfn           1291 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_cxt_src_t2_free(p_hwfn);
p_hwfn           1292 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_ilt_shadow_free(p_hwfn);
p_hwfn           1293 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	kfree(p_hwfn->p_cxt_mngr);
p_hwfn           1295 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	p_hwfn->p_cxt_mngr = NULL;
p_hwfn           1298 drivers/net/ethernet/qlogic/qed/qed_cxt.c void qed_cxt_mngr_setup(struct qed_hwfn *p_hwfn)
p_hwfn           1300 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
p_hwfn           1395 drivers/net/ethernet/qlogic/qed/qed_cxt.c static void qed_cdu_init_common(struct qed_hwfn *p_hwfn)
p_hwfn           1400 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	page_sz = p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC].p_size.val;
p_hwfn           1401 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	cxt_size = CONN_CXT_SIZE(p_hwfn);
p_hwfn           1408 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, CDU_REG_CID_ADDR_PARAMS_RT_OFFSET, cdu_params);
p_hwfn           1411 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	page_sz = p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT].p_size.val;
p_hwfn           1412 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	cxt_size = p_hwfn->p_cxt_mngr->task_type_size[0];
p_hwfn           1421 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, CDU_REG_SEGMENT0_PARAMS_RT_OFFSET, cdu_params);
p_hwfn           1424 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	cxt_size = p_hwfn->p_cxt_mngr->task_type_size[1];
p_hwfn           1433 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, CDU_REG_SEGMENT1_PARAMS_RT_OFFSET, cdu_params);
p_hwfn           1442 drivers/net/ethernet/qlogic/qed/qed_cxt.c static void qed_cdu_init_pf(struct qed_hwfn *p_hwfn)
p_hwfn           1463 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT];
p_hwfn           1468 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		p_seg = qed_cxt_tid_seg_info(p_hwfn, i);
p_hwfn           1484 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG(p_hwfn, rt_type_offset_arr[i], cdu_seg_params);
p_hwfn           1493 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG(p_hwfn, rt_type_offset_fl_arr[i], cdu_seg_params);
p_hwfn           1497 drivers/net/ethernet/qlogic/qed/qed_cxt.c void qed_qm_init_pf(struct qed_hwfn *p_hwfn,
p_hwfn           1500 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
p_hwfn           1506 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_cxt_qm_iids(p_hwfn, &iids);
p_hwfn           1508 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	p_link = &QED_LEADING_HWFN(p_hwfn->cdev)->mcp_info->link_output;
p_hwfn           1511 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	params.port_id = p_hwfn->port_id;
p_hwfn           1512 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	params.pf_id = p_hwfn->rel_pf_id;
p_hwfn           1529 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_qm_pf_rt_init(p_hwfn, p_ptt, &params);
p_hwfn           1533 drivers/net/ethernet/qlogic/qed/qed_cxt.c static void qed_cm_init_pf(struct qed_hwfn *p_hwfn)
p_hwfn           1536 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, XCM_REG_CON_PHY_Q3_RT_OFFSET,
p_hwfn           1537 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		     qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_LB));
p_hwfn           1541 drivers/net/ethernet/qlogic/qed/qed_cxt.c static void qed_dq_init_pf(struct qed_hwfn *p_hwfn)
p_hwfn           1543 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
p_hwfn           1547 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_0_RT_OFFSET, dq_pf_max_cid);
p_hwfn           1550 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_0_RT_OFFSET, dq_vf_max_cid);
p_hwfn           1553 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_1_RT_OFFSET, dq_pf_max_cid);
p_hwfn           1556 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_1_RT_OFFSET, dq_vf_max_cid);
p_hwfn           1559 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_2_RT_OFFSET, dq_pf_max_cid);
p_hwfn           1562 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_2_RT_OFFSET, dq_vf_max_cid);
p_hwfn           1565 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_3_RT_OFFSET, dq_pf_max_cid);
p_hwfn           1568 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_3_RT_OFFSET, dq_vf_max_cid);
p_hwfn           1571 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_4_RT_OFFSET, dq_pf_max_cid);
p_hwfn           1574 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_4_RT_OFFSET, dq_vf_max_cid);
p_hwfn           1577 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_5_RT_OFFSET, dq_pf_max_cid);
p_hwfn           1580 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_5_RT_OFFSET, dq_vf_max_cid);
p_hwfn           1588 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_6_RT_OFFSET, dq_pf_max_cid);
p_hwfn           1589 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_6_RT_OFFSET, dq_vf_max_cid);
p_hwfn           1591 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_7_RT_OFFSET, dq_pf_max_cid);
p_hwfn           1592 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_7_RT_OFFSET, dq_vf_max_cid);
p_hwfn           1595 drivers/net/ethernet/qlogic/qed/qed_cxt.c static void qed_ilt_bounds_init(struct qed_hwfn *p_hwfn)
p_hwfn           1600 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	ilt_clients = p_hwfn->p_cxt_mngr->clients;
p_hwfn           1602 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG(p_hwfn,
p_hwfn           1605 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG(p_hwfn,
p_hwfn           1607 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG(p_hwfn,
p_hwfn           1613 drivers/net/ethernet/qlogic/qed/qed_cxt.c static void qed_ilt_vf_bounds_init(struct qed_hwfn *p_hwfn)
p_hwfn           1619 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	if (p_hwfn->cdev->p_iov_info) {
p_hwfn           1620 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		struct qed_hw_sriov_info *p_iov = p_hwfn->cdev->p_iov_info;
p_hwfn           1622 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG(p_hwfn,
p_hwfn           1625 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG(p_hwfn,
p_hwfn           1630 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC];
p_hwfn           1633 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG(p_hwfn,
p_hwfn           1636 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG(p_hwfn,
p_hwfn           1639 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG(p_hwfn,
p_hwfn           1644 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT];
p_hwfn           1647 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG(p_hwfn,
p_hwfn           1650 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG(p_hwfn,
p_hwfn           1653 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG(p_hwfn,
p_hwfn           1658 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_TM];
p_hwfn           1661 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG(p_hwfn,
p_hwfn           1663 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG(p_hwfn,
p_hwfn           1666 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG(p_hwfn,
p_hwfn           1673 drivers/net/ethernet/qlogic/qed/qed_cxt.c static void qed_ilt_init_pf(struct qed_hwfn *p_hwfn)
p_hwfn           1680 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_ilt_bounds_init(p_hwfn);
p_hwfn           1681 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_ilt_vf_bounds_init(p_hwfn);
p_hwfn           1683 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	p_mngr = p_hwfn->p_cxt_mngr;
p_hwfn           1685 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	clients = p_hwfn->p_cxt_mngr->clients;
p_hwfn           1707 drivers/net/ethernet/qlogic/qed/qed_cxt.c 				DP_VERBOSE(p_hwfn, QED_MSG_ILT,
p_hwfn           1713 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			STORE_RT_REG_AGG(p_hwfn, rt_offst, ilt_hw_entry);
p_hwfn           1719 drivers/net/ethernet/qlogic/qed/qed_cxt.c static void qed_src_init_pf(struct qed_hwfn *p_hwfn)
p_hwfn           1721 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
p_hwfn           1734 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, SRC_REG_COUNTFREE_RT_OFFSET, conn_num);
p_hwfn           1735 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, SRC_REG_NUMBER_HASH_BITS_RT_OFFSET,
p_hwfn           1738 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG_AGG(p_hwfn, SRC_REG_FIRSTFREE_RT_OFFSET,
p_hwfn           1739 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			 p_hwfn->p_cxt_mngr->first_free);
p_hwfn           1740 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG_AGG(p_hwfn, SRC_REG_LASTFREE_RT_OFFSET,
p_hwfn           1741 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			 p_hwfn->p_cxt_mngr->last_free);
p_hwfn           1760 drivers/net/ethernet/qlogic/qed/qed_cxt.c static void qed_tm_init_pf(struct qed_hwfn *p_hwfn)
p_hwfn           1762 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
p_hwfn           1769 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_cxt_tm_iids(p_hwfn, p_mngr, &tm_iids);
p_hwfn           1778 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		SET_FIELD(cfg_word, TM_CFG_PARENT_PF, p_hwfn->rel_pf_id);
p_hwfn           1782 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		    (p_hwfn->cdev->p_iov_info->first_vf_in_pf + i);
p_hwfn           1783 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG_AGG(p_hwfn, rt_reg, cfg_word);
p_hwfn           1794 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	    (NUM_OF_VFS(p_hwfn->cdev) + p_hwfn->rel_pf_id);
p_hwfn           1795 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG_AGG(p_hwfn, rt_reg, cfg_word);
p_hwfn           1798 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, TM_REG_PF_ENABLE_CONN_RT_OFFSET,
p_hwfn           1810 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		SET_FIELD(cfg_word, TM_CFG_PARENT_PF, p_hwfn->rel_pf_id);
p_hwfn           1816 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		    (p_hwfn->cdev->p_iov_info->first_vf_in_pf + i);
p_hwfn           1818 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG_AGG(p_hwfn, rt_reg, cfg_word);
p_hwfn           1832 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		    (NUM_OF_VFS(p_hwfn->cdev) +
p_hwfn           1833 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		     p_hwfn->rel_pf_id * NUM_TASK_PF_SEGMENTS + i);
p_hwfn           1835 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG_AGG(p_hwfn, rt_reg, cfg_word);
p_hwfn           1841 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	if (QED_IS_RDMA_PERSONALITY(p_hwfn))
p_hwfn           1844 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	STORE_RT_REG(p_hwfn, TM_REG_PF_ENABLE_TASK_RT_OFFSET, active_seg_mask);
p_hwfn           1849 drivers/net/ethernet/qlogic/qed/qed_cxt.c static void qed_prs_init_common(struct qed_hwfn *p_hwfn)
p_hwfn           1851 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	if ((p_hwfn->hw_info.personality == QED_PCI_FCOE) &&
p_hwfn           1852 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	    p_hwfn->pf_params.fcoe_pf_params.is_target)
p_hwfn           1853 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG(p_hwfn,
p_hwfn           1857 drivers/net/ethernet/qlogic/qed/qed_cxt.c static void qed_prs_init_pf(struct qed_hwfn *p_hwfn)
p_hwfn           1859 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
p_hwfn           1870 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	if (p_hwfn->pf_params.fcoe_pf_params.is_target) {
p_hwfn           1871 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG_AGG(p_hwfn,
p_hwfn           1875 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		STORE_RT_REG_AGG(p_hwfn,
p_hwfn           1881 drivers/net/ethernet/qlogic/qed/qed_cxt.c void qed_cxt_hw_init_common(struct qed_hwfn *p_hwfn)
p_hwfn           1883 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_cdu_init_common(p_hwfn);
p_hwfn           1884 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_prs_init_common(p_hwfn);
p_hwfn           1887 drivers/net/ethernet/qlogic/qed/qed_cxt.c void qed_cxt_hw_init_pf(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           1889 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_qm_init_pf(p_hwfn, p_ptt, true);
p_hwfn           1890 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_cm_init_pf(p_hwfn);
p_hwfn           1891 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_dq_init_pf(p_hwfn);
p_hwfn           1892 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_cdu_init_pf(p_hwfn);
p_hwfn           1893 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_ilt_init_pf(p_hwfn);
p_hwfn           1894 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_src_init_pf(p_hwfn);
p_hwfn           1895 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_tm_init_pf(p_hwfn);
p_hwfn           1896 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_prs_init_pf(p_hwfn);
p_hwfn           1899 drivers/net/ethernet/qlogic/qed/qed_cxt.c int _qed_cxt_acquire_cid(struct qed_hwfn *p_hwfn,
p_hwfn           1902 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
p_hwfn           1907 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		DP_NOTICE(p_hwfn, "Invalid protocol type %d", type);
p_hwfn           1912 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		DP_NOTICE(p_hwfn, "VF [%02x] is out of range\n", vfid);
p_hwfn           1923 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		DP_NOTICE(p_hwfn, "Invalid protocol type %d", type);
p_hwfn           1930 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		DP_NOTICE(p_hwfn, "no CID available for protocol %d\n", type);
p_hwfn           1938 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	DP_VERBOSE(p_hwfn, QED_MSG_CXT,
p_hwfn           1945 drivers/net/ethernet/qlogic/qed/qed_cxt.c int qed_cxt_acquire_cid(struct qed_hwfn *p_hwfn,
p_hwfn           1948 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	return _qed_cxt_acquire_cid(p_hwfn, type, p_cid, QED_CXT_PF_CID);
p_hwfn           1951 drivers/net/ethernet/qlogic/qed/qed_cxt.c static bool qed_cxt_test_cid_acquired(struct qed_hwfn *p_hwfn,
p_hwfn           1957 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
p_hwfn           1975 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		DP_NOTICE(p_hwfn, "Invalid CID %d vfid %02x", cid, vfid);
p_hwfn           1981 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		DP_NOTICE(p_hwfn, "CID %d [vifd %02x] not acquired",
p_hwfn           1993 drivers/net/ethernet/qlogic/qed/qed_cxt.c void _qed_cxt_release_cid(struct qed_hwfn *p_hwfn, u32 cid, u8 vfid)
p_hwfn           2001 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		DP_NOTICE(p_hwfn,
p_hwfn           2008 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	b_acquired = qed_cxt_test_cid_acquired(p_hwfn, cid, vfid,
p_hwfn           2017 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	DP_VERBOSE(p_hwfn, QED_MSG_CXT,
p_hwfn           2022 drivers/net/ethernet/qlogic/qed/qed_cxt.c void qed_cxt_release_cid(struct qed_hwfn *p_hwfn, u32 cid)
p_hwfn           2024 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	_qed_cxt_release_cid(p_hwfn, cid, QED_CXT_PF_CID);
p_hwfn           2027 drivers/net/ethernet/qlogic/qed/qed_cxt.c int qed_cxt_get_cid_info(struct qed_hwfn *p_hwfn, struct qed_cxt_info *p_info)
p_hwfn           2029 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
p_hwfn           2036 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	b_acquired = qed_cxt_test_cid_acquired(p_hwfn, p_info->iid,
p_hwfn           2046 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	hw_p_size = p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC].p_size.val;
p_hwfn           2048 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	conn_cxt_size = CONN_CXT_SIZE(p_hwfn);
p_hwfn           2059 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	DP_VERBOSE(p_hwfn, (QED_MSG_ILT | QED_MSG_CXT),
p_hwfn           2066 drivers/net/ethernet/qlogic/qed/qed_cxt.c static void qed_rdma_set_pf_params(struct qed_hwfn *p_hwfn,
p_hwfn           2075 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	if (p_hwfn->mcp_info->func_info.protocol == QED_PCI_ETH_RDMA) {
p_hwfn           2076 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		DP_NOTICE(p_hwfn,
p_hwfn           2078 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		p_hwfn->hw_info.personality = QED_PCI_ETH_ROCE;
p_hwfn           2081 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	switch (p_hwfn->hw_info.personality) {
p_hwfn           2097 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		qed_cxt_set_proto_cid_count(p_hwfn, proto, num_cons, 0);
p_hwfn           2102 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		qed_cxt_set_proto_tid_count(p_hwfn, PROTOCOLID_ROCE,
p_hwfn           2105 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		qed_cxt_set_srq_count(p_hwfn, num_srqs);
p_hwfn           2107 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		DP_INFO(p_hwfn->cdev,
p_hwfn           2112 drivers/net/ethernet/qlogic/qed/qed_cxt.c int qed_cxt_set_pf_params(struct qed_hwfn *p_hwfn, u32 rdma_tasks)
p_hwfn           2117 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	if (p_hwfn->using_ll2)
p_hwfn           2119 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_cxt_set_proto_cid_count(p_hwfn, PROTOCOLID_CORE, core_cids, 0);
p_hwfn           2121 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	switch (p_hwfn->hw_info.personality) {
p_hwfn           2126 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			qed_rdma_set_pf_params(p_hwfn,
p_hwfn           2127 drivers/net/ethernet/qlogic/qed/qed_cxt.c 					       &p_hwfn->
p_hwfn           2136 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		    &p_hwfn->pf_params.eth_pf_params;
p_hwfn           2141 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		qed_cxt_set_proto_cid_count(p_hwfn, PROTOCOLID_ETH,
p_hwfn           2144 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		p_hwfn->p_cxt_mngr->arfs_count = p_params->num_arfs_filters;
p_hwfn           2151 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		p_params = &p_hwfn->pf_params.fcoe_pf_params;
p_hwfn           2154 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			qed_cxt_set_proto_cid_count(p_hwfn,
p_hwfn           2159 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			qed_cxt_set_proto_tid_count(p_hwfn, PROTOCOLID_FCOE,
p_hwfn           2163 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			DP_INFO(p_hwfn->cdev,
p_hwfn           2172 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		p_params = &p_hwfn->pf_params.iscsi_pf_params;
p_hwfn           2175 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			qed_cxt_set_proto_cid_count(p_hwfn,
p_hwfn           2180 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			qed_cxt_set_proto_tid_count(p_hwfn,
p_hwfn           2187 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			DP_INFO(p_hwfn->cdev,
p_hwfn           2199 drivers/net/ethernet/qlogic/qed/qed_cxt.c int qed_cxt_get_tid_mem_info(struct qed_hwfn *p_hwfn,
p_hwfn           2202 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
p_hwfn           2209 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	switch (p_hwfn->hw_info.personality) {
p_hwfn           2236 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		    p_hwfn->p_cxt_mngr->pf_start_line;
p_hwfn           2252 drivers/net/ethernet/qlogic/qed/qed_cxt.c qed_cxt_dynamic_ilt_alloc(struct qed_hwfn *p_hwfn,
p_hwfn           2266 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC];
p_hwfn           2267 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		elem_size = CONN_CXT_SIZE(p_hwfn);
p_hwfn           2271 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_TSDM];
p_hwfn           2276 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT];
p_hwfn           2277 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		elem_size = TYPE1_TASK_CXT_SIZE(p_hwfn);
p_hwfn           2281 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		DP_NOTICE(p_hwfn, "-EINVALID elem type = %d", elem_type);
p_hwfn           2289 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	shadow_line = line - p_hwfn->p_cxt_mngr->pf_start_line;
p_hwfn           2297 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	mutex_lock(&p_hwfn->p_cxt_mngr->mutex);
p_hwfn           2299 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	if (p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].p_virt)
p_hwfn           2302 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           2304 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		DP_NOTICE(p_hwfn,
p_hwfn           2310 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	p_virt = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn           2333 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			elem_start += TYPE1_TASK_CXT_SIZE(p_hwfn);
p_hwfn           2337 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].p_virt = p_virt;
p_hwfn           2338 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].p_phys = p_phys;
p_hwfn           2339 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].size =
p_hwfn           2350 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		  (p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].p_phys >> 12));
p_hwfn           2353 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_dmae_host2grc(p_hwfn, p_ptt, (u64) (uintptr_t)&ilt_hw_entry,
p_hwfn           2362 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		qed_wr(p_hwfn, p_ptt, PRS_REG_ROCE_DEST_QP_MAX_PF,
p_hwfn           2365 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		if (!p_hwfn->b_rdma_enabled_in_prs) {
p_hwfn           2367 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			qed_wr(p_hwfn, p_ptt, p_hwfn->rdma_prs_search_reg, 1);
p_hwfn           2368 drivers/net/ethernet/qlogic/qed/qed_cxt.c 			p_hwfn->b_rdma_enabled_in_prs = true;
p_hwfn           2373 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           2375 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	mutex_unlock(&p_hwfn->p_cxt_mngr->mutex);
p_hwfn           2384 drivers/net/ethernet/qlogic/qed/qed_cxt.c qed_cxt_free_ilt_range(struct qed_hwfn *p_hwfn,
p_hwfn           2399 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC];
p_hwfn           2400 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		elem_size = CONN_CXT_SIZE(p_hwfn);
p_hwfn           2404 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_TSDM];
p_hwfn           2409 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT];
p_hwfn           2410 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		elem_size = TYPE1_TASK_CXT_SIZE(p_hwfn);
p_hwfn           2414 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		DP_NOTICE(p_hwfn, "-EINVALID elem type = %d", elem_type);
p_hwfn           2426 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	shadow_start_line = start_line - p_hwfn->p_cxt_mngr->pf_start_line;
p_hwfn           2427 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	shadow_end_line = end_line - p_hwfn->p_cxt_mngr->pf_start_line;
p_hwfn           2429 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           2431 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		DP_NOTICE(p_hwfn,
p_hwfn           2437 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		if (!p_hwfn->p_cxt_mngr->ilt_shadow[i].p_virt)
p_hwfn           2440 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn           2441 drivers/net/ethernet/qlogic/qed/qed_cxt.c 				  p_hwfn->p_cxt_mngr->ilt_shadow[i].size,
p_hwfn           2442 drivers/net/ethernet/qlogic/qed/qed_cxt.c 				  p_hwfn->p_cxt_mngr->ilt_shadow[i].p_virt,
p_hwfn           2443 drivers/net/ethernet/qlogic/qed/qed_cxt.c 				  p_hwfn->p_cxt_mngr->ilt_shadow[i].p_phys);
p_hwfn           2445 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		p_hwfn->p_cxt_mngr->ilt_shadow[i].p_virt = NULL;
p_hwfn           2446 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		p_hwfn->p_cxt_mngr->ilt_shadow[i].p_phys = 0;
p_hwfn           2447 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		p_hwfn->p_cxt_mngr->ilt_shadow[i].size = 0;
p_hwfn           2457 drivers/net/ethernet/qlogic/qed/qed_cxt.c 		qed_dmae_host2grc(p_hwfn, p_ptt,
p_hwfn           2464 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           2469 drivers/net/ethernet/qlogic/qed/qed_cxt.c int qed_cxt_free_proto_ilt(struct qed_hwfn *p_hwfn, enum protocol_type proto)
p_hwfn           2475 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	rc = qed_cxt_free_ilt_range(p_hwfn, QED_ELEM_CXT,
p_hwfn           2476 drivers/net/ethernet/qlogic/qed/qed_cxt.c 				    qed_cxt_get_proto_cid_start(p_hwfn,
p_hwfn           2478 drivers/net/ethernet/qlogic/qed/qed_cxt.c 				    qed_cxt_get_proto_cid_count(p_hwfn,
p_hwfn           2488 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	rc = qed_cxt_free_ilt_range(p_hwfn, QED_ELEM_TASK, 0,
p_hwfn           2489 drivers/net/ethernet/qlogic/qed/qed_cxt.c 				    qed_cxt_get_proto_tid_count(p_hwfn, proto));
p_hwfn           2494 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	rc = qed_cxt_free_ilt_range(p_hwfn, QED_ELEM_SRQ, 0,
p_hwfn           2495 drivers/net/ethernet/qlogic/qed/qed_cxt.c 				    qed_cxt_get_srq_count(p_hwfn));
p_hwfn           2500 drivers/net/ethernet/qlogic/qed/qed_cxt.c int qed_cxt_get_task_ctx(struct qed_hwfn *p_hwfn,
p_hwfn           2503 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	struct qed_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
p_hwfn           2513 drivers/net/ethernet/qlogic/qed/qed_cxt.c 	switch (p_hwfn->hw_info.personality) {
p_hwfn             65 drivers/net/ethernet/qlogic/qed/qed_cxt.h int qed_cxt_get_cid_info(struct qed_hwfn *p_hwfn,
p_hwfn             76 drivers/net/ethernet/qlogic/qed/qed_cxt.h int qed_cxt_get_tid_mem_info(struct qed_hwfn *p_hwfn,
p_hwfn             88 drivers/net/ethernet/qlogic/qed/qed_cxt.h u32 qed_cxt_get_proto_cid_count(struct qed_hwfn *p_hwfn,
p_hwfn             98 drivers/net/ethernet/qlogic/qed/qed_cxt.h int qed_cxt_set_pf_params(struct qed_hwfn *p_hwfn, u32 rdma_tasks);
p_hwfn            108 drivers/net/ethernet/qlogic/qed/qed_cxt.h int qed_cxt_cfg_ilt_compute(struct qed_hwfn *p_hwfn, u32 *last_line);
p_hwfn            116 drivers/net/ethernet/qlogic/qed/qed_cxt.h u32 qed_cxt_cfg_ilt_compute_excess(struct qed_hwfn *p_hwfn, u32 used_lines);
p_hwfn            125 drivers/net/ethernet/qlogic/qed/qed_cxt.h int qed_cxt_mngr_alloc(struct qed_hwfn *p_hwfn);
p_hwfn            132 drivers/net/ethernet/qlogic/qed/qed_cxt.h void qed_cxt_mngr_free(struct qed_hwfn *p_hwfn);
p_hwfn            141 drivers/net/ethernet/qlogic/qed/qed_cxt.h int qed_cxt_tables_alloc(struct qed_hwfn *p_hwfn);
p_hwfn            148 drivers/net/ethernet/qlogic/qed/qed_cxt.h void qed_cxt_mngr_setup(struct qed_hwfn *p_hwfn);
p_hwfn            157 drivers/net/ethernet/qlogic/qed/qed_cxt.h void qed_cxt_hw_init_common(struct qed_hwfn *p_hwfn);
p_hwfn            165 drivers/net/ethernet/qlogic/qed/qed_cxt.h void qed_cxt_hw_init_pf(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn            174 drivers/net/ethernet/qlogic/qed/qed_cxt.h void qed_qm_init_pf(struct qed_hwfn *p_hwfn,
p_hwfn            185 drivers/net/ethernet/qlogic/qed/qed_cxt.h int qed_qm_reconf(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn            195 drivers/net/ethernet/qlogic/qed/qed_cxt.h void qed_cxt_release_cid(struct qed_hwfn *p_hwfn, u32 cid);
p_hwfn            204 drivers/net/ethernet/qlogic/qed/qed_cxt.h void _qed_cxt_release_cid(struct qed_hwfn *p_hwfn, u32 cid, u8 vfid);
p_hwfn            215 drivers/net/ethernet/qlogic/qed/qed_cxt.h int qed_cxt_acquire_cid(struct qed_hwfn *p_hwfn,
p_hwfn            229 drivers/net/ethernet/qlogic/qed/qed_cxt.h int _qed_cxt_acquire_cid(struct qed_hwfn *p_hwfn,
p_hwfn            232 drivers/net/ethernet/qlogic/qed/qed_cxt.h int qed_cxt_dynamic_ilt_alloc(struct qed_hwfn *p_hwfn,
p_hwfn            234 drivers/net/ethernet/qlogic/qed/qed_cxt.h u32 qed_cxt_get_proto_tid_count(struct qed_hwfn *p_hwfn,
p_hwfn            236 drivers/net/ethernet/qlogic/qed/qed_cxt.h u32 qed_cxt_get_proto_cid_start(struct qed_hwfn *p_hwfn,
p_hwfn            238 drivers/net/ethernet/qlogic/qed/qed_cxt.h u32 qed_cxt_get_srq_count(struct qed_hwfn *p_hwfn);
p_hwfn            239 drivers/net/ethernet/qlogic/qed/qed_cxt.h int qed_cxt_free_proto_ilt(struct qed_hwfn *p_hwfn, enum protocol_type proto);
p_hwfn            243 drivers/net/ethernet/qlogic/qed/qed_cxt.h int qed_cxt_get_task_ctx(struct qed_hwfn *p_hwfn,
p_hwfn            172 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_dp_protocol(struct qed_hwfn *p_hwfn, struct qed_dcbx_results *p_data)
p_hwfn            177 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	DP_VERBOSE(p_hwfn, QED_MSG_DCB, "DCBX negotiated: %d\n",
p_hwfn            183 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		DP_VERBOSE(p_hwfn, QED_MSG_DCB,
p_hwfn            187 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 			   p_data->arr[id].tc, p_hwfn->hw_info.num_active_tc);
p_hwfn            193 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		    struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
p_hwfn            207 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	if (test_bit(QED_MF_DONT_ADD_VLAN0_TAG, &p_hwfn->cdev->mf_bits))
p_hwfn            211 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	if (app_tlv && p_hwfn->hw_info.personality == personality)
p_hwfn            212 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		qed_hw_info_set_offload_tc(&p_hwfn->hw_info, tc);
p_hwfn            215 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	if (test_bit(QED_MF_UFP_SPECIFIC, &p_hwfn->cdev->mf_bits) &&
p_hwfn            217 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		qed_wr(p_hwfn, p_ptt, DORQ_REG_TAG1_OVRD_MODE, 1);
p_hwfn            218 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		qed_wr(p_hwfn, p_ptt, DORQ_REG_PF_PCP_BB_K2, prio << 1);
p_hwfn            225 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 			 struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
p_hwfn            241 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		qed_dcbx_set_params(p_data, p_hwfn, p_ptt, app_tlv, enable,
p_hwfn            247 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_get_app_protocol_type(struct qed_hwfn *p_hwfn,
p_hwfn            263 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		DP_VERBOSE(p_hwfn, QED_MSG_DCB,
p_hwfn            276 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_process_tlv(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
p_hwfn            288 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	DP_VERBOSE(p_hwfn, QED_MSG_DCB, "Num APP entries = %d\n", count);
p_hwfn            300 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 			DP_ERR(p_hwfn, "Invalid priority\n");
p_hwfn            305 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		if (qed_dcbx_get_app_protocol_type(p_hwfn, p_tbl[i].entry,
p_hwfn            320 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 			qed_dcbx_update_app_info(p_data, p_hwfn, p_ptt, true,
p_hwfn            326 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	if (test_bit(QED_MF_UFP_SPECIFIC, &p_hwfn->cdev->mf_bits) && !eth_tlv)
p_hwfn            327 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		p_data->arr[DCBX_PROTOCOL_ETH].tc = p_hwfn->ufp_info.tc;
p_hwfn            342 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		qed_dcbx_update_app_info(p_data, p_hwfn, p_ptt, false, enable,
p_hwfn            353 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_process_mib_info(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn            365 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	flags = p_hwfn->p_dcbx_info->operational.flags;
p_hwfn            368 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	p_app = &p_hwfn->p_dcbx_info->operational.features.app;
p_hwfn            371 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	p_ets = &p_hwfn->p_dcbx_info->operational.features.ets;
p_hwfn            374 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	p_info = &p_hwfn->hw_info;
p_hwfn            377 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	rc = qed_dcbx_process_tlv(p_hwfn, p_ptt, &data, p_tbl, pri_tc_tbl,
p_hwfn            384 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	p_hwfn->qm_info.ooo_tc = QED_MFW_GET_FIELD(p_ets->flags, DCBX_OOO_TC);
p_hwfn            385 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	data.pf_id = p_hwfn->rel_pf_id;
p_hwfn            388 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	qed_dcbx_dp_protocol(p_hwfn, &data);
p_hwfn            390 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	memcpy(&p_hwfn->p_dcbx_info->results, &data,
p_hwfn            397 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_copy_mib(struct qed_hwfn *p_hwfn,
p_hwfn            411 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 			qed_memcpy_from(p_hwfn, p_ptt, p_data->lldp_remote,
p_hwfn            416 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 			qed_memcpy_from(p_hwfn, p_ptt, p_data->mib,
p_hwfn            423 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		DP_VERBOSE(p_hwfn,
p_hwfn            431 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		DP_ERR(p_hwfn,
p_hwfn            441 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_get_priority_info(struct qed_hwfn *p_hwfn,
p_hwfn            474 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	DP_VERBOSE(p_hwfn, QED_MSG_DCB,
p_hwfn            481 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_get_app_data(struct qed_hwfn *p_hwfn,
p_hwfn            535 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		qed_dcbx_get_app_protocol_type(p_hwfn, p_tbl[i].entry,
p_hwfn            540 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	DP_VERBOSE(p_hwfn, QED_MSG_DCB,
p_hwfn            547 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_get_pfc_data(struct qed_hwfn *p_hwfn,
p_hwfn            565 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	DP_VERBOSE(p_hwfn, QED_MSG_DCB,
p_hwfn            572 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_get_ets_data(struct qed_hwfn *p_hwfn,
p_hwfn            586 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	DP_VERBOSE(p_hwfn, QED_MSG_DCB,
p_hwfn            594 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		DP_VERBOSE(p_hwfn, QED_MSG_DCB,
p_hwfn            611 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		DP_VERBOSE(p_hwfn, QED_MSG_DCB,
p_hwfn            619 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_get_common_params(struct qed_hwfn *p_hwfn,
p_hwfn            625 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	qed_dcbx_get_app_data(p_hwfn, p_app, p_tbl, p_params, ieee);
p_hwfn            626 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	qed_dcbx_get_ets_data(p_hwfn, p_ets, p_params);
p_hwfn            627 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	qed_dcbx_get_pfc_data(p_hwfn, pfc, p_params);
p_hwfn            631 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_get_local_params(struct qed_hwfn *p_hwfn, struct qed_dcbx_get *params)
p_hwfn            635 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	p_feat = &p_hwfn->p_dcbx_info->local_admin.features;
p_hwfn            636 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	qed_dcbx_get_common_params(p_hwfn, &p_feat->app,
p_hwfn            643 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_get_remote_params(struct qed_hwfn *p_hwfn, struct qed_dcbx_get *params)
p_hwfn            647 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	p_feat = &p_hwfn->p_dcbx_info->remote.features;
p_hwfn            648 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	qed_dcbx_get_common_params(p_hwfn, &p_feat->app,
p_hwfn            655 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_get_operational_params(struct qed_hwfn *p_hwfn,
p_hwfn            665 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	flags = p_hwfn->p_dcbx_info->operational.flags;
p_hwfn            676 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		DP_VERBOSE(p_hwfn, QED_MSG_DCB, "Dcbx is disabled\n");
p_hwfn            680 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	p_feat = &p_hwfn->p_dcbx_info->operational.features;
p_hwfn            681 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	p_results = &p_hwfn->p_dcbx_info->results;
p_hwfn            694 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	DP_VERBOSE(p_hwfn, QED_MSG_DCB,
p_hwfn            699 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	qed_dcbx_get_common_params(p_hwfn, &p_feat->app,
p_hwfn            703 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	qed_dcbx_get_priority_info(p_hwfn, &p_operational->app_prio, p_results);
p_hwfn            711 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_get_local_lldp_params(struct qed_hwfn *p_hwfn,
p_hwfn            716 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	p_local = &p_hwfn->p_dcbx_info->lldp_local[LLDP_NEAREST_BRIDGE];
p_hwfn            725 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_get_remote_lldp_params(struct qed_hwfn *p_hwfn,
p_hwfn            730 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	p_remote = &p_hwfn->p_dcbx_info->lldp_remote[LLDP_NEAREST_BRIDGE];
p_hwfn            739 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_get_params(struct qed_hwfn *p_hwfn, struct qed_dcbx_get *p_params,
p_hwfn            744 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		qed_dcbx_get_remote_params(p_hwfn, p_params);
p_hwfn            747 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		qed_dcbx_get_local_params(p_hwfn, p_params);
p_hwfn            750 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		qed_dcbx_get_operational_params(p_hwfn, p_params);
p_hwfn            753 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		qed_dcbx_get_remote_lldp_params(p_hwfn, p_params);
p_hwfn            756 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		qed_dcbx_get_local_lldp_params(p_hwfn, p_params);
p_hwfn            759 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		DP_ERR(p_hwfn, "MIB read err, unknown mib type %d\n", type);
p_hwfn            767 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_read_local_lldp_mib(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn            773 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	data.addr = p_hwfn->mcp_info->port_addr + offsetof(struct public_port,
p_hwfn            775 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	data.lldp_local = p_hwfn->p_dcbx_info->lldp_local;
p_hwfn            777 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	qed_memcpy_from(p_hwfn, p_ptt, data.lldp_local, data.addr, data.size);
p_hwfn            783 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_read_remote_lldp_mib(struct qed_hwfn *p_hwfn,
p_hwfn            791 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	data.addr = p_hwfn->mcp_info->port_addr + offsetof(struct public_port,
p_hwfn            793 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	data.lldp_remote = p_hwfn->p_dcbx_info->lldp_remote;
p_hwfn            795 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	rc = qed_dcbx_copy_mib(p_hwfn, p_ptt, &data, type);
p_hwfn            801 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_read_operational_mib(struct qed_hwfn *p_hwfn,
p_hwfn            809 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	data.addr = p_hwfn->mcp_info->port_addr +
p_hwfn            811 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	data.mib = &p_hwfn->p_dcbx_info->operational;
p_hwfn            813 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	rc = qed_dcbx_copy_mib(p_hwfn, p_ptt, &data, type);
p_hwfn            819 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_read_remote_mib(struct qed_hwfn *p_hwfn,
p_hwfn            826 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	data.addr = p_hwfn->mcp_info->port_addr +
p_hwfn            828 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	data.mib = &p_hwfn->p_dcbx_info->remote;
p_hwfn            830 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	rc = qed_dcbx_copy_mib(p_hwfn, p_ptt, &data, type);
p_hwfn            836 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_read_local_mib(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn            842 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	data.addr = p_hwfn->mcp_info->port_addr +
p_hwfn            844 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	data.local_admin = &p_hwfn->p_dcbx_info->local_admin;
p_hwfn            846 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	qed_memcpy_from(p_hwfn, p_ptt, data.local_admin, data.addr, data.size);
p_hwfn            851 drivers/net/ethernet/qlogic/qed/qed_dcbx.c static int qed_dcbx_read_mib(struct qed_hwfn *p_hwfn,
p_hwfn            858 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		rc = qed_dcbx_read_operational_mib(p_hwfn, p_ptt, type);
p_hwfn            861 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		rc = qed_dcbx_read_remote_mib(p_hwfn, p_ptt, type);
p_hwfn            864 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		rc = qed_dcbx_read_local_mib(p_hwfn, p_ptt);
p_hwfn            867 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		rc = qed_dcbx_read_remote_lldp_mib(p_hwfn, p_ptt, type);
p_hwfn            870 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		rc = qed_dcbx_read_local_lldp_mib(p_hwfn, p_ptt);
p_hwfn            873 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		DP_ERR(p_hwfn, "MIB read err, unknown mib type %d\n", type);
p_hwfn            893 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_mib_update_event(struct qed_hwfn *p_hwfn,
p_hwfn            898 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	rc = qed_dcbx_read_mib(p_hwfn, p_ptt, type);
p_hwfn            903 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		rc = qed_dcbx_process_mib_info(p_hwfn, p_ptt);
p_hwfn            908 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 			qed_qm_reconf(p_hwfn, p_ptt);
p_hwfn            911 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 			qed_sp_pf_update(p_hwfn);
p_hwfn            916 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 			if (p_hwfn->hw_info.personality ==
p_hwfn            918 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 				qed_roce_dpm_dcbx(p_hwfn, p_ptt);
p_hwfn            922 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	qed_dcbx_get_params(p_hwfn, &p_hwfn->p_dcbx_info->get, type);
p_hwfn            931 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		p_data = &p_hwfn->p_dcbx_info->results;
p_hwfn            936 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		qed_wr(p_hwfn, p_ptt, NIG_REG_TX_EDPM_CTRL, val);
p_hwfn            939 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	qed_dcbx_aen(p_hwfn, type);
p_hwfn            944 drivers/net/ethernet/qlogic/qed/qed_dcbx.c int qed_dcbx_info_alloc(struct qed_hwfn *p_hwfn)
p_hwfn            946 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	p_hwfn->p_dcbx_info = kzalloc(sizeof(*p_hwfn->p_dcbx_info), GFP_KERNEL);
p_hwfn            947 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	if (!p_hwfn->p_dcbx_info)
p_hwfn            953 drivers/net/ethernet/qlogic/qed/qed_dcbx.c void qed_dcbx_info_free(struct qed_hwfn *p_hwfn)
p_hwfn            955 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	kfree(p_hwfn->p_dcbx_info);
p_hwfn            956 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	p_hwfn->p_dcbx_info = NULL;
p_hwfn           1002 drivers/net/ethernet/qlogic/qed/qed_dcbx.c u8 qed_dcbx_get_priority_tc(struct qed_hwfn *p_hwfn, u8 pri)
p_hwfn           1004 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	struct qed_dcbx_get *dcbx_info = &p_hwfn->p_dcbx_info->get;
p_hwfn           1007 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		DP_ERR(p_hwfn, "Invalid priority %d\n", pri);
p_hwfn           1012 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		DP_VERBOSE(p_hwfn, QED_MSG_DCB,
p_hwfn           1021 drivers/net/ethernet/qlogic/qed/qed_dcbx.c static int qed_dcbx_query_params(struct qed_hwfn *p_hwfn,
p_hwfn           1028 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	if (IS_VF(p_hwfn->cdev))
p_hwfn           1031 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           1035 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	rc = qed_dcbx_read_mib(p_hwfn, p_ptt, type);
p_hwfn           1039 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	rc = qed_dcbx_get_params(p_hwfn, p_get, type);
p_hwfn           1042 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           1047 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_set_pfc_data(struct qed_hwfn *p_hwfn,
p_hwfn           1075 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	DP_VERBOSE(p_hwfn, QED_MSG_DCB, "pfc = 0x%x\n", *pfc);
p_hwfn           1079 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_set_ets_data(struct qed_hwfn *p_hwfn,
p_hwfn           1124 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_set_app_data(struct qed_hwfn *p_hwfn,
p_hwfn           1196 drivers/net/ethernet/qlogic/qed/qed_dcbx.c qed_dcbx_set_local_params(struct qed_hwfn *p_hwfn,
p_hwfn           1204 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	       &p_hwfn->p_dcbx_info->operational.features,
p_hwfn           1214 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	DP_VERBOSE(p_hwfn, QED_MSG_DCB, "Dcbx version = %d\n",
p_hwfn           1218 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		qed_dcbx_set_pfc_data(p_hwfn, &local_admin->features.pfc,
p_hwfn           1222 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		qed_dcbx_set_ets_data(p_hwfn, &local_admin->features.ets,
p_hwfn           1226 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		qed_dcbx_set_app_data(p_hwfn, &local_admin->features.app,
p_hwfn           1230 drivers/net/ethernet/qlogic/qed/qed_dcbx.c int qed_dcbx_config_params(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
p_hwfn           1239 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		memcpy(&p_hwfn->p_dcbx_info->set, params,
p_hwfn           1245 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	memset(&p_hwfn->p_dcbx_info->set, 0, sizeof(p_hwfn->p_dcbx_info->set));
p_hwfn           1248 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	qed_dcbx_set_local_params(p_hwfn, &local_admin, params);
p_hwfn           1250 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	data.addr = p_hwfn->mcp_info->port_addr +
p_hwfn           1254 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	qed_memcpy_to(p_hwfn, p_ptt, data.addr, data.local_admin, data.size);
p_hwfn           1256 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_SET_DCBX,
p_hwfn           1259 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		DP_NOTICE(p_hwfn, "Failed to send DCBX update request\n");
p_hwfn           1264 drivers/net/ethernet/qlogic/qed/qed_dcbx.c int qed_dcbx_get_config_params(struct qed_hwfn *p_hwfn,
p_hwfn           1270 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	if (p_hwfn->p_dcbx_info->set.config.valid) {
p_hwfn           1271 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		memcpy(params, &p_hwfn->p_dcbx_info->set,
p_hwfn           1280 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	rc = qed_dcbx_query_params(p_hwfn, dcbx_info, QED_DCBX_OPERATIONAL_MIB);
p_hwfn           1286 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	p_hwfn->p_dcbx_info->set.override_flags = 0;
p_hwfn           1287 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	p_hwfn->p_dcbx_info->set.ver_num = DCBX_CONFIG_VERSION_DISABLED;
p_hwfn           1289 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		p_hwfn->p_dcbx_info->set.ver_num |= DCBX_CONFIG_VERSION_CEE;
p_hwfn           1291 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		p_hwfn->p_dcbx_info->set.ver_num |= DCBX_CONFIG_VERSION_IEEE;
p_hwfn           1293 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 		p_hwfn->p_dcbx_info->set.ver_num |= DCBX_CONFIG_VERSION_STATIC;
p_hwfn           1295 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	p_hwfn->p_dcbx_info->set.enabled = dcbx_info->operational.enabled;
p_hwfn           1296 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	memcpy(&p_hwfn->p_dcbx_info->set.config.params,
p_hwfn           1299 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	p_hwfn->p_dcbx_info->set.config.valid = true;
p_hwfn           1301 drivers/net/ethernet/qlogic/qed/qed_dcbx.c 	memcpy(params, &p_hwfn->p_dcbx_info->set, sizeof(struct qed_dcbx_set));
p_hwfn            122 drivers/net/ethernet/qlogic/qed/qed_dcbx.h int qed_dcbx_info_alloc(struct qed_hwfn *p_hwfn);
p_hwfn            123 drivers/net/ethernet/qlogic/qed/qed_dcbx.h void qed_dcbx_info_free(struct qed_hwfn *p_hwfn);
p_hwfn            129 drivers/net/ethernet/qlogic/qed/qed_dcbx.h u8 qed_dcbx_get_priority_tc(struct qed_hwfn *p_hwfn, u8 pri);
p_hwfn           1760 drivers/net/ethernet/qlogic/qed/qed_debug.c static void qed_grc_set_param(struct qed_hwfn *p_hwfn,
p_hwfn           1763 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           1769 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_get_param(struct qed_hwfn *p_hwfn,
p_hwfn           1772 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           1778 drivers/net/ethernet/qlogic/qed/qed_debug.c static void qed_dbg_grc_init_params(struct qed_hwfn *p_hwfn)
p_hwfn           1780 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           1783 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_dbg_grc_set_params_default(p_hwfn);
p_hwfn           1789 drivers/net/ethernet/qlogic/qed/qed_debug.c static enum dbg_status qed_dbg_dev_init(struct qed_hwfn *p_hwfn,
p_hwfn           1792 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           1799 drivers/net/ethernet/qlogic/qed/qed_debug.c 	if (QED_IS_K2(p_hwfn->cdev)) {
p_hwfn           1805 drivers/net/ethernet/qlogic/qed/qed_debug.c 	} else if (QED_IS_BB_B0(p_hwfn->cdev)) {
p_hwfn           1820 drivers/net/ethernet/qlogic/qed/qed_debug.c 	switch (qed_rd(p_hwfn, p_ptt, MISC_REG_PORT_MODE)) {
p_hwfn           1834 drivers/net/ethernet/qlogic/qed/qed_debug.c 	    qed_rd(p_hwfn, p_ptt, CNIG_REG_NW_PORT_MODE_BB) == 2)
p_hwfn           1852 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_dbg_grc_init_params(p_hwfn);
p_hwfn           1860 drivers/net/ethernet/qlogic/qed/qed_debug.c static struct dbg_bus_block *get_dbg_bus_block_desc(struct qed_hwfn *p_hwfn,
p_hwfn           1863 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           1873 drivers/net/ethernet/qlogic/qed/qed_debug.c static void qed_read_storm_fw_info(struct qed_hwfn *p_hwfn,
p_hwfn           1894 drivers/net/ethernet/qlogic/qed/qed_debug.c 		dest[i] = qed_rd(p_hwfn, p_ptt, addr);
p_hwfn           1903 drivers/net/ethernet/qlogic/qed/qed_debug.c 			dest[i] = qed_rd(p_hwfn, p_ptt, addr);
p_hwfn           1993 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_dump_fw_ver_param(struct qed_hwfn *p_hwfn,
p_hwfn           2002 drivers/net/ethernet/qlogic/qed/qed_debug.c 	if (dump && !qed_grc_get_param(p_hwfn, DBG_GRC_PARAM_NO_FW_VER)) {
p_hwfn           2004 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_read_fw_info(p_hwfn, p_ptt, &fw_info);
p_hwfn           2011 drivers/net/ethernet/qlogic/qed/qed_debug.c 			DP_NOTICE(p_hwfn,
p_hwfn           2038 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_dump_mfw_ver_param(struct qed_hwfn *p_hwfn,
p_hwfn           2045 drivers/net/ethernet/qlogic/qed/qed_debug.c 	    !qed_grc_get_param(p_hwfn, DBG_GRC_PARAM_NO_FW_VER)) {
p_hwfn           2052 drivers/net/ethernet/qlogic/qed/qed_debug.c 		public_data_addr = qed_rd(p_hwfn,
p_hwfn           2062 drivers/net/ethernet/qlogic/qed/qed_debug.c 		global_section_offsize = qed_rd(p_hwfn, p_ptt,
p_hwfn           2069 drivers/net/ethernet/qlogic/qed/qed_debug.c 		mfw_ver = qed_rd(p_hwfn, p_ptt,
p_hwfn           2077 drivers/net/ethernet/qlogic/qed/qed_debug.c 			DP_NOTICE(p_hwfn,
p_hwfn           2096 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_dump_common_global_params(struct qed_hwfn *p_hwfn,
p_hwfn           2102 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           2112 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_dump_fw_ver_param(p_hwfn, p_ptt, dump_buf + offset, dump);
p_hwfn           2113 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_dump_mfw_ver_param(p_hwfn,
p_hwfn           2128 drivers/net/ethernet/qlogic/qed/qed_debug.c 			       p_hwfn->abs_pf_id);
p_hwfn           2155 drivers/net/ethernet/qlogic/qed/qed_debug.c static void qed_update_blocks_reset_state(struct qed_hwfn *p_hwfn,
p_hwfn           2158 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           2165 drivers/net/ethernet/qlogic/qed/qed_debug.c 			reg_val[i] = qed_rd(p_hwfn,
p_hwfn           2178 drivers/net/ethernet/qlogic/qed/qed_debug.c static void qed_bus_enable_dbg_block(struct qed_hwfn *p_hwfn,
p_hwfn           2181 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_wr(p_hwfn, p_ptt, DBG_REG_DBG_BLOCK_ON, enable ? 1 : 0);
p_hwfn           2185 drivers/net/ethernet/qlogic/qed/qed_debug.c static void qed_bus_reset_dbg_block(struct qed_hwfn *p_hwfn,
p_hwfn           2192 drivers/net/ethernet/qlogic/qed/qed_debug.c 	old_reset_reg_val = qed_rd(p_hwfn, p_ptt, dbg_reset_reg_addr);
p_hwfn           2196 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_wr(p_hwfn, p_ptt, dbg_reset_reg_addr, new_reset_reg_val);
p_hwfn           2197 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_wr(p_hwfn, p_ptt, dbg_reset_reg_addr, old_reset_reg_val);
p_hwfn           2200 drivers/net/ethernet/qlogic/qed/qed_debug.c static void qed_bus_set_framing_mode(struct qed_hwfn *p_hwfn,
p_hwfn           2204 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_wr(p_hwfn, p_ptt, DBG_REG_FRAMING_MODE, (u8)mode);
p_hwfn           2210 drivers/net/ethernet/qlogic/qed/qed_debug.c static void qed_bus_enable_clients(struct qed_hwfn *p_hwfn,
p_hwfn           2213 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_wr(p_hwfn, p_ptt, DBG_REG_CLIENT_ENABLE, client_mask);
p_hwfn           2216 drivers/net/ethernet/qlogic/qed/qed_debug.c static bool qed_is_mode_match(struct qed_hwfn *p_hwfn, u16 *modes_buf_offset)
p_hwfn           2218 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           2229 drivers/net/ethernet/qlogic/qed/qed_debug.c 		return !qed_is_mode_match(p_hwfn, modes_buf_offset);
p_hwfn           2232 drivers/net/ethernet/qlogic/qed/qed_debug.c 		arg1 = qed_is_mode_match(p_hwfn, modes_buf_offset);
p_hwfn           2233 drivers/net/ethernet/qlogic/qed/qed_debug.c 		arg2 = qed_is_mode_match(p_hwfn, modes_buf_offset);
p_hwfn           2244 drivers/net/ethernet/qlogic/qed/qed_debug.c static bool qed_grc_is_included(struct qed_hwfn *p_hwfn,
p_hwfn           2247 drivers/net/ethernet/qlogic/qed/qed_debug.c 	return qed_grc_get_param(p_hwfn, grc_param) > 0;
p_hwfn           2253 drivers/net/ethernet/qlogic/qed/qed_debug.c static bool qed_grc_is_storm_included(struct qed_hwfn *p_hwfn,
p_hwfn           2256 drivers/net/ethernet/qlogic/qed/qed_debug.c 	return qed_grc_get_param(p_hwfn, (enum dbg_grc_params)storm) > 0;
p_hwfn           2262 drivers/net/ethernet/qlogic/qed/qed_debug.c static bool qed_grc_is_mem_included(struct qed_hwfn *p_hwfn,
p_hwfn           2270 drivers/net/ethernet/qlogic/qed/qed_debug.c 	    !qed_grc_is_storm_included(p_hwfn,
p_hwfn           2279 drivers/net/ethernet/qlogic/qed/qed_debug.c 			return qed_grc_is_included(p_hwfn, big_ram->grc_param);
p_hwfn           2285 drivers/net/ethernet/qlogic/qed/qed_debug.c 		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_PXP);
p_hwfn           2287 drivers/net/ethernet/qlogic/qed/qed_debug.c 		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_RAM);
p_hwfn           2289 drivers/net/ethernet/qlogic/qed/qed_debug.c 		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_PBUF);
p_hwfn           2293 drivers/net/ethernet/qlogic/qed/qed_debug.c 		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_CAU);
p_hwfn           2295 drivers/net/ethernet/qlogic/qed/qed_debug.c 		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_QM);
p_hwfn           2299 drivers/net/ethernet/qlogic/qed/qed_debug.c 		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_CFC) ||
p_hwfn           2300 drivers/net/ethernet/qlogic/qed/qed_debug.c 		       qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_CM_CTX);
p_hwfn           2303 drivers/net/ethernet/qlogic/qed/qed_debug.c 		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_IGU);
p_hwfn           2305 drivers/net/ethernet/qlogic/qed/qed_debug.c 		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_MULD);
p_hwfn           2307 drivers/net/ethernet/qlogic/qed/qed_debug.c 		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_PRS);
p_hwfn           2309 drivers/net/ethernet/qlogic/qed/qed_debug.c 		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_DMAE);
p_hwfn           2311 drivers/net/ethernet/qlogic/qed/qed_debug.c 		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_TM);
p_hwfn           2313 drivers/net/ethernet/qlogic/qed/qed_debug.c 		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_SDM);
p_hwfn           2316 drivers/net/ethernet/qlogic/qed/qed_debug.c 		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_DIF);
p_hwfn           2318 drivers/net/ethernet/qlogic/qed/qed_debug.c 		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_CM);
p_hwfn           2320 drivers/net/ethernet/qlogic/qed/qed_debug.c 		return qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_IOR);
p_hwfn           2327 drivers/net/ethernet/qlogic/qed/qed_debug.c static void qed_grc_stall_storms(struct qed_hwfn *p_hwfn,
p_hwfn           2334 drivers/net/ethernet/qlogic/qed/qed_debug.c 		if (!qed_grc_is_storm_included(p_hwfn,
p_hwfn           2340 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_wr(p_hwfn, p_ptt, reg_addr, stall ? 1 : 0);
p_hwfn           2347 drivers/net/ethernet/qlogic/qed/qed_debug.c static void qed_grc_unreset_blocks(struct qed_hwfn *p_hwfn,
p_hwfn           2350 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           2373 drivers/net/ethernet/qlogic/qed/qed_debug.c 			qed_wr(p_hwfn,
p_hwfn           2407 drivers/net/ethernet/qlogic/qed/qed_debug.c static void qed_grc_clear_all_prty(struct qed_hwfn *p_hwfn,
p_hwfn           2410 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           2438 drivers/net/ethernet/qlogic/qed/qed_debug.c 			    qed_is_mode_match(p_hwfn, &modes_buf_offset))
p_hwfn           2439 drivers/net/ethernet/qlogic/qed/qed_debug.c 				qed_rd(p_hwfn, p_ptt,
p_hwfn           2485 drivers/net/ethernet/qlogic/qed/qed_debug.c void qed_read_regs(struct qed_hwfn *p_hwfn,
p_hwfn           2491 drivers/net/ethernet/qlogic/qed/qed_debug.c 		buf[i] = qed_rd(p_hwfn, p_ptt, DWORDS_TO_BYTES(addr + i));
p_hwfn           2498 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_addr_range(struct qed_hwfn *p_hwfn,
p_hwfn           2505 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           2515 drivers/net/ethernet/qlogic/qed/qed_debug.c 		DP_VERBOSE(p_hwfn,
p_hwfn           2545 drivers/net/ethernet/qlogic/qed/qed_debug.c 		if (!qed_dmae_grc2host(p_hwfn, p_ptt, DWORDS_TO_BYTES(addr),
p_hwfn           2549 drivers/net/ethernet/qlogic/qed/qed_debug.c 		DP_VERBOSE(p_hwfn,
p_hwfn           2561 drivers/net/ethernet/qlogic/qed/qed_debug.c 			qed_port_pretend(p_hwfn, p_ptt, port_id);
p_hwfn           2565 drivers/net/ethernet/qlogic/qed/qed_debug.c 			qed_fid_pretend(p_hwfn, p_ptt, fid);
p_hwfn           2569 drivers/net/ethernet/qlogic/qed/qed_debug.c 			qed_port_fid_pretend(p_hwfn, p_ptt, port_id, fid);
p_hwfn           2574 drivers/net/ethernet/qlogic/qed/qed_debug.c 			qed_fid_pretend(p_hwfn, p_ptt, fid);
p_hwfn           2585 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_read_regs(p_hwfn, p_ptt, dump_buf, addr, len);
p_hwfn           2605 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_reg_entry(struct qed_hwfn *p_hwfn,
p_hwfn           2614 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_grc_dump_addr_range(p_hwfn,
p_hwfn           2630 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_reg_entry_skip(struct qed_hwfn *p_hwfn,
p_hwfn           2648 drivers/net/ethernet/qlogic/qed/qed_debug.c 		offset += qed_grc_dump_addr_range(p_hwfn,
p_hwfn           2669 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_regs_entries(struct qed_hwfn *p_hwfn,
p_hwfn           2698 drivers/net/ethernet/qlogic/qed/qed_debug.c 			mode_match = qed_is_mode_match(p_hwfn,
p_hwfn           2717 drivers/net/ethernet/qlogic/qed/qed_debug.c 			offset += qed_grc_dump_reg_entry(p_hwfn,
p_hwfn           2733 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_split_data(struct qed_hwfn *p_hwfn,
p_hwfn           2744 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           2763 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_grc_dump_regs_entries(p_hwfn,
p_hwfn           2787 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_registers(struct qed_hwfn *p_hwfn,
p_hwfn           2794 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           2839 drivers/net/ethernet/qlogic/qed/qed_debug.c 			offset += qed_grc_dump_split_data(p_hwfn, p_ptt,
p_hwfn           2853 drivers/net/ethernet/qlogic/qed/qed_debug.c 		fid = p_hwfn->rel_pf_id << PXP_PRETEND_CONCRETE_FID_PFID_SHIFT;
p_hwfn           2854 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_fid_pretend(p_hwfn, p_ptt, fid);
p_hwfn           2863 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_reset_regs(struct qed_hwfn *p_hwfn,
p_hwfn           2867 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           2880 drivers/net/ethernet/qlogic/qed/qed_debug.c 		offset += qed_grc_dump_reg_entry(p_hwfn,
p_hwfn           2902 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_modified_regs(struct qed_hwfn *p_hwfn,
p_hwfn           2906 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           2939 drivers/net/ethernet/qlogic/qed/qed_debug.c 			    !qed_is_mode_match(p_hwfn, &modes_buf_offset))
p_hwfn           2944 drivers/net/ethernet/qlogic/qed/qed_debug.c 			offset += qed_grc_dump_reg_entry(p_hwfn,
p_hwfn           2953 drivers/net/ethernet/qlogic/qed/qed_debug.c 			offset += qed_grc_dump_reg_entry(p_hwfn,
p_hwfn           2975 drivers/net/ethernet/qlogic/qed/qed_debug.c 		offset += qed_grc_dump_reg_entry(p_hwfn,
p_hwfn           2996 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_special_regs(struct qed_hwfn *p_hwfn,
p_hwfn           3010 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_grc_dump_reg_entry_skip(p_hwfn,
p_hwfn           3020 drivers/net/ethernet/qlogic/qed/qed_debug.c 	    qed_grc_dump_reg_entry_skip(p_hwfn,
p_hwfn           3044 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_mem_hdr(struct qed_hwfn *p_hwfn,
p_hwfn           3060 drivers/net/ethernet/qlogic/qed/qed_debug.c 		DP_NOTICE(p_hwfn,
p_hwfn           3123 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_mem(struct qed_hwfn *p_hwfn,
p_hwfn           3138 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_grc_dump_mem_hdr(p_hwfn,
p_hwfn           3147 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_grc_dump_addr_range(p_hwfn,
p_hwfn           3157 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_mem_entries(struct qed_hwfn *p_hwfn,
p_hwfn           3182 drivers/net/ethernet/qlogic/qed/qed_debug.c 			mode_match = qed_is_mode_match(p_hwfn,
p_hwfn           3205 drivers/net/ethernet/qlogic/qed/qed_debug.c 				DP_NOTICE(p_hwfn, "Invalid mem_group_id\n");
p_hwfn           3210 drivers/net/ethernet/qlogic/qed/qed_debug.c 			if (!qed_grc_is_mem_included(p_hwfn,
p_hwfn           3225 drivers/net/ethernet/qlogic/qed/qed_debug.c 					DP_NOTICE(p_hwfn,
p_hwfn           3231 drivers/net/ethernet/qlogic/qed/qed_debug.c 				mem_len = qed_grc_get_param(p_hwfn, grc_param) *
p_hwfn           3235 drivers/net/ethernet/qlogic/qed/qed_debug.c 					DP_NOTICE(p_hwfn,
p_hwfn           3241 drivers/net/ethernet/qlogic/qed/qed_debug.c 				mem_len = qed_grc_get_param(p_hwfn, grc_param) *
p_hwfn           3258 drivers/net/ethernet/qlogic/qed/qed_debug.c 			offset += qed_grc_dump_mem(p_hwfn,
p_hwfn           3280 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_memories(struct qed_hwfn *p_hwfn,
p_hwfn           3306 drivers/net/ethernet/qlogic/qed/qed_debug.c 			offset += qed_grc_dump_mem_entries(p_hwfn,
p_hwfn           3312 drivers/net/ethernet/qlogic/qed/qed_debug.c 			DP_NOTICE(p_hwfn,
p_hwfn           3325 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_ctx_data(struct qed_hwfn *p_hwfn,
p_hwfn           3344 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_grc_dump_mem_hdr(p_hwfn,
p_hwfn           3359 drivers/net/ethernet/qlogic/qed/qed_debug.c 			qed_wr(p_hwfn,
p_hwfn           3361 drivers/net/ethernet/qlogic/qed/qed_debug.c 			*(dump_buf + offset) = qed_rd(p_hwfn,
p_hwfn           3370 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_ctx(struct qed_hwfn *p_hwfn,
p_hwfn           3380 drivers/net/ethernet/qlogic/qed/qed_debug.c 		if (!qed_grc_is_storm_included(p_hwfn,
p_hwfn           3387 drivers/net/ethernet/qlogic/qed/qed_debug.c 			qed_grc_dump_ctx_data(p_hwfn,
p_hwfn           3392 drivers/net/ethernet/qlogic/qed/qed_debug.c 					      qed_grc_get_param(p_hwfn,
p_hwfn           3401 drivers/net/ethernet/qlogic/qed/qed_debug.c 			qed_grc_dump_ctx_data(p_hwfn,
p_hwfn           3406 drivers/net/ethernet/qlogic/qed/qed_debug.c 					      qed_grc_get_param(p_hwfn,
p_hwfn           3415 drivers/net/ethernet/qlogic/qed/qed_debug.c 			qed_grc_dump_ctx_data(p_hwfn,
p_hwfn           3420 drivers/net/ethernet/qlogic/qed/qed_debug.c 					      qed_grc_get_param(p_hwfn,
p_hwfn           3429 drivers/net/ethernet/qlogic/qed/qed_debug.c 			qed_grc_dump_ctx_data(p_hwfn,
p_hwfn           3434 drivers/net/ethernet/qlogic/qed/qed_debug.c 					      qed_grc_get_param(p_hwfn,
p_hwfn           3445 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_iors(struct qed_hwfn *p_hwfn,
p_hwfn           3455 drivers/net/ethernet/qlogic/qed/qed_debug.c 		if (!qed_grc_is_storm_included(p_hwfn,
p_hwfn           3465 drivers/net/ethernet/qlogic/qed/qed_debug.c 			offset += qed_grc_dump_mem(p_hwfn,
p_hwfn           3485 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_vfc_cam(struct qed_hwfn *p_hwfn,
p_hwfn           3495 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_grc_dump_mem_hdr(p_hwfn,
p_hwfn           3514 drivers/net/ethernet/qlogic/qed/qed_debug.c 		ARR_REG_WR(p_hwfn,
p_hwfn           3520 drivers/net/ethernet/qlogic/qed/qed_debug.c 		ARR_REG_WR(p_hwfn,
p_hwfn           3526 drivers/net/ethernet/qlogic/qed/qed_debug.c 		ARR_REG_RD(p_hwfn,
p_hwfn           3536 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_vfc_ram(struct qed_hwfn *p_hwfn,
p_hwfn           3548 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_grc_dump_mem_hdr(p_hwfn,
p_hwfn           3569 drivers/net/ethernet/qlogic/qed/qed_debug.c 		ARR_REG_WR(p_hwfn,
p_hwfn           3576 drivers/net/ethernet/qlogic/qed/qed_debug.c 		ARR_REG_WR(p_hwfn,
p_hwfn           3582 drivers/net/ethernet/qlogic/qed/qed_debug.c 		ARR_REG_RD(p_hwfn,
p_hwfn           3592 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_vfc(struct qed_hwfn *p_hwfn,
p_hwfn           3595 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           3600 drivers/net/ethernet/qlogic/qed/qed_debug.c 		if (!qed_grc_is_storm_included(p_hwfn,
p_hwfn           3608 drivers/net/ethernet/qlogic/qed/qed_debug.c 		offset += qed_grc_dump_vfc_cam(p_hwfn,
p_hwfn           3615 drivers/net/ethernet/qlogic/qed/qed_debug.c 			offset += qed_grc_dump_vfc_ram(p_hwfn,
p_hwfn           3627 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_rss(struct qed_hwfn *p_hwfn,
p_hwfn           3630 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           3646 drivers/net/ethernet/qlogic/qed/qed_debug.c 		offset += qed_grc_dump_mem_hdr(p_hwfn,
p_hwfn           3667 drivers/net/ethernet/qlogic/qed/qed_debug.c 			qed_wr(p_hwfn, p_ptt, RSS_REG_RSS_RAM_ADDR, rss_addr);
p_hwfn           3668 drivers/net/ethernet/qlogic/qed/qed_debug.c 			offset += qed_grc_dump_addr_range(p_hwfn,
p_hwfn           3685 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_big_ram(struct qed_hwfn *p_hwfn,
p_hwfn           3689 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           3698 drivers/net/ethernet/qlogic/qed/qed_debug.c 	reg_val = qed_rd(p_hwfn, p_ptt, big_ram->is_256b_reg_addr);
p_hwfn           3707 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_grc_dump_mem_hdr(p_hwfn,
p_hwfn           3725 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_wr(p_hwfn, p_ptt, big_ram->addr_reg_addr, i);
p_hwfn           3728 drivers/net/ethernet/qlogic/qed/qed_debug.c 		offset += qed_grc_dump_addr_range(p_hwfn,
p_hwfn           3740 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_mcp(struct qed_hwfn *p_hwfn,
p_hwfn           3748 drivers/net/ethernet/qlogic/qed/qed_debug.c 	if (dump && !qed_grc_get_param(p_hwfn, DBG_GRC_PARAM_NO_MCP)) {
p_hwfn           3749 drivers/net/ethernet/qlogic/qed/qed_debug.c 		halted = !qed_mcp_halt(p_hwfn, p_ptt);
p_hwfn           3751 drivers/net/ethernet/qlogic/qed/qed_debug.c 			DP_NOTICE(p_hwfn, "MCP halt failed!\n");
p_hwfn           3755 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_grc_dump_mem(p_hwfn,
p_hwfn           3765 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_grc_dump_mem(p_hwfn,
p_hwfn           3776 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_grc_dump_registers(p_hwfn,
p_hwfn           3786 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_grc_dump_reg_entry(p_hwfn,
p_hwfn           3795 drivers/net/ethernet/qlogic/qed/qed_debug.c 	if (halted && qed_mcp_resume(p_hwfn, p_ptt))
p_hwfn           3796 drivers/net/ethernet/qlogic/qed/qed_debug.c 		DP_NOTICE(p_hwfn, "Failed to resume MCP after halt!\n");
p_hwfn           3802 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_phy(struct qed_hwfn *p_hwfn,
p_hwfn           3826 drivers/net/ethernet/qlogic/qed/qed_debug.c 			DP_NOTICE(p_hwfn,
p_hwfn           3829 drivers/net/ethernet/qlogic/qed/qed_debug.c 		offset += qed_grc_dump_mem_hdr(p_hwfn,
p_hwfn           3846 drivers/net/ethernet/qlogic/qed/qed_debug.c 			qed_wr(p_hwfn, p_ptt, addr_hi_addr, tbus_hi_offset);
p_hwfn           3849 drivers/net/ethernet/qlogic/qed/qed_debug.c 				qed_wr(p_hwfn,
p_hwfn           3851 drivers/net/ethernet/qlogic/qed/qed_debug.c 				*(bytes_buf++) = (u8)qed_rd(p_hwfn,
p_hwfn           3854 drivers/net/ethernet/qlogic/qed/qed_debug.c 				*(bytes_buf++) = (u8)qed_rd(p_hwfn,
p_hwfn           3866 drivers/net/ethernet/qlogic/qed/qed_debug.c static void qed_config_dbg_line(struct qed_hwfn *p_hwfn,
p_hwfn           3876 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_wr(p_hwfn, p_ptt, block->dbg_select_addr, line_id);
p_hwfn           3877 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_wr(p_hwfn, p_ptt, block->dbg_enable_addr, enable_mask);
p_hwfn           3878 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_wr(p_hwfn, p_ptt, block->dbg_shift_addr, right_shift);
p_hwfn           3879 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_wr(p_hwfn, p_ptt, block->dbg_force_valid_addr, force_valid_mask);
p_hwfn           3880 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_wr(p_hwfn, p_ptt, block->dbg_force_frame_addr, force_frame_mask);
p_hwfn           3884 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_grc_dump_static_debug(struct qed_hwfn *p_hwfn,
p_hwfn           3888 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           3892 drivers/net/ethernet/qlogic/qed/qed_debug.c 	if (dump && qed_rd(p_hwfn, p_ptt, DBG_REG_DBG_BLOCK_ON))
p_hwfn           3902 drivers/net/ethernet/qlogic/qed/qed_debug.c 				qed_wr(p_hwfn, p_ptt, block->dbg_enable_addr,
p_hwfn           3906 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_bus_reset_dbg_block(p_hwfn, p_ptt);
p_hwfn           3907 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_bus_set_framing_mode(p_hwfn,
p_hwfn           3909 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_wr(p_hwfn,
p_hwfn           3911 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_wr(p_hwfn, p_ptt, DBG_REG_FULL_MODE, 1);
p_hwfn           3912 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_bus_enable_dbg_block(p_hwfn, p_ptt, true);
p_hwfn           3926 drivers/net/ethernet/qlogic/qed/qed_debug.c 		block_desc = get_dbg_bus_block_desc(p_hwfn,
p_hwfn           3932 drivers/net/ethernet/qlogic/qed/qed_debug.c 		offset += qed_grc_dump_mem_hdr(p_hwfn,
p_hwfn           3955 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_bus_enable_clients(p_hwfn,
p_hwfn           3964 drivers/net/ethernet/qlogic/qed/qed_debug.c 			qed_config_dbg_line(p_hwfn,
p_hwfn           3970 drivers/net/ethernet/qlogic/qed/qed_debug.c 			offset += qed_grc_dump_addr_range(p_hwfn,
p_hwfn           3981 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_bus_enable_clients(p_hwfn, p_ptt, 0);
p_hwfn           3982 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_wr(p_hwfn, p_ptt, block->dbg_enable_addr, 0);
p_hwfn           3986 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_bus_enable_dbg_block(p_hwfn, p_ptt, false);
p_hwfn           3987 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_bus_enable_clients(p_hwfn, p_ptt, 0);
p_hwfn           3996 drivers/net/ethernet/qlogic/qed/qed_debug.c static enum dbg_status qed_grc_dump(struct qed_hwfn *p_hwfn,
p_hwfn           4001 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           4011 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_update_blocks_reset_state(p_hwfn, p_ptt);
p_hwfn           4014 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_dump_common_global_params(p_hwfn,
p_hwfn           4022 drivers/net/ethernet/qlogic/qed/qed_debug.c 				     qed_grc_get_param(p_hwfn,
p_hwfn           4027 drivers/net/ethernet/qlogic/qed/qed_debug.c 				     qed_grc_get_param(p_hwfn,
p_hwfn           4033 drivers/net/ethernet/qlogic/qed/qed_debug.c 	if (qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_REGS))
p_hwfn           4034 drivers/net/ethernet/qlogic/qed/qed_debug.c 		offset += qed_grc_dump_reset_regs(p_hwfn,
p_hwfn           4040 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_grc_unreset_blocks(p_hwfn, p_ptt);
p_hwfn           4041 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_update_blocks_reset_state(p_hwfn, p_ptt);
p_hwfn           4046 drivers/net/ethernet/qlogic/qed/qed_debug.c 	    !qed_grc_get_param(p_hwfn, DBG_GRC_PARAM_NO_MCP)) {
p_hwfn           4047 drivers/net/ethernet/qlogic/qed/qed_debug.c 		parities_masked = !qed_mcp_mask_parities(p_hwfn, p_ptt, 1);
p_hwfn           4049 drivers/net/ethernet/qlogic/qed/qed_debug.c 			DP_NOTICE(p_hwfn,
p_hwfn           4052 drivers/net/ethernet/qlogic/qed/qed_debug.c 			    (p_hwfn, DBG_GRC_PARAM_PARITY_SAFE))
p_hwfn           4058 drivers/net/ethernet/qlogic/qed/qed_debug.c 	if (qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_REGS))
p_hwfn           4059 drivers/net/ethernet/qlogic/qed/qed_debug.c 		offset += qed_grc_dump_modified_regs(p_hwfn,
p_hwfn           4065 drivers/net/ethernet/qlogic/qed/qed_debug.c 	    (qed_grc_is_included(p_hwfn,
p_hwfn           4067 drivers/net/ethernet/qlogic/qed/qed_debug.c 	     qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_VFC)))
p_hwfn           4068 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_grc_stall_storms(p_hwfn, p_ptt, true);
p_hwfn           4071 drivers/net/ethernet/qlogic/qed/qed_debug.c 	if (qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_REGS)) {
p_hwfn           4078 drivers/net/ethernet/qlogic/qed/qed_debug.c 		offset += qed_grc_dump_registers(p_hwfn,
p_hwfn           4086 drivers/net/ethernet/qlogic/qed/qed_debug.c 		offset += qed_grc_dump_special_regs(p_hwfn,
p_hwfn           4092 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_grc_dump_memories(p_hwfn, p_ptt, dump_buf + offset, dump);
p_hwfn           4095 drivers/net/ethernet/qlogic/qed/qed_debug.c 	if (qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_MCP))
p_hwfn           4096 drivers/net/ethernet/qlogic/qed/qed_debug.c 		offset += qed_grc_dump_mcp(p_hwfn,
p_hwfn           4100 drivers/net/ethernet/qlogic/qed/qed_debug.c 	if (qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_CM_CTX))
p_hwfn           4101 drivers/net/ethernet/qlogic/qed/qed_debug.c 		offset += qed_grc_dump_ctx(p_hwfn,
p_hwfn           4105 drivers/net/ethernet/qlogic/qed/qed_debug.c 	if (qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_RSS))
p_hwfn           4106 drivers/net/ethernet/qlogic/qed/qed_debug.c 		offset += qed_grc_dump_rss(p_hwfn,
p_hwfn           4111 drivers/net/ethernet/qlogic/qed/qed_debug.c 		if (qed_grc_is_included(p_hwfn, s_big_ram_defs[i].grc_param))
p_hwfn           4112 drivers/net/ethernet/qlogic/qed/qed_debug.c 			offset += qed_grc_dump_big_ram(p_hwfn,
p_hwfn           4118 drivers/net/ethernet/qlogic/qed/qed_debug.c 	if (qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_IOR))
p_hwfn           4119 drivers/net/ethernet/qlogic/qed/qed_debug.c 		offset += qed_grc_dump_iors(p_hwfn,
p_hwfn           4123 drivers/net/ethernet/qlogic/qed/qed_debug.c 	if (qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_VFC))
p_hwfn           4124 drivers/net/ethernet/qlogic/qed/qed_debug.c 		offset += qed_grc_dump_vfc(p_hwfn,
p_hwfn           4128 drivers/net/ethernet/qlogic/qed/qed_debug.c 	if (qed_grc_is_included(p_hwfn,
p_hwfn           4131 drivers/net/ethernet/qlogic/qed/qed_debug.c 		offset += qed_grc_dump_phy(p_hwfn,
p_hwfn           4135 drivers/net/ethernet/qlogic/qed/qed_debug.c 	if (qed_grc_is_included(p_hwfn,
p_hwfn           4138 drivers/net/ethernet/qlogic/qed/qed_debug.c 		offset += qed_grc_dump_static_debug(p_hwfn,
p_hwfn           4147 drivers/net/ethernet/qlogic/qed/qed_debug.c 		if (qed_grc_get_param(p_hwfn, DBG_GRC_PARAM_UNSTALL))
p_hwfn           4148 drivers/net/ethernet/qlogic/qed/qed_debug.c 			qed_grc_stall_storms(p_hwfn, p_ptt, false);
p_hwfn           4151 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_grc_clear_all_prty(p_hwfn, p_ptt);
p_hwfn           4155 drivers/net/ethernet/qlogic/qed/qed_debug.c 			qed_mcp_mask_parities(p_hwfn, p_ptt, 0);
p_hwfn           4166 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_idle_chk_dump_failure(struct qed_hwfn *p_hwfn,
p_hwfn           4175 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           4243 drivers/net/ethernet/qlogic/qed/qed_debug.c 			DP_NOTICE(p_hwfn, "Invalid block_id\n");
p_hwfn           4264 drivers/net/ethernet/qlogic/qed/qed_debug.c 					qed_is_mode_match(p_hwfn,
p_hwfn           4286 drivers/net/ethernet/qlogic/qed/qed_debug.c 			offset += qed_grc_dump_addr_range(p_hwfn,
p_hwfn           4301 drivers/net/ethernet/qlogic/qed/qed_debug.c qed_idle_chk_dump_rule_entries(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
p_hwfn           4306 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           4341 drivers/net/ethernet/qlogic/qed/qed_debug.c 				DP_NOTICE(p_hwfn, "Invalid block_id\n");
p_hwfn           4355 drivers/net/ethernet/qlogic/qed/qed_debug.c 				qed_idle_chk_dump_failure(p_hwfn,
p_hwfn           4404 drivers/net/ethernet/qlogic/qed/qed_debug.c 					DP_NOTICE(p_hwfn,
p_hwfn           4410 drivers/net/ethernet/qlogic/qed/qed_debug.c 				    qed_grc_dump_addr_range(p_hwfn, p_ptt,
p_hwfn           4424 drivers/net/ethernet/qlogic/qed/qed_debug.c 				offset += qed_idle_chk_dump_failure(p_hwfn,
p_hwfn           4443 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_idle_chk_dump(struct qed_hwfn *p_hwfn,
p_hwfn           4450 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_dump_common_global_params(p_hwfn,
p_hwfn           4478 drivers/net/ethernet/qlogic/qed/qed_debug.c 			mode_match = qed_is_mode_match(p_hwfn,
p_hwfn           4484 drivers/net/ethernet/qlogic/qed/qed_debug.c 			    qed_idle_chk_dump_rule_entries(p_hwfn,
p_hwfn           4511 drivers/net/ethernet/qlogic/qed/qed_debug.c static enum dbg_status qed_find_nvram_image(struct qed_hwfn *p_hwfn,
p_hwfn           4522 drivers/net/ethernet/qlogic/qed/qed_debug.c 	nvm_result = qed_mcp_nvm_rd_cmd(p_hwfn,
p_hwfn           4539 drivers/net/ethernet/qlogic/qed/qed_debug.c 	DP_VERBOSE(p_hwfn,
p_hwfn           4552 drivers/net/ethernet/qlogic/qed/qed_debug.c static enum dbg_status qed_nvram_read(struct qed_hwfn *p_hwfn,
p_hwfn           4561 drivers/net/ethernet/qlogic/qed/qed_debug.c 	DP_VERBOSE(p_hwfn,
p_hwfn           4572 drivers/net/ethernet/qlogic/qed/qed_debug.c 		if (qed_mcp_nvm_rd_cmd(p_hwfn, p_ptt,
p_hwfn           4599 drivers/net/ethernet/qlogic/qed/qed_debug.c static enum dbg_status qed_mcp_trace_get_data_info(struct qed_hwfn *p_hwfn,
p_hwfn           4607 drivers/net/ethernet/qlogic/qed/qed_debug.c 	spad_trace_offsize = qed_rd(p_hwfn, p_ptt, MCP_SPAD_TRACE_OFFSIZE_ADDR);
p_hwfn           4614 drivers/net/ethernet/qlogic/qed/qed_debug.c 	signature = qed_rd(p_hwfn, p_ptt,
p_hwfn           4622 drivers/net/ethernet/qlogic/qed/qed_debug.c 	*trace_data_size = qed_rd(p_hwfn,
p_hwfn           4636 drivers/net/ethernet/qlogic/qed/qed_debug.c static enum dbg_status qed_mcp_trace_get_meta_info(struct qed_hwfn *p_hwfn,
p_hwfn           4646 drivers/net/ethernet/qlogic/qed/qed_debug.c 	spad_trace_offsize = qed_rd(p_hwfn, p_ptt, MCP_SPAD_TRACE_OFFSIZE_ADDR);
p_hwfn           4652 drivers/net/ethernet/qlogic/qed/qed_debug.c 	*running_bundle_id = qed_rd(p_hwfn, p_ptt, running_mfw_addr);
p_hwfn           4660 drivers/net/ethernet/qlogic/qed/qed_debug.c 	return qed_find_nvram_image(p_hwfn,
p_hwfn           4667 drivers/net/ethernet/qlogic/qed/qed_debug.c static enum dbg_status qed_mcp_trace_read_meta(struct qed_hwfn *p_hwfn,
p_hwfn           4677 drivers/net/ethernet/qlogic/qed/qed_debug.c 	status = qed_nvram_read(p_hwfn,
p_hwfn           4708 drivers/net/ethernet/qlogic/qed/qed_debug.c static enum dbg_status qed_mcp_trace_dump(struct qed_hwfn *p_hwfn,
p_hwfn           4722 drivers/net/ethernet/qlogic/qed/qed_debug.c 	mcp_access = !qed_grc_get_param(p_hwfn, DBG_GRC_PARAM_NO_MCP);
p_hwfn           4725 drivers/net/ethernet/qlogic/qed/qed_debug.c 	status = qed_mcp_trace_get_data_info(p_hwfn,
p_hwfn           4733 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_dump_common_global_params(p_hwfn,
p_hwfn           4744 drivers/net/ethernet/qlogic/qed/qed_debug.c 		halted = !qed_mcp_halt(p_hwfn, p_ptt);
p_hwfn           4746 drivers/net/ethernet/qlogic/qed/qed_debug.c 			DP_NOTICE(p_hwfn, "MCP halt failed!\n");
p_hwfn           4761 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_grc_dump_addr_range(p_hwfn,
p_hwfn           4770 drivers/net/ethernet/qlogic/qed/qed_debug.c 	if (halted && qed_mcp_resume(p_hwfn, p_ptt))
p_hwfn           4771 drivers/net/ethernet/qlogic/qed/qed_debug.c 		DP_NOTICE(p_hwfn, "Failed to resume MCP after halt!\n");
p_hwfn           4782 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_grc_get_param(p_hwfn, DBG_GRC_PARAM_MCP_TRACE_META_SIZE);
p_hwfn           4784 drivers/net/ethernet/qlogic/qed/qed_debug.c 		status = qed_mcp_trace_get_meta_info(p_hwfn,
p_hwfn           4801 drivers/net/ethernet/qlogic/qed/qed_debug.c 		status = qed_mcp_trace_read_meta(p_hwfn,
p_hwfn           4821 drivers/net/ethernet/qlogic/qed/qed_debug.c static enum dbg_status qed_reg_fifo_dump(struct qed_hwfn *p_hwfn,
p_hwfn           4832 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_dump_common_global_params(p_hwfn,
p_hwfn           4854 drivers/net/ethernet/qlogic/qed/qed_debug.c 	fifo_has_data = qed_rd(p_hwfn, p_ptt,
p_hwfn           4867 drivers/net/ethernet/qlogic/qed/qed_debug.c 		offset += qed_grc_dump_addr_range(p_hwfn,
p_hwfn           4875 drivers/net/ethernet/qlogic/qed/qed_debug.c 		fifo_has_data = qed_rd(p_hwfn, p_ptt,
p_hwfn           4891 drivers/net/ethernet/qlogic/qed/qed_debug.c static enum dbg_status qed_igu_fifo_dump(struct qed_hwfn *p_hwfn,
p_hwfn           4902 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_dump_common_global_params(p_hwfn,
p_hwfn           4924 drivers/net/ethernet/qlogic/qed/qed_debug.c 	fifo_has_data = qed_rd(p_hwfn, p_ptt,
p_hwfn           4937 drivers/net/ethernet/qlogic/qed/qed_debug.c 		offset += qed_grc_dump_addr_range(p_hwfn,
p_hwfn           4945 drivers/net/ethernet/qlogic/qed/qed_debug.c 		fifo_has_data = qed_rd(p_hwfn, p_ptt,
p_hwfn           4961 drivers/net/ethernet/qlogic/qed/qed_debug.c static enum dbg_status qed_protection_override_dump(struct qed_hwfn *p_hwfn,
p_hwfn           4972 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_dump_common_global_params(p_hwfn,
p_hwfn           4993 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_rd(p_hwfn, p_ptt, GRC_REG_NUMBER_VALID_OVERRIDE_WINDOW) *
p_hwfn           4996 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_grc_dump_addr_range(p_hwfn,
p_hwfn           5017 drivers/net/ethernet/qlogic/qed/qed_debug.c static u32 qed_fw_asserts_dump(struct qed_hwfn *p_hwfn,
p_hwfn           5020 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           5028 drivers/net/ethernet/qlogic/qed/qed_debug.c 	offset += qed_dump_common_global_params(p_hwfn,
p_hwfn           5044 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_read_storm_fw_info(p_hwfn, p_ptt, storm_id, &fw_info);
p_hwfn           5070 drivers/net/ethernet/qlogic/qed/qed_debug.c 		next_list_idx = qed_rd(p_hwfn, p_ptt, next_list_idx_addr);
p_hwfn           5078 drivers/net/ethernet/qlogic/qed/qed_debug.c 		    qed_grc_dump_addr_range(p_hwfn, p_ptt,
p_hwfn           5109 drivers/net/ethernet/qlogic/qed/qed_debug.c bool qed_read_fw_info(struct qed_hwfn *p_hwfn,
p_hwfn           5112 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           5123 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_read_storm_fw_info(p_hwfn, p_ptt, storm_id, fw_info);
p_hwfn           5131 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_dbg_grc_config(struct qed_hwfn *p_hwfn,
p_hwfn           5138 drivers/net/ethernet/qlogic/qed/qed_debug.c 	DP_VERBOSE(p_hwfn, QED_MSG_DEBUG,
p_hwfn           5141 drivers/net/ethernet/qlogic/qed/qed_debug.c 	status = qed_dbg_dev_init(p_hwfn, p_ptt);
p_hwfn           5148 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_dbg_grc_init_params(p_hwfn);
p_hwfn           5183 drivers/net/ethernet/qlogic/qed/qed_debug.c 			qed_grc_set_param(p_hwfn,
p_hwfn           5188 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_grc_set_param(p_hwfn, grc_param, val);
p_hwfn           5195 drivers/net/ethernet/qlogic/qed/qed_debug.c void qed_dbg_grc_set_params_default(struct qed_hwfn *p_hwfn)
p_hwfn           5197 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           5206 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_dbg_grc_get_dump_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           5210 drivers/net/ethernet/qlogic/qed/qed_debug.c 	enum dbg_status status = qed_dbg_dev_init(p_hwfn, p_ptt);
p_hwfn           5224 drivers/net/ethernet/qlogic/qed/qed_debug.c 	return qed_grc_dump(p_hwfn, p_ptt, NULL, false, buf_size);
p_hwfn           5227 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_dbg_grc_dump(struct qed_hwfn *p_hwfn,
p_hwfn           5238 drivers/net/ethernet/qlogic/qed/qed_debug.c 	status = qed_dbg_grc_get_dump_buf_size(p_hwfn,
p_hwfn           5248 drivers/net/ethernet/qlogic/qed/qed_debug.c 	status = qed_grc_dump(p_hwfn, p_ptt, dump_buf, true, num_dumped_dwords);
p_hwfn           5251 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_dbg_grc_set_params_default(p_hwfn);
p_hwfn           5256 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_dbg_idle_chk_get_dump_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           5260 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           5267 drivers/net/ethernet/qlogic/qed/qed_debug.c 	status = qed_dbg_dev_init(p_hwfn, p_ptt);
p_hwfn           5278 drivers/net/ethernet/qlogic/qed/qed_debug.c 		idle_chk->buf_size = qed_idle_chk_dump(p_hwfn,
p_hwfn           5288 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_dbg_idle_chk_dump(struct qed_hwfn *p_hwfn,
p_hwfn           5299 drivers/net/ethernet/qlogic/qed/qed_debug.c 	status = qed_dbg_idle_chk_get_dump_buf_size(p_hwfn,
p_hwfn           5309 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_update_blocks_reset_state(p_hwfn, p_ptt);
p_hwfn           5312 drivers/net/ethernet/qlogic/qed/qed_debug.c 	*num_dumped_dwords = qed_idle_chk_dump(p_hwfn, p_ptt, dump_buf, true);
p_hwfn           5315 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_dbg_grc_set_params_default(p_hwfn);
p_hwfn           5320 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_dbg_mcp_trace_get_dump_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           5324 drivers/net/ethernet/qlogic/qed/qed_debug.c 	enum dbg_status status = qed_dbg_dev_init(p_hwfn, p_ptt);
p_hwfn           5331 drivers/net/ethernet/qlogic/qed/qed_debug.c 	return qed_mcp_trace_dump(p_hwfn, p_ptt, NULL, false, buf_size);
p_hwfn           5334 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_dbg_mcp_trace_dump(struct qed_hwfn *p_hwfn,
p_hwfn           5344 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_dbg_mcp_trace_get_dump_buf_size(p_hwfn,
p_hwfn           5355 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_update_blocks_reset_state(p_hwfn, p_ptt);
p_hwfn           5358 drivers/net/ethernet/qlogic/qed/qed_debug.c 	status = qed_mcp_trace_dump(p_hwfn,
p_hwfn           5362 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_dbg_grc_set_params_default(p_hwfn);
p_hwfn           5367 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_dbg_reg_fifo_get_dump_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           5371 drivers/net/ethernet/qlogic/qed/qed_debug.c 	enum dbg_status status = qed_dbg_dev_init(p_hwfn, p_ptt);
p_hwfn           5378 drivers/net/ethernet/qlogic/qed/qed_debug.c 	return qed_reg_fifo_dump(p_hwfn, p_ptt, NULL, false, buf_size);
p_hwfn           5381 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_dbg_reg_fifo_dump(struct qed_hwfn *p_hwfn,
p_hwfn           5392 drivers/net/ethernet/qlogic/qed/qed_debug.c 	status = qed_dbg_reg_fifo_get_dump_buf_size(p_hwfn,
p_hwfn           5402 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_update_blocks_reset_state(p_hwfn, p_ptt);
p_hwfn           5404 drivers/net/ethernet/qlogic/qed/qed_debug.c 	status = qed_reg_fifo_dump(p_hwfn,
p_hwfn           5408 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_dbg_grc_set_params_default(p_hwfn);
p_hwfn           5413 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_dbg_igu_fifo_get_dump_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           5417 drivers/net/ethernet/qlogic/qed/qed_debug.c 	enum dbg_status status = qed_dbg_dev_init(p_hwfn, p_ptt);
p_hwfn           5424 drivers/net/ethernet/qlogic/qed/qed_debug.c 	return qed_igu_fifo_dump(p_hwfn, p_ptt, NULL, false, buf_size);
p_hwfn           5427 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_dbg_igu_fifo_dump(struct qed_hwfn *p_hwfn,
p_hwfn           5438 drivers/net/ethernet/qlogic/qed/qed_debug.c 	status = qed_dbg_igu_fifo_get_dump_buf_size(p_hwfn,
p_hwfn           5448 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_update_blocks_reset_state(p_hwfn, p_ptt);
p_hwfn           5450 drivers/net/ethernet/qlogic/qed/qed_debug.c 	status = qed_igu_fifo_dump(p_hwfn,
p_hwfn           5453 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_dbg_grc_set_params_default(p_hwfn);
p_hwfn           5459 drivers/net/ethernet/qlogic/qed/qed_debug.c qed_dbg_protection_override_get_dump_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           5463 drivers/net/ethernet/qlogic/qed/qed_debug.c 	enum dbg_status status = qed_dbg_dev_init(p_hwfn, p_ptt);
p_hwfn           5470 drivers/net/ethernet/qlogic/qed/qed_debug.c 	return qed_protection_override_dump(p_hwfn,
p_hwfn           5474 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_dbg_protection_override_dump(struct qed_hwfn *p_hwfn,
p_hwfn           5486 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_dbg_protection_override_get_dump_buf_size(p_hwfn,
p_hwfn           5496 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_update_blocks_reset_state(p_hwfn, p_ptt);
p_hwfn           5498 drivers/net/ethernet/qlogic/qed/qed_debug.c 	status = qed_protection_override_dump(p_hwfn,
p_hwfn           5504 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_dbg_grc_set_params_default(p_hwfn);
p_hwfn           5509 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_dbg_fw_asserts_get_dump_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           5513 drivers/net/ethernet/qlogic/qed/qed_debug.c 	enum dbg_status status = qed_dbg_dev_init(p_hwfn, p_ptt);
p_hwfn           5521 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_update_blocks_reset_state(p_hwfn, p_ptt);
p_hwfn           5523 drivers/net/ethernet/qlogic/qed/qed_debug.c 	*buf_size = qed_fw_asserts_dump(p_hwfn, p_ptt, NULL, false);
p_hwfn           5528 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_dbg_fw_asserts_dump(struct qed_hwfn *p_hwfn,
p_hwfn           5540 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_dbg_fw_asserts_get_dump_buf_size(p_hwfn,
p_hwfn           5549 drivers/net/ethernet/qlogic/qed/qed_debug.c 	*num_dumped_dwords = qed_fw_asserts_dump(p_hwfn, p_ptt, dump_buf, true);
p_hwfn           5552 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_dbg_grc_set_params_default(p_hwfn);
p_hwfn           5557 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_dbg_read_attn(struct qed_hwfn *p_hwfn,
p_hwfn           5564 drivers/net/ethernet/qlogic/qed/qed_debug.c 	enum dbg_status status = qed_dbg_dev_init(p_hwfn, p_ptt);
p_hwfn           5591 drivers/net/ethernet/qlogic/qed/qed_debug.c 		if (eval_mode && !qed_is_mode_match(p_hwfn, &modes_buf_offset))
p_hwfn           5599 drivers/net/ethernet/qlogic/qed/qed_debug.c 		sts_val = qed_rd(p_hwfn, p_ptt, sts_addr);
p_hwfn           5612 drivers/net/ethernet/qlogic/qed/qed_debug.c 		reg_result->mask_val = qed_rd(p_hwfn,
p_hwfn           6361 drivers/net/ethernet/qlogic/qed/qed_debug.c qed_dbg_get_user_data(struct qed_hwfn *p_hwfn)
p_hwfn           6363 drivers/net/ethernet/qlogic/qed/qed_debug.c 	return (struct dbg_tools_user_data *)p_hwfn->dbg_user_info;
p_hwfn           6630 drivers/net/ethernet/qlogic/qed/qed_debug.c qed_mcp_trace_alloc_meta_data(struct qed_hwfn *p_hwfn,
p_hwfn           6638 drivers/net/ethernet/qlogic/qed/qed_debug.c 	dev_user_data = qed_dbg_get_user_data(p_hwfn);
p_hwfn           6644 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_mcp_trace_free_meta_data(p_hwfn);
p_hwfn           6727 drivers/net/ethernet/qlogic/qed/qed_debug.c static enum dbg_status qed_parse_mcp_trace_buf(struct qed_hwfn *p_hwfn,
p_hwfn           6740 drivers/net/ethernet/qlogic/qed/qed_debug.c 	dev_user_data = qed_dbg_get_user_data(p_hwfn);
p_hwfn           6850 drivers/net/ethernet/qlogic/qed/qed_debug.c static enum dbg_status qed_parse_mcp_trace_dump(struct qed_hwfn *p_hwfn,
p_hwfn           6914 drivers/net/ethernet/qlogic/qed/qed_debug.c 			qed_dbg_get_user_data(p_hwfn);
p_hwfn           6926 drivers/net/ethernet/qlogic/qed/qed_debug.c 	status = qed_mcp_trace_alloc_meta_data(p_hwfn, meta_buf);
p_hwfn           6930 drivers/net/ethernet/qlogic/qed/qed_debug.c 	status = qed_parse_mcp_trace_buf(p_hwfn,
p_hwfn           6943 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_mcp_trace_free_meta_data(p_hwfn);
p_hwfn           7417 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_dbg_alloc_user_data(struct qed_hwfn *p_hwfn)
p_hwfn           7419 drivers/net/ethernet/qlogic/qed/qed_debug.c 	p_hwfn->dbg_user_info = kzalloc(sizeof(struct dbg_tools_user_data),
p_hwfn           7421 drivers/net/ethernet/qlogic/qed/qed_debug.c 	if (!p_hwfn->dbg_user_info)
p_hwfn           7433 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_get_idle_chk_results_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           7447 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_print_idle_chk_results(struct qed_hwfn *p_hwfn,
p_hwfn           7463 drivers/net/ethernet/qlogic/qed/qed_debug.c void qed_dbg_mcp_trace_set_meta_data(struct qed_hwfn *p_hwfn,
p_hwfn           7467 drivers/net/ethernet/qlogic/qed/qed_debug.c 		qed_dbg_get_user_data(p_hwfn);
p_hwfn           7472 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_get_mcp_trace_results_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           7477 drivers/net/ethernet/qlogic/qed/qed_debug.c 	return qed_parse_mcp_trace_dump(p_hwfn,
p_hwfn           7481 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_print_mcp_trace_results(struct qed_hwfn *p_hwfn,
p_hwfn           7488 drivers/net/ethernet/qlogic/qed/qed_debug.c 	return qed_parse_mcp_trace_dump(p_hwfn,
p_hwfn           7493 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_print_mcp_trace_results_cont(struct qed_hwfn *p_hwfn,
p_hwfn           7499 drivers/net/ethernet/qlogic/qed/qed_debug.c 	return qed_parse_mcp_trace_dump(p_hwfn, dump_buf, results_buf,
p_hwfn           7503 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_print_mcp_trace_line(struct qed_hwfn *p_hwfn,
p_hwfn           7510 drivers/net/ethernet/qlogic/qed/qed_debug.c 	return qed_parse_mcp_trace_buf(p_hwfn,
p_hwfn           7519 drivers/net/ethernet/qlogic/qed/qed_debug.c void qed_mcp_trace_free_meta_data(struct qed_hwfn *p_hwfn)
p_hwfn           7525 drivers/net/ethernet/qlogic/qed/qed_debug.c 	dev_user_data = qed_dbg_get_user_data(p_hwfn);
p_hwfn           7547 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_get_reg_fifo_results_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           7555 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_print_reg_fifo_results(struct qed_hwfn *p_hwfn,
p_hwfn           7565 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_get_igu_fifo_results_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           7573 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_print_igu_fifo_results(struct qed_hwfn *p_hwfn,
p_hwfn           7584 drivers/net/ethernet/qlogic/qed/qed_debug.c qed_get_protection_override_results_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           7593 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_print_protection_override_results(struct qed_hwfn *p_hwfn,
p_hwfn           7605 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_get_fw_asserts_results_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           7613 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_print_fw_asserts_results(struct qed_hwfn *p_hwfn,
p_hwfn           7624 drivers/net/ethernet/qlogic/qed/qed_debug.c enum dbg_status qed_dbg_parse_attn(struct qed_hwfn *p_hwfn,
p_hwfn           7695 drivers/net/ethernet/qlogic/qed/qed_debug.c 			DP_NOTICE(p_hwfn,
p_hwfn           7709 drivers/net/ethernet/qlogic/qed/qed_debug.c qed_print_idle_chk_results_wrapper(struct qed_hwfn *p_hwfn,
p_hwfn           7716 drivers/net/ethernet/qlogic/qed/qed_debug.c 	return qed_print_idle_chk_results(p_hwfn, dump_buf, num_dumped_dwords,
p_hwfn           7724 drivers/net/ethernet/qlogic/qed/qed_debug.c 	enum dbg_status (*get_size)(struct qed_hwfn *p_hwfn,
p_hwfn           7726 drivers/net/ethernet/qlogic/qed/qed_debug.c 	enum dbg_status (*perform_dump)(struct qed_hwfn *p_hwfn,
p_hwfn           7729 drivers/net/ethernet/qlogic/qed/qed_debug.c 	enum dbg_status (*print_results)(struct qed_hwfn *p_hwfn,
p_hwfn           7732 drivers/net/ethernet/qlogic/qed/qed_debug.c 	enum dbg_status (*results_buf_size)(struct qed_hwfn *p_hwfn,
p_hwfn           7783 drivers/net/ethernet/qlogic/qed/qed_debug.c static enum dbg_status format_feature(struct qed_hwfn *p_hwfn,
p_hwfn           7787 drivers/net/ethernet/qlogic/qed/qed_debug.c 	    &p_hwfn->cdev->dbg_params.features[feature_idx];
p_hwfn           7798 drivers/net/ethernet/qlogic/qed/qed_debug.c 		results_buf_size(p_hwfn, (u32 *)feature->dump_buf,
p_hwfn           7808 drivers/net/ethernet/qlogic/qed/qed_debug.c 		DP_NOTICE(p_hwfn->cdev,
p_hwfn           7821 drivers/net/ethernet/qlogic/qed/qed_debug.c 		print_results(p_hwfn, (u32 *)feature->dump_buf,
p_hwfn           7836 drivers/net/ethernet/qlogic/qed/qed_debug.c 	if (p_hwfn->cdev->dbg_params.print_data)
p_hwfn           7850 drivers/net/ethernet/qlogic/qed/qed_debug.c static enum dbg_status qed_dbg_dump(struct qed_hwfn *p_hwfn,
p_hwfn           7855 drivers/net/ethernet/qlogic/qed/qed_debug.c 	    &p_hwfn->cdev->dbg_params.features[feature_idx];
p_hwfn           7859 drivers/net/ethernet/qlogic/qed/qed_debug.c 	DP_NOTICE(p_hwfn->cdev, "Collecting a debug feature [\"%s\"]\n",
p_hwfn           7874 drivers/net/ethernet/qlogic/qed/qed_debug.c 	rc = qed_features_lookup[feature_idx].get_size(p_hwfn, p_ptt,
p_hwfn           7884 drivers/net/ethernet/qlogic/qed/qed_debug.c 		perform_dump(p_hwfn, p_ptt, (u32 *)feature->dump_buf,
p_hwfn           7901 drivers/net/ethernet/qlogic/qed/qed_debug.c 	rc = format_feature(p_hwfn, feature_idx);
p_hwfn           7948 drivers/net/ethernet/qlogic/qed/qed_debug.c static int qed_dbg_nvm_image_length(struct qed_hwfn *p_hwfn,
p_hwfn           7955 drivers/net/ethernet/qlogic/qed/qed_debug.c 	rc = qed_mcp_get_nvm_image_att(p_hwfn, image_id, &image_att);
p_hwfn           7968 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct qed_hwfn *p_hwfn =
p_hwfn           7975 drivers/net/ethernet/qlogic/qed/qed_debug.c 	rc = qed_dbg_nvm_image_length(p_hwfn, image_id, &len_rounded);
p_hwfn           7979 drivers/net/ethernet/qlogic/qed/qed_debug.c 	DP_NOTICE(p_hwfn->cdev,
p_hwfn           7984 drivers/net/ethernet/qlogic/qed/qed_debug.c 	rc = qed_mcp_get_nvm_image(p_hwfn, image_id, buffer, len_rounded);
p_hwfn           8072 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct qed_hwfn *p_hwfn =
p_hwfn           8074 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
p_hwfn           8251 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct qed_hwfn *p_hwfn =
p_hwfn           8276 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_dbg_nvm_image_length(p_hwfn, QED_NVM_IMAGE_NVM_CFG1, &image_len);
p_hwfn           8279 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_dbg_nvm_image_length(p_hwfn, QED_NVM_IMAGE_DEFAULT_CFG, &image_len);
p_hwfn           8282 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_dbg_nvm_image_length(p_hwfn, QED_NVM_IMAGE_NVM_META, &image_len);
p_hwfn           8292 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct qed_hwfn *p_hwfn =
p_hwfn           8301 drivers/net/ethernet/qlogic/qed/qed_debug.c 	p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           8306 drivers/net/ethernet/qlogic/qed/qed_debug.c 	dbg_rc = qed_dbg_dump(p_hwfn, p_ptt, feature);
p_hwfn           8322 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           8328 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct qed_hwfn *p_hwfn =
p_hwfn           8330 drivers/net/ethernet/qlogic/qed/qed_debug.c 	struct qed_ptt *p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           8339 drivers/net/ethernet/qlogic/qed/qed_debug.c 	rc = qed_features_lookup[feature].get_size(p_hwfn, p_ptt,
p_hwfn           8344 drivers/net/ethernet/qlogic/qed/qed_debug.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn             87 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_db_recovery_dp_entry(struct qed_hwfn *p_hwfn,
p_hwfn             91 drivers/net/ethernet/qlogic/qed/qed_dev.c 	DP_VERBOSE(p_hwfn,
p_hwfn            136 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_hwfn *p_hwfn;
p_hwfn            140 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn = db_addr < cdev->hwfns[1].doorbells ?
p_hwfn            143 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn            145 drivers/net/ethernet/qlogic/qed/qed_dev.c 	return p_hwfn;
p_hwfn            156 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_hwfn *p_hwfn;
p_hwfn            170 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn = qed_db_rec_find_hwfn(cdev, db_addr);
p_hwfn            184 drivers/net/ethernet/qlogic/qed/qed_dev.c 	db_entry->hwfn_idx = p_hwfn->my_id;
p_hwfn            187 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_db_recovery_dp_entry(p_hwfn, db_entry, "Adding");
p_hwfn            190 drivers/net/ethernet/qlogic/qed/qed_dev.c 	spin_lock_bh(&p_hwfn->db_recovery_info.lock);
p_hwfn            191 drivers/net/ethernet/qlogic/qed/qed_dev.c 	list_add_tail(&db_entry->list_entry, &p_hwfn->db_recovery_info.list);
p_hwfn            192 drivers/net/ethernet/qlogic/qed/qed_dev.c 	spin_unlock_bh(&p_hwfn->db_recovery_info.lock);
p_hwfn            202 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_hwfn *p_hwfn;
p_hwfn            213 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn = qed_db_rec_find_hwfn(cdev, db_addr);
p_hwfn            216 drivers/net/ethernet/qlogic/qed/qed_dev.c 	spin_lock_bh(&p_hwfn->db_recovery_info.lock);
p_hwfn            218 drivers/net/ethernet/qlogic/qed/qed_dev.c 			    &p_hwfn->db_recovery_info.list, list_entry) {
p_hwfn            221 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_db_recovery_dp_entry(p_hwfn, db_entry, "Deleting");
p_hwfn            228 drivers/net/ethernet/qlogic/qed/qed_dev.c 	spin_unlock_bh(&p_hwfn->db_recovery_info.lock);
p_hwfn            232 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn,
p_hwfn            242 drivers/net/ethernet/qlogic/qed/qed_dev.c static int qed_db_recovery_setup(struct qed_hwfn *p_hwfn)
p_hwfn            244 drivers/net/ethernet/qlogic/qed/qed_dev.c 	DP_VERBOSE(p_hwfn, QED_MSG_SPQ, "Setting up db recovery\n");
p_hwfn            247 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (!p_hwfn->cdev->db_size) {
p_hwfn            248 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_ERR(p_hwfn->cdev, "db_size not set\n");
p_hwfn            252 drivers/net/ethernet/qlogic/qed/qed_dev.c 	INIT_LIST_HEAD(&p_hwfn->db_recovery_info.list);
p_hwfn            253 drivers/net/ethernet/qlogic/qed/qed_dev.c 	spin_lock_init(&p_hwfn->db_recovery_info.lock);
p_hwfn            254 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->db_recovery_info.db_recovery_counter = 0;
p_hwfn            260 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_db_recovery_teardown(struct qed_hwfn *p_hwfn)
p_hwfn            264 drivers/net/ethernet/qlogic/qed/qed_dev.c 	DP_VERBOSE(p_hwfn, QED_MSG_SPQ, "Tearing down db recovery\n");
p_hwfn            265 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (!list_empty(&p_hwfn->db_recovery_info.list)) {
p_hwfn            266 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_VERBOSE(p_hwfn,
p_hwfn            269 drivers/net/ethernet/qlogic/qed/qed_dev.c 		while (!list_empty(&p_hwfn->db_recovery_info.list)) {
p_hwfn            271 drivers/net/ethernet/qlogic/qed/qed_dev.c 			    list_first_entry(&p_hwfn->db_recovery_info.list,
p_hwfn            274 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_db_recovery_dp_entry(p_hwfn, db_entry, "Purging");
p_hwfn            279 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->db_recovery_info.db_recovery_counter = 0;
p_hwfn            283 drivers/net/ethernet/qlogic/qed/qed_dev.c void qed_db_recovery_dp(struct qed_hwfn *p_hwfn)
p_hwfn            287 drivers/net/ethernet/qlogic/qed/qed_dev.c 	DP_NOTICE(p_hwfn,
p_hwfn            289 drivers/net/ethernet/qlogic/qed/qed_dev.c 		  p_hwfn->db_recovery_info.db_recovery_counter);
p_hwfn            292 drivers/net/ethernet/qlogic/qed/qed_dev.c 	spin_lock_bh(&p_hwfn->db_recovery_info.lock);
p_hwfn            294 drivers/net/ethernet/qlogic/qed/qed_dev.c 			    &p_hwfn->db_recovery_info.list, list_entry) {
p_hwfn            295 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_db_recovery_dp_entry(p_hwfn, db_entry, "Printing");
p_hwfn            298 drivers/net/ethernet/qlogic/qed/qed_dev.c 	spin_unlock_bh(&p_hwfn->db_recovery_info.lock);
p_hwfn            302 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_db_recovery_ring(struct qed_hwfn *p_hwfn,
p_hwfn            307 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_VERBOSE(p_hwfn, QED_MSG_SPQ,
p_hwfn            312 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_VERBOSE(p_hwfn, QED_MSG_SPQ,
p_hwfn            319 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (!qed_db_rec_sanity(p_hwfn->cdev, db_entry->db_addr,
p_hwfn            344 drivers/net/ethernet/qlogic/qed/qed_dev.c void qed_db_recovery_execute(struct qed_hwfn *p_hwfn)
p_hwfn            348 drivers/net/ethernet/qlogic/qed/qed_dev.c 	DP_NOTICE(p_hwfn, "Executing doorbell recovery. Counter was %d\n",
p_hwfn            349 drivers/net/ethernet/qlogic/qed/qed_dev.c 		  p_hwfn->db_recovery_info.db_recovery_counter);
p_hwfn            352 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->db_recovery_info.db_recovery_counter++;
p_hwfn            355 drivers/net/ethernet/qlogic/qed/qed_dev.c 	spin_lock_bh(&p_hwfn->db_recovery_info.lock);
p_hwfn            357 drivers/net/ethernet/qlogic/qed/qed_dev.c 			    &p_hwfn->db_recovery_info.list, list_entry)
p_hwfn            358 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_db_recovery_ring(p_hwfn, db_entry);
p_hwfn            359 drivers/net/ethernet/qlogic/qed/qed_dev.c 	spin_unlock_bh(&p_hwfn->db_recovery_info.lock);
p_hwfn            665 drivers/net/ethernet/qlogic/qed/qed_dev.c qed_llh_set_engine_affin(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn            667 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn            672 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_mcp_get_engine_config(p_hwfn, p_ptt);
p_hwfn            674 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn,
p_hwfn            680 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (QED_IS_ROCE_PERSONALITY(p_hwfn)) {
p_hwfn            696 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (QED_IS_FCOE_PERSONALITY(p_hwfn) || QED_IS_ISCSI_PERSONALITY(p_hwfn))
p_hwfn            718 drivers/net/ethernet/qlogic/qed/qed_dev.c static int qed_llh_hw_init_pf(struct qed_hwfn *p_hwfn,
p_hwfn            721 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn            733 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, addr, p_hwfn->rel_pf_id);
p_hwfn            737 drivers/net/ethernet/qlogic/qed/qed_dev.c 	    !QED_IS_FCOE_PERSONALITY(p_hwfn)) {
p_hwfn            739 drivers/net/ethernet/qlogic/qed/qed_dev.c 					    p_hwfn->hw_info.hw_mac_addr);
p_hwfn            746 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_llh_set_engine_affin(p_hwfn, p_ptt);
p_hwfn            766 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn            767 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_ptt *p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn            799 drivers/net/ethernet/qlogic/qed/qed_dev.c 	val = qed_rd(p_hwfn, p_ptt, addr);
p_hwfn            801 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_wr(p_hwfn, p_ptt, addr, val);
p_hwfn            804 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (!ppfid && QED_IS_IWARP_PERSONALITY(p_hwfn))
p_hwfn            807 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn            814 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn            815 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_ptt *p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn            835 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, NIG_REG_LLH_ENG_CLS_ROCE_QP_SEL,
p_hwfn            850 drivers/net/ethernet/qlogic/qed/qed_dev.c 		val = qed_rd(p_hwfn, p_ptt, addr);
p_hwfn            852 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, addr, val);
p_hwfn            855 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn            869 drivers/net/ethernet/qlogic/qed/qed_dev.c qed_llh_access_filter(struct qed_hwfn *p_hwfn,
p_hwfn            888 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (QED_IS_BB(p_hwfn->cdev))
p_hwfn            891 drivers/net/ethernet/qlogic/qed/qed_dev.c 		pfid = abs_ppfid * p_hwfn->cdev->num_ports_in_engine +
p_hwfn            892 drivers/net/ethernet/qlogic/qed/qed_dev.c 		    MFW_PORT(p_hwfn);
p_hwfn            896 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_fid_pretend(p_hwfn, p_ptt,
p_hwfn            900 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, addr, p_details->enable);
p_hwfn            902 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_fid_pretend(p_hwfn, p_ptt,
p_hwfn            903 drivers/net/ethernet/qlogic/qed/qed_dev.c 				p_hwfn->rel_pf_id <<
p_hwfn            912 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_dmae_host2grc(p_hwfn,
p_hwfn            920 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_fid_pretend(p_hwfn, p_ptt,
p_hwfn            925 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_wr(p_hwfn, p_ptt, addr, p_details->mode);
p_hwfn            929 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_wr(p_hwfn, p_ptt, addr, p_details->protocol_type);
p_hwfn            933 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_wr(p_hwfn, p_ptt, addr, p_details->hdr_sel);
p_hwfn            938 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, addr, p_details->enable);
p_hwfn            941 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_fid_pretend(p_hwfn, p_ptt,
p_hwfn            942 drivers/net/ethernet/qlogic/qed/qed_dev.c 			p_hwfn->rel_pf_id <<
p_hwfn            949 drivers/net/ethernet/qlogic/qed/qed_dev.c qed_llh_add_filter(struct qed_hwfn *p_hwfn,
p_hwfn            963 drivers/net/ethernet/qlogic/qed/qed_dev.c 	return qed_llh_access_filter(p_hwfn, p_ptt, abs_ppfid, filter_idx,
p_hwfn            968 drivers/net/ethernet/qlogic/qed/qed_dev.c qed_llh_remove_filter(struct qed_hwfn *p_hwfn,
p_hwfn            973 drivers/net/ethernet/qlogic/qed/qed_dev.c 	return qed_llh_access_filter(p_hwfn, p_ptt, abs_ppfid, filter_idx,
p_hwfn            980 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn            981 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_ptt *p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           1009 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_llh_add_filter(p_hwfn, p_ptt, abs_ppfid, filter_idx,
p_hwfn           1026 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           1113 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn           1114 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_ptt *p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           1155 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_llh_add_filter(p_hwfn, p_ptt, abs_ppfid,
p_hwfn           1168 drivers/net/ethernet/qlogic/qed/qed_dev.c err:	DP_NOTICE(p_hwfn,
p_hwfn           1172 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           1180 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn           1181 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_ptt *p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           1205 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_llh_remove_filter(p_hwfn, p_ptt, abs_ppfid,
p_hwfn           1222 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           1230 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn           1231 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_ptt *p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           1263 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_llh_remove_filter(p_hwfn, p_ptt, abs_ppfid,
p_hwfn           1280 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           1288 drivers/net/ethernet/qlogic/qed/qed_dev.c static u32 qed_hw_bar_size(struct qed_hwfn *p_hwfn,
p_hwfn           1295 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (IS_VF(p_hwfn->cdev))
p_hwfn           1296 drivers/net/ethernet/qlogic/qed/qed_dev.c 		return qed_vf_hw_bar_size(p_hwfn, bar_id);
p_hwfn           1298 drivers/net/ethernet/qlogic/qed/qed_dev.c 	val = qed_rd(p_hwfn, p_ptt, bar_reg);
p_hwfn           1303 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (p_hwfn->cdev->num_hwfns > 1) {
p_hwfn           1304 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_INFO(p_hwfn,
p_hwfn           1308 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_INFO(p_hwfn,
p_hwfn           1321 drivers/net/ethernet/qlogic/qed/qed_dev.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           1323 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->dp_level = dp_level;
p_hwfn           1324 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->dp_module = dp_module;
p_hwfn           1333 drivers/net/ethernet/qlogic/qed/qed_dev.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           1335 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->cdev = cdev;
p_hwfn           1336 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->my_id = i;
p_hwfn           1337 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->b_active = false;
p_hwfn           1339 drivers/net/ethernet/qlogic/qed/qed_dev.c 		mutex_init(&p_hwfn->dmae_info.mutex);
p_hwfn           1349 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_qm_info_free(struct qed_hwfn *p_hwfn)
p_hwfn           1351 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
p_hwfn           1363 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_dbg_user_data_free(struct qed_hwfn *p_hwfn)
p_hwfn           1365 drivers/net/ethernet/qlogic/qed/qed_dev.c 	kfree(p_hwfn->dbg_user_info);
p_hwfn           1366 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->dbg_user_info = NULL;
p_hwfn           1388 drivers/net/ethernet/qlogic/qed/qed_dev.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           1390 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_cxt_mngr_free(p_hwfn);
p_hwfn           1391 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_qm_info_free(p_hwfn);
p_hwfn           1392 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_spq_free(p_hwfn);
p_hwfn           1393 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_eq_free(p_hwfn);
p_hwfn           1394 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_consq_free(p_hwfn);
p_hwfn           1395 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_int_free(p_hwfn);
p_hwfn           1397 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_ll2_free(p_hwfn);
p_hwfn           1399 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (p_hwfn->hw_info.personality == QED_PCI_FCOE)
p_hwfn           1400 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_fcoe_free(p_hwfn);
p_hwfn           1402 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (p_hwfn->hw_info.personality == QED_PCI_ISCSI) {
p_hwfn           1403 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_iscsi_free(p_hwfn);
p_hwfn           1404 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_ooo_free(p_hwfn);
p_hwfn           1407 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (QED_IS_RDMA_PERSONALITY(p_hwfn))
p_hwfn           1408 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_rdma_info_free(p_hwfn);
p_hwfn           1410 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_iov_free(p_hwfn);
p_hwfn           1411 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_l2_free(p_hwfn);
p_hwfn           1412 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_dmae_info_free(p_hwfn);
p_hwfn           1413 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_dcbx_info_free(p_hwfn);
p_hwfn           1414 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_dbg_user_data_free(p_hwfn);
p_hwfn           1417 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_db_recovery_teardown(p_hwfn);
p_hwfn           1426 drivers/net/ethernet/qlogic/qed/qed_dev.c static u32 qed_get_pq_flags(struct qed_hwfn *p_hwfn)
p_hwfn           1434 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (IS_QED_SRIOV(p_hwfn->cdev))
p_hwfn           1438 drivers/net/ethernet/qlogic/qed/qed_dev.c 	switch (p_hwfn->hw_info.personality) {
p_hwfn           1450 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (IS_QED_MULTI_TC_ROCE(p_hwfn))
p_hwfn           1458 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_ERR(p_hwfn,
p_hwfn           1459 drivers/net/ethernet/qlogic/qed/qed_dev.c 		       "unknown personality %d\n", p_hwfn->hw_info.personality);
p_hwfn           1467 drivers/net/ethernet/qlogic/qed/qed_dev.c static u8 qed_init_qm_get_num_tcs(struct qed_hwfn *p_hwfn)
p_hwfn           1469 drivers/net/ethernet/qlogic/qed/qed_dev.c 	return p_hwfn->hw_info.num_hw_tc;
p_hwfn           1472 drivers/net/ethernet/qlogic/qed/qed_dev.c static u16 qed_init_qm_get_num_vfs(struct qed_hwfn *p_hwfn)
p_hwfn           1474 drivers/net/ethernet/qlogic/qed/qed_dev.c 	return IS_QED_SRIOV(p_hwfn->cdev) ?
p_hwfn           1475 drivers/net/ethernet/qlogic/qed/qed_dev.c 	       p_hwfn->cdev->p_iov_info->total_vfs : 0;
p_hwfn           1478 drivers/net/ethernet/qlogic/qed/qed_dev.c static u8 qed_init_qm_get_num_mtc_tcs(struct qed_hwfn *p_hwfn)
p_hwfn           1480 drivers/net/ethernet/qlogic/qed/qed_dev.c 	u32 pq_flags = qed_get_pq_flags(p_hwfn);
p_hwfn           1485 drivers/net/ethernet/qlogic/qed/qed_dev.c 	return qed_init_qm_get_num_tcs(p_hwfn);
p_hwfn           1490 drivers/net/ethernet/qlogic/qed/qed_dev.c static u16 qed_init_qm_get_num_pf_rls(struct qed_hwfn *p_hwfn)
p_hwfn           1492 drivers/net/ethernet/qlogic/qed/qed_dev.c 	u16 num_pf_rls, num_vfs = qed_init_qm_get_num_vfs(p_hwfn);
p_hwfn           1495 drivers/net/ethernet/qlogic/qed/qed_dev.c 	num_pf_rls = (u16) min_t(u32, RESC_NUM(p_hwfn, QED_RL),
p_hwfn           1496 drivers/net/ethernet/qlogic/qed/qed_dev.c 				 RESC_NUM(p_hwfn, QED_VPORT));
p_hwfn           1508 drivers/net/ethernet/qlogic/qed/qed_dev.c static u16 qed_init_qm_get_num_vports(struct qed_hwfn *p_hwfn)
p_hwfn           1510 drivers/net/ethernet/qlogic/qed/qed_dev.c 	u32 pq_flags = qed_get_pq_flags(p_hwfn);
p_hwfn           1514 drivers/net/ethernet/qlogic/qed/qed_dev.c 	       qed_init_qm_get_num_pf_rls(p_hwfn) +
p_hwfn           1516 drivers/net/ethernet/qlogic/qed/qed_dev.c 	       qed_init_qm_get_num_vfs(p_hwfn) + 1;
p_hwfn           1520 drivers/net/ethernet/qlogic/qed/qed_dev.c static u16 qed_init_qm_get_num_pqs(struct qed_hwfn *p_hwfn)
p_hwfn           1522 drivers/net/ethernet/qlogic/qed/qed_dev.c 	u32 pq_flags = qed_get_pq_flags(p_hwfn);
p_hwfn           1525 drivers/net/ethernet/qlogic/qed/qed_dev.c 	       qed_init_qm_get_num_pf_rls(p_hwfn) +
p_hwfn           1527 drivers/net/ethernet/qlogic/qed/qed_dev.c 	       qed_init_qm_get_num_tcs(p_hwfn) +
p_hwfn           1531 drivers/net/ethernet/qlogic/qed/qed_dev.c 	       qed_init_qm_get_num_mtc_tcs(p_hwfn) +
p_hwfn           1533 drivers/net/ethernet/qlogic/qed/qed_dev.c 	       qed_init_qm_get_num_mtc_tcs(p_hwfn) +
p_hwfn           1534 drivers/net/ethernet/qlogic/qed/qed_dev.c 	       (!!(PQ_FLAGS_VFS & pq_flags)) * qed_init_qm_get_num_vfs(p_hwfn);
p_hwfn           1538 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_init_qm_params(struct qed_hwfn *p_hwfn)
p_hwfn           1540 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
p_hwfn           1544 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qm_info->start_pq = (u16) RESC_START(p_hwfn, QED_PQ);
p_hwfn           1545 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qm_info->start_vport = (u8) RESC_START(p_hwfn, QED_VPORT);
p_hwfn           1552 drivers/net/ethernet/qlogic/qed/qed_dev.c 	four_port = p_hwfn->cdev->num_ports_in_engine == MAX_NUM_PORTS_K2;
p_hwfn           1567 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_init_qm_vport_params(struct qed_hwfn *p_hwfn)
p_hwfn           1569 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
p_hwfn           1573 drivers/net/ethernet/qlogic/qed/qed_dev.c 	for (i = 0; i < qed_init_qm_get_num_vports(p_hwfn); i++)
p_hwfn           1578 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_init_qm_port_params(struct qed_hwfn *p_hwfn)
p_hwfn           1581 drivers/net/ethernet/qlogic/qed/qed_dev.c 	u8 i, active_phys_tcs, num_ports = p_hwfn->cdev->num_ports_in_engine;
p_hwfn           1590 drivers/net/ethernet/qlogic/qed/qed_dev.c 		    &p_hwfn->qm_info.qm_port_params[i];
p_hwfn           1605 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_init_qm_reset_params(struct qed_hwfn *p_hwfn)
p_hwfn           1607 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
p_hwfn           1618 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_init_qm_advance_vport(struct qed_hwfn *p_hwfn)
p_hwfn           1620 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
p_hwfn           1624 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (qm_info->num_vports > qed_init_qm_get_num_vports(p_hwfn))
p_hwfn           1625 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_ERR(p_hwfn,
p_hwfn           1627 drivers/net/ethernet/qlogic/qed/qed_dev.c 		       qm_info->num_vports, qed_init_qm_get_num_vports(p_hwfn));
p_hwfn           1651 drivers/net/ethernet/qlogic/qed/qed_dev.c static bool qed_is_offload_tc_set(struct qed_hwfn *p_hwfn)
p_hwfn           1653 drivers/net/ethernet/qlogic/qed/qed_dev.c 	return p_hwfn->hw_info.offload_tc_set;
p_hwfn           1656 drivers/net/ethernet/qlogic/qed/qed_dev.c static u32 qed_get_offload_tc(struct qed_hwfn *p_hwfn)
p_hwfn           1658 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (qed_is_offload_tc_set(p_hwfn))
p_hwfn           1659 drivers/net/ethernet/qlogic/qed/qed_dev.c 		return p_hwfn->hw_info.offload_tc;
p_hwfn           1664 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_init_qm_pq(struct qed_hwfn *p_hwfn,
p_hwfn           1668 drivers/net/ethernet/qlogic/qed/qed_dev.c 	u16 pq_idx = qm_info->num_pqs, max_pq = qed_init_qm_get_num_pqs(p_hwfn);
p_hwfn           1671 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_ERR(p_hwfn,
p_hwfn           1675 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qm_info->qm_pq_params[pq_idx].port_id = p_hwfn->port_id;
p_hwfn           1691 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (qm_info->num_vports > qed_init_qm_get_num_vports(p_hwfn))
p_hwfn           1692 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_ERR(p_hwfn,
p_hwfn           1694 drivers/net/ethernet/qlogic/qed/qed_dev.c 		       qm_info->num_vports, qed_init_qm_get_num_vports(p_hwfn));
p_hwfn           1696 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (qm_info->num_pf_rls > qed_init_qm_get_num_pf_rls(p_hwfn))
p_hwfn           1697 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_ERR(p_hwfn,
p_hwfn           1699 drivers/net/ethernet/qlogic/qed/qed_dev.c 		       qm_info->num_pf_rls, qed_init_qm_get_num_pf_rls(p_hwfn));
p_hwfn           1703 drivers/net/ethernet/qlogic/qed/qed_dev.c static u16 *qed_init_qm_get_idx_from_flags(struct qed_hwfn *p_hwfn,
p_hwfn           1706 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
p_hwfn           1711 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_ERR(p_hwfn, "requested multiple pq flags 0x%lx\n", pq_flags);
p_hwfn           1715 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (!(qed_get_pq_flags(p_hwfn) & pq_flags)) {
p_hwfn           1716 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_ERR(p_hwfn, "pq flag 0x%lx is not set\n", pq_flags);
p_hwfn           1746 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_init_qm_set_idx(struct qed_hwfn *p_hwfn,
p_hwfn           1749 drivers/net/ethernet/qlogic/qed/qed_dev.c 	u16 *base_pq_idx = qed_init_qm_get_idx_from_flags(p_hwfn, pq_flags);
p_hwfn           1751 drivers/net/ethernet/qlogic/qed/qed_dev.c 	*base_pq_idx = p_hwfn->qm_info.start_pq + pq_val;
p_hwfn           1755 drivers/net/ethernet/qlogic/qed/qed_dev.c u16 qed_get_cm_pq_idx(struct qed_hwfn *p_hwfn, u32 pq_flags)
p_hwfn           1757 drivers/net/ethernet/qlogic/qed/qed_dev.c 	u16 *base_pq_idx = qed_init_qm_get_idx_from_flags(p_hwfn, pq_flags);
p_hwfn           1762 drivers/net/ethernet/qlogic/qed/qed_dev.c u16 qed_get_cm_pq_idx_mcos(struct qed_hwfn *p_hwfn, u8 tc)
p_hwfn           1764 drivers/net/ethernet/qlogic/qed/qed_dev.c 	u8 max_tc = qed_init_qm_get_num_tcs(p_hwfn);
p_hwfn           1767 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_ERR(p_hwfn, "pq with flag 0x%lx do not exist\n",
p_hwfn           1769 drivers/net/ethernet/qlogic/qed/qed_dev.c 		return p_hwfn->qm_info.start_pq;
p_hwfn           1773 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_ERR(p_hwfn, "tc %d must be smaller than %d\n", tc, max_tc);
p_hwfn           1775 drivers/net/ethernet/qlogic/qed/qed_dev.c 	return qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_MCOS) + (tc % max_tc);
p_hwfn           1778 drivers/net/ethernet/qlogic/qed/qed_dev.c u16 qed_get_cm_pq_idx_vf(struct qed_hwfn *p_hwfn, u16 vf)
p_hwfn           1780 drivers/net/ethernet/qlogic/qed/qed_dev.c 	u16 max_vf = qed_init_qm_get_num_vfs(p_hwfn);
p_hwfn           1783 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_ERR(p_hwfn, "pq with flag 0x%lx do not exist\n",
p_hwfn           1785 drivers/net/ethernet/qlogic/qed/qed_dev.c 		return p_hwfn->qm_info.start_pq;
p_hwfn           1789 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_ERR(p_hwfn, "vf %d must be smaller than %d\n", vf, max_vf);
p_hwfn           1791 drivers/net/ethernet/qlogic/qed/qed_dev.c 	return qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_VFS) + (vf % max_vf);
p_hwfn           1794 drivers/net/ethernet/qlogic/qed/qed_dev.c u16 qed_get_cm_pq_idx_ofld_mtc(struct qed_hwfn *p_hwfn, u8 tc)
p_hwfn           1798 drivers/net/ethernet/qlogic/qed/qed_dev.c 	first_ofld_pq = qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_OFLD);
p_hwfn           1799 drivers/net/ethernet/qlogic/qed/qed_dev.c 	pq_offset = (tc < qed_init_qm_get_num_mtc_tcs(p_hwfn)) ?
p_hwfn           1805 drivers/net/ethernet/qlogic/qed/qed_dev.c u16 qed_get_cm_pq_idx_llt_mtc(struct qed_hwfn *p_hwfn, u8 tc)
p_hwfn           1809 drivers/net/ethernet/qlogic/qed/qed_dev.c 	first_llt_pq = qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_LLT);
p_hwfn           1810 drivers/net/ethernet/qlogic/qed/qed_dev.c 	pq_offset = (tc < qed_init_qm_get_num_mtc_tcs(p_hwfn)) ?
p_hwfn           1817 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_init_qm_lb_pq(struct qed_hwfn *p_hwfn)
p_hwfn           1819 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
p_hwfn           1821 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (!(qed_get_pq_flags(p_hwfn) & PQ_FLAGS_LB))
p_hwfn           1824 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_set_idx(p_hwfn, PQ_FLAGS_LB, qm_info->num_pqs);
p_hwfn           1825 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_pq(p_hwfn, qm_info, PURE_LB_TC, PQ_INIT_SHARE_VPORT);
p_hwfn           1828 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_init_qm_ooo_pq(struct qed_hwfn *p_hwfn)
p_hwfn           1830 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
p_hwfn           1832 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (!(qed_get_pq_flags(p_hwfn) & PQ_FLAGS_OOO))
p_hwfn           1835 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_set_idx(p_hwfn, PQ_FLAGS_OOO, qm_info->num_pqs);
p_hwfn           1836 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_pq(p_hwfn, qm_info, qm_info->ooo_tc, PQ_INIT_SHARE_VPORT);
p_hwfn           1839 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_init_qm_pure_ack_pq(struct qed_hwfn *p_hwfn)
p_hwfn           1841 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
p_hwfn           1843 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (!(qed_get_pq_flags(p_hwfn) & PQ_FLAGS_ACK))
p_hwfn           1846 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_set_idx(p_hwfn, PQ_FLAGS_ACK, qm_info->num_pqs);
p_hwfn           1847 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_pq(p_hwfn, qm_info, qed_get_offload_tc(p_hwfn),
p_hwfn           1851 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_init_qm_mtc_pqs(struct qed_hwfn *p_hwfn)
p_hwfn           1853 drivers/net/ethernet/qlogic/qed/qed_dev.c 	u8 num_tcs = qed_init_qm_get_num_mtc_tcs(p_hwfn);
p_hwfn           1854 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
p_hwfn           1859 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_init_qm_pq(p_hwfn, qm_info,
p_hwfn           1860 drivers/net/ethernet/qlogic/qed/qed_dev.c 			       qed_is_offload_tc_set(p_hwfn) ?
p_hwfn           1861 drivers/net/ethernet/qlogic/qed/qed_dev.c 			       p_hwfn->hw_info.offload_tc : tc,
p_hwfn           1865 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_init_qm_offload_pq(struct qed_hwfn *p_hwfn)
p_hwfn           1867 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
p_hwfn           1869 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (!(qed_get_pq_flags(p_hwfn) & PQ_FLAGS_OFLD))
p_hwfn           1872 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_set_idx(p_hwfn, PQ_FLAGS_OFLD, qm_info->num_pqs);
p_hwfn           1873 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_mtc_pqs(p_hwfn);
p_hwfn           1876 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_init_qm_low_latency_pq(struct qed_hwfn *p_hwfn)
p_hwfn           1878 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
p_hwfn           1880 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (!(qed_get_pq_flags(p_hwfn) & PQ_FLAGS_LLT))
p_hwfn           1883 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_set_idx(p_hwfn, PQ_FLAGS_LLT, qm_info->num_pqs);
p_hwfn           1884 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_mtc_pqs(p_hwfn);
p_hwfn           1887 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_init_qm_mcos_pqs(struct qed_hwfn *p_hwfn)
p_hwfn           1889 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
p_hwfn           1892 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (!(qed_get_pq_flags(p_hwfn) & PQ_FLAGS_MCOS))
p_hwfn           1895 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_set_idx(p_hwfn, PQ_FLAGS_MCOS, qm_info->num_pqs);
p_hwfn           1896 drivers/net/ethernet/qlogic/qed/qed_dev.c 	for (tc_idx = 0; tc_idx < qed_init_qm_get_num_tcs(p_hwfn); tc_idx++)
p_hwfn           1897 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_init_qm_pq(p_hwfn, qm_info, tc_idx, PQ_INIT_SHARE_VPORT);
p_hwfn           1900 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_init_qm_vf_pqs(struct qed_hwfn *p_hwfn)
p_hwfn           1902 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
p_hwfn           1903 drivers/net/ethernet/qlogic/qed/qed_dev.c 	u16 vf_idx, num_vfs = qed_init_qm_get_num_vfs(p_hwfn);
p_hwfn           1905 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (!(qed_get_pq_flags(p_hwfn) & PQ_FLAGS_VFS))
p_hwfn           1908 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_set_idx(p_hwfn, PQ_FLAGS_VFS, qm_info->num_pqs);
p_hwfn           1911 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_init_qm_pq(p_hwfn,
p_hwfn           1915 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_init_qm_rl_pqs(struct qed_hwfn *p_hwfn)
p_hwfn           1917 drivers/net/ethernet/qlogic/qed/qed_dev.c 	u16 pf_rls_idx, num_pf_rls = qed_init_qm_get_num_pf_rls(p_hwfn);
p_hwfn           1918 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
p_hwfn           1920 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (!(qed_get_pq_flags(p_hwfn) & PQ_FLAGS_RLS))
p_hwfn           1923 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_set_idx(p_hwfn, PQ_FLAGS_RLS, qm_info->num_pqs);
p_hwfn           1925 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_init_qm_pq(p_hwfn, qm_info, qed_get_offload_tc(p_hwfn),
p_hwfn           1929 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_init_qm_pq_params(struct qed_hwfn *p_hwfn)
p_hwfn           1932 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_rl_pqs(p_hwfn);
p_hwfn           1935 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_mcos_pqs(p_hwfn);
p_hwfn           1938 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_lb_pq(p_hwfn);
p_hwfn           1941 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_ooo_pq(p_hwfn);
p_hwfn           1944 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_pure_ack_pq(p_hwfn);
p_hwfn           1947 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_offload_pq(p_hwfn);
p_hwfn           1950 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_low_latency_pq(p_hwfn);
p_hwfn           1953 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_advance_vport(p_hwfn);
p_hwfn           1956 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_vf_pqs(p_hwfn);
p_hwfn           1960 drivers/net/ethernet/qlogic/qed/qed_dev.c static int qed_init_qm_sanity(struct qed_hwfn *p_hwfn)
p_hwfn           1962 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (qed_init_qm_get_num_vports(p_hwfn) > RESC_NUM(p_hwfn, QED_VPORT)) {
p_hwfn           1963 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_ERR(p_hwfn, "requested amount of vports exceeds resource\n");
p_hwfn           1967 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (qed_init_qm_get_num_pqs(p_hwfn) <= RESC_NUM(p_hwfn, QED_PQ))
p_hwfn           1970 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (QED_IS_ROCE_PERSONALITY(p_hwfn)) {
p_hwfn           1971 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->hw_info.multi_tc_roce_en = 0;
p_hwfn           1972 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn,
p_hwfn           1974 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (qed_init_qm_get_num_pqs(p_hwfn) <= RESC_NUM(p_hwfn, QED_PQ))
p_hwfn           1978 drivers/net/ethernet/qlogic/qed/qed_dev.c 	DP_ERR(p_hwfn, "requested amount of pqs exceeds resource\n");
p_hwfn           1982 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_dp_init_qm_params(struct qed_hwfn *p_hwfn)
p_hwfn           1984 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
p_hwfn           1991 drivers/net/ethernet/qlogic/qed/qed_dev.c 	DP_VERBOSE(p_hwfn,
p_hwfn           2000 drivers/net/ethernet/qlogic/qed/qed_dev.c 	DP_VERBOSE(p_hwfn,
p_hwfn           2008 drivers/net/ethernet/qlogic/qed/qed_dev.c 	DP_VERBOSE(p_hwfn,
p_hwfn           2017 drivers/net/ethernet/qlogic/qed/qed_dev.c 		   qm_info->num_pf_rls, qed_get_pq_flags(p_hwfn));
p_hwfn           2020 drivers/net/ethernet/qlogic/qed/qed_dev.c 	for (i = 0; i < p_hwfn->cdev->num_ports_in_engine; i++) {
p_hwfn           2022 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_VERBOSE(p_hwfn,
p_hwfn           2035 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_VERBOSE(p_hwfn,
p_hwfn           2041 drivers/net/ethernet/qlogic/qed/qed_dev.c 			DP_VERBOSE(p_hwfn,
p_hwfn           2044 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_HW, "]\n");
p_hwfn           2050 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_VERBOSE(p_hwfn,
p_hwfn           2060 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_init_qm_info(struct qed_hwfn *p_hwfn)
p_hwfn           2063 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_reset_params(p_hwfn);
p_hwfn           2066 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_params(p_hwfn);
p_hwfn           2069 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_port_params(p_hwfn);
p_hwfn           2072 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_vport_params(p_hwfn);
p_hwfn           2075 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_pq_params(p_hwfn);
p_hwfn           2078 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_dp_init_qm_params(p_hwfn);
p_hwfn           2089 drivers/net/ethernet/qlogic/qed/qed_dev.c int qed_qm_reconf(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           2091 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
p_hwfn           2096 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_qm_info(p_hwfn);
p_hwfn           2100 drivers/net/ethernet/qlogic/qed/qed_dev.c 	b_rc = qed_send_qm_stop_cmd(p_hwfn, p_ptt, false, true,
p_hwfn           2107 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_clear_rt_data(p_hwfn);
p_hwfn           2110 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_qm_init_pf(p_hwfn, p_ptt, false);
p_hwfn           2113 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_init_run(p_hwfn, p_ptt, PHASE_QM_PF, p_hwfn->rel_pf_id,
p_hwfn           2114 drivers/net/ethernet/qlogic/qed/qed_dev.c 			  p_hwfn->hw_info.hw_mode);
p_hwfn           2120 drivers/net/ethernet/qlogic/qed/qed_dev.c 	b_rc = qed_send_qm_stop_cmd(p_hwfn, p_ptt, true, true,
p_hwfn           2129 drivers/net/ethernet/qlogic/qed/qed_dev.c static int qed_alloc_qm_data(struct qed_hwfn *p_hwfn)
p_hwfn           2131 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
p_hwfn           2134 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_init_qm_sanity(p_hwfn);
p_hwfn           2138 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qm_info->qm_pq_params = kcalloc(qed_init_qm_get_num_pqs(p_hwfn),
p_hwfn           2144 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qm_info->qm_vport_params = kcalloc(qed_init_qm_get_num_vports(p_hwfn),
p_hwfn           2150 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qm_info->qm_port_params = kcalloc(p_hwfn->cdev->num_ports_in_engine,
p_hwfn           2156 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qm_info->wfq_data = kcalloc(qed_init_qm_get_num_vports(p_hwfn),
p_hwfn           2165 drivers/net/ethernet/qlogic/qed/qed_dev.c 	DP_NOTICE(p_hwfn, "Failed to allocate memory for QM params\n");
p_hwfn           2166 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_qm_info_free(p_hwfn);
p_hwfn           2190 drivers/net/ethernet/qlogic/qed/qed_dev.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           2194 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_db_recovery_setup(p_hwfn);
p_hwfn           2199 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_cxt_mngr_alloc(p_hwfn);
p_hwfn           2206 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_cxt_set_pf_params(p_hwfn, RDMA_MAX_TIDS);
p_hwfn           2210 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_alloc_qm_data(p_hwfn);
p_hwfn           2215 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_init_qm_info(p_hwfn);
p_hwfn           2218 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_cxt_cfg_ilt_compute(p_hwfn, &line_count);
p_hwfn           2220 drivers/net/ethernet/qlogic/qed/qed_dev.c 			DP_NOTICE(p_hwfn,
p_hwfn           2226 drivers/net/ethernet/qlogic/qed/qed_dev.c 			    qed_cxt_cfg_ilt_compute_excess(p_hwfn, line_count);
p_hwfn           2231 drivers/net/ethernet/qlogic/qed/qed_dev.c 			rc = qed_cxt_set_pf_params(p_hwfn, rdma_tasks);
p_hwfn           2235 drivers/net/ethernet/qlogic/qed/qed_dev.c 			rc = qed_cxt_cfg_ilt_compute(p_hwfn, &line_count);
p_hwfn           2237 drivers/net/ethernet/qlogic/qed/qed_dev.c 				DP_ERR(p_hwfn,
p_hwfn           2248 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_cxt_tables_alloc(p_hwfn);
p_hwfn           2253 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_spq_alloc(p_hwfn);
p_hwfn           2258 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->p_dpc_ptt = qed_get_reserved_ptt(p_hwfn,
p_hwfn           2261 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_int_alloc(p_hwfn, p_hwfn->p_main_ptt);
p_hwfn           2265 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_iov_alloc(p_hwfn);
p_hwfn           2270 drivers/net/ethernet/qlogic/qed/qed_dev.c 		n_eqes = qed_chain_get_capacity(&p_hwfn->p_spq->chain);
p_hwfn           2271 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (QED_IS_RDMA_PERSONALITY(p_hwfn)) {
p_hwfn           2274 drivers/net/ethernet/qlogic/qed/qed_dev.c 			if (QED_IS_ROCE_PERSONALITY(p_hwfn))
p_hwfn           2279 drivers/net/ethernet/qlogic/qed/qed_dev.c 			num_cons = qed_cxt_get_proto_cid_count(p_hwfn,
p_hwfn           2283 drivers/net/ethernet/qlogic/qed/qed_dev.c 		} else if (p_hwfn->hw_info.personality == QED_PCI_ISCSI) {
p_hwfn           2285 drivers/net/ethernet/qlogic/qed/qed_dev.c 			    qed_cxt_get_proto_cid_count(p_hwfn,
p_hwfn           2292 drivers/net/ethernet/qlogic/qed/qed_dev.c 			DP_ERR(p_hwfn,
p_hwfn           2298 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_eq_alloc(p_hwfn, (u16) n_eqes);
p_hwfn           2302 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_consq_alloc(p_hwfn);
p_hwfn           2306 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_l2_alloc(p_hwfn);
p_hwfn           2311 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (p_hwfn->using_ll2) {
p_hwfn           2312 drivers/net/ethernet/qlogic/qed/qed_dev.c 			rc = qed_ll2_alloc(p_hwfn);
p_hwfn           2318 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (p_hwfn->hw_info.personality == QED_PCI_FCOE) {
p_hwfn           2319 drivers/net/ethernet/qlogic/qed/qed_dev.c 			rc = qed_fcoe_alloc(p_hwfn);
p_hwfn           2324 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (p_hwfn->hw_info.personality == QED_PCI_ISCSI) {
p_hwfn           2325 drivers/net/ethernet/qlogic/qed/qed_dev.c 			rc = qed_iscsi_alloc(p_hwfn);
p_hwfn           2328 drivers/net/ethernet/qlogic/qed/qed_dev.c 			rc = qed_ooo_alloc(p_hwfn);
p_hwfn           2333 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (QED_IS_RDMA_PERSONALITY(p_hwfn)) {
p_hwfn           2334 drivers/net/ethernet/qlogic/qed/qed_dev.c 			rc = qed_rdma_info_alloc(p_hwfn);
p_hwfn           2340 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_dmae_info_alloc(p_hwfn);
p_hwfn           2345 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_dcbx_info_alloc(p_hwfn);
p_hwfn           2349 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_dbg_alloc_user_data(p_hwfn);
p_hwfn           2385 drivers/net/ethernet/qlogic/qed/qed_dev.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           2387 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_cxt_mngr_setup(p_hwfn);
p_hwfn           2388 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_spq_setup(p_hwfn);
p_hwfn           2389 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_eq_setup(p_hwfn);
p_hwfn           2390 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_consq_setup(p_hwfn);
p_hwfn           2393 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_mcp_read_mb(p_hwfn, p_hwfn->p_main_ptt);
p_hwfn           2394 drivers/net/ethernet/qlogic/qed/qed_dev.c 		memcpy(p_hwfn->mcp_info->mfw_mb_shadow,
p_hwfn           2395 drivers/net/ethernet/qlogic/qed/qed_dev.c 		       p_hwfn->mcp_info->mfw_mb_cur,
p_hwfn           2396 drivers/net/ethernet/qlogic/qed/qed_dev.c 		       p_hwfn->mcp_info->mfw_mb_length);
p_hwfn           2398 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_int_setup(p_hwfn, p_hwfn->p_main_ptt);
p_hwfn           2400 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_l2_setup(p_hwfn);
p_hwfn           2401 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_iov_setup(p_hwfn);
p_hwfn           2403 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (p_hwfn->using_ll2)
p_hwfn           2404 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_ll2_setup(p_hwfn);
p_hwfn           2406 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (p_hwfn->hw_info.personality == QED_PCI_FCOE)
p_hwfn           2407 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_fcoe_setup(p_hwfn);
p_hwfn           2409 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (p_hwfn->hw_info.personality == QED_PCI_ISCSI) {
p_hwfn           2410 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_iscsi_setup(p_hwfn);
p_hwfn           2411 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_ooo_setup(p_hwfn);
p_hwfn           2418 drivers/net/ethernet/qlogic/qed/qed_dev.c int qed_final_cleanup(struct qed_hwfn *p_hwfn,
p_hwfn           2425 drivers/net/ethernet/qlogic/qed/qed_dev.c 		USTORM_FLR_FINAL_ACK_OFFSET(p_hwfn->rel_pf_id);
p_hwfn           2437 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (REG_RD(p_hwfn, addr)) {
p_hwfn           2438 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn,
p_hwfn           2440 drivers/net/ethernet/qlogic/qed/qed_dev.c 		REG_WR(p_hwfn, addr, 0);
p_hwfn           2443 drivers/net/ethernet/qlogic/qed/qed_dev.c 	DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           2447 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_wr(p_hwfn, p_ptt, XSDM_REG_OPERATION_GEN, command);
p_hwfn           2450 drivers/net/ethernet/qlogic/qed/qed_dev.c 	while (!REG_RD(p_hwfn, addr) && count--)
p_hwfn           2453 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (REG_RD(p_hwfn, addr))
p_hwfn           2456 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn,
p_hwfn           2460 drivers/net/ethernet/qlogic/qed/qed_dev.c 	REG_WR(p_hwfn, addr, 0);
p_hwfn           2465 drivers/net/ethernet/qlogic/qed/qed_dev.c static int qed_calc_hw_mode(struct qed_hwfn *p_hwfn)
p_hwfn           2469 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (QED_IS_BB_B0(p_hwfn->cdev)) {
p_hwfn           2471 drivers/net/ethernet/qlogic/qed/qed_dev.c 	} else if (QED_IS_AH(p_hwfn->cdev)) {
p_hwfn           2474 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn, "Unknown chip type %#x\n",
p_hwfn           2475 drivers/net/ethernet/qlogic/qed/qed_dev.c 			  p_hwfn->cdev->type);
p_hwfn           2479 drivers/net/ethernet/qlogic/qed/qed_dev.c 	switch (p_hwfn->cdev->num_ports_in_engine) {
p_hwfn           2490 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn, "num_ports_in_engine = %d not supported\n",
p_hwfn           2491 drivers/net/ethernet/qlogic/qed/qed_dev.c 			  p_hwfn->cdev->num_ports_in_engine);
p_hwfn           2495 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (test_bit(QED_MF_OVLAN_CLSS, &p_hwfn->cdev->mf_bits))
p_hwfn           2502 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (p_hwfn->cdev->num_hwfns > 1)
p_hwfn           2505 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->hw_info.hw_mode = hw_mode;
p_hwfn           2507 drivers/net/ethernet/qlogic/qed/qed_dev.c 	DP_VERBOSE(p_hwfn, (NETIF_MSG_PROBE | NETIF_MSG_IFUP),
p_hwfn           2509 drivers/net/ethernet/qlogic/qed/qed_dev.c 		   p_hwfn->hw_info.hw_mode);
p_hwfn           2521 drivers/net/ethernet/qlogic/qed/qed_dev.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           2526 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_igu_info = p_hwfn->hw_info.p_igu_info;
p_hwfn           2535 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_init_cau_sb_entry(p_hwfn, &sb_entry,
p_hwfn           2537 drivers/net/ethernet/qlogic/qed/qed_dev.c 			STORE_RT_REG_AGG(p_hwfn, offset + igu_sb_id * 2,
p_hwfn           2543 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_init_cache_line_size(struct qed_hwfn *p_hwfn,
p_hwfn           2548 drivers/net/ethernet/qlogic/qed/qed_dev.c 	val = qed_rd(p_hwfn, p_ptt, PSWRQ2_REG_WR_MBS0);
p_hwfn           2560 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_INFO(p_hwfn,
p_hwfn           2581 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_INFO(p_hwfn,
p_hwfn           2587 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_INFO(p_hwfn,
p_hwfn           2591 drivers/net/ethernet/qlogic/qed/qed_dev.c 	STORE_RT_REG(p_hwfn, PGLUE_REG_B_CACHE_LINE_SIZE_RT_OFFSET, val);
p_hwfn           2593 drivers/net/ethernet/qlogic/qed/qed_dev.c 		STORE_RT_REG(p_hwfn, PSWRQ2_REG_DRAM_ALIGN_WR_RT_OFFSET, val);
p_hwfn           2594 drivers/net/ethernet/qlogic/qed/qed_dev.c 		STORE_RT_REG(p_hwfn, PSWRQ2_REG_DRAM_ALIGN_RD_RT_OFFSET, val);
p_hwfn           2598 drivers/net/ethernet/qlogic/qed/qed_dev.c static int qed_hw_init_common(struct qed_hwfn *p_hwfn,
p_hwfn           2601 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
p_hwfn           2603 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn           2612 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_gtt_init(p_hwfn);
p_hwfn           2614 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (p_hwfn->mcp_info) {
p_hwfn           2615 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (p_hwfn->mcp_info->func_info.bandwidth_max)
p_hwfn           2617 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (p_hwfn->mcp_info->func_info.bandwidth_min)
p_hwfn           2622 drivers/net/ethernet/qlogic/qed/qed_dev.c 	params.max_ports_per_engine = p_hwfn->cdev->num_ports_in_engine;
p_hwfn           2630 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_qm_common_rt_init(p_hwfn, &params);
p_hwfn           2632 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_cxt_hw_init_common(p_hwfn);
p_hwfn           2634 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_init_cache_line_size(p_hwfn, p_ptt);
p_hwfn           2636 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_init_run(p_hwfn, p_ptt, PHASE_ENGINE, ANY_PHASE_ID, hw_mode);
p_hwfn           2640 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_wr(p_hwfn, p_ptt, PSWRQ2_REG_L2P_VALIDATE_VFID, 0);
p_hwfn           2641 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_wr(p_hwfn, p_ptt, PGLUE_B_REG_USE_CLIENTID_IN_TAG, 1);
p_hwfn           2643 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (QED_IS_BB(p_hwfn->cdev)) {
p_hwfn           2644 drivers/net/ethernet/qlogic/qed/qed_dev.c 		num_pfs = NUM_OF_ENG_PFS(p_hwfn->cdev);
p_hwfn           2646 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_fid_pretend(p_hwfn, p_ptt, pf_id);
p_hwfn           2647 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_ROCE, 0x0);
p_hwfn           2648 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_TCP, 0x0);
p_hwfn           2651 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_fid_pretend(p_hwfn, p_ptt, p_hwfn->rel_pf_id);
p_hwfn           2656 drivers/net/ethernet/qlogic/qed/qed_dev.c 		concrete_fid = qed_vfid_to_concrete(p_hwfn, vf_id);
p_hwfn           2657 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_fid_pretend(p_hwfn, p_ptt, (u16) concrete_fid);
p_hwfn           2658 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, CCFC_REG_STRONG_ENABLE_VF, 0x1);
p_hwfn           2659 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, CCFC_REG_WEAK_ENABLE_VF, 0x0);
p_hwfn           2660 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, TCFC_REG_STRONG_ENABLE_VF, 0x1);
p_hwfn           2661 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, TCFC_REG_WEAK_ENABLE_VF, 0x0);
p_hwfn           2664 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_fid_pretend(p_hwfn, p_ptt, p_hwfn->rel_pf_id);
p_hwfn           2670 drivers/net/ethernet/qlogic/qed/qed_dev.c qed_hw_init_dpi_size(struct qed_hwfn *p_hwfn,
p_hwfn           2684 drivers/net/ethernet/qlogic/qed/qed_dev.c 	min_dpis = p_hwfn->pf_params.rdma_pf_params.min_dpis;
p_hwfn           2687 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->dpi_size = dpi_page_size;
p_hwfn           2688 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->dpi_count = dpi_count;
p_hwfn           2690 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_wr(p_hwfn, p_ptt, DORQ_REG_PF_DPI_BIT_SHIFT, dpi_bit_shift);
p_hwfn           2704 drivers/net/ethernet/qlogic/qed/qed_dev.c bool qed_edpm_enabled(struct qed_hwfn *p_hwfn)
p_hwfn           2706 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (p_hwfn->dcbx_no_edpm || p_hwfn->db_bar_no_edpm)
p_hwfn           2713 drivers/net/ethernet/qlogic/qed/qed_dev.c qed_hw_init_pf_doorbell_bar(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           2723 drivers/net/ethernet/qlogic/qed/qed_dev.c 	db_bar_size = qed_hw_bar_size(p_hwfn, p_ptt, BAR_ID_1);
p_hwfn           2724 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (p_hwfn->cdev->num_hwfns > 1)
p_hwfn           2728 drivers/net/ethernet/qlogic/qed/qed_dev.c 	non_pwm_conn = qed_cxt_get_proto_cid_start(p_hwfn, PROTOCOLID_CORE) +
p_hwfn           2729 drivers/net/ethernet/qlogic/qed/qed_dev.c 		       qed_cxt_get_proto_cid_count(p_hwfn, PROTOCOLID_CORE,
p_hwfn           2731 drivers/net/ethernet/qlogic/qed/qed_dev.c 		       qed_cxt_get_proto_cid_count(p_hwfn, PROTOCOLID_ETH,
p_hwfn           2739 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_ERR(p_hwfn->cdev,
p_hwfn           2746 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_ERR(p_hwfn->cdev,
p_hwfn           2754 drivers/net/ethernet/qlogic/qed/qed_dev.c 	roce_edpm_mode = p_hwfn->pf_params.rdma_pf_params.roce_edpm_mode;
p_hwfn           2761 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_hw_init_dpi_size(p_hwfn, p_ptt, pwm_regsize, n_cpus);
p_hwfn           2766 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (cond || p_hwfn->dcbx_no_edpm) {
p_hwfn           2772 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_hw_init_dpi_size(p_hwfn, p_ptt, pwm_regsize, n_cpus);
p_hwfn           2775 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_rdma_dpm_bar(p_hwfn, p_ptt);
p_hwfn           2778 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->wid_count = (u16) n_cpus;
p_hwfn           2780 drivers/net/ethernet/qlogic/qed/qed_dev.c 	DP_INFO(p_hwfn,
p_hwfn           2784 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->dpi_size,
p_hwfn           2785 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->dpi_count,
p_hwfn           2786 drivers/net/ethernet/qlogic/qed/qed_dev.c 		(!qed_edpm_enabled(p_hwfn)) ?
p_hwfn           2790 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_ERR(p_hwfn,
p_hwfn           2792 drivers/net/ethernet/qlogic/qed/qed_dev.c 		       p_hwfn->dpi_count,
p_hwfn           2793 drivers/net/ethernet/qlogic/qed/qed_dev.c 		       p_hwfn->pf_params.rdma_pf_params.min_dpis);
p_hwfn           2797 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->dpi_start_offset = norm_regsize;
p_hwfn           2801 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_wr(p_hwfn, p_ptt, DORQ_REG_PF_ICID_BIT_SHIFT_NORM, pf_dems_shift);
p_hwfn           2802 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_wr(p_hwfn, p_ptt, DORQ_REG_PF_MIN_ADDR_REG1, min_addr_reg1);
p_hwfn           2807 drivers/net/ethernet/qlogic/qed/qed_dev.c static int qed_hw_init_port(struct qed_hwfn *p_hwfn,
p_hwfn           2813 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (!QED_IS_CMT(p_hwfn->cdev) || !IS_LEAD_HWFN(p_hwfn))
p_hwfn           2814 drivers/net/ethernet/qlogic/qed/qed_dev.c 		STORE_RT_REG(p_hwfn, NIG_REG_BRB_GATE_DNTFWD_PORT_RT_OFFSET, 0);
p_hwfn           2816 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_init_run(p_hwfn, p_ptt, PHASE_PORT, p_hwfn->port_id, hw_mode);
p_hwfn           2820 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_wr(p_hwfn, p_ptt, PGLUE_B_REG_MASTER_WRITE_PAD_ENABLE, 0);
p_hwfn           2825 drivers/net/ethernet/qlogic/qed/qed_dev.c static int qed_hw_init_pf(struct qed_hwfn *p_hwfn,
p_hwfn           2833 drivers/net/ethernet/qlogic/qed/qed_dev.c 	u8 rel_pf_id = p_hwfn->rel_pf_id;
p_hwfn           2836 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (p_hwfn->mcp_info) {
p_hwfn           2839 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_info = &p_hwfn->mcp_info->func_info;
p_hwfn           2841 drivers/net/ethernet/qlogic/qed/qed_dev.c 			p_hwfn->qm_info.pf_wfq = p_info->bandwidth_min;
p_hwfn           2844 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->qm_info.pf_rl = 100000;
p_hwfn           2847 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_cxt_hw_init_pf(p_hwfn, p_ptt);
p_hwfn           2849 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_int_igu_init_rt(p_hwfn);
p_hwfn           2853 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_HW, "Configuring LLH_FUNC_TAG\n");
p_hwfn           2854 drivers/net/ethernet/qlogic/qed/qed_dev.c 		STORE_RT_REG(p_hwfn, NIG_REG_LLH_FUNC_TAG_EN_RT_OFFSET, 1);
p_hwfn           2855 drivers/net/ethernet/qlogic/qed/qed_dev.c 		STORE_RT_REG(p_hwfn, NIG_REG_LLH_FUNC_TAG_VALUE_RT_OFFSET,
p_hwfn           2856 drivers/net/ethernet/qlogic/qed/qed_dev.c 			     p_hwfn->hw_info.ovlan);
p_hwfn           2858 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_HW,
p_hwfn           2860 drivers/net/ethernet/qlogic/qed/qed_dev.c 		STORE_RT_REG(p_hwfn, NIG_REG_LLH_FUNC_FILTER_HDR_SEL_RT_OFFSET,
p_hwfn           2866 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_HW,
p_hwfn           2868 drivers/net/ethernet/qlogic/qed/qed_dev.c 		STORE_RT_REG(p_hwfn,
p_hwfn           2873 drivers/net/ethernet/qlogic/qed/qed_dev.c 	STORE_RT_REG(p_hwfn, PRS_REG_SEARCH_TCP_RT_OFFSET,
p_hwfn           2874 drivers/net/ethernet/qlogic/qed/qed_dev.c 		     (p_hwfn->hw_info.personality == QED_PCI_ISCSI) ? 1 : 0);
p_hwfn           2875 drivers/net/ethernet/qlogic/qed/qed_dev.c 	STORE_RT_REG(p_hwfn, PRS_REG_SEARCH_FCOE_RT_OFFSET,
p_hwfn           2876 drivers/net/ethernet/qlogic/qed/qed_dev.c 		     (p_hwfn->hw_info.personality == QED_PCI_FCOE) ? 1 : 0);
p_hwfn           2877 drivers/net/ethernet/qlogic/qed/qed_dev.c 	STORE_RT_REG(p_hwfn, PRS_REG_SEARCH_ROCE_RT_OFFSET, 0);
p_hwfn           2880 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_dmae_sanity(p_hwfn, p_ptt, "pf_phase");
p_hwfn           2885 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_init_run(p_hwfn, p_ptt, PHASE_PF, rel_pf_id, hw_mode);
p_hwfn           2890 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_init_run(p_hwfn, p_ptt, PHASE_QM_PF, rel_pf_id, hw_mode);
p_hwfn           2895 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_int_igu_init_pure_rt(p_hwfn, p_ptt, true, true);
p_hwfn           2897 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_hw_init_pf_doorbell_bar(p_hwfn, p_ptt);
p_hwfn           2902 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (IS_LEAD_HWFN(p_hwfn)) {
p_hwfn           2903 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_llh_hw_init_pf(p_hwfn, p_ptt);
p_hwfn           2910 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_int_igu_enable(p_hwfn, p_ptt, int_mode);
p_hwfn           2913 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_sp_pf_start(p_hwfn, p_ptt, p_tunn,
p_hwfn           2916 drivers/net/ethernet/qlogic/qed/qed_dev.c 			DP_NOTICE(p_hwfn, "Function start ramrod failed\n");
p_hwfn           2919 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (p_hwfn->hw_info.personality == QED_PCI_FCOE) {
p_hwfn           2920 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_TAG1, BIT(2));
p_hwfn           2921 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_wr(p_hwfn, p_ptt,
p_hwfn           2929 drivers/net/ethernet/qlogic/qed/qed_dev.c int qed_pglueb_set_pfid_enable(struct qed_hwfn *p_hwfn,
p_hwfn           2935 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_wr(p_hwfn, p_ptt, PGLUE_B_REG_INTERNAL_PFID_ENABLE_MASTER, set_val);
p_hwfn           2939 drivers/net/ethernet/qlogic/qed/qed_dev.c 		val = qed_rd(p_hwfn, p_ptt,
p_hwfn           2948 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn,
p_hwfn           2956 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_reset_mb_shadow(struct qed_hwfn *p_hwfn,
p_hwfn           2960 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_mcp_read_mb(p_hwfn, p_main_ptt);
p_hwfn           2961 drivers/net/ethernet/qlogic/qed/qed_dev.c 	memcpy(p_hwfn->mcp_info->mfw_mb_shadow,
p_hwfn           2962 drivers/net/ethernet/qlogic/qed/qed_dev.c 	       p_hwfn->mcp_info->mfw_mb_cur, p_hwfn->mcp_info->mfw_mb_length);
p_hwfn           2978 drivers/net/ethernet/qlogic/qed/qed_dev.c static int qed_vf_start(struct qed_hwfn *p_hwfn,
p_hwfn           2983 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_vf_pf_tunnel_param_update(p_hwfn, p_params->p_tunn);
p_hwfn           2986 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->b_int_enabled = true;
p_hwfn           2991 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_pglueb_clear_err(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           2993 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_wr(p_hwfn, p_ptt, PGLUE_B_REG_WAS_ERROR_PF_31_0_CLR,
p_hwfn           2994 drivers/net/ethernet/qlogic/qed/qed_dev.c 	       BIT(p_hwfn->abs_pf_id));
p_hwfn           3002 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_hwfn *p_hwfn;
p_hwfn           3018 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn = &cdev->hwfns[i];
p_hwfn           3021 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (!p_hwfn->hw_info.mtu) {
p_hwfn           3022 drivers/net/ethernet/qlogic/qed/qed_dev.c 			p_hwfn->hw_info.mtu = 1500;
p_hwfn           3027 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_vf_start(p_hwfn, p_params);
p_hwfn           3031 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_calc_hw_mode(p_hwfn);
p_hwfn           3043 drivers/net/ethernet/qlogic/qed/qed_dev.c 			STORE_RT_REG(p_hwfn, PRS_REG_TAG_ETHERTYPE_0_RT_OFFSET,
p_hwfn           3045 drivers/net/ethernet/qlogic/qed/qed_dev.c 			STORE_RT_REG(p_hwfn, NIG_REG_TAG_ETHERTYPE_0_RT_OFFSET,
p_hwfn           3047 drivers/net/ethernet/qlogic/qed/qed_dev.c 			STORE_RT_REG(p_hwfn, PBF_REG_TAG_ETHERTYPE_0_RT_OFFSET,
p_hwfn           3049 drivers/net/ethernet/qlogic/qed/qed_dev.c 			STORE_RT_REG(p_hwfn, DORQ_REG_TAG1_ETHERTYPE_RT_OFFSET,
p_hwfn           3055 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_mcp_load_req(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           3058 drivers/net/ethernet/qlogic/qed/qed_dev.c 			DP_NOTICE(p_hwfn, "Failed sending a LOAD_REQ command\n");
p_hwfn           3063 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn           3072 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_mcp_set_capabilities(p_hwfn, p_hwfn->p_main_ptt);
p_hwfn           3074 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_reset_mb_shadow(p_hwfn, p_hwfn->p_main_ptt);
p_hwfn           3081 drivers/net/ethernet/qlogic/qed/qed_dev.c 			rc = qed_final_cleanup(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           3082 drivers/net/ethernet/qlogic/qed/qed_dev.c 					       p_hwfn->rel_pf_id, false);
p_hwfn           3084 drivers/net/ethernet/qlogic/qed/qed_dev.c 				DP_NOTICE(p_hwfn, "Final cleanup failed\n");
p_hwfn           3090 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_pglueb_rbc_attn_handler(p_hwfn, p_hwfn->p_main_ptt);
p_hwfn           3093 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_pglueb_set_pfid_enable(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           3103 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_pglueb_clear_err(p_hwfn, p_hwfn->p_main_ptt);
p_hwfn           3107 drivers/net/ethernet/qlogic/qed/qed_dev.c 			rc = qed_hw_init_common(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           3108 drivers/net/ethernet/qlogic/qed/qed_dev.c 						p_hwfn->hw_info.hw_mode);
p_hwfn           3113 drivers/net/ethernet/qlogic/qed/qed_dev.c 			rc = qed_hw_init_port(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           3114 drivers/net/ethernet/qlogic/qed/qed_dev.c 					      p_hwfn->hw_info.hw_mode);
p_hwfn           3120 drivers/net/ethernet/qlogic/qed/qed_dev.c 			rc = qed_hw_init_pf(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           3122 drivers/net/ethernet/qlogic/qed/qed_dev.c 					    p_hwfn->hw_info.hw_mode,
p_hwfn           3128 drivers/net/ethernet/qlogic/qed/qed_dev.c 			DP_NOTICE(p_hwfn,
p_hwfn           3135 drivers/net/ethernet/qlogic/qed/qed_dev.c 			DP_NOTICE(p_hwfn,
p_hwfn           3141 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_mcp_load_done(p_hwfn, p_hwfn->p_main_ptt);
p_hwfn           3146 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_VERBOSE(p_hwfn,
p_hwfn           3149 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_mcp_cmd(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           3154 drivers/net/ethernet/qlogic/qed/qed_dev.c 			DP_NOTICE(p_hwfn,
p_hwfn           3159 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->hw_init_done = true;
p_hwfn           3163 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn           3166 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_VERBOSE(p_hwfn,
p_hwfn           3170 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_mcp_cmd(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           3174 drivers/net/ethernet/qlogic/qed/qed_dev.c 			DP_NOTICE(p_hwfn,
p_hwfn           3178 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_mcp_cmd(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           3182 drivers/net/ethernet/qlogic/qed/qed_dev.c 			DP_INFO(p_hwfn, "Failed to update firmware version\n");
p_hwfn           3185 drivers/net/ethernet/qlogic/qed/qed_dev.c 			rc = qed_mcp_ov_update_mtu(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           3186 drivers/net/ethernet/qlogic/qed/qed_dev.c 						   p_hwfn->hw_info.mtu);
p_hwfn           3188 drivers/net/ethernet/qlogic/qed/qed_dev.c 				DP_INFO(p_hwfn,
p_hwfn           3192 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_mcp_ov_update_driver_state(p_hwfn,
p_hwfn           3193 drivers/net/ethernet/qlogic/qed/qed_dev.c 						    p_hwfn->p_main_ptt,
p_hwfn           3196 drivers/net/ethernet/qlogic/qed/qed_dev.c 			DP_INFO(p_hwfn, "Failed to update driver state\n");
p_hwfn           3198 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_mcp_ov_update_eswitch(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           3201 drivers/net/ethernet/qlogic/qed/qed_dev.c 			DP_INFO(p_hwfn, "Failed to update eswitch mode\n");
p_hwfn           3209 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_mcp_load_done(p_hwfn, p_hwfn->p_main_ptt);
p_hwfn           3215 drivers/net/ethernet/qlogic/qed/qed_dev.c 			       struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           3220 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_wr(p_hwfn, p_ptt, TM_REG_PF_ENABLE_CONN, 0x0);
p_hwfn           3221 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_wr(p_hwfn, p_ptt, TM_REG_PF_ENABLE_TASK, 0x0);
p_hwfn           3227 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if ((!qed_rd(p_hwfn, p_ptt,
p_hwfn           3229 drivers/net/ethernet/qlogic/qed/qed_dev.c 		    (!qed_rd(p_hwfn, p_ptt, TM_REG_PF_SCAN_ACTIVE_TASK)))
p_hwfn           3241 drivers/net/ethernet/qlogic/qed/qed_dev.c 	DP_NOTICE(p_hwfn,
p_hwfn           3243 drivers/net/ethernet/qlogic/qed/qed_dev.c 		  (u8)qed_rd(p_hwfn, p_ptt, TM_REG_PF_SCAN_ACTIVE_CONN),
p_hwfn           3244 drivers/net/ethernet/qlogic/qed/qed_dev.c 		  (u8)qed_rd(p_hwfn, p_ptt, TM_REG_PF_SCAN_ACTIVE_TASK));
p_hwfn           3252 drivers/net/ethernet/qlogic/qed/qed_dev.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[j];
p_hwfn           3253 drivers/net/ethernet/qlogic/qed/qed_dev.c 		struct qed_ptt *p_ptt = p_hwfn->p_main_ptt;
p_hwfn           3255 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_hw_timers_stop(cdev, p_hwfn, p_ptt);
p_hwfn           3261 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_hwfn *p_hwfn;
p_hwfn           3267 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn = &cdev->hwfns[j];
p_hwfn           3268 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_ptt = p_hwfn->p_main_ptt;
p_hwfn           3270 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_IFDOWN, "Stopping hw/fw\n");
p_hwfn           3273 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_vf_pf_int_cleanup(p_hwfn);
p_hwfn           3274 drivers/net/ethernet/qlogic/qed/qed_dev.c 			rc = qed_vf_pf_reset(p_hwfn);
p_hwfn           3276 drivers/net/ethernet/qlogic/qed/qed_dev.c 				DP_NOTICE(p_hwfn,
p_hwfn           3285 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->hw_init_done = false;
p_hwfn           3289 drivers/net/ethernet/qlogic/qed/qed_dev.c 			rc = qed_mcp_unload_req(p_hwfn, p_ptt);
p_hwfn           3291 drivers/net/ethernet/qlogic/qed/qed_dev.c 				DP_NOTICE(p_hwfn,
p_hwfn           3298 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_slowpath_irq_sync(p_hwfn);
p_hwfn           3303 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_sp_pf_stop(p_hwfn);
p_hwfn           3305 drivers/net/ethernet/qlogic/qed/qed_dev.c 			DP_NOTICE(p_hwfn,
p_hwfn           3311 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt,
p_hwfn           3314 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_TCP, 0x0);
p_hwfn           3315 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_UDP, 0x0);
p_hwfn           3316 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_FCOE, 0x0);
p_hwfn           3317 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_ROCE, 0x0);
p_hwfn           3318 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_OPENFLOW, 0x0);
p_hwfn           3320 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_hw_timers_stop(cdev, p_hwfn, p_ptt);
p_hwfn           3323 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_int_igu_disable_int(p_hwfn, p_ptt);
p_hwfn           3325 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, IGU_REG_LEADING_EDGE_LATCH, 0);
p_hwfn           3326 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, IGU_REG_TRAILING_EDGE_LATCH, 0);
p_hwfn           3328 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_int_igu_init_pure_rt(p_hwfn, p_ptt, false, true);
p_hwfn           3334 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, DORQ_REG_PF_DB_ENABLE, 0);
p_hwfn           3335 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, QM_REG_PF_EN, 0);
p_hwfn           3337 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (IS_LEAD_HWFN(p_hwfn) &&
p_hwfn           3339 drivers/net/ethernet/qlogic/qed/qed_dev.c 		    !QED_IS_FCOE_PERSONALITY(p_hwfn))
p_hwfn           3341 drivers/net/ethernet/qlogic/qed/qed_dev.c 						  p_hwfn->hw_info.hw_mac_addr);
p_hwfn           3344 drivers/net/ethernet/qlogic/qed/qed_dev.c 			rc = qed_mcp_unload_done(p_hwfn, p_ptt);
p_hwfn           3346 drivers/net/ethernet/qlogic/qed/qed_dev.c 				DP_NOTICE(p_hwfn,
p_hwfn           3355 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn           3363 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_pglueb_set_pfid_enable(p_hwfn, p_ptt, false);
p_hwfn           3365 drivers/net/ethernet/qlogic/qed/qed_dev.c 			DP_NOTICE(p_hwfn,
p_hwfn           3380 drivers/net/ethernet/qlogic/qed/qed_dev.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[j];
p_hwfn           3384 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_vf_pf_int_cleanup(p_hwfn);
p_hwfn           3387 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           3391 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_VERBOSE(p_hwfn,
p_hwfn           3394 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt,
p_hwfn           3397 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_TCP, 0x0);
p_hwfn           3398 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_UDP, 0x0);
p_hwfn           3399 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_FCOE, 0x0);
p_hwfn           3400 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_ROCE, 0x0);
p_hwfn           3401 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_OPENFLOW, 0x0);
p_hwfn           3403 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_int_igu_init_pure_rt(p_hwfn, p_ptt, false, false);
p_hwfn           3407 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           3413 drivers/net/ethernet/qlogic/qed/qed_dev.c int qed_hw_start_fastpath(struct qed_hwfn *p_hwfn)
p_hwfn           3417 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (IS_VF(p_hwfn->cdev))
p_hwfn           3420 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           3424 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (p_hwfn->p_rdma_info &&
p_hwfn           3425 drivers/net/ethernet/qlogic/qed/qed_dev.c 	    p_hwfn->p_rdma_info->active && p_hwfn->b_rdma_enabled_in_prs)
p_hwfn           3426 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_ptt, p_hwfn->rdma_prs_search_reg, 0x1);
p_hwfn           3429 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_RX_LLH_BRB_GATE_DNTFWD_PERPF, 0x0);
p_hwfn           3430 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           3436 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_hw_hwfn_free(struct qed_hwfn *p_hwfn)
p_hwfn           3438 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_ptt_pool_free(p_hwfn);
p_hwfn           3439 drivers/net/ethernet/qlogic/qed/qed_dev.c 	kfree(p_hwfn->hw_info.p_igu_info);
p_hwfn           3440 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->hw_info.p_igu_info = NULL;
p_hwfn           3444 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_hw_hwfn_prepare(struct qed_hwfn *p_hwfn)
p_hwfn           3447 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (QED_IS_AH(p_hwfn->cdev)) {
p_hwfn           3448 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           3450 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           3452 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           3454 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           3457 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           3459 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           3461 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           3463 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_wr(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           3468 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_pglueb_clear_err(p_hwfn, p_hwfn->p_main_ptt);
p_hwfn           3471 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_wr(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           3475 drivers/net/ethernet/qlogic/qed/qed_dev.c static void get_function_id(struct qed_hwfn *p_hwfn)
p_hwfn           3478 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->hw_info.opaque_fid = (u16) REG_RD(p_hwfn,
p_hwfn           3481 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->hw_info.concrete_fid = REG_RD(p_hwfn, PXP_PF_ME_CONCRETE_ADDR);
p_hwfn           3483 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->abs_pf_id = (p_hwfn->hw_info.concrete_fid >> 16) & 0xf;
p_hwfn           3484 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->rel_pf_id = GET_FIELD(p_hwfn->hw_info.concrete_fid,
p_hwfn           3486 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->port_id = GET_FIELD(p_hwfn->hw_info.concrete_fid,
p_hwfn           3489 drivers/net/ethernet/qlogic/qed/qed_dev.c 	DP_VERBOSE(p_hwfn, NETIF_MSG_PROBE,
p_hwfn           3491 drivers/net/ethernet/qlogic/qed/qed_dev.c 		   p_hwfn->hw_info.concrete_fid, p_hwfn->hw_info.opaque_fid);
p_hwfn           3494 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_hw_set_feat(struct qed_hwfn *p_hwfn)
p_hwfn           3496 drivers/net/ethernet/qlogic/qed/qed_dev.c 	u32 *feat_num = p_hwfn->hw_info.feat_num;
p_hwfn           3501 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_int_get_num_sbs(p_hwfn, &sb_cnt);
p_hwfn           3504 drivers/net/ethernet/qlogic/qed/qed_dev.c 	    QED_IS_RDMA_PERSONALITY(p_hwfn)) {
p_hwfn           3511 drivers/net/ethernet/qlogic/qed/qed_dev.c 			      RESC_NUM(p_hwfn, QED_RDMA_CNQ_RAM));
p_hwfn           3515 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (QED_IS_L2_PERSONALITY(p_hwfn)) {
p_hwfn           3518 drivers/net/ethernet/qlogic/qed/qed_dev.c 						RESC_NUM(p_hwfn, QED_L2_QUEUE),
p_hwfn           3522 drivers/net/ethernet/qlogic/qed/qed_dev.c 						RESC_NUM(p_hwfn,
p_hwfn           3524 drivers/net/ethernet/qlogic/qed/qed_dev.c 						FEAT_NUM(p_hwfn,
p_hwfn           3528 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (QED_IS_FCOE_PERSONALITY(p_hwfn))
p_hwfn           3530 drivers/net/ethernet/qlogic/qed/qed_dev.c 					       RESC_NUM(p_hwfn,
p_hwfn           3533 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (QED_IS_ISCSI_PERSONALITY(p_hwfn))
p_hwfn           3535 drivers/net/ethernet/qlogic/qed/qed_dev.c 					       RESC_NUM(p_hwfn,
p_hwfn           3537 drivers/net/ethernet/qlogic/qed/qed_dev.c 	DP_VERBOSE(p_hwfn,
p_hwfn           3540 drivers/net/ethernet/qlogic/qed/qed_dev.c 		   (int)FEAT_NUM(p_hwfn, QED_PF_L2_QUE),
p_hwfn           3541 drivers/net/ethernet/qlogic/qed/qed_dev.c 		   (int)FEAT_NUM(p_hwfn, QED_VF_L2_QUE),
p_hwfn           3542 drivers/net/ethernet/qlogic/qed/qed_dev.c 		   (int)FEAT_NUM(p_hwfn, QED_RDMA_CNQ),
p_hwfn           3543 drivers/net/ethernet/qlogic/qed/qed_dev.c 		   (int)FEAT_NUM(p_hwfn, QED_FCOE_CQ),
p_hwfn           3544 drivers/net/ethernet/qlogic/qed/qed_dev.c 		   (int)FEAT_NUM(p_hwfn, QED_ISCSI_CQ),
p_hwfn           3585 drivers/net/ethernet/qlogic/qed/qed_dev.c __qed_hw_set_soft_resc_size(struct qed_hwfn *p_hwfn,
p_hwfn           3592 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_mcp_set_resc_max_val(p_hwfn, p_ptt, res_id,
p_hwfn           3595 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn,
p_hwfn           3602 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_INFO(p_hwfn,
p_hwfn           3610 drivers/net/ethernet/qlogic/qed/qed_dev.c qed_hw_set_soft_resc_size(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           3612 drivers/net/ethernet/qlogic/qed/qed_dev.c 	bool b_ah = QED_IS_AH(p_hwfn->cdev);
p_hwfn           3639 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = __qed_hw_set_soft_resc_size(p_hwfn, p_ptt, res_id,
p_hwfn           3658 drivers/net/ethernet/qlogic/qed/qed_dev.c int qed_hw_get_dflt_resc(struct qed_hwfn *p_hwfn,
p_hwfn           3662 drivers/net/ethernet/qlogic/qed/qed_dev.c 	u8 num_funcs = p_hwfn->num_funcs_on_engine;
p_hwfn           3663 drivers/net/ethernet/qlogic/qed/qed_dev.c 	bool b_ah = QED_IS_AH(p_hwfn->cdev);
p_hwfn           3708 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (p_hwfn->hw_info.personality != QED_PCI_ISCSI &&
p_hwfn           3709 drivers/net/ethernet/qlogic/qed/qed_dev.c 		    p_hwfn->hw_info.personality != QED_PCI_FCOE)
p_hwfn           3728 drivers/net/ethernet/qlogic/qed/qed_dev.c 		else if (p_hwfn->cdev->num_ports_in_engine == 4)
p_hwfn           3729 drivers/net/ethernet/qlogic/qed/qed_dev.c 			*p_resc_start = p_hwfn->port_id;
p_hwfn           3730 drivers/net/ethernet/qlogic/qed/qed_dev.c 		else if (p_hwfn->hw_info.personality == QED_PCI_ISCSI)
p_hwfn           3731 drivers/net/ethernet/qlogic/qed/qed_dev.c 			*p_resc_start = p_hwfn->port_id;
p_hwfn           3732 drivers/net/ethernet/qlogic/qed/qed_dev.c 		else if (p_hwfn->hw_info.personality == QED_PCI_FCOE)
p_hwfn           3733 drivers/net/ethernet/qlogic/qed/qed_dev.c 			*p_resc_start = p_hwfn->port_id + 2;
p_hwfn           3736 drivers/net/ethernet/qlogic/qed/qed_dev.c 		*p_resc_start = *p_resc_num * p_hwfn->enabled_func_idx;
p_hwfn           3743 drivers/net/ethernet/qlogic/qed/qed_dev.c static int __qed_hw_set_resc_info(struct qed_hwfn *p_hwfn,
p_hwfn           3750 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_resc_num = &RESC_NUM(p_hwfn, res_id);
p_hwfn           3751 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_resc_start = &RESC_START(p_hwfn, res_id);
p_hwfn           3753 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_hw_get_dflt_resc(p_hwfn, res_id, &dflt_resc_num,
p_hwfn           3756 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_ERR(p_hwfn,
p_hwfn           3762 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_mcp_get_resc_info(p_hwfn, p_hwfn->p_main_ptt, res_id,
p_hwfn           3765 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn,
p_hwfn           3777 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_INFO(p_hwfn,
p_hwfn           3792 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_INFO(p_hwfn,
p_hwfn           3804 drivers/net/ethernet/qlogic/qed/qed_dev.c static int qed_hw_set_resc_info(struct qed_hwfn *p_hwfn)
p_hwfn           3810 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = __qed_hw_set_resc_info(p_hwfn, res_id);
p_hwfn           3818 drivers/net/ethernet/qlogic/qed/qed_dev.c static int qed_hw_get_ppfid_bitmap(struct qed_hwfn *p_hwfn,
p_hwfn           3821 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn           3827 drivers/net/ethernet/qlogic/qed/qed_dev.c 		native_ppfid_idx = p_hwfn->rel_pf_id;
p_hwfn           3829 drivers/net/ethernet/qlogic/qed/qed_dev.c 		native_ppfid_idx = p_hwfn->rel_pf_id /
p_hwfn           3832 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_mcp_get_ppfid_bitmap(p_hwfn, p_ptt);
p_hwfn           3839 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_INFO(p_hwfn,
p_hwfn           3848 drivers/net/ethernet/qlogic/qed/qed_dev.c static int qed_hw_get_resc(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           3852 drivers/net/ethernet/qlogic/qed/qed_dev.c 	bool b_ah = QED_IS_AH(p_hwfn->cdev);
p_hwfn           3867 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_mcp_resc_lock(p_hwfn, p_ptt, &resc_lock_params);
p_hwfn           3871 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_INFO(p_hwfn,
p_hwfn           3874 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn,
p_hwfn           3878 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_hw_set_soft_resc_size(p_hwfn, p_ptt);
p_hwfn           3880 drivers/net/ethernet/qlogic/qed/qed_dev.c 			DP_NOTICE(p_hwfn,
p_hwfn           3884 drivers/net/ethernet/qlogic/qed/qed_dev.c 			DP_INFO(p_hwfn,
p_hwfn           3886 drivers/net/ethernet/qlogic/qed/qed_dev.c 			rc = qed_mcp_resc_unlock(p_hwfn, p_ptt,
p_hwfn           3889 drivers/net/ethernet/qlogic/qed/qed_dev.c 				DP_INFO(p_hwfn,
p_hwfn           3894 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_hw_set_resc_info(p_hwfn);
p_hwfn           3899 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_mcp_resc_unlock(p_hwfn, p_ptt, &resc_unlock_params);
p_hwfn           3901 drivers/net/ethernet/qlogic/qed/qed_dev.c 			DP_INFO(p_hwfn,
p_hwfn           3906 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (IS_LEAD_HWFN(p_hwfn)) {
p_hwfn           3907 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_hw_get_ppfid_bitmap(p_hwfn, p_ptt);
p_hwfn           3913 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if ((b_ah && (RESC_END(p_hwfn, QED_ILT) > PXP_NUM_ILT_RECORDS_K2)) ||
p_hwfn           3914 drivers/net/ethernet/qlogic/qed/qed_dev.c 	    (!b_ah && (RESC_END(p_hwfn, QED_ILT) > PXP_NUM_ILT_RECORDS_BB))) {
p_hwfn           3915 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn, "Can't assign ILT pages [%08x,...,%08x]\n",
p_hwfn           3916 drivers/net/ethernet/qlogic/qed/qed_dev.c 			  RESC_START(p_hwfn, QED_ILT),
p_hwfn           3917 drivers/net/ethernet/qlogic/qed/qed_dev.c 			  RESC_END(p_hwfn, QED_ILT) - 1);
p_hwfn           3922 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (qed_int_igu_reset_cam(p_hwfn, p_ptt))
p_hwfn           3925 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_hw_set_feat(p_hwfn);
p_hwfn           3928 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_PROBE, "%s = %d start = %d\n",
p_hwfn           3930 drivers/net/ethernet/qlogic/qed/qed_dev.c 			   RESC_NUM(p_hwfn, res_id),
p_hwfn           3931 drivers/net/ethernet/qlogic/qed/qed_dev.c 			   RESC_START(p_hwfn, res_id));
p_hwfn           3937 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_mcp_resc_unlock(p_hwfn, p_ptt, &resc_unlock_params);
p_hwfn           3941 drivers/net/ethernet/qlogic/qed/qed_dev.c static int qed_hw_get_nvm_info(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           3949 drivers/net/ethernet/qlogic/qed/qed_dev.c 	nvm_cfg_addr = qed_rd(p_hwfn, p_ptt, MISC_REG_GEN_PURP_CR0);
p_hwfn           3953 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn, "Shared memory not initialized\n");
p_hwfn           3958 drivers/net/ethernet/qlogic/qed/qed_dev.c 	nvm_cfg1_offset = qed_rd(p_hwfn, p_ptt, nvm_cfg_addr + 4);
p_hwfn           3964 drivers/net/ethernet/qlogic/qed/qed_dev.c 	core_cfg = qed_rd(p_hwfn, p_ptt, addr);
p_hwfn           3969 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->hw_info.port_mode = QED_PORT_MODE_DE_2X40G;
p_hwfn           3972 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->hw_info.port_mode = QED_PORT_MODE_DE_2X50G;
p_hwfn           3975 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->hw_info.port_mode = QED_PORT_MODE_DE_1X100G;
p_hwfn           3978 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->hw_info.port_mode = QED_PORT_MODE_DE_4X10G_F;
p_hwfn           3981 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->hw_info.port_mode = QED_PORT_MODE_DE_4X10G_E;
p_hwfn           3984 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->hw_info.port_mode = QED_PORT_MODE_DE_4X20G;
p_hwfn           3987 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->hw_info.port_mode = QED_PORT_MODE_DE_1X40G;
p_hwfn           3990 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->hw_info.port_mode = QED_PORT_MODE_DE_2X25G;
p_hwfn           3993 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->hw_info.port_mode = QED_PORT_MODE_DE_2X10G;
p_hwfn           3996 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->hw_info.port_mode = QED_PORT_MODE_DE_1X25G;
p_hwfn           3999 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->hw_info.port_mode = QED_PORT_MODE_DE_4X25G;
p_hwfn           4002 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn, "Unknown port mode in 0x%08x\n", core_cfg);
p_hwfn           4007 drivers/net/ethernet/qlogic/qed/qed_dev.c 	link = &p_hwfn->mcp_info->link_input;
p_hwfn           4008 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_caps = &p_hwfn->mcp_info->link_capabilities;
p_hwfn           4010 drivers/net/ethernet/qlogic/qed/qed_dev.c 			offsetof(struct nvm_cfg1, port[MFW_PORT(p_hwfn)]);
p_hwfn           4011 drivers/net/ethernet/qlogic/qed/qed_dev.c 	link_temp = qed_rd(p_hwfn, p_ptt,
p_hwfn           4018 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->mcp_info->link_capabilities.speed_capabilities = link_temp;
p_hwfn           4020 drivers/net/ethernet/qlogic/qed/qed_dev.c 	link_temp = qed_rd(p_hwfn, p_ptt,
p_hwfn           4050 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn, "Unknown Speed in 0x%08x\n", link_temp);
p_hwfn           4053 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->mcp_info->link_capabilities.default_speed_autoneg =
p_hwfn           4066 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (p_hwfn->mcp_info->capabilities & FW_MB_PARAM_FEATURE_SUPPORT_EEE) {
p_hwfn           4067 drivers/net/ethernet/qlogic/qed/qed_dev.c 		link_temp = qed_rd(p_hwfn, p_ptt, port_cfg_addr +
p_hwfn           4097 drivers/net/ethernet/qlogic/qed/qed_dev.c 	DP_VERBOSE(p_hwfn,
p_hwfn           4106 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (IS_LEAD_HWFN(p_hwfn)) {
p_hwfn           4107 drivers/net/ethernet/qlogic/qed/qed_dev.c 		struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn           4114 drivers/net/ethernet/qlogic/qed/qed_dev.c 		generic_cont0 = qed_rd(p_hwfn, p_ptt, addr);
p_hwfn           4146 drivers/net/ethernet/qlogic/qed/qed_dev.c 			if (QED_IS_BB(p_hwfn->cdev))
p_hwfn           4151 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_INFO(p_hwfn, "Multi function mode is 0x%lx\n",
p_hwfn           4155 drivers/net/ethernet/qlogic/qed/qed_dev.c 	DP_INFO(p_hwfn, "Multi function mode is 0x%lx\n",
p_hwfn           4156 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->cdev->mf_bits);
p_hwfn           4163 drivers/net/ethernet/qlogic/qed/qed_dev.c 	device_capabilities = qed_rd(p_hwfn, p_ptt, addr);
p_hwfn           4166 drivers/net/ethernet/qlogic/qed/qed_dev.c 			  &p_hwfn->hw_info.device_capabilities);
p_hwfn           4169 drivers/net/ethernet/qlogic/qed/qed_dev.c 			  &p_hwfn->hw_info.device_capabilities);
p_hwfn           4172 drivers/net/ethernet/qlogic/qed/qed_dev.c 			  &p_hwfn->hw_info.device_capabilities);
p_hwfn           4175 drivers/net/ethernet/qlogic/qed/qed_dev.c 			  &p_hwfn->hw_info.device_capabilities);
p_hwfn           4177 drivers/net/ethernet/qlogic/qed/qed_dev.c 	return qed_mcp_fill_shmem_func_info(p_hwfn, p_ptt);
p_hwfn           4180 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_get_num_funcs(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           4182 drivers/net/ethernet/qlogic/qed/qed_dev.c 	u8 num_funcs, enabled_func_idx = p_hwfn->rel_pf_id;
p_hwfn           4184 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn           4196 drivers/net/ethernet/qlogic/qed/qed_dev.c 	reg_function_hide = qed_rd(p_hwfn, p_ptt, MISCS_REG_FUNCTION_HIDE);
p_hwfn           4200 drivers/net/ethernet/qlogic/qed/qed_dev.c 			if (QED_PATH_ID(p_hwfn) && cdev->num_hwfns == 1) {
p_hwfn           4221 drivers/net/ethernet/qlogic/qed/qed_dev.c 		low_pfs_mask = (0x1 << p_hwfn->abs_pf_id) - 1;
p_hwfn           4230 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->num_funcs_on_engine = num_funcs;
p_hwfn           4231 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->enabled_func_idx = enabled_func_idx;
p_hwfn           4233 drivers/net/ethernet/qlogic/qed/qed_dev.c 	DP_VERBOSE(p_hwfn,
p_hwfn           4236 drivers/net/ethernet/qlogic/qed/qed_dev.c 		   p_hwfn->rel_pf_id,
p_hwfn           4237 drivers/net/ethernet/qlogic/qed/qed_dev.c 		   p_hwfn->abs_pf_id,
p_hwfn           4238 drivers/net/ethernet/qlogic/qed/qed_dev.c 		   p_hwfn->enabled_func_idx, p_hwfn->num_funcs_on_engine);
p_hwfn           4241 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_hw_info_port_num(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           4244 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn           4254 drivers/net/ethernet/qlogic/qed/qed_dev.c 	port_mode = qed_rd(p_hwfn, p_ptt, MISC_REG_PORT_MODE);
p_hwfn           4266 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn, "Unknown port mode 0x%08x\n", port_mode);
p_hwfn           4272 drivers/net/ethernet/qlogic/qed/qed_dev.c 	addr = SECTION_OFFSIZE_ADDR(p_hwfn->mcp_info->public_base,
p_hwfn           4274 drivers/net/ethernet/qlogic/qed/qed_dev.c 	global_offsize = qed_rd(p_hwfn, p_ptt, addr);
p_hwfn           4277 drivers/net/ethernet/qlogic/qed/qed_dev.c 	cdev->num_ports = (u8)qed_rd(p_hwfn, p_ptt, addr);
p_hwfn           4280 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_get_eee_caps(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           4285 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_caps = &p_hwfn->mcp_info->link_capabilities;
p_hwfn           4290 drivers/net/ethernet/qlogic/qed/qed_dev.c 	eee_status = qed_rd(p_hwfn, p_ptt, p_hwfn->mcp_info->port_addr +
p_hwfn           4302 drivers/net/ethernet/qlogic/qed/qed_dev.c qed_get_hw_info(struct qed_hwfn *p_hwfn,
p_hwfn           4309 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (IS_LEAD_HWFN(p_hwfn)) {
p_hwfn           4310 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_iov_hw_info(p_hwfn);
p_hwfn           4315 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (IS_LEAD_HWFN(p_hwfn))
p_hwfn           4316 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_hw_info_port_num(p_hwfn, p_ptt);
p_hwfn           4318 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_mcp_get_capabilities(p_hwfn, p_ptt);
p_hwfn           4320 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_hw_get_nvm_info(p_hwfn, p_ptt);
p_hwfn           4322 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_int_igu_read_cam(p_hwfn, p_ptt);
p_hwfn           4326 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (qed_mcp_is_init(p_hwfn))
p_hwfn           4327 drivers/net/ethernet/qlogic/qed/qed_dev.c 		ether_addr_copy(p_hwfn->hw_info.hw_mac_addr,
p_hwfn           4328 drivers/net/ethernet/qlogic/qed/qed_dev.c 				p_hwfn->mcp_info->func_info.mac);
p_hwfn           4330 drivers/net/ethernet/qlogic/qed/qed_dev.c 		eth_random_addr(p_hwfn->hw_info.hw_mac_addr);
p_hwfn           4332 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (qed_mcp_is_init(p_hwfn)) {
p_hwfn           4333 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (p_hwfn->mcp_info->func_info.ovlan != QED_MCP_VLAN_UNSET)
p_hwfn           4334 drivers/net/ethernet/qlogic/qed/qed_dev.c 			p_hwfn->hw_info.ovlan =
p_hwfn           4335 drivers/net/ethernet/qlogic/qed/qed_dev.c 				p_hwfn->mcp_info->func_info.ovlan;
p_hwfn           4337 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_mcp_cmd_port_init(p_hwfn, p_ptt);
p_hwfn           4339 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_get_eee_caps(p_hwfn, p_ptt);
p_hwfn           4341 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_mcp_read_ufp_config(p_hwfn, p_ptt);
p_hwfn           4344 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (qed_mcp_is_init(p_hwfn)) {
p_hwfn           4347 drivers/net/ethernet/qlogic/qed/qed_dev.c 		protocol = p_hwfn->mcp_info->func_info.protocol;
p_hwfn           4348 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->hw_info.personality = protocol;
p_hwfn           4351 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (QED_IS_ROCE_PERSONALITY(p_hwfn))
p_hwfn           4352 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->hw_info.multi_tc_roce_en = 1;
p_hwfn           4354 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->hw_info.num_hw_tc = NUM_PHYS_TCS_4PORT_K2;
p_hwfn           4355 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->hw_info.num_active_tc = 1;
p_hwfn           4357 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_get_num_funcs(p_hwfn, p_ptt);
p_hwfn           4359 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (qed_mcp_is_init(p_hwfn))
p_hwfn           4360 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->hw_info.mtu = p_hwfn->mcp_info->func_info.mtu;
p_hwfn           4362 drivers/net/ethernet/qlogic/qed/qed_dev.c 	return qed_hw_get_resc(p_hwfn, p_ptt);
p_hwfn           4365 drivers/net/ethernet/qlogic/qed/qed_dev.c static int qed_get_dev_info(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           4367 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn           4385 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn, "Unknown device id 0x%x\n", cdev->device_id);
p_hwfn           4389 drivers/net/ethernet/qlogic/qed/qed_dev.c 	cdev->chip_num = (u16)qed_rd(p_hwfn, p_ptt, MISCS_REG_CHIP_NUM);
p_hwfn           4390 drivers/net/ethernet/qlogic/qed/qed_dev.c 	cdev->chip_rev = (u16)qed_rd(p_hwfn, p_ptt, MISCS_REG_CHIP_REV);
p_hwfn           4395 drivers/net/ethernet/qlogic/qed/qed_dev.c 	tmp = qed_rd(p_hwfn, p_ptt, MISCS_REG_CMT_ENABLED_FOR_PAIR);
p_hwfn           4397 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (tmp & (1 << p_hwfn->rel_pf_id)) {
p_hwfn           4404 drivers/net/ethernet/qlogic/qed/qed_dev.c 	cdev->chip_bond_id = qed_rd(p_hwfn, p_ptt,
p_hwfn           4407 drivers/net/ethernet/qlogic/qed/qed_dev.c 	cdev->chip_metal = (u16)qed_rd(p_hwfn, p_ptt, MISCS_REG_CHIP_METAL);
p_hwfn           4421 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_nvm_info_free(struct qed_hwfn *p_hwfn)
p_hwfn           4423 drivers/net/ethernet/qlogic/qed/qed_dev.c 	kfree(p_hwfn->nvm_info.image_att);
p_hwfn           4424 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->nvm_info.image_att = NULL;
p_hwfn           4427 drivers/net/ethernet/qlogic/qed/qed_dev.c static int qed_hw_prepare_single(struct qed_hwfn *p_hwfn,
p_hwfn           4433 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn           4437 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->regview = p_regview;
p_hwfn           4438 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->doorbells = p_doorbells;
p_hwfn           4439 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->db_phys_addr = db_phys_addr;
p_hwfn           4441 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (IS_VF(p_hwfn->cdev))
p_hwfn           4442 drivers/net/ethernet/qlogic/qed/qed_dev.c 		return qed_vf_hw_prepare(p_hwfn);
p_hwfn           4445 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (REG_RD(p_hwfn, PXP_PF_ME_OPAQUE_ADDR) == 0xffffffff) {
p_hwfn           4446 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_ERR(p_hwfn,
p_hwfn           4451 drivers/net/ethernet/qlogic/qed/qed_dev.c 	get_function_id(p_hwfn);
p_hwfn           4454 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_ptt_pool_alloc(p_hwfn);
p_hwfn           4459 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->p_main_ptt = qed_get_reserved_ptt(p_hwfn, RESERVED_PTT_MAIN);
p_hwfn           4462 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (!p_hwfn->my_id) {
p_hwfn           4463 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_get_dev_info(p_hwfn, p_hwfn->p_main_ptt);
p_hwfn           4468 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_hw_hwfn_prepare(p_hwfn);
p_hwfn           4471 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_mcp_cmd_init(p_hwfn, p_hwfn->p_main_ptt);
p_hwfn           4473 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn, "Failed initializing mcp command\n");
p_hwfn           4478 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_get_hw_info(p_hwfn, p_hwfn->p_main_ptt, personality);
p_hwfn           4480 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn, "Failed to get HW information\n");
p_hwfn           4487 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (IS_LEAD_HWFN(p_hwfn) && !cdev->recov_in_prog) {
p_hwfn           4488 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_mcp_initiate_pf_flr(p_hwfn, p_hwfn->p_main_ptt);
p_hwfn           4490 drivers/net/ethernet/qlogic/qed/qed_dev.c 			DP_NOTICE(p_hwfn, "Failed to initiate PF FLR\n");
p_hwfn           4494 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (IS_LEAD_HWFN(p_hwfn)) {
p_hwfn           4495 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_mcp_nvm_info_populate(p_hwfn);
p_hwfn           4497 drivers/net/ethernet/qlogic/qed/qed_dev.c 			DP_NOTICE(p_hwfn,
p_hwfn           4504 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_init_alloc(p_hwfn);
p_hwfn           4510 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (IS_LEAD_HWFN(p_hwfn))
p_hwfn           4511 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_nvm_info_free(p_hwfn);
p_hwfn           4513 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (IS_LEAD_HWFN(p_hwfn))
p_hwfn           4514 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_iov_free_hw_info(p_hwfn->cdev);
p_hwfn           4515 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_mcp_free(p_hwfn);
p_hwfn           4517 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_hw_hwfn_free(p_hwfn);
p_hwfn           4525 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn           4533 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_hw_prepare_single(p_hwfn,
p_hwfn           4541 drivers/net/ethernet/qlogic/qed/qed_dev.c 	personality = p_hwfn->hw_info.personality;
p_hwfn           4550 drivers/net/ethernet/qlogic/qed/qed_dev.c 		offset = qed_hw_bar_size(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           4554 drivers/net/ethernet/qlogic/qed/qed_dev.c 		offset = qed_hw_bar_size(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           4571 drivers/net/ethernet/qlogic/qed/qed_dev.c 				qed_init_free(p_hwfn);
p_hwfn           4572 drivers/net/ethernet/qlogic/qed/qed_dev.c 				qed_nvm_info_free(p_hwfn);
p_hwfn           4573 drivers/net/ethernet/qlogic/qed/qed_dev.c 				qed_mcp_free(p_hwfn);
p_hwfn           4574 drivers/net/ethernet/qlogic/qed/qed_dev.c 				qed_hw_hwfn_free(p_hwfn);
p_hwfn           4584 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn           4588 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_mcp_ov_update_driver_state(p_hwfn, p_hwfn->p_main_ptt,
p_hwfn           4592 drivers/net/ethernet/qlogic/qed/qed_dev.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           4595 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_vf_pf_release(p_hwfn);
p_hwfn           4599 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_init_free(p_hwfn);
p_hwfn           4600 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_hw_hwfn_free(p_hwfn);
p_hwfn           4601 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_mcp_free(p_hwfn);
p_hwfn           4606 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_nvm_info_free(p_hwfn);
p_hwfn           4882 drivers/net/ethernet/qlogic/qed/qed_dev.c int qed_fw_l2_queue(struct qed_hwfn *p_hwfn, u16 src_id, u16 *dst_id)
p_hwfn           4884 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (src_id >= RESC_NUM(p_hwfn, QED_L2_QUEUE)) {
p_hwfn           4887 drivers/net/ethernet/qlogic/qed/qed_dev.c 		min = (u16) RESC_START(p_hwfn, QED_L2_QUEUE);
p_hwfn           4888 drivers/net/ethernet/qlogic/qed/qed_dev.c 		max = min + RESC_NUM(p_hwfn, QED_L2_QUEUE);
p_hwfn           4889 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn,
p_hwfn           4896 drivers/net/ethernet/qlogic/qed/qed_dev.c 	*dst_id = RESC_START(p_hwfn, QED_L2_QUEUE) + src_id;
p_hwfn           4901 drivers/net/ethernet/qlogic/qed/qed_dev.c int qed_fw_vport(struct qed_hwfn *p_hwfn, u8 src_id, u8 *dst_id)
p_hwfn           4903 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (src_id >= RESC_NUM(p_hwfn, QED_VPORT)) {
p_hwfn           4906 drivers/net/ethernet/qlogic/qed/qed_dev.c 		min = (u8)RESC_START(p_hwfn, QED_VPORT);
p_hwfn           4907 drivers/net/ethernet/qlogic/qed/qed_dev.c 		max = min + RESC_NUM(p_hwfn, QED_VPORT);
p_hwfn           4908 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn,
p_hwfn           4915 drivers/net/ethernet/qlogic/qed/qed_dev.c 	*dst_id = RESC_START(p_hwfn, QED_VPORT) + src_id;
p_hwfn           4920 drivers/net/ethernet/qlogic/qed/qed_dev.c int qed_fw_rss_eng(struct qed_hwfn *p_hwfn, u8 src_id, u8 *dst_id)
p_hwfn           4922 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (src_id >= RESC_NUM(p_hwfn, QED_RSS_ENG)) {
p_hwfn           4925 drivers/net/ethernet/qlogic/qed/qed_dev.c 		min = (u8)RESC_START(p_hwfn, QED_RSS_ENG);
p_hwfn           4926 drivers/net/ethernet/qlogic/qed/qed_dev.c 		max = min + RESC_NUM(p_hwfn, QED_RSS_ENG);
p_hwfn           4927 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn,
p_hwfn           4934 drivers/net/ethernet/qlogic/qed/qed_dev.c 	*dst_id = RESC_START(p_hwfn, QED_RSS_ENG) + src_id;
p_hwfn           4939 drivers/net/ethernet/qlogic/qed/qed_dev.c static int qed_set_coalesce(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
p_hwfn           4945 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (p_hwfn->cdev->int_coalescing_mode != QED_COAL_MODE_ENABLE) {
p_hwfn           4946 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn, "Coalescing configuration not enabled\n");
p_hwfn           4954 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_memcpy_to(p_hwfn, p_ptt, hw_addr, p_eth_qzone, eth_qzone_size);
p_hwfn           4962 drivers/net/ethernet/qlogic/qed/qed_dev.c 	struct qed_hwfn *p_hwfn;
p_hwfn           4966 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn = p_cid->p_owner;
p_hwfn           4968 drivers/net/ethernet/qlogic/qed/qed_dev.c 	if (IS_VF(p_hwfn->cdev))
p_hwfn           4969 drivers/net/ethernet/qlogic/qed/qed_dev.c 		return qed_vf_pf_set_coalesce(p_hwfn, rx_coal, tx_coal, p_cid);
p_hwfn           4971 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           4976 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_set_rxq_coalesce(p_hwfn, p_ptt, rx_coal, p_cid);
p_hwfn           4979 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->cdev->rx_coalesce_usecs = rx_coal;
p_hwfn           4983 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_set_txq_coalesce(p_hwfn, p_ptt, tx_coal, p_cid);
p_hwfn           4986 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->cdev->tx_coalesce_usecs = tx_coal;
p_hwfn           4989 drivers/net/ethernet/qlogic/qed/qed_dev.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           4993 drivers/net/ethernet/qlogic/qed/qed_dev.c int qed_set_rxq_coalesce(struct qed_hwfn *p_hwfn,
p_hwfn           5010 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_ERR(p_hwfn, "Invalid coalesce value - %d\n", coalesce);
p_hwfn           5015 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_int_set_timer_res(p_hwfn, p_ptt, timer_res,
p_hwfn           5023 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_set_coalesce(p_hwfn, p_ptt, address, &eth_qzone,
p_hwfn           5032 drivers/net/ethernet/qlogic/qed/qed_dev.c int qed_set_txq_coalesce(struct qed_hwfn *p_hwfn,
p_hwfn           5049 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_ERR(p_hwfn, "Invalid coalesce value - %d\n", coalesce);
p_hwfn           5054 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_int_set_timer_res(p_hwfn, p_ptt, timer_res,
p_hwfn           5062 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_set_coalesce(p_hwfn, p_ptt, address, &eth_qzone,
p_hwfn           5072 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_configure_wfq_for_all_vports(struct qed_hwfn *p_hwfn,
p_hwfn           5079 drivers/net/ethernet/qlogic/qed/qed_dev.c 	vport_params = p_hwfn->qm_info.qm_vport_params;
p_hwfn           5081 drivers/net/ethernet/qlogic/qed/qed_dev.c 	for (i = 0; i < p_hwfn->qm_info.num_vports; i++) {
p_hwfn           5082 drivers/net/ethernet/qlogic/qed/qed_dev.c 		u32 wfq_speed = p_hwfn->qm_info.wfq_data[i].min_speed;
p_hwfn           5086 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_init_vport_wfq(p_hwfn, p_ptt,
p_hwfn           5092 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_init_wfq_default_param(struct qed_hwfn *p_hwfn,
p_hwfn           5098 drivers/net/ethernet/qlogic/qed/qed_dev.c 	for (i = 0; i < p_hwfn->qm_info.num_vports; i++)
p_hwfn           5099 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->qm_info.qm_vport_params[i].vport_wfq = 1;
p_hwfn           5102 drivers/net/ethernet/qlogic/qed/qed_dev.c static void qed_disable_wfq_for_all_vports(struct qed_hwfn *p_hwfn,
p_hwfn           5109 drivers/net/ethernet/qlogic/qed/qed_dev.c 	vport_params = p_hwfn->qm_info.qm_vport_params;
p_hwfn           5111 drivers/net/ethernet/qlogic/qed/qed_dev.c 	for (i = 0; i < p_hwfn->qm_info.num_vports; i++) {
p_hwfn           5112 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_init_wfq_default_param(p_hwfn, min_pf_rate);
p_hwfn           5113 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_init_vport_wfq(p_hwfn, p_ptt,
p_hwfn           5126 drivers/net/ethernet/qlogic/qed/qed_dev.c static int qed_init_wfq_param(struct qed_hwfn *p_hwfn,
p_hwfn           5132 drivers/net/ethernet/qlogic/qed/qed_dev.c 	num_vports = p_hwfn->qm_info.num_vports;
p_hwfn           5139 drivers/net/ethernet/qlogic/qed/qed_dev.c 		    p_hwfn->qm_info.wfq_data[i].configured) {
p_hwfn           5141 drivers/net/ethernet/qlogic/qed/qed_dev.c 			tmp_speed = p_hwfn->qm_info.wfq_data[i].min_speed;
p_hwfn           5152 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_LINK,
p_hwfn           5159 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_LINK,
p_hwfn           5166 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_LINK,
p_hwfn           5176 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_LINK,
p_hwfn           5182 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->qm_info.wfq_data[vport_id].min_speed = req_rate;
p_hwfn           5183 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->qm_info.wfq_data[vport_id].configured = true;
p_hwfn           5186 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (p_hwfn->qm_info.wfq_data[i].configured)
p_hwfn           5189 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->qm_info.wfq_data[i].min_speed = left_rate_per_vp;
p_hwfn           5195 drivers/net/ethernet/qlogic/qed/qed_dev.c static int __qed_configure_vport_wfq(struct qed_hwfn *p_hwfn,
p_hwfn           5201 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_link = &p_hwfn->cdev->hwfns[0].mcp_info->link_output;
p_hwfn           5204 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->qm_info.wfq_data[vp_id].min_speed = rate;
p_hwfn           5205 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->qm_info.wfq_data[vp_id].configured = true;
p_hwfn           5209 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_init_wfq_param(p_hwfn, vp_id, rate, p_link->min_pf_rate);
p_hwfn           5212 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_configure_wfq_for_all_vports(p_hwfn, p_ptt,
p_hwfn           5215 drivers/net/ethernet/qlogic/qed/qed_dev.c 		DP_NOTICE(p_hwfn,
p_hwfn           5221 drivers/net/ethernet/qlogic/qed/qed_dev.c static int __qed_configure_vp_wfq_on_link_change(struct qed_hwfn *p_hwfn,
p_hwfn           5230 drivers/net/ethernet/qlogic/qed/qed_dev.c 	for (i = 0; i < p_hwfn->qm_info.num_vports; i++) {
p_hwfn           5233 drivers/net/ethernet/qlogic/qed/qed_dev.c 		if (!p_hwfn->qm_info.wfq_data[i].configured)
p_hwfn           5236 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rate = p_hwfn->qm_info.wfq_data[i].min_speed;
p_hwfn           5239 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = qed_init_wfq_param(p_hwfn, i, rate, min_pf_rate);
p_hwfn           5241 drivers/net/ethernet/qlogic/qed/qed_dev.c 			DP_NOTICE(p_hwfn,
p_hwfn           5248 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_configure_wfq_for_all_vports(p_hwfn, p_ptt, min_pf_rate);
p_hwfn           5250 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_disable_wfq_for_all_vports(p_hwfn, p_ptt, min_pf_rate);
p_hwfn           5271 drivers/net/ethernet/qlogic/qed/qed_dev.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           5274 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           5278 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = __qed_configure_vport_wfq(p_hwfn, p_ptt, vp_id, rate);
p_hwfn           5281 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           5285 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           5305 drivers/net/ethernet/qlogic/qed/qed_dev.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           5307 drivers/net/ethernet/qlogic/qed/qed_dev.c 		__qed_configure_vp_wfq_on_link_change(p_hwfn, p_ptt,
p_hwfn           5312 drivers/net/ethernet/qlogic/qed/qed_dev.c int __qed_configure_pf_max_bandwidth(struct qed_hwfn *p_hwfn,
p_hwfn           5319 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->mcp_info->func_info.bandwidth_max = max_bw;
p_hwfn           5325 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->qm_info.pf_rl = p_link->speed;
p_hwfn           5332 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_hwfn->qm_info.pf_rl = 100000;
p_hwfn           5334 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_init_pf_rl(p_hwfn, p_ptt, p_hwfn->rel_pf_id,
p_hwfn           5335 drivers/net/ethernet/qlogic/qed/qed_dev.c 			    p_hwfn->qm_info.pf_rl);
p_hwfn           5337 drivers/net/ethernet/qlogic/qed/qed_dev.c 	DP_VERBOSE(p_hwfn, NETIF_MSG_LINK,
p_hwfn           5355 drivers/net/ethernet/qlogic/qed/qed_dev.c 		struct qed_hwfn	*p_hwfn = &cdev->hwfns[i];
p_hwfn           5362 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           5366 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = __qed_configure_pf_max_bandwidth(p_hwfn, p_ptt,
p_hwfn           5369 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           5378 drivers/net/ethernet/qlogic/qed/qed_dev.c int __qed_configure_pf_min_bandwidth(struct qed_hwfn *p_hwfn,
p_hwfn           5385 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->mcp_info->func_info.bandwidth_min = min_bw;
p_hwfn           5386 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_hwfn->qm_info.pf_wfq = min_bw;
p_hwfn           5393 drivers/net/ethernet/qlogic/qed/qed_dev.c 	rc = qed_init_pf_wfq(p_hwfn, p_ptt, p_hwfn->rel_pf_id, min_bw);
p_hwfn           5395 drivers/net/ethernet/qlogic/qed/qed_dev.c 	DP_VERBOSE(p_hwfn, NETIF_MSG_LINK,
p_hwfn           5413 drivers/net/ethernet/qlogic/qed/qed_dev.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           5420 drivers/net/ethernet/qlogic/qed/qed_dev.c 		p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           5424 drivers/net/ethernet/qlogic/qed/qed_dev.c 		rc = __qed_configure_pf_min_bandwidth(p_hwfn, p_ptt,
p_hwfn           5427 drivers/net/ethernet/qlogic/qed/qed_dev.c 			qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           5434 drivers/net/ethernet/qlogic/qed/qed_dev.c 			rc = __qed_configure_vp_wfq_on_link_change(p_hwfn,
p_hwfn           5439 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           5445 drivers/net/ethernet/qlogic/qed/qed_dev.c void qed_clean_wfq_db(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           5449 drivers/net/ethernet/qlogic/qed/qed_dev.c 	p_link = &p_hwfn->mcp_info->link_output;
p_hwfn           5452 drivers/net/ethernet/qlogic/qed/qed_dev.c 		qed_disable_wfq_for_all_vports(p_hwfn, p_ptt,
p_hwfn           5455 drivers/net/ethernet/qlogic/qed/qed_dev.c 	memset(p_hwfn->qm_info.wfq_data, 0,
p_hwfn           5456 drivers/net/ethernet/qlogic/qed/qed_dev.c 	       sizeof(*p_hwfn->qm_info.wfq_data) * p_hwfn->qm_info.num_vports);
p_hwfn            180 drivers/net/ethernet/qlogic/qed/qed_dev_api.h int qed_hw_start_fastpath(struct qed_hwfn *p_hwfn);
p_hwfn            211 drivers/net/ethernet/qlogic/qed/qed_dev_api.h struct qed_ptt *qed_ptt_acquire(struct qed_hwfn *p_hwfn);
p_hwfn            223 drivers/net/ethernet/qlogic/qed/qed_dev_api.h void qed_ptt_release(struct qed_hwfn *p_hwfn,
p_hwfn            269 drivers/net/ethernet/qlogic/qed/qed_dev_api.h qed_dmae_host2grc(struct qed_hwfn *p_hwfn,
p_hwfn            286 drivers/net/ethernet/qlogic/qed/qed_dev_api.h int qed_dmae_grc2host(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
p_hwfn            301 drivers/net/ethernet/qlogic/qed/qed_dev_api.h int qed_dmae_host2host(struct qed_hwfn *p_hwfn,
p_hwfn            346 drivers/net/ethernet/qlogic/qed/qed_dev_api.h int qed_fw_l2_queue(struct qed_hwfn *p_hwfn,
p_hwfn            359 drivers/net/ethernet/qlogic/qed/qed_dev_api.h int qed_fw_vport(struct qed_hwfn *p_hwfn,
p_hwfn            372 drivers/net/ethernet/qlogic/qed/qed_dev_api.h int qed_fw_rss_eng(struct qed_hwfn *p_hwfn,
p_hwfn            489 drivers/net/ethernet/qlogic/qed/qed_dev_api.h int qed_final_cleanup(struct qed_hwfn *p_hwfn,
p_hwfn            501 drivers/net/ethernet/qlogic/qed/qed_dev_api.h int qed_get_queue_coalesce(struct qed_hwfn *p_hwfn, u16 *coal, void *handle);
p_hwfn            531 drivers/net/ethernet/qlogic/qed/qed_dev_api.h int qed_pglueb_set_pfid_enable(struct qed_hwfn *p_hwfn,
p_hwfn            111 drivers/net/ethernet/qlogic/qed/qed_fcoe.c qed_sp_fcoe_func_start(struct qed_hwfn *p_hwfn,
p_hwfn            129 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	init_data.cid = qed_spq_get_cid(p_hwfn);
p_hwfn            130 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            134 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            142 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	fcoe_pf_params = &p_hwfn->pf_params.fcoe_pf_params;
p_hwfn            145 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	if (fcoe_pf_params->num_cqs > p_hwfn->hw_info.feat_num[QED_FCOE_CQ]) {
p_hwfn            146 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		DP_ERR(p_hwfn,
p_hwfn            149 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		       p_hwfn->hw_info.feat_num[QED_FCOE_CQ]);
p_hwfn            158 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	rc = qed_cxt_acquire_cid(p_hwfn, PROTOCOLID_FCOE, &dummy_cid);
p_hwfn            163 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	rc = qed_cxt_get_cid_info(p_hwfn, &cxt_info);
p_hwfn            165 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		DP_NOTICE(p_hwfn, "Cannot find context info for dummy cid=%d\n",
p_hwfn            192 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	tmp = (u16)p_hwfn->hw_info.resc_start[QED_CMDQS_CQS];
p_hwfn            198 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		igu_sb_id = qed_get_igu_sb_id(p_hwfn, i);
p_hwfn            206 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	p_data->q_params.bdq_resource_id = (u8)RESC_START(p_hwfn, QED_BDQ);
p_hwfn            241 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            246 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	qed_sp_destroy_request(p_hwfn, p_ent);
p_hwfn            251 drivers/net/ethernet/qlogic/qed/qed_fcoe.c qed_sp_fcoe_conn_offload(struct qed_hwfn *p_hwfn,
p_hwfn            266 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            270 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            280 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	physical_q0 = qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_OFLD);
p_hwfn            321 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	if (test_bit(QED_MF_UFP_SPECIFIC, &p_hwfn->cdev->mf_bits))
p_hwfn            326 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            330 drivers/net/ethernet/qlogic/qed/qed_fcoe.c qed_sp_fcoe_conn_destroy(struct qed_hwfn *p_hwfn,
p_hwfn            343 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            347 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            357 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            361 drivers/net/ethernet/qlogic/qed/qed_fcoe.c qed_sp_fcoe_func_stop(struct qed_hwfn *p_hwfn,
p_hwfn            373 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	init_data.cid = p_hwfn->pf_params.fcoe_pf_params.dummy_icid;
p_hwfn            374 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            378 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            384 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	active_segs = qed_rd(p_hwfn, p_ptt, TM_REG_PF_ENABLE_TASK);
p_hwfn            386 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	qed_wr(p_hwfn, p_ptt, TM_REG_PF_ENABLE_TASK, active_segs);
p_hwfn            388 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            392 drivers/net/ethernet/qlogic/qed/qed_fcoe.c qed_fcoe_allocate_connection(struct qed_hwfn *p_hwfn,
p_hwfn            399 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	spin_lock_bh(&p_hwfn->p_fcoe_info->lock);
p_hwfn            400 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	if (!list_empty(&p_hwfn->p_fcoe_info->free_list))
p_hwfn            402 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		    list_first_entry(&p_hwfn->p_fcoe_info->free_list,
p_hwfn            406 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		spin_unlock_bh(&p_hwfn->p_fcoe_info->lock);
p_hwfn            410 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	spin_unlock_bh(&p_hwfn->p_fcoe_info->lock);
p_hwfn            416 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	p_addr = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            424 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		p_addr = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            435 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	p_addr = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            443 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		p_addr = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            459 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            465 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 			dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            470 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            476 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 			dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            485 drivers/net/ethernet/qlogic/qed/qed_fcoe.c static void qed_fcoe_free_connection(struct qed_hwfn *p_hwfn,
p_hwfn            494 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            502 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            509 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            517 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            525 drivers/net/ethernet/qlogic/qed/qed_fcoe.c static void __iomem *qed_fcoe_get_db_addr(struct qed_hwfn *p_hwfn, u32 cid)
p_hwfn            527 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	return (u8 __iomem *)p_hwfn->doorbells +
p_hwfn            531 drivers/net/ethernet/qlogic/qed/qed_fcoe.c static void __iomem *qed_fcoe_get_primary_bdq_prod(struct qed_hwfn *p_hwfn,
p_hwfn            534 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	if (RESC_NUM(p_hwfn, QED_BDQ)) {
p_hwfn            535 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		return (u8 __iomem *)p_hwfn->regview +
p_hwfn            537 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		       MSTORM_SCSI_BDQ_EXT_PROD_OFFSET(RESC_START(p_hwfn,
p_hwfn            541 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		DP_NOTICE(p_hwfn, "BDQ is not allocated!\n");
p_hwfn            546 drivers/net/ethernet/qlogic/qed/qed_fcoe.c static void __iomem *qed_fcoe_get_secondary_bdq_prod(struct qed_hwfn *p_hwfn,
p_hwfn            549 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	if (RESC_NUM(p_hwfn, QED_BDQ)) {
p_hwfn            550 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		return (u8 __iomem *)p_hwfn->regview +
p_hwfn            552 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		       TSTORM_SCSI_BDQ_EXT_PROD_OFFSET(RESC_START(p_hwfn,
p_hwfn            556 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		DP_NOTICE(p_hwfn, "BDQ is not allocated!\n");
p_hwfn            561 drivers/net/ethernet/qlogic/qed/qed_fcoe.c int qed_fcoe_alloc(struct qed_hwfn *p_hwfn)
p_hwfn            568 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		DP_NOTICE(p_hwfn, "Failed to allocate qed_fcoe_info'\n");
p_hwfn            573 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	p_hwfn->p_fcoe_info = p_fcoe_info;
p_hwfn            577 drivers/net/ethernet/qlogic/qed/qed_fcoe.c void qed_fcoe_setup(struct qed_hwfn *p_hwfn)
p_hwfn            583 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	spin_lock_init(&p_hwfn->p_fcoe_info->lock);
p_hwfn            584 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	for (i = 0; i < p_hwfn->pf_params.fcoe_pf_params.num_tasks; i++) {
p_hwfn            585 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		rc = qed_cxt_get_task_ctx(p_hwfn, i,
p_hwfn            601 drivers/net/ethernet/qlogic/qed/qed_fcoe.c void qed_fcoe_free(struct qed_hwfn *p_hwfn)
p_hwfn            605 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	if (!p_hwfn->p_fcoe_info)
p_hwfn            608 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	while (!list_empty(&p_hwfn->p_fcoe_info->free_list)) {
p_hwfn            609 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		p_conn = list_first_entry(&p_hwfn->p_fcoe_info->free_list,
p_hwfn            614 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		qed_fcoe_free_connection(p_hwfn, p_conn);
p_hwfn            617 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	kfree(p_hwfn->p_fcoe_info);
p_hwfn            618 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	p_hwfn->p_fcoe_info = NULL;
p_hwfn            622 drivers/net/ethernet/qlogic/qed/qed_fcoe.c qed_fcoe_acquire_connection(struct qed_hwfn *p_hwfn,
p_hwfn            630 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	spin_lock_bh(&p_hwfn->p_fcoe_info->lock);
p_hwfn            631 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	rc = qed_cxt_acquire_cid(p_hwfn, PROTOCOLID_FCOE, &icid);
p_hwfn            632 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	spin_unlock_bh(&p_hwfn->p_fcoe_info->lock);
p_hwfn            640 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		rc = qed_fcoe_allocate_connection(p_hwfn, &p_conn);
p_hwfn            642 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 			spin_lock_bh(&p_hwfn->p_fcoe_info->lock);
p_hwfn            643 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 			qed_cxt_release_cid(p_hwfn, icid);
p_hwfn            644 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 			spin_unlock_bh(&p_hwfn->p_fcoe_info->lock);
p_hwfn            650 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	p_conn->fw_cid = (p_hwfn->hw_info.opaque_fid << 16) | icid;
p_hwfn            656 drivers/net/ethernet/qlogic/qed/qed_fcoe.c static void qed_fcoe_release_connection(struct qed_hwfn *p_hwfn,
p_hwfn            659 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	spin_lock_bh(&p_hwfn->p_fcoe_info->lock);
p_hwfn            660 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	list_add_tail(&p_conn->list_entry, &p_hwfn->p_fcoe_info->free_list);
p_hwfn            661 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	qed_cxt_release_cid(p_hwfn, p_conn->icid);
p_hwfn            662 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	spin_unlock_bh(&p_hwfn->p_fcoe_info->lock);
p_hwfn            665 drivers/net/ethernet/qlogic/qed/qed_fcoe.c static void _qed_fcoe_get_tstats(struct qed_hwfn *p_hwfn,
p_hwfn            674 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	    TSTORM_FCOE_RX_STATS_OFFSET(p_hwfn->rel_pf_id);
p_hwfn            675 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	qed_memcpy_from(p_hwfn, p_ptt, &tstats, tstats_addr, sizeof(tstats));
p_hwfn            697 drivers/net/ethernet/qlogic/qed/qed_fcoe.c static void _qed_fcoe_get_pstats(struct qed_hwfn *p_hwfn,
p_hwfn            706 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	    PSTORM_FCOE_TX_STATS_OFFSET(p_hwfn->rel_pf_id);
p_hwfn            707 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	qed_memcpy_from(p_hwfn, p_ptt, &pstats, pstats_addr, sizeof(pstats));
p_hwfn            718 drivers/net/ethernet/qlogic/qed/qed_fcoe.c static int qed_fcoe_get_stats(struct qed_hwfn *p_hwfn,
p_hwfn            725 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn            728 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 		DP_ERR(p_hwfn, "Failed to acquire ptt\n");
p_hwfn            732 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	_qed_fcoe_get_tstats(p_hwfn, p_ptt, p_stats);
p_hwfn            733 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	_qed_fcoe_get_pstats(p_hwfn, p_ptt, p_stats);
p_hwfn            735 drivers/net/ethernet/qlogic/qed/qed_fcoe.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn             52 drivers/net/ethernet/qlogic/qed/qed_fcoe.h int qed_fcoe_alloc(struct qed_hwfn *p_hwfn);
p_hwfn             54 drivers/net/ethernet/qlogic/qed/qed_fcoe.h void qed_fcoe_setup(struct qed_hwfn *p_hwfn);
p_hwfn             56 drivers/net/ethernet/qlogic/qed/qed_fcoe.h void qed_fcoe_free(struct qed_hwfn *p_hwfn);
p_hwfn             60 drivers/net/ethernet/qlogic/qed/qed_fcoe.h static inline int qed_fcoe_alloc(struct qed_hwfn *p_hwfn)
p_hwfn             65 drivers/net/ethernet/qlogic/qed/qed_fcoe.h static inline void qed_fcoe_setup(struct qed_hwfn *p_hwfn) {}
p_hwfn             66 drivers/net/ethernet/qlogic/qed/qed_fcoe.h static inline void qed_fcoe_free(struct qed_hwfn *p_hwfn) {}
p_hwfn           3007 drivers/net/ethernet/qlogic/qed/qed_hsi.h void qed_read_regs(struct qed_hwfn *p_hwfn,
p_hwfn           3025 drivers/net/ethernet/qlogic/qed/qed_hsi.h bool qed_read_fw_info(struct qed_hwfn *p_hwfn,
p_hwfn           3039 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_dbg_grc_config(struct qed_hwfn *p_hwfn,
p_hwfn           3049 drivers/net/ethernet/qlogic/qed/qed_hsi.h void qed_dbg_grc_set_params_default(struct qed_hwfn *p_hwfn);
p_hwfn           3063 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_dbg_grc_get_dump_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           3081 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_dbg_grc_dump(struct qed_hwfn *p_hwfn,
p_hwfn           3100 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_dbg_idle_chk_get_dump_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           3119 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_dbg_idle_chk_dump(struct qed_hwfn *p_hwfn,
p_hwfn           3140 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_dbg_mcp_trace_get_dump_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           3163 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_dbg_mcp_trace_dump(struct qed_hwfn *p_hwfn,
p_hwfn           3181 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_dbg_reg_fifo_get_dump_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           3201 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_dbg_reg_fifo_dump(struct qed_hwfn *p_hwfn,
p_hwfn           3220 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_dbg_igu_fifo_get_dump_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           3240 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_dbg_igu_fifo_dump(struct qed_hwfn *p_hwfn,
p_hwfn           3260 drivers/net/ethernet/qlogic/qed/qed_hsi.h qed_dbg_protection_override_get_dump_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           3279 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_dbg_protection_override_dump(struct qed_hwfn *p_hwfn,
p_hwfn           3296 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_dbg_fw_asserts_get_dump_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           3314 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_dbg_fw_asserts_dump(struct qed_hwfn *p_hwfn,
p_hwfn           3335 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_dbg_read_attn(struct qed_hwfn *p_hwfn,
p_hwfn           3353 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_dbg_print_attn(struct qed_hwfn *p_hwfn,
p_hwfn           3394 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_dbg_alloc_user_data(struct qed_hwfn *p_hwfn);
p_hwfn           3417 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_get_idle_chk_results_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           3433 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_print_idle_chk_results(struct qed_hwfn *p_hwfn,
p_hwfn           3449 drivers/net/ethernet/qlogic/qed/qed_hsi.h void qed_dbg_mcp_trace_set_meta_data(struct qed_hwfn *p_hwfn,
p_hwfn           3464 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_get_mcp_trace_results_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           3479 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_print_mcp_trace_results(struct qed_hwfn *p_hwfn,
p_hwfn           3496 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_print_mcp_trace_results_cont(struct qed_hwfn *p_hwfn,
p_hwfn           3510 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_print_mcp_trace_line(struct qed_hwfn *p_hwfn,
p_hwfn           3521 drivers/net/ethernet/qlogic/qed/qed_hsi.h void qed_mcp_trace_free_meta_data(struct qed_hwfn *p_hwfn);
p_hwfn           3535 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_get_reg_fifo_results_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           3550 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_print_reg_fifo_results(struct qed_hwfn *p_hwfn,
p_hwfn           3567 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_get_igu_fifo_results_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           3582 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_print_igu_fifo_results(struct qed_hwfn *p_hwfn,
p_hwfn           3600 drivers/net/ethernet/qlogic/qed/qed_hsi.h qed_get_protection_override_results_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           3616 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_print_protection_override_results(struct qed_hwfn *p_hwfn,
p_hwfn           3633 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_get_fw_asserts_results_buf_size(struct qed_hwfn *p_hwfn,
p_hwfn           3648 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_print_fw_asserts_results(struct qed_hwfn *p_hwfn,
p_hwfn           3664 drivers/net/ethernet/qlogic/qed/qed_hsi.h enum dbg_status qed_dbg_parse_attn(struct qed_hwfn *p_hwfn,
p_hwfn           3990 drivers/net/ethernet/qlogic/qed/qed_hsi.h int qed_qm_common_rt_init(struct qed_hwfn *p_hwfn,
p_hwfn           4013 drivers/net/ethernet/qlogic/qed/qed_hsi.h int qed_qm_pf_rt_init(struct qed_hwfn *p_hwfn,
p_hwfn           4027 drivers/net/ethernet/qlogic/qed/qed_hsi.h int qed_init_pf_wfq(struct qed_hwfn *p_hwfn,
p_hwfn           4040 drivers/net/ethernet/qlogic/qed/qed_hsi.h int qed_init_pf_rl(struct qed_hwfn *p_hwfn,
p_hwfn           4055 drivers/net/ethernet/qlogic/qed/qed_hsi.h int qed_init_vport_wfq(struct qed_hwfn *p_hwfn,
p_hwfn           4070 drivers/net/ethernet/qlogic/qed/qed_hsi.h int qed_init_vport_rl(struct qed_hwfn *p_hwfn,
p_hwfn           4087 drivers/net/ethernet/qlogic/qed/qed_hsi.h bool qed_send_qm_stop_cmd(struct qed_hwfn *p_hwfn,
p_hwfn           4099 drivers/net/ethernet/qlogic/qed/qed_hsi.h void qed_set_vxlan_dest_port(struct qed_hwfn *p_hwfn,
p_hwfn           4109 drivers/net/ethernet/qlogic/qed/qed_hsi.h void qed_set_vxlan_enable(struct qed_hwfn *p_hwfn,
p_hwfn           4120 drivers/net/ethernet/qlogic/qed/qed_hsi.h void qed_set_gre_enable(struct qed_hwfn *p_hwfn,
p_hwfn           4131 drivers/net/ethernet/qlogic/qed/qed_hsi.h void qed_set_geneve_dest_port(struct qed_hwfn *p_hwfn,
p_hwfn           4141 drivers/net/ethernet/qlogic/qed/qed_hsi.h void qed_set_geneve_enable(struct qed_hwfn *p_hwfn,
p_hwfn           4145 drivers/net/ethernet/qlogic/qed/qed_hsi.h void qed_set_vxlan_no_l2_enable(struct qed_hwfn *p_hwfn,
p_hwfn           4155 drivers/net/ethernet/qlogic/qed/qed_hsi.h void qed_gft_disable(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, u16 pf_id);
p_hwfn           4169 drivers/net/ethernet/qlogic/qed/qed_hsi.h void qed_gft_config(struct qed_hwfn *p_hwfn,
p_hwfn           4183 drivers/net/ethernet/qlogic/qed/qed_hsi.h void qed_enable_context_validation(struct qed_hwfn *p_hwfn,
p_hwfn           4242 drivers/net/ethernet/qlogic/qed/qed_hsi.h void qed_set_rdma_error_level(struct qed_hwfn *p_hwfn,
p_hwfn             70 drivers/net/ethernet/qlogic/qed/qed_hw.c int qed_ptt_pool_alloc(struct qed_hwfn *p_hwfn)
p_hwfn             83 drivers/net/ethernet/qlogic/qed/qed_hw.c 		p_pool->ptts[i].hwfn_id = p_hwfn->my_id;
p_hwfn             89 drivers/net/ethernet/qlogic/qed/qed_hw.c 	p_hwfn->p_ptt_pool = p_pool;
p_hwfn             95 drivers/net/ethernet/qlogic/qed/qed_hw.c void qed_ptt_invalidate(struct qed_hwfn *p_hwfn)
p_hwfn            101 drivers/net/ethernet/qlogic/qed/qed_hw.c 		p_ptt = &p_hwfn->p_ptt_pool->ptts[i];
p_hwfn            106 drivers/net/ethernet/qlogic/qed/qed_hw.c void qed_ptt_pool_free(struct qed_hwfn *p_hwfn)
p_hwfn            108 drivers/net/ethernet/qlogic/qed/qed_hw.c 	kfree(p_hwfn->p_ptt_pool);
p_hwfn            109 drivers/net/ethernet/qlogic/qed/qed_hw.c 	p_hwfn->p_ptt_pool = NULL;
p_hwfn            112 drivers/net/ethernet/qlogic/qed/qed_hw.c struct qed_ptt *qed_ptt_acquire(struct qed_hwfn *p_hwfn)
p_hwfn            119 drivers/net/ethernet/qlogic/qed/qed_hw.c 		spin_lock_bh(&p_hwfn->p_ptt_pool->lock);
p_hwfn            121 drivers/net/ethernet/qlogic/qed/qed_hw.c 		if (!list_empty(&p_hwfn->p_ptt_pool->free_list)) {
p_hwfn            122 drivers/net/ethernet/qlogic/qed/qed_hw.c 			p_ptt = list_first_entry(&p_hwfn->p_ptt_pool->free_list,
p_hwfn            126 drivers/net/ethernet/qlogic/qed/qed_hw.c 			spin_unlock_bh(&p_hwfn->p_ptt_pool->lock);
p_hwfn            128 drivers/net/ethernet/qlogic/qed/qed_hw.c 			DP_VERBOSE(p_hwfn, NETIF_MSG_HW,
p_hwfn            133 drivers/net/ethernet/qlogic/qed/qed_hw.c 		spin_unlock_bh(&p_hwfn->p_ptt_pool->lock);
p_hwfn            137 drivers/net/ethernet/qlogic/qed/qed_hw.c 	DP_NOTICE(p_hwfn, "PTT acquire timeout - failed to allocate PTT\n");
p_hwfn            141 drivers/net/ethernet/qlogic/qed/qed_hw.c void qed_ptt_release(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn            143 drivers/net/ethernet/qlogic/qed/qed_hw.c 	spin_lock_bh(&p_hwfn->p_ptt_pool->lock);
p_hwfn            144 drivers/net/ethernet/qlogic/qed/qed_hw.c 	list_add(&p_ptt->list_entry, &p_hwfn->p_ptt_pool->free_list);
p_hwfn            145 drivers/net/ethernet/qlogic/qed/qed_hw.c 	spin_unlock_bh(&p_hwfn->p_ptt_pool->lock);
p_hwfn            148 drivers/net/ethernet/qlogic/qed/qed_hw.c u32 qed_ptt_get_hw_addr(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn            166 drivers/net/ethernet/qlogic/qed/qed_hw.c void qed_ptt_set_win(struct qed_hwfn *p_hwfn,
p_hwfn            171 drivers/net/ethernet/qlogic/qed/qed_hw.c 	prev_hw_addr = qed_ptt_get_hw_addr(p_hwfn, p_ptt);
p_hwfn            177 drivers/net/ethernet/qlogic/qed/qed_hw.c 	DP_VERBOSE(p_hwfn, NETIF_MSG_HW,
p_hwfn            184 drivers/net/ethernet/qlogic/qed/qed_hw.c 	REG_WR(p_hwfn,
p_hwfn            190 drivers/net/ethernet/qlogic/qed/qed_hw.c static u32 qed_set_ptt(struct qed_hwfn *p_hwfn,
p_hwfn            193 drivers/net/ethernet/qlogic/qed/qed_hw.c 	u32 win_hw_addr = qed_ptt_get_hw_addr(p_hwfn, p_ptt);
p_hwfn            198 drivers/net/ethernet/qlogic/qed/qed_hw.c 	if (p_ptt->hwfn_id != p_hwfn->my_id)
p_hwfn            199 drivers/net/ethernet/qlogic/qed/qed_hw.c 		DP_NOTICE(p_hwfn,
p_hwfn            201 drivers/net/ethernet/qlogic/qed/qed_hw.c 			  p_ptt->idx, p_ptt->hwfn_id, p_hwfn->my_id);
p_hwfn            206 drivers/net/ethernet/qlogic/qed/qed_hw.c 		qed_ptt_set_win(p_hwfn, p_ptt, hw_addr);
p_hwfn            213 drivers/net/ethernet/qlogic/qed/qed_hw.c struct qed_ptt *qed_get_reserved_ptt(struct qed_hwfn *p_hwfn,
p_hwfn            217 drivers/net/ethernet/qlogic/qed/qed_hw.c 		DP_NOTICE(p_hwfn,
p_hwfn            222 drivers/net/ethernet/qlogic/qed/qed_hw.c 	return &p_hwfn->p_ptt_pool->ptts[ptt_idx];
p_hwfn            225 drivers/net/ethernet/qlogic/qed/qed_hw.c void qed_wr(struct qed_hwfn *p_hwfn,
p_hwfn            229 drivers/net/ethernet/qlogic/qed/qed_hw.c 	u32 bar_addr = qed_set_ptt(p_hwfn, p_ptt, hw_addr);
p_hwfn            231 drivers/net/ethernet/qlogic/qed/qed_hw.c 	REG_WR(p_hwfn, bar_addr, val);
p_hwfn            232 drivers/net/ethernet/qlogic/qed/qed_hw.c 	DP_VERBOSE(p_hwfn, NETIF_MSG_HW,
p_hwfn            237 drivers/net/ethernet/qlogic/qed/qed_hw.c u32 qed_rd(struct qed_hwfn *p_hwfn,
p_hwfn            241 drivers/net/ethernet/qlogic/qed/qed_hw.c 	u32 bar_addr = qed_set_ptt(p_hwfn, p_ptt, hw_addr);
p_hwfn            242 drivers/net/ethernet/qlogic/qed/qed_hw.c 	u32 val = REG_RD(p_hwfn, bar_addr);
p_hwfn            244 drivers/net/ethernet/qlogic/qed/qed_hw.c 	DP_VERBOSE(p_hwfn, NETIF_MSG_HW,
p_hwfn            251 drivers/net/ethernet/qlogic/qed/qed_hw.c static void qed_memcpy_hw(struct qed_hwfn *p_hwfn,
p_hwfn            263 drivers/net/ethernet/qlogic/qed/qed_hw.c 		if (IS_PF(p_hwfn->cdev)) {
p_hwfn            264 drivers/net/ethernet/qlogic/qed/qed_hw.c 			qed_ptt_set_win(p_hwfn, p_ptt, hw_addr + done);
p_hwfn            272 drivers/net/ethernet/qlogic/qed/qed_hw.c 		reg_addr = (u32 __iomem *)REG_ADDR(p_hwfn, hw_offset);
p_hwfn            284 drivers/net/ethernet/qlogic/qed/qed_hw.c void qed_memcpy_from(struct qed_hwfn *p_hwfn,
p_hwfn            287 drivers/net/ethernet/qlogic/qed/qed_hw.c 	DP_VERBOSE(p_hwfn, NETIF_MSG_HW,
p_hwfn            291 drivers/net/ethernet/qlogic/qed/qed_hw.c 	qed_memcpy_hw(p_hwfn, p_ptt, dest, hw_addr, n, false);
p_hwfn            294 drivers/net/ethernet/qlogic/qed/qed_hw.c void qed_memcpy_to(struct qed_hwfn *p_hwfn,
p_hwfn            297 drivers/net/ethernet/qlogic/qed/qed_hw.c 	DP_VERBOSE(p_hwfn, NETIF_MSG_HW,
p_hwfn            301 drivers/net/ethernet/qlogic/qed/qed_hw.c 	qed_memcpy_hw(p_hwfn, p_ptt, src, hw_addr, n, true);
p_hwfn            304 drivers/net/ethernet/qlogic/qed/qed_hw.c void qed_fid_pretend(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, u16 fid)
p_hwfn            324 drivers/net/ethernet/qlogic/qed/qed_hw.c 	REG_WR(p_hwfn,
p_hwfn            330 drivers/net/ethernet/qlogic/qed/qed_hw.c void qed_port_pretend(struct qed_hwfn *p_hwfn,
p_hwfn            341 drivers/net/ethernet/qlogic/qed/qed_hw.c 	REG_WR(p_hwfn,
p_hwfn            347 drivers/net/ethernet/qlogic/qed/qed_hw.c void qed_port_unpretend(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn            357 drivers/net/ethernet/qlogic/qed/qed_hw.c 	REG_WR(p_hwfn,
p_hwfn            363 drivers/net/ethernet/qlogic/qed/qed_hw.c void qed_port_fid_pretend(struct qed_hwfn *p_hwfn,
p_hwfn            377 drivers/net/ethernet/qlogic/qed/qed_hw.c 	REG_WR(p_hwfn,
p_hwfn            383 drivers/net/ethernet/qlogic/qed/qed_hw.c u32 qed_vfid_to_concrete(struct qed_hwfn *p_hwfn, u8 vfid)
p_hwfn            387 drivers/net/ethernet/qlogic/qed/qed_hw.c 	SET_FIELD(concrete_fid, PXP_CONCRETE_FID_PFID, p_hwfn->rel_pf_id);
p_hwfn            398 drivers/net/ethernet/qlogic/qed/qed_hw.c static void qed_dmae_opcode(struct qed_hwfn *p_hwfn,
p_hwfn            415 drivers/net/ethernet/qlogic/qed/qed_hw.c 		   p_params->src_pfid : p_hwfn->rel_pf_id;
p_hwfn            424 drivers/net/ethernet/qlogic/qed/qed_hw.c 		   p_params->dst_pfid : p_hwfn->rel_pf_id;
p_hwfn            442 drivers/net/ethernet/qlogic/qed/qed_hw.c 		   p_params->port_id : p_hwfn->port_id;
p_hwfn            469 drivers/net/ethernet/qlogic/qed/qed_hw.c 	p_hwfn->dmae_info.p_dmae_cmd->opcode = cpu_to_le32(opcode);
p_hwfn            470 drivers/net/ethernet/qlogic/qed/qed_hw.c 	p_hwfn->dmae_info.p_dmae_cmd->opcode_b = cpu_to_le16(opcode_b);
p_hwfn            479 drivers/net/ethernet/qlogic/qed/qed_hw.c static int qed_dmae_post_command(struct qed_hwfn *p_hwfn,
p_hwfn            482 drivers/net/ethernet/qlogic/qed/qed_hw.c 	struct dmae_cmd *p_command = p_hwfn->dmae_info.p_dmae_cmd;
p_hwfn            483 drivers/net/ethernet/qlogic/qed/qed_hw.c 	u8 idx_cmd = p_hwfn->dmae_info.channel, i;
p_hwfn            489 drivers/net/ethernet/qlogic/qed/qed_hw.c 		DP_NOTICE(p_hwfn,
p_hwfn            504 drivers/net/ethernet/qlogic/qed/qed_hw.c 	DP_VERBOSE(p_hwfn,
p_hwfn            526 drivers/net/ethernet/qlogic/qed/qed_hw.c 		qed_wr(p_hwfn, p_ptt,
p_hwfn            532 drivers/net/ethernet/qlogic/qed/qed_hw.c 	qed_wr(p_hwfn, p_ptt, qed_dmae_idx_to_go_cmd(idx_cmd), DMAE_GO_VALUE);
p_hwfn            537 drivers/net/ethernet/qlogic/qed/qed_hw.c int qed_dmae_info_alloc(struct qed_hwfn *p_hwfn)
p_hwfn            539 drivers/net/ethernet/qlogic/qed/qed_hw.c 	dma_addr_t *p_addr = &p_hwfn->dmae_info.completion_word_phys_addr;
p_hwfn            540 drivers/net/ethernet/qlogic/qed/qed_hw.c 	struct dmae_cmd **p_cmd = &p_hwfn->dmae_info.p_dmae_cmd;
p_hwfn            541 drivers/net/ethernet/qlogic/qed/qed_hw.c 	u32 **p_buff = &p_hwfn->dmae_info.p_intermediate_buffer;
p_hwfn            542 drivers/net/ethernet/qlogic/qed/qed_hw.c 	u32 **p_comp = &p_hwfn->dmae_info.p_completion_word;
p_hwfn            544 drivers/net/ethernet/qlogic/qed/qed_hw.c 	*p_comp = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            549 drivers/net/ethernet/qlogic/qed/qed_hw.c 	p_addr = &p_hwfn->dmae_info.dmae_cmd_phys_addr;
p_hwfn            550 drivers/net/ethernet/qlogic/qed/qed_hw.c 	*p_cmd = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            556 drivers/net/ethernet/qlogic/qed/qed_hw.c 	p_addr = &p_hwfn->dmae_info.intermediate_buffer_phys_addr;
p_hwfn            557 drivers/net/ethernet/qlogic/qed/qed_hw.c 	*p_buff = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            563 drivers/net/ethernet/qlogic/qed/qed_hw.c 	p_hwfn->dmae_info.channel = p_hwfn->rel_pf_id;
p_hwfn            567 drivers/net/ethernet/qlogic/qed/qed_hw.c 	qed_dmae_info_free(p_hwfn);
p_hwfn            571 drivers/net/ethernet/qlogic/qed/qed_hw.c void qed_dmae_info_free(struct qed_hwfn *p_hwfn)
p_hwfn            576 drivers/net/ethernet/qlogic/qed/qed_hw.c 	mutex_lock(&p_hwfn->dmae_info.mutex);
p_hwfn            578 drivers/net/ethernet/qlogic/qed/qed_hw.c 	if (p_hwfn->dmae_info.p_completion_word) {
p_hwfn            579 drivers/net/ethernet/qlogic/qed/qed_hw.c 		p_phys = p_hwfn->dmae_info.completion_word_phys_addr;
p_hwfn            580 drivers/net/ethernet/qlogic/qed/qed_hw.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            582 drivers/net/ethernet/qlogic/qed/qed_hw.c 				  p_hwfn->dmae_info.p_completion_word, p_phys);
p_hwfn            583 drivers/net/ethernet/qlogic/qed/qed_hw.c 		p_hwfn->dmae_info.p_completion_word = NULL;
p_hwfn            586 drivers/net/ethernet/qlogic/qed/qed_hw.c 	if (p_hwfn->dmae_info.p_dmae_cmd) {
p_hwfn            587 drivers/net/ethernet/qlogic/qed/qed_hw.c 		p_phys = p_hwfn->dmae_info.dmae_cmd_phys_addr;
p_hwfn            588 drivers/net/ethernet/qlogic/qed/qed_hw.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            590 drivers/net/ethernet/qlogic/qed/qed_hw.c 				  p_hwfn->dmae_info.p_dmae_cmd, p_phys);
p_hwfn            591 drivers/net/ethernet/qlogic/qed/qed_hw.c 		p_hwfn->dmae_info.p_dmae_cmd = NULL;
p_hwfn            594 drivers/net/ethernet/qlogic/qed/qed_hw.c 	if (p_hwfn->dmae_info.p_intermediate_buffer) {
p_hwfn            595 drivers/net/ethernet/qlogic/qed/qed_hw.c 		p_phys = p_hwfn->dmae_info.intermediate_buffer_phys_addr;
p_hwfn            596 drivers/net/ethernet/qlogic/qed/qed_hw.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            598 drivers/net/ethernet/qlogic/qed/qed_hw.c 				  p_hwfn->dmae_info.p_intermediate_buffer,
p_hwfn            600 drivers/net/ethernet/qlogic/qed/qed_hw.c 		p_hwfn->dmae_info.p_intermediate_buffer = NULL;
p_hwfn            603 drivers/net/ethernet/qlogic/qed/qed_hw.c 	mutex_unlock(&p_hwfn->dmae_info.mutex);
p_hwfn            606 drivers/net/ethernet/qlogic/qed/qed_hw.c static int qed_dmae_operation_wait(struct qed_hwfn *p_hwfn)
p_hwfn            612 drivers/net/ethernet/qlogic/qed/qed_hw.c 	while (*p_hwfn->dmae_info.p_completion_word != DMAE_COMPLETION_VAL) {
p_hwfn            615 drivers/net/ethernet/qlogic/qed/qed_hw.c 			DP_NOTICE(p_hwfn->cdev,
p_hwfn            617 drivers/net/ethernet/qlogic/qed/qed_hw.c 				  *p_hwfn->dmae_info.p_completion_word,
p_hwfn            630 drivers/net/ethernet/qlogic/qed/qed_hw.c 		*p_hwfn->dmae_info.p_completion_word = 0;
p_hwfn            635 drivers/net/ethernet/qlogic/qed/qed_hw.c static int qed_dmae_execute_sub_operation(struct qed_hwfn *p_hwfn,
p_hwfn            643 drivers/net/ethernet/qlogic/qed/qed_hw.c 	dma_addr_t phys = p_hwfn->dmae_info.intermediate_buffer_phys_addr;
p_hwfn            644 drivers/net/ethernet/qlogic/qed/qed_hw.c 	struct dmae_cmd *cmd = p_hwfn->dmae_info.p_dmae_cmd;
p_hwfn            657 drivers/net/ethernet/qlogic/qed/qed_hw.c 		memcpy(&p_hwfn->dmae_info.p_intermediate_buffer[0],
p_hwfn            682 drivers/net/ethernet/qlogic/qed/qed_hw.c 	qed_dmae_post_command(p_hwfn, p_ptt);
p_hwfn            684 drivers/net/ethernet/qlogic/qed/qed_hw.c 	qed_status = qed_dmae_operation_wait(p_hwfn);
p_hwfn            687 drivers/net/ethernet/qlogic/qed/qed_hw.c 		DP_NOTICE(p_hwfn,
p_hwfn            695 drivers/net/ethernet/qlogic/qed/qed_hw.c 		       &p_hwfn->dmae_info.p_intermediate_buffer[0],
p_hwfn            701 drivers/net/ethernet/qlogic/qed/qed_hw.c static int qed_dmae_execute_command(struct qed_hwfn *p_hwfn,
p_hwfn            708 drivers/net/ethernet/qlogic/qed/qed_hw.c 	dma_addr_t phys = p_hwfn->dmae_info.completion_word_phys_addr;
p_hwfn            710 drivers/net/ethernet/qlogic/qed/qed_hw.c 	struct dmae_cmd *cmd = p_hwfn->dmae_info.p_dmae_cmd;
p_hwfn            716 drivers/net/ethernet/qlogic/qed/qed_hw.c 	if (p_hwfn->cdev->recov_in_prog) {
p_hwfn            717 drivers/net/ethernet/qlogic/qed/qed_hw.c 		DP_VERBOSE(p_hwfn,
p_hwfn            727 drivers/net/ethernet/qlogic/qed/qed_hw.c 	qed_dmae_opcode(p_hwfn,
p_hwfn            764 drivers/net/ethernet/qlogic/qed/qed_hw.c 		qed_status = qed_dmae_execute_sub_operation(p_hwfn,
p_hwfn            772 drivers/net/ethernet/qlogic/qed/qed_hw.c 			DP_NOTICE(p_hwfn,
p_hwfn            782 drivers/net/ethernet/qlogic/qed/qed_hw.c int qed_dmae_host2grc(struct qed_hwfn *p_hwfn,
p_hwfn            791 drivers/net/ethernet/qlogic/qed/qed_hw.c 	mutex_lock(&p_hwfn->dmae_info.mutex);
p_hwfn            793 drivers/net/ethernet/qlogic/qed/qed_hw.c 	rc = qed_dmae_execute_command(p_hwfn, p_ptt, source_addr,
p_hwfn            799 drivers/net/ethernet/qlogic/qed/qed_hw.c 	mutex_unlock(&p_hwfn->dmae_info.mutex);
p_hwfn            804 drivers/net/ethernet/qlogic/qed/qed_hw.c int qed_dmae_grc2host(struct qed_hwfn *p_hwfn,
p_hwfn            814 drivers/net/ethernet/qlogic/qed/qed_hw.c 	mutex_lock(&p_hwfn->dmae_info.mutex);
p_hwfn            816 drivers/net/ethernet/qlogic/qed/qed_hw.c 	rc = qed_dmae_execute_command(p_hwfn, p_ptt, grc_addr_in_dw,
p_hwfn            821 drivers/net/ethernet/qlogic/qed/qed_hw.c 	mutex_unlock(&p_hwfn->dmae_info.mutex);
p_hwfn            826 drivers/net/ethernet/qlogic/qed/qed_hw.c int qed_dmae_host2host(struct qed_hwfn *p_hwfn,
p_hwfn            834 drivers/net/ethernet/qlogic/qed/qed_hw.c 	mutex_lock(&(p_hwfn->dmae_info.mutex));
p_hwfn            836 drivers/net/ethernet/qlogic/qed/qed_hw.c 	rc = qed_dmae_execute_command(p_hwfn, p_ptt, source_addr,
p_hwfn            842 drivers/net/ethernet/qlogic/qed/qed_hw.c 	mutex_unlock(&(p_hwfn->dmae_info.mutex));
p_hwfn            847 drivers/net/ethernet/qlogic/qed/qed_hw.c int qed_dmae_sanity(struct qed_hwfn *p_hwfn,
p_hwfn            856 drivers/net/ethernet/qlogic/qed/qed_hw.c 	p_virt = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            859 drivers/net/ethernet/qlogic/qed/qed_hw.c 		DP_NOTICE(p_hwfn,
p_hwfn            876 drivers/net/ethernet/qlogic/qed/qed_hw.c 	DP_VERBOSE(p_hwfn,
p_hwfn            883 drivers/net/ethernet/qlogic/qed/qed_hw.c 	rc = qed_dmae_host2host(p_hwfn, p_ptt, p_phys, p_phys + size,
p_hwfn            886 drivers/net/ethernet/qlogic/qed/qed_hw.c 		DP_NOTICE(p_hwfn,
p_hwfn            899 drivers/net/ethernet/qlogic/qed/qed_hw.c 			DP_NOTICE(p_hwfn,
p_hwfn            910 drivers/net/ethernet/qlogic/qed/qed_hw.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev, 2 * size, p_virt, p_phys);
p_hwfn             86 drivers/net/ethernet/qlogic/qed/qed_hw.h void qed_gtt_init(struct qed_hwfn *p_hwfn);
p_hwfn             93 drivers/net/ethernet/qlogic/qed/qed_hw.h void qed_ptt_invalidate(struct qed_hwfn *p_hwfn);
p_hwfn            102 drivers/net/ethernet/qlogic/qed/qed_hw.h int qed_ptt_pool_alloc(struct qed_hwfn *p_hwfn);
p_hwfn            109 drivers/net/ethernet/qlogic/qed/qed_hw.h void qed_ptt_pool_free(struct qed_hwfn *p_hwfn);
p_hwfn            119 drivers/net/ethernet/qlogic/qed/qed_hw.h u32 qed_ptt_get_hw_addr(struct qed_hwfn *p_hwfn,
p_hwfn            139 drivers/net/ethernet/qlogic/qed/qed_hw.h void qed_ptt_set_win(struct qed_hwfn *p_hwfn,
p_hwfn            151 drivers/net/ethernet/qlogic/qed/qed_hw.h struct qed_ptt *qed_get_reserved_ptt(struct qed_hwfn *p_hwfn,
p_hwfn            162 drivers/net/ethernet/qlogic/qed/qed_hw.h void qed_wr(struct qed_hwfn *p_hwfn,
p_hwfn            175 drivers/net/ethernet/qlogic/qed/qed_hw.h u32 qed_rd(struct qed_hwfn *p_hwfn,
p_hwfn            189 drivers/net/ethernet/qlogic/qed/qed_hw.h void qed_memcpy_from(struct qed_hwfn *p_hwfn,
p_hwfn            205 drivers/net/ethernet/qlogic/qed/qed_hw.h void qed_memcpy_to(struct qed_hwfn *p_hwfn,
p_hwfn            221 drivers/net/ethernet/qlogic/qed/qed_hw.h void qed_fid_pretend(struct qed_hwfn *p_hwfn,
p_hwfn            233 drivers/net/ethernet/qlogic/qed/qed_hw.h void qed_port_pretend(struct qed_hwfn *p_hwfn,
p_hwfn            244 drivers/net/ethernet/qlogic/qed/qed_hw.h void qed_port_unpretend(struct qed_hwfn *p_hwfn,
p_hwfn            256 drivers/net/ethernet/qlogic/qed/qed_hw.h void qed_port_fid_pretend(struct qed_hwfn *p_hwfn,
p_hwfn            267 drivers/net/ethernet/qlogic/qed/qed_hw.h u32 qed_vfid_to_concrete(struct qed_hwfn *p_hwfn, u8 vfid);
p_hwfn            281 drivers/net/ethernet/qlogic/qed/qed_hw.h int qed_dmae_info_alloc(struct qed_hwfn *p_hwfn);
p_hwfn            289 drivers/net/ethernet/qlogic/qed/qed_hw.h void qed_dmae_info_free(struct qed_hwfn *p_hwfn);
p_hwfn            315 drivers/net/ethernet/qlogic/qed/qed_hw.h int qed_dmae_sanity(struct qed_hwfn *p_hwfn,
p_hwfn            181 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c #define QM_INIT_TX_PQ_MAP(p_hwfn, map, chip, pq_id, rl_valid, vp_pq_id, rl_id, \
p_hwfn            195 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		STORE_RT_REG(p_hwfn, QM_REG_TXPQMAP_RT_OFFSET + (pq_id), \
p_hwfn            210 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c static u8 qed_get_ext_voq(struct qed_hwfn *p_hwfn,
p_hwfn            220 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c static void qed_enable_pf_rl(struct qed_hwfn *p_hwfn, bool pf_rl_en)
p_hwfn            222 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	STORE_RT_REG(p_hwfn, QM_REG_RLPFENABLE_RT_OFFSET, pf_rl_en ? 1 : 0);
p_hwfn            228 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		STORE_RT_REG(p_hwfn,
p_hwfn            232 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 			STORE_RT_REG(p_hwfn, QM_REG_RLPFVOQENABLE_MSB_RT_OFFSET,
p_hwfn            236 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		STORE_RT_REG(p_hwfn,
p_hwfn            238 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		STORE_RT_REG(p_hwfn,
p_hwfn            244 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 			STORE_RT_REG(p_hwfn,
p_hwfn            251 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c static void qed_enable_pf_wfq(struct qed_hwfn *p_hwfn, bool pf_wfq_en)
p_hwfn            253 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	STORE_RT_REG(p_hwfn, QM_REG_WFQPFENABLE_RT_OFFSET, pf_wfq_en ? 1 : 0);
p_hwfn            257 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		STORE_RT_REG(p_hwfn,
p_hwfn            263 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c static void qed_enable_vport_rl(struct qed_hwfn *p_hwfn, bool vport_rl_en)
p_hwfn            265 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	STORE_RT_REG(p_hwfn, QM_REG_RLGLBLENABLE_RT_OFFSET,
p_hwfn            269 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		STORE_RT_REG(p_hwfn,
p_hwfn            272 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		STORE_RT_REG(p_hwfn,
p_hwfn            278 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 			STORE_RT_REG(p_hwfn,
p_hwfn            285 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c static void qed_enable_vport_wfq(struct qed_hwfn *p_hwfn, bool vport_wfq_en)
p_hwfn            287 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	STORE_RT_REG(p_hwfn, QM_REG_WFQVPENABLE_RT_OFFSET,
p_hwfn            292 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		STORE_RT_REG(p_hwfn,
p_hwfn            300 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c static void qed_cmdq_lines_voq_rt_init(struct qed_hwfn *p_hwfn,
p_hwfn            305 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	OVERWRITE_RT_REG(p_hwfn, PBF_CMDQ_LINES_RT_OFFSET(ext_voq),
p_hwfn            307 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	STORE_RT_REG(p_hwfn, QM_REG_VOQCRDLINE_RT_OFFSET + ext_voq,
p_hwfn            309 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	STORE_RT_REG(p_hwfn, QM_REG_VOQINITCRDLINE_RT_OFFSET + ext_voq,
p_hwfn            315 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	struct qed_hwfn *p_hwfn,
p_hwfn            325 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		STORE_RT_REG(p_hwfn, PBF_CMDQ_LINES_RT_OFFSET(ext_voq), 0);
p_hwfn            350 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 			ext_voq = qed_get_ext_voq(p_hwfn,
p_hwfn            355 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 				qed_cmdq_lines_voq_rt_init(p_hwfn,
p_hwfn            361 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		ext_voq = qed_get_ext_voq(p_hwfn,
p_hwfn            364 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		qed_cmdq_lines_voq_rt_init(p_hwfn,
p_hwfn            370 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	struct qed_hwfn *p_hwfn,
p_hwfn            408 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 					qed_get_ext_voq(p_hwfn,
p_hwfn            412 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 				STORE_RT_REG(p_hwfn,
p_hwfn            419 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		ext_voq = qed_get_ext_voq(p_hwfn,
p_hwfn            422 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		STORE_RT_REG(p_hwfn, PBF_BTB_GUARANTEED_RT_OFFSET(ext_voq),
p_hwfn            428 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c static void qed_tx_pq_map_rt_init(struct qed_hwfn *p_hwfn,
p_hwfn            452 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		STORE_RT_REG(p_hwfn, QM_REG_PQTX2PF_0_RT_OFFSET + pq_group,
p_hwfn            456 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	STORE_RT_REG(p_hwfn, QM_REG_MAXPQSIZE_0_RT_OFFSET,
p_hwfn            458 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	STORE_RT_REG(p_hwfn, QM_REG_MAXPQSIZE_1_RT_OFFSET,
p_hwfn            469 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		ext_voq = qed_get_ext_voq(p_hwfn,
p_hwfn            489 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 			STORE_RT_REG(p_hwfn,
p_hwfn            497 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 			DP_NOTICE(p_hwfn,
p_hwfn            503 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		QM_INIT_TX_PQ_MAP(p_hwfn,
p_hwfn            513 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		STORE_RT_REG(p_hwfn,
p_hwfn            520 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 				STORE_RT_REG(p_hwfn,
p_hwfn            535 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 			qed_wr(p_hwfn, p_ptt, PQ_INFO_RAM_GRC_ADDRESS(pq_id),
p_hwfn            553 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 			STORE_RT_REG(p_hwfn,
p_hwfn            559 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c static void qed_other_pq_map_rt_init(struct qed_hwfn *p_hwfn,
p_hwfn            577 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	STORE_RT_REG(p_hwfn, QM_REG_PQOTHER2PF_0_RT_OFFSET + pq_group,
p_hwfn            581 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	STORE_RT_REG(p_hwfn, QM_REG_MAXPQSIZE_2_RT_OFFSET,
p_hwfn            587 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		STORE_RT_REG(p_hwfn,
p_hwfn            594 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 				STORE_RT_REG(p_hwfn,
p_hwfn            605 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c static int qed_pf_wfq_rt_init(struct qed_hwfn *p_hwfn,
p_hwfn            617 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		DP_NOTICE(p_hwfn, "Invalid PF WFQ weight configuration\n");
p_hwfn            622 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		ext_voq = qed_get_ext_voq(p_hwfn,
p_hwfn            632 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		OVERWRITE_RT_REG(p_hwfn,
p_hwfn            636 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	STORE_RT_REG(p_hwfn,
p_hwfn            639 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	STORE_RT_REG(p_hwfn, QM_REG_WFQPFWEIGHT_RT_OFFSET + p_params->pf_id,
p_hwfn            648 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c static int qed_pf_rl_rt_init(struct qed_hwfn *p_hwfn, u8 pf_id, u32 pf_rl)
p_hwfn            653 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		DP_NOTICE(p_hwfn, "Invalid PF rate limit configuration\n");
p_hwfn            657 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	STORE_RT_REG(p_hwfn,
p_hwfn            660 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	STORE_RT_REG(p_hwfn,
p_hwfn            663 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	STORE_RT_REG(p_hwfn, QM_REG_RLPFINCVAL_RT_OFFSET + pf_id, inc_val);
p_hwfn            671 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c static int qed_vp_wfq_rt_init(struct qed_hwfn *p_hwfn,
p_hwfn            686 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 			DP_NOTICE(p_hwfn,
p_hwfn            695 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 				STORE_RT_REG(p_hwfn,
p_hwfn            699 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 				STORE_RT_REG(p_hwfn,
p_hwfn            712 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c static int qed_vport_rl_rt_init(struct qed_hwfn *p_hwfn,
p_hwfn            722 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		DP_NOTICE(p_hwfn,
p_hwfn            733 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 			DP_NOTICE(p_hwfn,
p_hwfn            738 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		STORE_RT_REG(p_hwfn, QM_REG_RLGLBLCRD_RT_OFFSET + vport_id,
p_hwfn            740 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		STORE_RT_REG(p_hwfn,
p_hwfn            744 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		STORE_RT_REG(p_hwfn, QM_REG_RLGLBLINCVAL_RT_OFFSET + vport_id,
p_hwfn            751 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c static bool qed_poll_on_qm_cmd_ready(struct qed_hwfn *p_hwfn,
p_hwfn            759 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		reg_val = qed_rd(p_hwfn, p_ptt, QM_REG_SDMCMDREADY);
p_hwfn            764 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_HW,
p_hwfn            772 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c static bool qed_send_qm_cmd(struct qed_hwfn *p_hwfn,
p_hwfn            776 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	if (!qed_poll_on_qm_cmd_ready(p_hwfn, p_ptt))
p_hwfn            779 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, QM_REG_SDMCMDADDR, cmd_addr);
p_hwfn            780 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, QM_REG_SDMCMDDATALSB, cmd_data_lsb);
p_hwfn            781 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, QM_REG_SDMCMDDATAMSB, cmd_data_msb);
p_hwfn            782 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, QM_REG_SDMCMDGO, 1);
p_hwfn            783 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, QM_REG_SDMCMDGO, 0);
p_hwfn            785 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	return qed_poll_on_qm_cmd_ready(p_hwfn, p_ptt);
p_hwfn            799 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c int qed_qm_common_rt_init(struct qed_hwfn *p_hwfn,
p_hwfn            819 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	STORE_RT_REG(p_hwfn, QM_REG_AFULLOPRTNSTCCRDMASK_RT_OFFSET, mask);
p_hwfn            822 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_enable_pf_rl(p_hwfn, p_params->pf_rl_en);
p_hwfn            825 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_enable_pf_wfq(p_hwfn, p_params->pf_wfq_en);
p_hwfn            828 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_enable_vport_rl(p_hwfn, p_params->vport_rl_en);
p_hwfn            831 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_enable_vport_wfq(p_hwfn, p_params->vport_wfq_en);
p_hwfn            834 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_cmdq_lines_rt_init(p_hwfn,
p_hwfn            840 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_btb_blocks_rt_init(p_hwfn,
p_hwfn            848 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c int qed_qm_pf_rt_init(struct qed_hwfn *p_hwfn,
p_hwfn            864 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_other_pq_map_rt_init(p_hwfn,
p_hwfn            870 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_tx_pq_map_rt_init(p_hwfn, p_ptt, p_params, other_mem_size_4kb);
p_hwfn            874 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		if (qed_pf_wfq_rt_init(p_hwfn, p_params))
p_hwfn            878 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	if (qed_pf_rl_rt_init(p_hwfn, p_params->pf_id, p_params->pf_rl))
p_hwfn            882 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	if (qed_vp_wfq_rt_init(p_hwfn, p_params->num_vports, vport_params))
p_hwfn            886 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	if (qed_vport_rl_rt_init(p_hwfn, p_params->start_vport,
p_hwfn            894 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c int qed_init_pf_wfq(struct qed_hwfn *p_hwfn,
p_hwfn            900 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		DP_NOTICE(p_hwfn, "Invalid PF WFQ weight configuration\n");
p_hwfn            904 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, QM_REG_WFQPFWEIGHT + pf_id * 4, inc_val);
p_hwfn            909 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c int qed_init_pf_rl(struct qed_hwfn *p_hwfn,
p_hwfn            915 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		DP_NOTICE(p_hwfn, "Invalid PF rate limit configuration\n");
p_hwfn            919 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn,
p_hwfn            921 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, QM_REG_RLPFINCVAL + pf_id * 4, inc_val);
p_hwfn            926 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c int qed_init_vport_wfq(struct qed_hwfn *p_hwfn,
p_hwfn            936 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		DP_NOTICE(p_hwfn, "Invalid VPORT WFQ weight configuration\n");
p_hwfn            943 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 			qed_wr(p_hwfn,
p_hwfn            951 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c int qed_init_vport_rl(struct qed_hwfn *p_hwfn,
p_hwfn            958 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		DP_NOTICE(p_hwfn,
p_hwfn            965 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		DP_NOTICE(p_hwfn, "Invalid VPORT rate-limit configuration\n");
p_hwfn            969 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn,
p_hwfn            972 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, QM_REG_RLGLBLINCVAL + vport_id * 4, inc_val);
p_hwfn            977 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c bool qed_send_qm_stop_cmd(struct qed_hwfn *p_hwfn,
p_hwfn           1006 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 			if (!qed_send_qm_cmd(p_hwfn, p_ptt, QM_STOP_CMD_ADDR,
p_hwfn           1027 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c void qed_set_vxlan_dest_port(struct qed_hwfn *p_hwfn,
p_hwfn           1031 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, PRS_REG_VXLAN_PORT, dest_port);
p_hwfn           1034 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_VXLAN_CTRL, dest_port);
p_hwfn           1037 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, PBF_REG_VXLAN_PORT, dest_port);
p_hwfn           1040 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c void qed_set_vxlan_enable(struct qed_hwfn *p_hwfn,
p_hwfn           1047 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	reg_val = qed_rd(p_hwfn, p_ptt, PRS_REG_ENCAPSULATION_TYPE_EN);
p_hwfn           1050 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, PRS_REG_ENCAPSULATION_TYPE_EN, reg_val);
p_hwfn           1053 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		    qed_rd(p_hwfn, p_ptt, PRS_REG_OUTPUT_FORMAT_4_0_BB_K2);
p_hwfn           1057 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 			qed_wr(p_hwfn, p_ptt, PRS_REG_OUTPUT_FORMAT_4_0_BB_K2,
p_hwfn           1062 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	reg_val = qed_rd(p_hwfn, p_ptt, NIG_REG_ENC_TYPE_ENABLE);
p_hwfn           1065 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_ENC_TYPE_ENABLE, reg_val);
p_hwfn           1068 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn,
p_hwfn           1072 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c void qed_set_gre_enable(struct qed_hwfn *p_hwfn,
p_hwfn           1080 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	reg_val = qed_rd(p_hwfn, p_ptt, PRS_REG_ENCAPSULATION_TYPE_EN);
p_hwfn           1085 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, PRS_REG_ENCAPSULATION_TYPE_EN, reg_val);
p_hwfn           1088 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		    qed_rd(p_hwfn, p_ptt, PRS_REG_OUTPUT_FORMAT_4_0_BB_K2);
p_hwfn           1092 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 			qed_wr(p_hwfn, p_ptt, PRS_REG_OUTPUT_FORMAT_4_0_BB_K2,
p_hwfn           1097 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	reg_val = qed_rd(p_hwfn, p_ptt, NIG_REG_ENC_TYPE_ENABLE);
p_hwfn           1102 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_ENC_TYPE_ENABLE, reg_val);
p_hwfn           1105 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn,
p_hwfn           1108 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn,
p_hwfn           1112 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c void qed_set_geneve_dest_port(struct qed_hwfn *p_hwfn,
p_hwfn           1116 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, PRS_REG_NGE_PORT, dest_port);
p_hwfn           1119 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_NGE_PORT, dest_port);
p_hwfn           1122 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, PBF_REG_NGE_PORT, dest_port);
p_hwfn           1125 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c void qed_set_geneve_enable(struct qed_hwfn *p_hwfn,
p_hwfn           1133 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	reg_val = qed_rd(p_hwfn, p_ptt, PRS_REG_ENCAPSULATION_TYPE_EN);
p_hwfn           1138 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, PRS_REG_ENCAPSULATION_TYPE_EN, reg_val);
p_hwfn           1141 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		    qed_rd(p_hwfn, p_ptt, PRS_REG_OUTPUT_FORMAT_4_0_BB_K2);
p_hwfn           1145 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 			qed_wr(p_hwfn, p_ptt, PRS_REG_OUTPUT_FORMAT_4_0_BB_K2,
p_hwfn           1150 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_NGE_ETH_ENABLE,
p_hwfn           1152 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_NGE_IP_ENABLE, ip_geneve_enable ? 1 : 0);
p_hwfn           1155 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	if (QED_IS_BB_B0(p_hwfn->cdev))
p_hwfn           1159 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn,
p_hwfn           1163 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn,
p_hwfn           1172 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c void qed_set_vxlan_no_l2_enable(struct qed_hwfn *p_hwfn,
p_hwfn           1178 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	reg_val = qed_rd(p_hwfn, p_ptt, PRS_REG_MSG_INFO);
p_hwfn           1188 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		qed_wr(p_hwfn,
p_hwfn           1198 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, PRS_REG_MSG_INFO, reg_val);
p_hwfn           1209 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c void qed_gft_disable(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, u16 pf_id)
p_hwfn           1212 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_GFT, 0);
p_hwfn           1217 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, PRS_REG_GFT_CAM + CAM_LINE_SIZE * pf_id, 0);
p_hwfn           1220 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn,
p_hwfn           1222 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn,
p_hwfn           1228 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c void qed_gft_config(struct qed_hwfn *p_hwfn,
p_hwfn           1238 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		DP_NOTICE(p_hwfn,
p_hwfn           1241 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		DP_NOTICE(p_hwfn,
p_hwfn           1244 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		DP_NOTICE(p_hwfn, "gft_config: unsupported gft_profile_type\n");
p_hwfn           1250 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, PRS_REG_CM_HDR_GFT, reg_val);
p_hwfn           1253 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, PRS_REG_LOAD_L2_FILTER, 0);
p_hwfn           1256 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_TENANT_ID, 0);
p_hwfn           1295 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, PRS_REG_GFT_CAM + CAM_LINE_SIZE * pf_id,
p_hwfn           1298 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	    qed_rd(p_hwfn, p_ptt, PRS_REG_GFT_CAM + CAM_LINE_SIZE * pf_id);
p_hwfn           1335 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn,
p_hwfn           1337 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn,
p_hwfn           1341 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn,
p_hwfn           1347 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn,
p_hwfn           1351 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn,
p_hwfn           1357 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_GFT, 1);
p_hwfn           1490 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c void qed_enable_context_validation(struct qed_hwfn *p_hwfn,
p_hwfn           1497 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, CDU_REG_CCFC_CTX_VALID0, ctx_validation);
p_hwfn           1501 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, CDU_REG_CCFC_CTX_VALID1, ctx_validation);
p_hwfn           1505 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 	qed_wr(p_hwfn, p_ptt, CDU_REG_TCFC_CTX_VALID0, ctx_validation);
p_hwfn           1508 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c static u32 qed_get_rdma_assert_ram_addr(struct qed_hwfn *p_hwfn, u8 storm_id)
p_hwfn           1513 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		    TSTORM_RDMA_ASSERT_LEVEL_OFFSET(p_hwfn->rel_pf_id);
p_hwfn           1516 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		    MSTORM_RDMA_ASSERT_LEVEL_OFFSET(p_hwfn->rel_pf_id);
p_hwfn           1519 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		    USTORM_RDMA_ASSERT_LEVEL_OFFSET(p_hwfn->rel_pf_id);
p_hwfn           1522 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		    XSTORM_RDMA_ASSERT_LEVEL_OFFSET(p_hwfn->rel_pf_id);
p_hwfn           1525 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		    YSTORM_RDMA_ASSERT_LEVEL_OFFSET(p_hwfn->rel_pf_id);
p_hwfn           1528 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		    PSTORM_RDMA_ASSERT_LEVEL_OFFSET(p_hwfn->rel_pf_id);
p_hwfn           1535 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c void qed_set_rdma_error_level(struct qed_hwfn *p_hwfn,
p_hwfn           1542 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		u32 ram_addr = qed_get_rdma_assert_ram_addr(p_hwfn, storm_id);
p_hwfn           1544 drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 		qed_wr(p_hwfn, p_ptt, ram_addr, assert_level[storm_id]);
p_hwfn             78 drivers/net/ethernet/qlogic/qed/qed_init_ops.c void qed_init_clear_rt_data(struct qed_hwfn *p_hwfn)
p_hwfn             83 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		p_hwfn->rt_data.b_valid[i] = false;
p_hwfn             86 drivers/net/ethernet/qlogic/qed/qed_init_ops.c void qed_init_store_rt_reg(struct qed_hwfn *p_hwfn, u32 rt_offset, u32 val)
p_hwfn             88 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 	p_hwfn->rt_data.init_val[rt_offset] = val;
p_hwfn             89 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 	p_hwfn->rt_data.b_valid[rt_offset] = true;
p_hwfn             92 drivers/net/ethernet/qlogic/qed/qed_init_ops.c void qed_init_store_rt_agg(struct qed_hwfn *p_hwfn,
p_hwfn             98 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		p_hwfn->rt_data.init_val[rt_offset + i] = p_val[i];
p_hwfn             99 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		p_hwfn->rt_data.b_valid[rt_offset + i]	= true;
p_hwfn            103 drivers/net/ethernet/qlogic/qed/qed_init_ops.c static int qed_init_rt(struct qed_hwfn	*p_hwfn,
p_hwfn            107 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 	u32 *p_init_val = &p_hwfn->rt_data.init_val[rt_offset];
p_hwfn            108 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 	bool *p_valid = &p_hwfn->rt_data.b_valid[rt_offset];
p_hwfn            123 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 			qed_wr(p_hwfn, p_ptt, addr + (i << 2), p_init_val[i]);
p_hwfn            132 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		rc = qed_dmae_host2grc(p_hwfn, p_ptt,
p_hwfn            145 drivers/net/ethernet/qlogic/qed/qed_init_ops.c int qed_init_alloc(struct qed_hwfn *p_hwfn)
p_hwfn            147 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 	struct qed_rt_data *rt_data = &p_hwfn->rt_data;
p_hwfn            149 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 	if (IS_VF(p_hwfn->cdev))
p_hwfn            168 drivers/net/ethernet/qlogic/qed/qed_init_ops.c void qed_init_free(struct qed_hwfn *p_hwfn)
p_hwfn            170 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 	kfree(p_hwfn->rt_data.init_val);
p_hwfn            171 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 	p_hwfn->rt_data.init_val = NULL;
p_hwfn            172 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 	kfree(p_hwfn->rt_data.b_valid);
p_hwfn            173 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 	p_hwfn->rt_data.b_valid = NULL;
p_hwfn            176 drivers/net/ethernet/qlogic/qed/qed_init_ops.c static int qed_init_array_dmae(struct qed_hwfn *p_hwfn,
p_hwfn            193 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 			qed_wr(p_hwfn, p_ptt, addr + (i << 2), data[i]);
p_hwfn            195 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		rc = qed_dmae_host2grc(p_hwfn, p_ptt,
p_hwfn            203 drivers/net/ethernet/qlogic/qed/qed_init_ops.c static int qed_init_fill_dmae(struct qed_hwfn *p_hwfn,
p_hwfn            219 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 	return qed_dmae_host2grc(p_hwfn, p_ptt,
p_hwfn            224 drivers/net/ethernet/qlogic/qed/qed_init_ops.c static void qed_init_fill(struct qed_hwfn *p_hwfn,
p_hwfn            231 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		qed_wr(p_hwfn, p_ptt, addr, fill);
p_hwfn            234 drivers/net/ethernet/qlogic/qed/qed_init_ops.c static int qed_init_cmd_array(struct qed_hwfn *p_hwfn,
p_hwfn            244 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn            260 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		memset(p_hwfn->unzip_buf, 0, max_size);
p_hwfn            262 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		output_len = qed_unzip_data(p_hwfn, input_len,
p_hwfn            264 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 					    max_size, (u8 *)p_hwfn->unzip_buf);
p_hwfn            266 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 			rc = qed_init_array_dmae(p_hwfn, p_ptt, addr, 0,
p_hwfn            268 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 						 p_hwfn->unzip_buf,
p_hwfn            271 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 			DP_NOTICE(p_hwfn, "Failed to unzip dmae data\n");
p_hwfn            284 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 			rc = qed_init_array_dmae(p_hwfn, p_ptt, addr,
p_hwfn            295 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		rc = qed_init_array_dmae(p_hwfn, p_ptt, addr,
p_hwfn            306 drivers/net/ethernet/qlogic/qed/qed_init_ops.c static int qed_init_cmd_wr(struct qed_hwfn *p_hwfn,
p_hwfn            318 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		DP_NOTICE(p_hwfn,
p_hwfn            327 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		qed_wr(p_hwfn, p_ptt, addr, data);
p_hwfn            332 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 			rc = qed_init_fill_dmae(p_hwfn, p_ptt, addr, 0, data);
p_hwfn            334 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 			qed_init_fill(p_hwfn, p_ptt, addr, 0, data);
p_hwfn            337 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		rc = qed_init_cmd_array(p_hwfn, p_ptt, p_cmd,
p_hwfn            341 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		qed_init_rt(p_hwfn, p_ptt, addr,
p_hwfn            367 drivers/net/ethernet/qlogic/qed/qed_init_ops.c static void qed_init_cmd_rd(struct qed_hwfn *p_hwfn,
p_hwfn            380 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 	val = qed_rd(p_hwfn, p_ptt, addr);
p_hwfn            396 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		DP_ERR(p_hwfn, "Invalid poll comparison type %08x\n",
p_hwfn            406 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		val = qed_rd(p_hwfn, p_ptt, addr);
p_hwfn            410 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		DP_ERR(p_hwfn,
p_hwfn            418 drivers/net/ethernet/qlogic/qed/qed_init_ops.c static int qed_init_cmd_cb(struct qed_hwfn *p_hwfn,
p_hwfn            426 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		rc = qed_dmae_sanity(p_hwfn, p_ptt, "engine_phase");
p_hwfn            429 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		DP_NOTICE(p_hwfn, "Unexpected init op callback ID %d\n",
p_hwfn            437 drivers/net/ethernet/qlogic/qed/qed_init_ops.c static u8 qed_init_cmd_mode_match(struct qed_hwfn *p_hwfn,
p_hwfn            440 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn            448 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		return qed_init_cmd_mode_match(p_hwfn, p_offset, modes) ^ 1;
p_hwfn            450 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		arg1 = qed_init_cmd_mode_match(p_hwfn, p_offset, modes);
p_hwfn            451 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		arg2 = qed_init_cmd_mode_match(p_hwfn, p_offset, modes);
p_hwfn            454 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		arg1 = qed_init_cmd_mode_match(p_hwfn, p_offset, modes);
p_hwfn            455 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 		arg2 = qed_init_cmd_mode_match(p_hwfn, p_offset, modes);
p_hwfn            463 drivers/net/ethernet/qlogic/qed/qed_init_ops.c static u32 qed_init_cmd_mode(struct qed_hwfn *p_hwfn,
p_hwfn            468 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 	if (qed_init_cmd_mode_match(p_hwfn, &offset, modes))
p_hwfn            475 drivers/net/ethernet/qlogic/qed/qed_init_ops.c static u32 qed_init_cmd_phase(struct qed_hwfn *p_hwfn,
p_hwfn            490 drivers/net/ethernet/qlogic/qed/qed_init_ops.c int qed_init_run(struct qed_hwfn *p_hwfn,
p_hwfn            493 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn            502 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 	p_hwfn->unzip_buf = kzalloc(MAX_ZIPPED_SIZE * 4, GFP_ATOMIC);
p_hwfn            503 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 	if (!p_hwfn->unzip_buf)
p_hwfn            512 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 			rc = qed_init_cmd_wr(p_hwfn, p_ptt, &cmd->write,
p_hwfn            516 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 			qed_init_cmd_rd(p_hwfn, p_ptt, &cmd->read);
p_hwfn            519 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 			cmd_num += qed_init_cmd_mode(p_hwfn, &cmd->if_mode,
p_hwfn            523 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 			cmd_num += qed_init_cmd_phase(p_hwfn, &cmd->if_phase,
p_hwfn            535 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 			rc = qed_init_cmd_cb(p_hwfn, p_ptt, &cmd->callback);
p_hwfn            543 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 	kfree(p_hwfn->unzip_buf);
p_hwfn            544 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 	p_hwfn->unzip_buf = NULL;
p_hwfn            548 drivers/net/ethernet/qlogic/qed/qed_init_ops.c void qed_gtt_init(struct qed_hwfn *p_hwfn)
p_hwfn            558 drivers/net/ethernet/qlogic/qed/qed_init_ops.c 			REG_WR(p_hwfn, gtt_base + i * PXP_GLOBAL_ENTRY_SIZE,
p_hwfn             59 drivers/net/ethernet/qlogic/qed/qed_init_ops.h int qed_init_run(struct qed_hwfn *p_hwfn,
p_hwfn             73 drivers/net/ethernet/qlogic/qed/qed_init_ops.h int qed_init_alloc(struct qed_hwfn *p_hwfn);
p_hwfn             81 drivers/net/ethernet/qlogic/qed/qed_init_ops.h void qed_init_free(struct qed_hwfn *p_hwfn);
p_hwfn             89 drivers/net/ethernet/qlogic/qed/qed_init_ops.h void qed_init_clear_rt_data(struct qed_hwfn *p_hwfn);
p_hwfn             99 drivers/net/ethernet/qlogic/qed/qed_init_ops.h void qed_init_store_rt_reg(struct qed_hwfn *p_hwfn,
p_hwfn            118 drivers/net/ethernet/qlogic/qed/qed_init_ops.h void qed_init_store_rt_agg(struct qed_hwfn *p_hwfn,
p_hwfn            133 drivers/net/ethernet/qlogic/qed/qed_init_ops.h void qed_gtt_init(struct qed_hwfn *p_hwfn);
p_hwfn             73 drivers/net/ethernet/qlogic/qed/qed_int.c #define SB_ATTN_ALIGNED_SIZE(p_hwfn) \
p_hwfn             74 drivers/net/ethernet/qlogic/qed/qed_int.c 	ALIGNED_TYPE_SIZE(struct atten_status_block, p_hwfn)
p_hwfn            102 drivers/net/ethernet/qlogic/qed/qed_int.c 	int (*cb)(struct qed_hwfn *p_hwfn);
p_hwfn            115 drivers/net/ethernet/qlogic/qed/qed_int.c static int qed_mcp_attn_cb(struct qed_hwfn *p_hwfn)
p_hwfn            117 drivers/net/ethernet/qlogic/qed/qed_int.c 	u32 tmp = qed_rd(p_hwfn, p_hwfn->p_dpc_ptt, MCP_REG_CPU_STATE);
p_hwfn            120 drivers/net/ethernet/qlogic/qed/qed_int.c 	DP_INFO(p_hwfn->cdev, "MCP_REG_CPU_STATE: %08x - Masking...\n",
p_hwfn            122 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_hwfn->p_dpc_ptt, MCP_REG_CPU_EVENT_MASK,
p_hwfn            141 drivers/net/ethernet/qlogic/qed/qed_int.c static int qed_pswhst_attn_cb(struct qed_hwfn *p_hwfn)
p_hwfn            143 drivers/net/ethernet/qlogic/qed/qed_int.c 	u32 tmp = qed_rd(p_hwfn, p_hwfn->p_dpc_ptt,
p_hwfn            149 drivers/net/ethernet/qlogic/qed/qed_int.c 		addr = qed_rd(p_hwfn, p_hwfn->p_dpc_ptt,
p_hwfn            151 drivers/net/ethernet/qlogic/qed/qed_int.c 		data = qed_rd(p_hwfn, p_hwfn->p_dpc_ptt,
p_hwfn            153 drivers/net/ethernet/qlogic/qed/qed_int.c 		length = qed_rd(p_hwfn, p_hwfn->p_dpc_ptt,
p_hwfn            156 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_INFO(p_hwfn->cdev,
p_hwfn            205 drivers/net/ethernet/qlogic/qed/qed_int.c static int qed_grc_attn_cb(struct qed_hwfn *p_hwfn)
p_hwfn            212 drivers/net/ethernet/qlogic/qed/qed_int.c 	tmp = qed_rd(p_hwfn, p_hwfn->p_dpc_ptt,
p_hwfn            218 drivers/net/ethernet/qlogic/qed/qed_int.c 	tmp = qed_rd(p_hwfn, p_hwfn->p_dpc_ptt,
p_hwfn            220 drivers/net/ethernet/qlogic/qed/qed_int.c 	tmp2 = qed_rd(p_hwfn, p_hwfn->p_dpc_ptt,
p_hwfn            223 drivers/net/ethernet/qlogic/qed/qed_int.c 	DP_INFO(p_hwfn->cdev,
p_hwfn            236 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_hwfn->p_dpc_ptt,
p_hwfn            259 drivers/net/ethernet/qlogic/qed/qed_int.c int qed_pglueb_rbc_attn_handler(struct qed_hwfn *p_hwfn,
p_hwfn            264 drivers/net/ethernet/qlogic/qed/qed_int.c 	tmp = qed_rd(p_hwfn, p_ptt, PGLUE_B_REG_TX_ERR_WR_DETAILS2);
p_hwfn            268 drivers/net/ethernet/qlogic/qed/qed_int.c 		addr_lo = qed_rd(p_hwfn, p_ptt,
p_hwfn            270 drivers/net/ethernet/qlogic/qed/qed_int.c 		addr_hi = qed_rd(p_hwfn, p_ptt,
p_hwfn            272 drivers/net/ethernet/qlogic/qed/qed_int.c 		details = qed_rd(p_hwfn, p_ptt,
p_hwfn            275 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_NOTICE(p_hwfn,
p_hwfn            293 drivers/net/ethernet/qlogic/qed/qed_int.c 	tmp = qed_rd(p_hwfn, p_ptt, PGLUE_B_REG_TX_ERR_RD_DETAILS2);
p_hwfn            297 drivers/net/ethernet/qlogic/qed/qed_int.c 		addr_lo = qed_rd(p_hwfn, p_ptt,
p_hwfn            299 drivers/net/ethernet/qlogic/qed/qed_int.c 		addr_hi = qed_rd(p_hwfn, p_ptt,
p_hwfn            301 drivers/net/ethernet/qlogic/qed/qed_int.c 		details = qed_rd(p_hwfn, p_ptt,
p_hwfn            304 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_NOTICE(p_hwfn,
p_hwfn            322 drivers/net/ethernet/qlogic/qed/qed_int.c 	tmp = qed_rd(p_hwfn, p_ptt, PGLUE_B_REG_TX_ERR_WR_DETAILS_ICPL);
p_hwfn            324 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_NOTICE(p_hwfn, "ICPL error - %08x\n", tmp);
p_hwfn            326 drivers/net/ethernet/qlogic/qed/qed_int.c 	tmp = qed_rd(p_hwfn, p_ptt, PGLUE_B_REG_MASTER_ZLR_ERR_DETAILS);
p_hwfn            330 drivers/net/ethernet/qlogic/qed/qed_int.c 		addr_lo = qed_rd(p_hwfn, p_ptt,
p_hwfn            332 drivers/net/ethernet/qlogic/qed/qed_int.c 		addr_hi = qed_rd(p_hwfn, p_ptt,
p_hwfn            335 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_NOTICE(p_hwfn, "ZLR error - %08x [Address %08x:%08x]\n",
p_hwfn            339 drivers/net/ethernet/qlogic/qed/qed_int.c 	tmp = qed_rd(p_hwfn, p_ptt, PGLUE_B_REG_VF_ILT_ERR_DETAILS2);
p_hwfn            343 drivers/net/ethernet/qlogic/qed/qed_int.c 		addr_lo = qed_rd(p_hwfn, p_ptt,
p_hwfn            345 drivers/net/ethernet/qlogic/qed/qed_int.c 		addr_hi = qed_rd(p_hwfn, p_ptt,
p_hwfn            347 drivers/net/ethernet/qlogic/qed/qed_int.c 		details = qed_rd(p_hwfn, p_ptt,
p_hwfn            350 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_NOTICE(p_hwfn,
p_hwfn            356 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_ptt, PGLUE_B_REG_LATCHED_ERRORS_CLR, BIT(2));
p_hwfn            361 drivers/net/ethernet/qlogic/qed/qed_int.c static int qed_pglueb_rbc_attn_cb(struct qed_hwfn *p_hwfn)
p_hwfn            363 drivers/net/ethernet/qlogic/qed/qed_int.c 	return qed_pglueb_rbc_attn_handler(p_hwfn, p_hwfn->p_dpc_ptt);
p_hwfn            375 drivers/net/ethernet/qlogic/qed/qed_int.c static int qed_db_rec_flush_queue(struct qed_hwfn *p_hwfn,
p_hwfn            382 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_ptt, DORQ_REG_DPM_FORCE_ABORT, 0x1);
p_hwfn            395 drivers/net/ethernet/qlogic/qed/qed_int.c 		usage = qed_rd(p_hwfn, p_ptt, DORQ_REG_PF_USAGE_CNT);
p_hwfn            401 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_NOTICE(p_hwfn->cdev,
p_hwfn            410 drivers/net/ethernet/qlogic/qed/qed_int.c int qed_db_rec_handler(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn            416 drivers/net/ethernet/qlogic/qed/qed_int.c 				       &p_hwfn->db_recovery_info.overflow);
p_hwfn            417 drivers/net/ethernet/qlogic/qed/qed_int.c 	cur_ovfl = qed_rd(p_hwfn, p_ptt, DORQ_REG_PF_OVFL_STICKY);
p_hwfn            421 drivers/net/ethernet/qlogic/qed/qed_int.c 	DP_NOTICE(p_hwfn, "PF Overflow sticky: attn %u current %u\n",
p_hwfn            424 drivers/net/ethernet/qlogic/qed/qed_int.c 	if (cur_ovfl && !p_hwfn->db_bar_no_edpm) {
p_hwfn            425 drivers/net/ethernet/qlogic/qed/qed_int.c 		rc = qed_db_rec_flush_queue(p_hwfn, p_ptt);
p_hwfn            431 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_ptt, DORQ_REG_PF_OVFL_STICKY, 0x0);
p_hwfn            434 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_db_recovery_execute(p_hwfn);
p_hwfn            439 drivers/net/ethernet/qlogic/qed/qed_int.c static void qed_dorq_attn_overflow(struct qed_hwfn *p_hwfn)
p_hwfn            441 drivers/net/ethernet/qlogic/qed/qed_int.c 	struct qed_ptt *p_ptt = p_hwfn->p_dpc_ptt;
p_hwfn            445 drivers/net/ethernet/qlogic/qed/qed_int.c 	overflow = qed_rd(p_hwfn, p_ptt, DORQ_REG_PF_OVFL_STICKY);
p_hwfn            450 drivers/net/ethernet/qlogic/qed/qed_int.c 	set_bit(QED_OVERFLOW_BIT, &p_hwfn->db_recovery_info.overflow);
p_hwfn            452 drivers/net/ethernet/qlogic/qed/qed_int.c 	if (!p_hwfn->db_bar_no_edpm) {
p_hwfn            453 drivers/net/ethernet/qlogic/qed/qed_int.c 		rc = qed_db_rec_flush_queue(p_hwfn, p_ptt);
p_hwfn            458 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_ptt, DORQ_REG_PF_OVFL_STICKY, 0x0);
p_hwfn            461 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_periodic_db_rec_start(p_hwfn);
p_hwfn            464 drivers/net/ethernet/qlogic/qed/qed_int.c static int qed_dorq_attn_int_sts(struct qed_hwfn *p_hwfn)
p_hwfn            467 drivers/net/ethernet/qlogic/qed/qed_int.c 	struct qed_ptt *p_ptt = p_hwfn->p_dpc_ptt;
p_hwfn            474 drivers/net/ethernet/qlogic/qed/qed_int.c 	int_sts = qed_rd(p_hwfn, p_ptt, DORQ_REG_INT_STS);
p_hwfn            478 drivers/net/ethernet/qlogic/qed/qed_int.c 	DP_NOTICE(p_hwfn->cdev, "DORQ attention. int_sts was %x\n", int_sts);
p_hwfn            484 drivers/net/ethernet/qlogic/qed/qed_int.c 		first_drop_reason = qed_rd(p_hwfn, p_ptt,
p_hwfn            487 drivers/net/ethernet/qlogic/qed/qed_int.c 		details = qed_rd(p_hwfn, p_ptt, DORQ_REG_DB_DROP_DETAILS);
p_hwfn            488 drivers/net/ethernet/qlogic/qed/qed_int.c 		address = qed_rd(p_hwfn, p_ptt,
p_hwfn            490 drivers/net/ethernet/qlogic/qed/qed_int.c 		all_drops_reason = qed_rd(p_hwfn, p_ptt,
p_hwfn            494 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_NOTICE(p_hwfn->cdev,
p_hwfn            507 drivers/net/ethernet/qlogic/qed/qed_int.c 		qed_wr(p_hwfn, p_ptt, DORQ_REG_DB_DROP_DETAILS_REL, 0);
p_hwfn            512 drivers/net/ethernet/qlogic/qed/qed_int.c 		qed_wr(p_hwfn,
p_hwfn            526 drivers/net/ethernet/qlogic/qed/qed_int.c 	DP_INFO(p_hwfn, "DORQ fatal attention\n");
p_hwfn            531 drivers/net/ethernet/qlogic/qed/qed_int.c static int qed_dorq_attn_cb(struct qed_hwfn *p_hwfn)
p_hwfn            533 drivers/net/ethernet/qlogic/qed/qed_int.c 	p_hwfn->db_recovery_info.dorq_attn = true;
p_hwfn            534 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_dorq_attn_overflow(p_hwfn);
p_hwfn            536 drivers/net/ethernet/qlogic/qed/qed_int.c 	return qed_dorq_attn_int_sts(p_hwfn);
p_hwfn            539 drivers/net/ethernet/qlogic/qed/qed_int.c static void qed_dorq_attn_handler(struct qed_hwfn *p_hwfn)
p_hwfn            541 drivers/net/ethernet/qlogic/qed/qed_int.c 	if (p_hwfn->db_recovery_info.dorq_attn)
p_hwfn            545 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_dorq_attn_cb(p_hwfn);
p_hwfn            547 drivers/net/ethernet/qlogic/qed/qed_int.c 	p_hwfn->db_recovery_info.dorq_attn = false;
p_hwfn            769 drivers/net/ethernet/qlogic/qed/qed_int.c qed_int_aeu_translate(struct qed_hwfn *p_hwfn,
p_hwfn            772 drivers/net/ethernet/qlogic/qed/qed_int.c 	if (!QED_IS_BB(p_hwfn->cdev))
p_hwfn            782 drivers/net/ethernet/qlogic/qed/qed_int.c static bool qed_int_is_parity_flag(struct qed_hwfn *p_hwfn,
p_hwfn            785 drivers/net/ethernet/qlogic/qed/qed_int.c 	return !!(qed_int_aeu_translate(p_hwfn, p_bit)->flags &
p_hwfn            812 drivers/net/ethernet/qlogic/qed/qed_int.c static inline u16 qed_attn_update_idx(struct qed_hwfn *p_hwfn,
p_hwfn            833 drivers/net/ethernet/qlogic/qed/qed_int.c static int qed_int_assertion(struct qed_hwfn *p_hwfn, u16 asserted_bits)
p_hwfn            835 drivers/net/ethernet/qlogic/qed/qed_int.c 	struct qed_sb_attn_info *sb_attn_sw = p_hwfn->p_sb_attn;
p_hwfn            839 drivers/net/ethernet/qlogic/qed/qed_int.c 	igu_mask = qed_rd(p_hwfn, p_hwfn->p_dpc_ptt, IGU_REG_ATTENTION_ENABLE);
p_hwfn            840 drivers/net/ethernet/qlogic/qed/qed_int.c 	DP_VERBOSE(p_hwfn, NETIF_MSG_INTR, "IGU mask: 0x%08x --> 0x%08x\n",
p_hwfn            843 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_hwfn->p_dpc_ptt, IGU_REG_ATTENTION_ENABLE, igu_mask);
p_hwfn            845 drivers/net/ethernet/qlogic/qed/qed_int.c 	DP_VERBOSE(p_hwfn, NETIF_MSG_INTR,
p_hwfn            853 drivers/net/ethernet/qlogic/qed/qed_int.c 		qed_mcp_handle_events(p_hwfn, p_hwfn->p_dpc_ptt);
p_hwfn            855 drivers/net/ethernet/qlogic/qed/qed_int.c 		qed_wr(p_hwfn, p_hwfn->p_dpc_ptt,
p_hwfn            859 drivers/net/ethernet/qlogic/qed/qed_int.c 	DIRECT_REG_WR((u8 __iomem *)p_hwfn->regview +
p_hwfn            865 drivers/net/ethernet/qlogic/qed/qed_int.c 	DP_VERBOSE(p_hwfn, NETIF_MSG_INTR, "set cmd IGU: 0x%04x\n",
p_hwfn            871 drivers/net/ethernet/qlogic/qed/qed_int.c static void qed_int_attn_print(struct qed_hwfn *p_hwfn,
p_hwfn            880 drivers/net/ethernet/qlogic/qed/qed_int.c 	status = qed_dbg_read_attn(p_hwfn, p_hwfn->p_dpc_ptt, id, type,
p_hwfn            883 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_NOTICE(p_hwfn,
p_hwfn            887 drivers/net/ethernet/qlogic/qed/qed_int.c 		qed_dbg_parse_attn(p_hwfn, &attn_results);
p_hwfn            903 drivers/net/ethernet/qlogic/qed/qed_int.c qed_int_deassertion_aeu_bit(struct qed_hwfn *p_hwfn,
p_hwfn            912 drivers/net/ethernet/qlogic/qed/qed_int.c 	DP_INFO(p_hwfn, "Deasserted attention `%s'[%08x]\n",
p_hwfn            917 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_INFO(p_hwfn, "`%s (attention)': Calling Callback function\n",
p_hwfn            919 drivers/net/ethernet/qlogic/qed/qed_int.c 		rc = p_aeu->cb(p_hwfn);
p_hwfn            927 drivers/net/ethernet/qlogic/qed/qed_int.c 		qed_int_attn_print(p_hwfn, p_aeu->block_index,
p_hwfn            936 drivers/net/ethernet/qlogic/qed/qed_int.c 	val = qed_rd(p_hwfn, p_hwfn->p_dpc_ptt, aeu_en_reg);
p_hwfn            937 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_hwfn->p_dpc_ptt, aeu_en_reg, (val & ~bitmask));
p_hwfn            938 drivers/net/ethernet/qlogic/qed/qed_int.c 	DP_INFO(p_hwfn, "`%s' - Disabled future attentions\n",
p_hwfn            953 drivers/net/ethernet/qlogic/qed/qed_int.c static void qed_int_deassertion_parity(struct qed_hwfn *p_hwfn,
p_hwfn            959 drivers/net/ethernet/qlogic/qed/qed_int.c 	DP_NOTICE(p_hwfn->cdev,
p_hwfn            964 drivers/net/ethernet/qlogic/qed/qed_int.c 		qed_int_attn_print(p_hwfn, block_id, ATTN_TYPE_PARITY, false);
p_hwfn            968 drivers/net/ethernet/qlogic/qed/qed_int.c 			qed_int_attn_print(p_hwfn, BLOCK_OPTE,
p_hwfn            970 drivers/net/ethernet/qlogic/qed/qed_int.c 			qed_int_attn_print(p_hwfn, BLOCK_MCP,
p_hwfn            977 drivers/net/ethernet/qlogic/qed/qed_int.c 	val = qed_rd(p_hwfn, p_hwfn->p_dpc_ptt, aeu_en_reg);
p_hwfn            978 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_hwfn->p_dpc_ptt, aeu_en_reg, val & mask);
p_hwfn            979 drivers/net/ethernet/qlogic/qed/qed_int.c 	DP_INFO(p_hwfn, "`%s' - Disabled future parity errors\n",
p_hwfn            991 drivers/net/ethernet/qlogic/qed/qed_int.c static int qed_int_deassertion(struct qed_hwfn  *p_hwfn,
p_hwfn            994 drivers/net/ethernet/qlogic/qed/qed_int.c 	struct qed_sb_attn_info *sb_attn_sw = p_hwfn->p_sb_attn;
p_hwfn           1001 drivers/net/ethernet/qlogic/qed/qed_int.c 		aeu_inv_arr[i] = qed_rd(p_hwfn, p_hwfn->p_dpc_ptt,
p_hwfn           1004 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_INTR,
p_hwfn           1015 drivers/net/ethernet/qlogic/qed/qed_int.c 		en = qed_rd(p_hwfn, p_hwfn->p_dpc_ptt, aeu_en);
p_hwfn           1025 drivers/net/ethernet/qlogic/qed/qed_int.c 			if (qed_int_is_parity_flag(p_hwfn, p_bit) &&
p_hwfn           1027 drivers/net/ethernet/qlogic/qed/qed_int.c 				qed_int_deassertion_parity(p_hwfn, p_bit,
p_hwfn           1049 drivers/net/ethernet/qlogic/qed/qed_int.c 			en = qed_rd(p_hwfn, p_hwfn->p_dpc_ptt, aeu_en);
p_hwfn           1065 drivers/net/ethernet/qlogic/qed/qed_int.c 				p_aeu = qed_int_aeu_translate(p_hwfn, p_aeu);
p_hwfn           1069 drivers/net/ethernet/qlogic/qed/qed_int.c 				if (qed_int_is_parity_flag(p_hwfn, p_aeu)) {
p_hwfn           1105 drivers/net/ethernet/qlogic/qed/qed_int.c 					qed_int_deassertion_aeu_bit(p_hwfn,
p_hwfn           1118 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_dorq_attn_handler(p_hwfn);
p_hwfn           1121 drivers/net/ethernet/qlogic/qed/qed_int.c 	DIRECT_REG_WR((u8 __iomem *)p_hwfn->regview +
p_hwfn           1128 drivers/net/ethernet/qlogic/qed/qed_int.c 	aeu_mask = qed_rd(p_hwfn, p_hwfn->p_dpc_ptt, IGU_REG_ATTENTION_ENABLE);
p_hwfn           1130 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_hwfn->p_dpc_ptt, IGU_REG_ATTENTION_ENABLE, aeu_mask);
p_hwfn           1138 drivers/net/ethernet/qlogic/qed/qed_int.c static int qed_int_attentions(struct qed_hwfn *p_hwfn)
p_hwfn           1140 drivers/net/ethernet/qlogic/qed/qed_int.c 	struct qed_sb_attn_info *p_sb_attn_sw = p_hwfn->p_sb_attn;
p_hwfn           1170 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_INFO(p_hwfn,
p_hwfn           1175 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_INFO(p_hwfn, "MFW indication via attention\n");
p_hwfn           1177 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_INTR,
p_hwfn           1182 drivers/net/ethernet/qlogic/qed/qed_int.c 		rc = qed_int_assertion(p_hwfn, asserted_bits);
p_hwfn           1188 drivers/net/ethernet/qlogic/qed/qed_int.c 		rc = qed_int_deassertion(p_hwfn, deasserted_bits);
p_hwfn           1193 drivers/net/ethernet/qlogic/qed/qed_int.c static void qed_sb_ack_attn(struct qed_hwfn *p_hwfn,
p_hwfn           1215 drivers/net/ethernet/qlogic/qed/qed_int.c 	struct qed_hwfn *p_hwfn = (struct qed_hwfn *)hwfn_cookie;
p_hwfn           1222 drivers/net/ethernet/qlogic/qed/qed_int.c 	if (!p_hwfn->p_sp_sb) {
p_hwfn           1223 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_ERR(p_hwfn->cdev, "DPC called - no p_sp_sb\n");
p_hwfn           1227 drivers/net/ethernet/qlogic/qed/qed_int.c 	sb_info = &p_hwfn->p_sp_sb->sb_info;
p_hwfn           1228 drivers/net/ethernet/qlogic/qed/qed_int.c 	arr_size = ARRAY_SIZE(p_hwfn->p_sp_sb->pi_info_arr);
p_hwfn           1230 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_ERR(p_hwfn->cdev,
p_hwfn           1235 drivers/net/ethernet/qlogic/qed/qed_int.c 	if (!p_hwfn->p_sb_attn) {
p_hwfn           1236 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_ERR(p_hwfn->cdev, "DPC called - no p_sb_attn");
p_hwfn           1239 drivers/net/ethernet/qlogic/qed/qed_int.c 	sb_attn = p_hwfn->p_sb_attn;
p_hwfn           1241 drivers/net/ethernet/qlogic/qed/qed_int.c 	DP_VERBOSE(p_hwfn, NETIF_MSG_INTR, "DPC Called! (hwfn %p %d)\n",
p_hwfn           1242 drivers/net/ethernet/qlogic/qed/qed_int.c 		   p_hwfn, p_hwfn->my_id);
p_hwfn           1251 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_ERR(p_hwfn->cdev,
p_hwfn           1257 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_VERBOSE(p_hwfn->cdev, NETIF_MSG_INTR,
p_hwfn           1263 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_ERR(p_hwfn->cdev,
p_hwfn           1268 drivers/net/ethernet/qlogic/qed/qed_int.c 		rc |= qed_attn_update_idx(p_hwfn, sb_attn);
p_hwfn           1269 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_VERBOSE(p_hwfn->cdev, NETIF_MSG_INTR,
p_hwfn           1281 drivers/net/ethernet/qlogic/qed/qed_int.c 	if (!p_hwfn->p_dpc_ptt) {
p_hwfn           1282 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_NOTICE(p_hwfn->cdev, "Failed to allocate PTT\n");
p_hwfn           1288 drivers/net/ethernet/qlogic/qed/qed_int.c 		qed_int_attentions(p_hwfn);
p_hwfn           1295 drivers/net/ethernet/qlogic/qed/qed_int.c 			pi_info = &p_hwfn->p_sp_sb->pi_info_arr[pi];
p_hwfn           1297 drivers/net/ethernet/qlogic/qed/qed_int.c 				pi_info->comp_cb(p_hwfn, pi_info->cookie);
p_hwfn           1305 drivers/net/ethernet/qlogic/qed/qed_int.c 		qed_sb_ack_attn(p_hwfn, sb_info->igu_addr, sb_attn->index);
p_hwfn           1310 drivers/net/ethernet/qlogic/qed/qed_int.c static void qed_int_sb_attn_free(struct qed_hwfn *p_hwfn)
p_hwfn           1312 drivers/net/ethernet/qlogic/qed/qed_int.c 	struct qed_sb_attn_info *p_sb = p_hwfn->p_sb_attn;
p_hwfn           1318 drivers/net/ethernet/qlogic/qed/qed_int.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn           1319 drivers/net/ethernet/qlogic/qed/qed_int.c 				  SB_ATTN_ALIGNED_SIZE(p_hwfn),
p_hwfn           1322 drivers/net/ethernet/qlogic/qed/qed_int.c 	p_hwfn->p_sb_attn = NULL;
p_hwfn           1325 drivers/net/ethernet/qlogic/qed/qed_int.c static void qed_int_sb_attn_setup(struct qed_hwfn *p_hwfn,
p_hwfn           1328 drivers/net/ethernet/qlogic/qed/qed_int.c 	struct qed_sb_attn_info *sb_info = p_hwfn->p_sb_attn;
p_hwfn           1336 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_ptt, IGU_REG_ATTN_MSG_ADDR_L,
p_hwfn           1337 drivers/net/ethernet/qlogic/qed/qed_int.c 	       lower_32_bits(p_hwfn->p_sb_attn->sb_phys));
p_hwfn           1338 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_ptt, IGU_REG_ATTN_MSG_ADDR_H,
p_hwfn           1339 drivers/net/ethernet/qlogic/qed/qed_int.c 	       upper_32_bits(p_hwfn->p_sb_attn->sb_phys));
p_hwfn           1342 drivers/net/ethernet/qlogic/qed/qed_int.c static void qed_int_sb_attn_init(struct qed_hwfn *p_hwfn,
p_hwfn           1346 drivers/net/ethernet/qlogic/qed/qed_int.c 	struct qed_sb_attn_info *sb_info = p_hwfn->p_sb_attn;
p_hwfn           1363 drivers/net/ethernet/qlogic/qed/qed_int.c 			if (qed_int_is_parity_flag(p_hwfn, p_aeu))
p_hwfn           1368 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_INTR,
p_hwfn           1374 drivers/net/ethernet/qlogic/qed/qed_int.c 	sb_info->mfw_attn_addr = (p_hwfn->rel_pf_id << 3) +
p_hwfn           1377 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_int_sb_attn_setup(p_hwfn, p_ptt);
p_hwfn           1380 drivers/net/ethernet/qlogic/qed/qed_int.c static int qed_int_sb_attn_alloc(struct qed_hwfn *p_hwfn,
p_hwfn           1383 drivers/net/ethernet/qlogic/qed/qed_int.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn           1395 drivers/net/ethernet/qlogic/qed/qed_int.c 				    SB_ATTN_ALIGNED_SIZE(p_hwfn),
p_hwfn           1404 drivers/net/ethernet/qlogic/qed/qed_int.c 	p_hwfn->p_sb_attn = p_sb;
p_hwfn           1405 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_int_sb_attn_init(p_hwfn, p_ptt, p_virt, p_phys);
p_hwfn           1414 drivers/net/ethernet/qlogic/qed/qed_int.c void qed_init_cau_sb_entry(struct qed_hwfn *p_hwfn,
p_hwfn           1418 drivers/net/ethernet/qlogic/qed/qed_int.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn           1461 drivers/net/ethernet/qlogic/qed/qed_int.c static void qed_int_cau_conf_pi(struct qed_hwfn *p_hwfn,
p_hwfn           1471 drivers/net/ethernet/qlogic/qed/qed_int.c 	if (IS_VF(p_hwfn->cdev))
p_hwfn           1484 drivers/net/ethernet/qlogic/qed/qed_int.c 	if (p_hwfn->hw_init_done) {
p_hwfn           1485 drivers/net/ethernet/qlogic/qed/qed_int.c 		qed_wr(p_hwfn, p_ptt,
p_hwfn           1489 drivers/net/ethernet/qlogic/qed/qed_int.c 		STORE_RT_REG(p_hwfn,
p_hwfn           1495 drivers/net/ethernet/qlogic/qed/qed_int.c void qed_int_cau_conf_sb(struct qed_hwfn *p_hwfn,
p_hwfn           1502 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_init_cau_sb_entry(p_hwfn, &sb_entry, p_hwfn->rel_pf_id,
p_hwfn           1505 drivers/net/ethernet/qlogic/qed/qed_int.c 	if (p_hwfn->hw_init_done) {
p_hwfn           1509 drivers/net/ethernet/qlogic/qed/qed_int.c 		qed_dmae_host2grc(p_hwfn, p_ptt, (u64)(uintptr_t)&phys_addr,
p_hwfn           1512 drivers/net/ethernet/qlogic/qed/qed_int.c 		qed_dmae_host2grc(p_hwfn, p_ptt, (u64)(uintptr_t)&sb_entry,
p_hwfn           1517 drivers/net/ethernet/qlogic/qed/qed_int.c 		STORE_RT_REG_AGG(p_hwfn,
p_hwfn           1522 drivers/net/ethernet/qlogic/qed/qed_int.c 		STORE_RT_REG_AGG(p_hwfn,
p_hwfn           1529 drivers/net/ethernet/qlogic/qed/qed_int.c 	if (p_hwfn->cdev->int_coalescing_mode == QED_COAL_MODE_ENABLE) {
p_hwfn           1530 drivers/net/ethernet/qlogic/qed/qed_int.c 		u8 num_tc = p_hwfn->hw_info.num_hw_tc;
p_hwfn           1535 drivers/net/ethernet/qlogic/qed/qed_int.c 		if (p_hwfn->cdev->rx_coalesce_usecs <= 0x7F)
p_hwfn           1537 drivers/net/ethernet/qlogic/qed/qed_int.c 		else if (p_hwfn->cdev->rx_coalesce_usecs <= 0xFF)
p_hwfn           1541 drivers/net/ethernet/qlogic/qed/qed_int.c 		timeset = (u8)(p_hwfn->cdev->rx_coalesce_usecs >> timer_res);
p_hwfn           1542 drivers/net/ethernet/qlogic/qed/qed_int.c 		qed_int_cau_conf_pi(p_hwfn, p_ptt, igu_sb_id, RX_PI,
p_hwfn           1545 drivers/net/ethernet/qlogic/qed/qed_int.c 		if (p_hwfn->cdev->tx_coalesce_usecs <= 0x7F)
p_hwfn           1547 drivers/net/ethernet/qlogic/qed/qed_int.c 		else if (p_hwfn->cdev->tx_coalesce_usecs <= 0xFF)
p_hwfn           1551 drivers/net/ethernet/qlogic/qed/qed_int.c 		timeset = (u8)(p_hwfn->cdev->tx_coalesce_usecs >> timer_res);
p_hwfn           1553 drivers/net/ethernet/qlogic/qed/qed_int.c 			qed_int_cau_conf_pi(p_hwfn, p_ptt,
p_hwfn           1561 drivers/net/ethernet/qlogic/qed/qed_int.c void qed_int_sb_setup(struct qed_hwfn *p_hwfn,
p_hwfn           1568 drivers/net/ethernet/qlogic/qed/qed_int.c 	if (IS_PF(p_hwfn->cdev))
p_hwfn           1569 drivers/net/ethernet/qlogic/qed/qed_int.c 		qed_int_cau_conf_sb(p_hwfn, p_ptt, sb_info->sb_phys,
p_hwfn           1573 drivers/net/ethernet/qlogic/qed/qed_int.c struct qed_igu_block *qed_get_igu_free_sb(struct qed_hwfn *p_hwfn, bool b_is_pf)
p_hwfn           1578 drivers/net/ethernet/qlogic/qed/qed_int.c 	for (igu_id = 0; igu_id < QED_MAPPING_MEMORY_SIZE(p_hwfn->cdev);
p_hwfn           1580 drivers/net/ethernet/qlogic/qed/qed_int.c 		p_block = &p_hwfn->hw_info.p_igu_info->entry[igu_id];
p_hwfn           1593 drivers/net/ethernet/qlogic/qed/qed_int.c static u16 qed_get_pf_igu_sb_id(struct qed_hwfn *p_hwfn, u16 vector_id)
p_hwfn           1598 drivers/net/ethernet/qlogic/qed/qed_int.c 	for (igu_id = 0; igu_id < QED_MAPPING_MEMORY_SIZE(p_hwfn->cdev);
p_hwfn           1600 drivers/net/ethernet/qlogic/qed/qed_int.c 		p_block = &p_hwfn->hw_info.p_igu_info->entry[igu_id];
p_hwfn           1613 drivers/net/ethernet/qlogic/qed/qed_int.c u16 qed_get_igu_sb_id(struct qed_hwfn *p_hwfn, u16 sb_id)
p_hwfn           1619 drivers/net/ethernet/qlogic/qed/qed_int.c 		igu_sb_id = p_hwfn->hw_info.p_igu_info->igu_dsb_id;
p_hwfn           1620 drivers/net/ethernet/qlogic/qed/qed_int.c 	else if (IS_PF(p_hwfn->cdev))
p_hwfn           1621 drivers/net/ethernet/qlogic/qed/qed_int.c 		igu_sb_id = qed_get_pf_igu_sb_id(p_hwfn, sb_id + 1);
p_hwfn           1623 drivers/net/ethernet/qlogic/qed/qed_int.c 		igu_sb_id = qed_vf_get_igu_sb_id(p_hwfn, sb_id);
p_hwfn           1626 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_INTR,
p_hwfn           1629 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_INTR,
p_hwfn           1635 drivers/net/ethernet/qlogic/qed/qed_int.c int qed_int_sb_init(struct qed_hwfn *p_hwfn,
p_hwfn           1643 drivers/net/ethernet/qlogic/qed/qed_int.c 	sb_info->igu_sb_id = qed_get_igu_sb_id(p_hwfn, sb_id);
p_hwfn           1646 drivers/net/ethernet/qlogic/qed/qed_int.c 		if (IS_PF(p_hwfn->cdev)) {
p_hwfn           1650 drivers/net/ethernet/qlogic/qed/qed_int.c 			p_info = p_hwfn->hw_info.p_igu_info;
p_hwfn           1657 drivers/net/ethernet/qlogic/qed/qed_int.c 			qed_vf_set_sb_info(p_hwfn, sb_id, sb_info);
p_hwfn           1661 drivers/net/ethernet/qlogic/qed/qed_int.c 	sb_info->cdev = p_hwfn->cdev;
p_hwfn           1666 drivers/net/ethernet/qlogic/qed/qed_int.c 	if (IS_PF(p_hwfn->cdev)) {
p_hwfn           1667 drivers/net/ethernet/qlogic/qed/qed_int.c 		sb_info->igu_addr = (u8 __iomem *)p_hwfn->regview +
p_hwfn           1671 drivers/net/ethernet/qlogic/qed/qed_int.c 		sb_info->igu_addr = (u8 __iomem *)p_hwfn->regview +
p_hwfn           1679 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_int_sb_setup(p_hwfn, p_ptt, sb_info);
p_hwfn           1684 drivers/net/ethernet/qlogic/qed/qed_int.c int qed_int_sb_release(struct qed_hwfn *p_hwfn,
p_hwfn           1697 drivers/net/ethernet/qlogic/qed/qed_int.c 	if (IS_VF(p_hwfn->cdev)) {
p_hwfn           1698 drivers/net/ethernet/qlogic/qed/qed_int.c 		qed_vf_set_sb_info(p_hwfn, sb_id, NULL);
p_hwfn           1702 drivers/net/ethernet/qlogic/qed/qed_int.c 	p_info = p_hwfn->hw_info.p_igu_info;
p_hwfn           1707 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_ERR(p_hwfn, "Do Not free sp sb using this function");
p_hwfn           1719 drivers/net/ethernet/qlogic/qed/qed_int.c static void qed_int_sp_sb_free(struct qed_hwfn *p_hwfn)
p_hwfn           1721 drivers/net/ethernet/qlogic/qed/qed_int.c 	struct qed_sb_sp_info *p_sb = p_hwfn->p_sp_sb;
p_hwfn           1727 drivers/net/ethernet/qlogic/qed/qed_int.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn           1728 drivers/net/ethernet/qlogic/qed/qed_int.c 				  SB_ALIGNED_SIZE(p_hwfn),
p_hwfn           1732 drivers/net/ethernet/qlogic/qed/qed_int.c 	p_hwfn->p_sp_sb = NULL;
p_hwfn           1735 drivers/net/ethernet/qlogic/qed/qed_int.c static int qed_int_sp_sb_alloc(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           1747 drivers/net/ethernet/qlogic/qed/qed_int.c 	p_virt = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn           1748 drivers/net/ethernet/qlogic/qed/qed_int.c 				    SB_ALIGNED_SIZE(p_hwfn),
p_hwfn           1756 drivers/net/ethernet/qlogic/qed/qed_int.c 	p_hwfn->p_sp_sb = p_sb;
p_hwfn           1757 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_int_sb_init(p_hwfn, p_ptt, &p_sb->sb_info, p_virt,
p_hwfn           1765 drivers/net/ethernet/qlogic/qed/qed_int.c int qed_int_register_cb(struct qed_hwfn *p_hwfn,
p_hwfn           1769 drivers/net/ethernet/qlogic/qed/qed_int.c 	struct qed_sb_sp_info *p_sp_sb = p_hwfn->p_sp_sb;
p_hwfn           1789 drivers/net/ethernet/qlogic/qed/qed_int.c int qed_int_unregister_cb(struct qed_hwfn *p_hwfn, u8 pi)
p_hwfn           1791 drivers/net/ethernet/qlogic/qed/qed_int.c 	struct qed_sb_sp_info *p_sp_sb = p_hwfn->p_sp_sb;
p_hwfn           1802 drivers/net/ethernet/qlogic/qed/qed_int.c u16 qed_int_get_sp_sb_id(struct qed_hwfn *p_hwfn)
p_hwfn           1804 drivers/net/ethernet/qlogic/qed/qed_int.c 	return p_hwfn->p_sp_sb->sb_info.igu_sb_id;
p_hwfn           1807 drivers/net/ethernet/qlogic/qed/qed_int.c void qed_int_igu_enable_int(struct qed_hwfn *p_hwfn,
p_hwfn           1812 drivers/net/ethernet/qlogic/qed/qed_int.c 	p_hwfn->cdev->int_mode = int_mode;
p_hwfn           1813 drivers/net/ethernet/qlogic/qed/qed_int.c 	switch (p_hwfn->cdev->int_mode) {
p_hwfn           1831 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_ptt, IGU_REG_PF_CONFIGURATION, igu_pf_conf);
p_hwfn           1834 drivers/net/ethernet/qlogic/qed/qed_int.c static void qed_int_igu_enable_attn(struct qed_hwfn *p_hwfn,
p_hwfn           1839 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_ptt, IGU_REG_ATTENTION_ENABLE, 0);
p_hwfn           1840 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_ptt, IGU_REG_LEADING_EDGE_LATCH, 0xfff);
p_hwfn           1841 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_ptt, IGU_REG_TRAILING_EDGE_LATCH, 0xfff);
p_hwfn           1842 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_ptt, IGU_REG_ATTENTION_ENABLE, 0xfff);
p_hwfn           1845 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_ptt, MISC_REG_AEU_MASK_ATTN_IGU, 0xff);
p_hwfn           1849 drivers/net/ethernet/qlogic/qed/qed_int.c qed_int_igu_enable(struct qed_hwfn *p_hwfn,
p_hwfn           1854 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_int_igu_enable_attn(p_hwfn, p_ptt);
p_hwfn           1856 drivers/net/ethernet/qlogic/qed/qed_int.c 	if ((int_mode != QED_INT_MODE_INTA) || IS_LEAD_HWFN(p_hwfn)) {
p_hwfn           1857 drivers/net/ethernet/qlogic/qed/qed_int.c 		rc = qed_slowpath_irq_req(p_hwfn);
p_hwfn           1859 drivers/net/ethernet/qlogic/qed/qed_int.c 			DP_NOTICE(p_hwfn, "Slowpath IRQ request failed\n");
p_hwfn           1862 drivers/net/ethernet/qlogic/qed/qed_int.c 		p_hwfn->b_int_requested = true;
p_hwfn           1865 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_int_igu_enable_int(p_hwfn, p_ptt, int_mode);
p_hwfn           1866 drivers/net/ethernet/qlogic/qed/qed_int.c 	p_hwfn->b_int_enabled = 1;
p_hwfn           1871 drivers/net/ethernet/qlogic/qed/qed_int.c void qed_int_igu_disable_int(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           1873 drivers/net/ethernet/qlogic/qed/qed_int.c 	p_hwfn->b_int_enabled = 0;
p_hwfn           1875 drivers/net/ethernet/qlogic/qed/qed_int.c 	if (IS_VF(p_hwfn->cdev))
p_hwfn           1878 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_ptt, IGU_REG_PF_CONFIGURATION, 0);
p_hwfn           1882 drivers/net/ethernet/qlogic/qed/qed_int.c static void qed_int_igu_cleanup_sb(struct qed_hwfn *p_hwfn,
p_hwfn           1901 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_ptt, IGU_REG_COMMAND_REG_32LSB_DATA, data);
p_hwfn           1905 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_ptt, IGU_REG_COMMAND_REG_CTRL, cmd_ctrl);
p_hwfn           1915 drivers/net/ethernet/qlogic/qed/qed_int.c 		val = qed_rd(p_hwfn, p_ptt, sb_bit_addr);
p_hwfn           1924 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_NOTICE(p_hwfn,
p_hwfn           1929 drivers/net/ethernet/qlogic/qed/qed_int.c void qed_int_igu_init_pure_rt_single(struct qed_hwfn *p_hwfn,
p_hwfn           1936 drivers/net/ethernet/qlogic/qed/qed_int.c 	p_block = &p_hwfn->hw_info.p_igu_info->entry[igu_sb_id];
p_hwfn           1937 drivers/net/ethernet/qlogic/qed/qed_int.c 	DP_VERBOSE(p_hwfn, NETIF_MSG_INTR,
p_hwfn           1945 drivers/net/ethernet/qlogic/qed/qed_int.c 		qed_int_igu_cleanup_sb(p_hwfn, p_ptt, igu_sb_id, 1, opaque);
p_hwfn           1948 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_int_igu_cleanup_sb(p_hwfn, p_ptt, igu_sb_id, 0, opaque);
p_hwfn           1954 drivers/net/ethernet/qlogic/qed/qed_int.c 		val = qed_rd(p_hwfn, p_ptt,
p_hwfn           1963 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_NOTICE(p_hwfn,
p_hwfn           1969 drivers/net/ethernet/qlogic/qed/qed_int.c 		qed_wr(p_hwfn, p_ptt,
p_hwfn           1973 drivers/net/ethernet/qlogic/qed/qed_int.c void qed_int_igu_init_pure_rt(struct qed_hwfn *p_hwfn,
p_hwfn           1977 drivers/net/ethernet/qlogic/qed/qed_int.c 	struct qed_igu_info *p_info = p_hwfn->hw_info.p_igu_info;
p_hwfn           1982 drivers/net/ethernet/qlogic/qed/qed_int.c 	val = qed_rd(p_hwfn, p_ptt, IGU_REG_BLOCK_CONFIGURATION);
p_hwfn           1985 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_wr(p_hwfn, p_ptt, IGU_REG_BLOCK_CONFIGURATION, val);
p_hwfn           1988 drivers/net/ethernet/qlogic/qed/qed_int.c 	     igu_sb_id < QED_MAPPING_MEMORY_SIZE(p_hwfn->cdev); igu_sb_id++) {
p_hwfn           1996 drivers/net/ethernet/qlogic/qed/qed_int.c 		qed_int_igu_init_pure_rt_single(p_hwfn, p_ptt, igu_sb_id,
p_hwfn           1997 drivers/net/ethernet/qlogic/qed/qed_int.c 						p_hwfn->hw_info.opaque_fid,
p_hwfn           2002 drivers/net/ethernet/qlogic/qed/qed_int.c 		qed_int_igu_init_pure_rt_single(p_hwfn, p_ptt,
p_hwfn           2004 drivers/net/ethernet/qlogic/qed/qed_int.c 						p_hwfn->hw_info.opaque_fid,
p_hwfn           2008 drivers/net/ethernet/qlogic/qed/qed_int.c int qed_int_igu_reset_cam(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           2010 drivers/net/ethernet/qlogic/qed/qed_int.c 	struct qed_igu_info *p_info = p_hwfn->hw_info.p_igu_info;
p_hwfn           2016 drivers/net/ethernet/qlogic/qed/qed_int.c 	if (!RESC_NUM(p_hwfn, QED_SB)) {
p_hwfn           2024 drivers/net/ethernet/qlogic/qed/qed_int.c 		if (p_info->usage.cnt != RESC_NUM(p_hwfn, QED_SB) - 1) {
p_hwfn           2025 drivers/net/ethernet/qlogic/qed/qed_int.c 			DP_INFO(p_hwfn,
p_hwfn           2027 drivers/net/ethernet/qlogic/qed/qed_int.c 				RESC_NUM(p_hwfn, QED_SB) - 1,
p_hwfn           2029 drivers/net/ethernet/qlogic/qed/qed_int.c 			p_info->usage.cnt = RESC_NUM(p_hwfn, QED_SB) - 1;
p_hwfn           2032 drivers/net/ethernet/qlogic/qed/qed_int.c 		if (IS_PF_SRIOV(p_hwfn)) {
p_hwfn           2033 drivers/net/ethernet/qlogic/qed/qed_int.c 			u16 vfs = p_hwfn->cdev->p_iov_info->total_vfs;
p_hwfn           2036 drivers/net/ethernet/qlogic/qed/qed_int.c 				DP_VERBOSE(p_hwfn,
p_hwfn           2047 drivers/net/ethernet/qlogic/qed/qed_int.c 				DP_NOTICE(p_hwfn,
p_hwfn           2075 drivers/net/ethernet/qlogic/qed/qed_int.c 	     igu_sb_id < QED_MAPPING_MEMORY_SIZE(p_hwfn->cdev); igu_sb_id++) {
p_hwfn           2083 drivers/net/ethernet/qlogic/qed/qed_int.c 			p_block->function_id = p_hwfn->rel_pf_id;
p_hwfn           2091 drivers/net/ethernet/qlogic/qed/qed_int.c 			p_block->function_id = p_hwfn->rel_pf_id;
p_hwfn           2099 drivers/net/ethernet/qlogic/qed/qed_int.c 			    p_hwfn->cdev->p_iov_info->first_vf_in_pf +
p_hwfn           2121 drivers/net/ethernet/qlogic/qed/qed_int.c 		rval = qed_rd(p_hwfn, p_ptt,
p_hwfn           2125 drivers/net/ethernet/qlogic/qed/qed_int.c 			qed_wr(p_hwfn, p_ptt,
p_hwfn           2129 drivers/net/ethernet/qlogic/qed/qed_int.c 			DP_VERBOSE(p_hwfn,
p_hwfn           2142 drivers/net/ethernet/qlogic/qed/qed_int.c static void qed_int_igu_read_cam_block(struct qed_hwfn *p_hwfn,
p_hwfn           2145 drivers/net/ethernet/qlogic/qed/qed_int.c 	u32 val = qed_rd(p_hwfn, p_ptt,
p_hwfn           2149 drivers/net/ethernet/qlogic/qed/qed_int.c 	p_block = &p_hwfn->hw_info.p_igu_info->entry[igu_sb_id];
p_hwfn           2158 drivers/net/ethernet/qlogic/qed/qed_int.c int qed_int_igu_read_cam(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           2165 drivers/net/ethernet/qlogic/qed/qed_int.c 	p_hwfn->hw_info.p_igu_info = kzalloc(sizeof(*p_igu_info), GFP_KERNEL);
p_hwfn           2166 drivers/net/ethernet/qlogic/qed/qed_int.c 	if (!p_hwfn->hw_info.p_igu_info)
p_hwfn           2169 drivers/net/ethernet/qlogic/qed/qed_int.c 	p_igu_info = p_hwfn->hw_info.p_igu_info;
p_hwfn           2175 drivers/net/ethernet/qlogic/qed/qed_int.c 	if (p_hwfn->cdev->p_iov_info) {
p_hwfn           2176 drivers/net/ethernet/qlogic/qed/qed_int.c 		struct qed_hw_sriov_info *p_iov = p_hwfn->cdev->p_iov_info;
p_hwfn           2183 drivers/net/ethernet/qlogic/qed/qed_int.c 	     igu_sb_id < QED_MAPPING_MEMORY_SIZE(p_hwfn->cdev); igu_sb_id++) {
p_hwfn           2185 drivers/net/ethernet/qlogic/qed/qed_int.c 		qed_int_igu_read_cam_block(p_hwfn, p_ptt, igu_sb_id);
p_hwfn           2189 drivers/net/ethernet/qlogic/qed/qed_int.c 		    (p_block->function_id == p_hwfn->rel_pf_id)) {
p_hwfn           2221 drivers/net/ethernet/qlogic/qed/qed_int.c 		    (p_hwfn->abs_pf_id == 0)) {
p_hwfn           2222 drivers/net/ethernet/qlogic/qed/qed_int.c 			DP_VERBOSE(p_hwfn, NETIF_MSG_INTR,
p_hwfn           2230 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_NOTICE(p_hwfn,
p_hwfn           2240 drivers/net/ethernet/qlogic/qed/qed_int.c 	DP_VERBOSE(p_hwfn, NETIF_MSG_INTR,
p_hwfn           2253 drivers/net/ethernet/qlogic/qed/qed_int.c void qed_int_igu_init_rt(struct qed_hwfn *p_hwfn)
p_hwfn           2257 drivers/net/ethernet/qlogic/qed/qed_int.c 	STORE_RT_REG(p_hwfn, IGU_REG_PF_CONFIGURATION_RT_OFFSET, igu_pf_conf);
p_hwfn           2260 drivers/net/ethernet/qlogic/qed/qed_int.c u64 qed_int_igu_read_sisr_reg(struct qed_hwfn *p_hwfn)
p_hwfn           2269 drivers/net/ethernet/qlogic/qed/qed_int.c 	intr_status_lo = REG_RD(p_hwfn,
p_hwfn           2272 drivers/net/ethernet/qlogic/qed/qed_int.c 	intr_status_hi = REG_RD(p_hwfn,
p_hwfn           2280 drivers/net/ethernet/qlogic/qed/qed_int.c static void qed_int_sp_dpc_setup(struct qed_hwfn *p_hwfn)
p_hwfn           2282 drivers/net/ethernet/qlogic/qed/qed_int.c 	tasklet_init(p_hwfn->sp_dpc,
p_hwfn           2283 drivers/net/ethernet/qlogic/qed/qed_int.c 		     qed_int_sp_dpc, (unsigned long)p_hwfn);
p_hwfn           2284 drivers/net/ethernet/qlogic/qed/qed_int.c 	p_hwfn->b_sp_dpc_enabled = true;
p_hwfn           2287 drivers/net/ethernet/qlogic/qed/qed_int.c static int qed_int_sp_dpc_alloc(struct qed_hwfn *p_hwfn)
p_hwfn           2289 drivers/net/ethernet/qlogic/qed/qed_int.c 	p_hwfn->sp_dpc = kmalloc(sizeof(*p_hwfn->sp_dpc), GFP_KERNEL);
p_hwfn           2290 drivers/net/ethernet/qlogic/qed/qed_int.c 	if (!p_hwfn->sp_dpc)
p_hwfn           2296 drivers/net/ethernet/qlogic/qed/qed_int.c static void qed_int_sp_dpc_free(struct qed_hwfn *p_hwfn)
p_hwfn           2298 drivers/net/ethernet/qlogic/qed/qed_int.c 	kfree(p_hwfn->sp_dpc);
p_hwfn           2299 drivers/net/ethernet/qlogic/qed/qed_int.c 	p_hwfn->sp_dpc = NULL;
p_hwfn           2302 drivers/net/ethernet/qlogic/qed/qed_int.c int qed_int_alloc(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           2306 drivers/net/ethernet/qlogic/qed/qed_int.c 	rc = qed_int_sp_dpc_alloc(p_hwfn);
p_hwfn           2310 drivers/net/ethernet/qlogic/qed/qed_int.c 	rc = qed_int_sp_sb_alloc(p_hwfn, p_ptt);
p_hwfn           2314 drivers/net/ethernet/qlogic/qed/qed_int.c 	rc = qed_int_sb_attn_alloc(p_hwfn, p_ptt);
p_hwfn           2319 drivers/net/ethernet/qlogic/qed/qed_int.c void qed_int_free(struct qed_hwfn *p_hwfn)
p_hwfn           2321 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_int_sp_sb_free(p_hwfn);
p_hwfn           2322 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_int_sb_attn_free(p_hwfn);
p_hwfn           2323 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_int_sp_dpc_free(p_hwfn);
p_hwfn           2326 drivers/net/ethernet/qlogic/qed/qed_int.c void qed_int_setup(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           2328 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_int_sb_setup(p_hwfn, p_ptt, &p_hwfn->p_sp_sb->sb_info);
p_hwfn           2329 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_int_sb_attn_setup(p_hwfn, p_ptt);
p_hwfn           2330 drivers/net/ethernet/qlogic/qed/qed_int.c 	qed_int_sp_dpc_setup(p_hwfn);
p_hwfn           2333 drivers/net/ethernet/qlogic/qed/qed_int.c void qed_int_get_num_sbs(struct qed_hwfn	*p_hwfn,
p_hwfn           2336 drivers/net/ethernet/qlogic/qed/qed_int.c 	struct qed_igu_info *info = p_hwfn->hw_info.p_igu_info;
p_hwfn           2352 drivers/net/ethernet/qlogic/qed/qed_int.c int qed_int_set_timer_res(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
p_hwfn           2358 drivers/net/ethernet/qlogic/qed/qed_int.c 	if (!p_hwfn->hw_init_done) {
p_hwfn           2359 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_ERR(p_hwfn, "hardware not initialized yet\n");
p_hwfn           2363 drivers/net/ethernet/qlogic/qed/qed_int.c 	rc = qed_dmae_grc2host(p_hwfn, p_ptt, CAU_REG_SB_VAR_MEMORY +
p_hwfn           2367 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_ERR(p_hwfn, "dmae_grc2host failed %d\n", rc);
p_hwfn           2376 drivers/net/ethernet/qlogic/qed/qed_int.c 	rc = qed_dmae_host2grc(p_hwfn, p_ptt,
p_hwfn           2381 drivers/net/ethernet/qlogic/qed/qed_int.c 		DP_ERR(p_hwfn, "dmae_host2grc failed %d\n", rc);
p_hwfn             88 drivers/net/ethernet/qlogic/qed/qed_int.h void qed_int_igu_enable_int(struct qed_hwfn *p_hwfn,
p_hwfn             98 drivers/net/ethernet/qlogic/qed/qed_int.h void qed_int_igu_disable_int(struct qed_hwfn *p_hwfn,
p_hwfn            109 drivers/net/ethernet/qlogic/qed/qed_int.h u64 qed_int_igu_read_sisr_reg(struct qed_hwfn *p_hwfn);
p_hwfn            128 drivers/net/ethernet/qlogic/qed/qed_int.h int qed_int_sb_init(struct qed_hwfn *p_hwfn,
p_hwfn            141 drivers/net/ethernet/qlogic/qed/qed_int.h void qed_int_sb_setup(struct qed_hwfn *p_hwfn,
p_hwfn            158 drivers/net/ethernet/qlogic/qed/qed_int.h int qed_int_sb_release(struct qed_hwfn *p_hwfn,
p_hwfn            180 drivers/net/ethernet/qlogic/qed/qed_int.h void qed_int_get_num_sbs(struct qed_hwfn	*p_hwfn,
p_hwfn            201 drivers/net/ethernet/qlogic/qed/qed_int.h int qed_db_rec_handler(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn            209 drivers/net/ethernet/qlogic/qed/qed_int.h #define SB_ALIGNED_SIZE(p_hwfn)	\
p_hwfn            210 drivers/net/ethernet/qlogic/qed/qed_int.h 	ALIGNED_TYPE_SIZE(struct status_block_e4, p_hwfn)
p_hwfn            246 drivers/net/ethernet/qlogic/qed/qed_int.h int qed_int_igu_reset_cam(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn            256 drivers/net/ethernet/qlogic/qed/qed_int.h u16 qed_get_igu_sb_id(struct qed_hwfn *p_hwfn, u16 sb_id);
p_hwfn            266 drivers/net/ethernet/qlogic/qed/qed_int.h struct qed_igu_block *qed_get_igu_free_sb(struct qed_hwfn *p_hwfn,
p_hwfn            269 drivers/net/ethernet/qlogic/qed/qed_int.h void qed_int_igu_init_pure_rt(struct qed_hwfn *p_hwfn,
p_hwfn            274 drivers/net/ethernet/qlogic/qed/qed_int.h void qed_int_igu_init_rt(struct qed_hwfn *p_hwfn);
p_hwfn            287 drivers/net/ethernet/qlogic/qed/qed_int.h int qed_int_igu_read_cam(struct qed_hwfn *p_hwfn,
p_hwfn            290 drivers/net/ethernet/qlogic/qed/qed_int.h typedef int (*qed_int_comp_cb_t)(struct qed_hwfn *p_hwfn,
p_hwfn            312 drivers/net/ethernet/qlogic/qed/qed_int.h int qed_int_register_cb(struct qed_hwfn *p_hwfn,
p_hwfn            329 drivers/net/ethernet/qlogic/qed/qed_int.h int qed_int_unregister_cb(struct qed_hwfn *p_hwfn,
p_hwfn            339 drivers/net/ethernet/qlogic/qed/qed_int.h u16 qed_int_get_sp_sb_id(struct qed_hwfn *p_hwfn);
p_hwfn            351 drivers/net/ethernet/qlogic/qed/qed_int.h void qed_int_igu_init_pure_rt_single(struct qed_hwfn *p_hwfn,
p_hwfn            368 drivers/net/ethernet/qlogic/qed/qed_int.h void qed_int_cau_conf_sb(struct qed_hwfn *p_hwfn,
p_hwfn            383 drivers/net/ethernet/qlogic/qed/qed_int.h int qed_int_alloc(struct qed_hwfn *p_hwfn,
p_hwfn            391 drivers/net/ethernet/qlogic/qed/qed_int.h void qed_int_free(struct qed_hwfn *p_hwfn);
p_hwfn            399 drivers/net/ethernet/qlogic/qed/qed_int.h void qed_int_setup(struct qed_hwfn *p_hwfn,
p_hwfn            411 drivers/net/ethernet/qlogic/qed/qed_int.h int qed_int_igu_enable(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
p_hwfn            423 drivers/net/ethernet/qlogic/qed/qed_int.h void qed_init_cau_sb_entry(struct qed_hwfn *p_hwfn,
p_hwfn            429 drivers/net/ethernet/qlogic/qed/qed_int.h int qed_int_set_timer_res(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
p_hwfn            434 drivers/net/ethernet/qlogic/qed/qed_int.h int qed_pglueb_rbc_attn_handler(struct qed_hwfn *p_hwfn,
p_hwfn            147 drivers/net/ethernet/qlogic/qed/qed_iscsi.c qed_iscsi_async_event(struct qed_hwfn *p_hwfn,
p_hwfn            151 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	if (p_hwfn->p_iscsi_info->event_cb) {
p_hwfn            152 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		struct qed_iscsi_info *p_iscsi = p_hwfn->p_iscsi_info;
p_hwfn            157 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		DP_NOTICE(p_hwfn, "iSCSI async completion is not set\n");
p_hwfn            163 drivers/net/ethernet/qlogic/qed/qed_iscsi.c qed_sp_iscsi_func_start(struct qed_hwfn *p_hwfn,
p_hwfn            181 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	init_data.cid = qed_spq_get_cid(p_hwfn);
p_hwfn            182 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            186 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            194 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	p_params = &p_hwfn->pf_params.iscsi_pf_params;
p_hwfn            198 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	if (p_params->num_queues > p_hwfn->hw_info.feat_num[QED_ISCSI_CQ]) {
p_hwfn            199 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		DP_ERR(p_hwfn,
p_hwfn            202 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		       p_hwfn->hw_info.feat_num[QED_ISCSI_CQ]);
p_hwfn            203 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		qed_sp_destroy_request(p_hwfn, p_ent);
p_hwfn            216 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	p_init->ll2_rx_queue_id = p_hwfn->hw_info.resc_start[QED_LL2_QUEUE] +
p_hwfn            232 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	dval = (u8)p_hwfn->hw_info.resc_start[QED_CMDQS_CQS];
p_hwfn            238 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		val = qed_get_igu_sb_id(p_hwfn, i);
p_hwfn            242 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	p_queue->bdq_resource_id = (u8)RESC_START(p_hwfn, QED_BDQ);
p_hwfn            280 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	p_hwfn->p_iscsi_info->event_context = event_context;
p_hwfn            281 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	p_hwfn->p_iscsi_info->event_cb = async_event_cb;
p_hwfn            283 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	qed_spq_register_async_cb(p_hwfn, PROTOCOLID_ISCSI,
p_hwfn            286 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            289 drivers/net/ethernet/qlogic/qed/qed_iscsi.c static int qed_sp_iscsi_conn_offload(struct qed_hwfn *p_hwfn,
p_hwfn            312 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            316 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            325 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	physical_q = qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_OFLD);
p_hwfn            330 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	physical_q = qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_ACK);
p_hwfn            467 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            470 drivers/net/ethernet/qlogic/qed/qed_iscsi.c static int qed_sp_iscsi_conn_update(struct qed_hwfn *p_hwfn,
p_hwfn            484 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            488 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            511 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            515 drivers/net/ethernet/qlogic/qed/qed_iscsi.c qed_sp_iscsi_mac_update(struct qed_hwfn *p_hwfn,
p_hwfn            529 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            533 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            559 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            562 drivers/net/ethernet/qlogic/qed/qed_iscsi.c static int qed_sp_iscsi_conn_terminate(struct qed_hwfn *p_hwfn,
p_hwfn            575 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            579 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            598 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            601 drivers/net/ethernet/qlogic/qed/qed_iscsi.c static int qed_sp_iscsi_conn_clear_sq(struct qed_hwfn *p_hwfn,
p_hwfn            614 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            618 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            629 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            632 drivers/net/ethernet/qlogic/qed/qed_iscsi.c static int qed_sp_iscsi_func_stop(struct qed_hwfn *p_hwfn,
p_hwfn            643 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	init_data.cid = qed_spq_get_cid(p_hwfn);
p_hwfn            644 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            648 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            657 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            659 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	qed_spq_unregister_async_cb(p_hwfn, PROTOCOLID_ISCSI);
p_hwfn            663 drivers/net/ethernet/qlogic/qed/qed_iscsi.c static void __iomem *qed_iscsi_get_db_addr(struct qed_hwfn *p_hwfn, u32 cid)
p_hwfn            665 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	return (u8 __iomem *)p_hwfn->doorbells +
p_hwfn            669 drivers/net/ethernet/qlogic/qed/qed_iscsi.c static void __iomem *qed_iscsi_get_primary_bdq_prod(struct qed_hwfn *p_hwfn,
p_hwfn            672 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	if (RESC_NUM(p_hwfn, QED_BDQ)) {
p_hwfn            673 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		return (u8 __iomem *)p_hwfn->regview +
p_hwfn            675 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		       MSTORM_SCSI_BDQ_EXT_PROD_OFFSET(RESC_START(p_hwfn,
p_hwfn            679 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		DP_NOTICE(p_hwfn, "BDQ is not allocated!\n");
p_hwfn            684 drivers/net/ethernet/qlogic/qed/qed_iscsi.c static void __iomem *qed_iscsi_get_secondary_bdq_prod(struct qed_hwfn *p_hwfn,
p_hwfn            687 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	if (RESC_NUM(p_hwfn, QED_BDQ)) {
p_hwfn            688 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		return (u8 __iomem *)p_hwfn->regview +
p_hwfn            690 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		       TSTORM_SCSI_BDQ_EXT_PROD_OFFSET(RESC_START(p_hwfn,
p_hwfn            694 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		DP_NOTICE(p_hwfn, "BDQ is not allocated!\n");
p_hwfn            728 drivers/net/ethernet/qlogic/qed/qed_iscsi.c static int qed_iscsi_allocate_connection(struct qed_hwfn *p_hwfn,
p_hwfn            739 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	spin_lock_bh(&p_hwfn->p_iscsi_info->lock);
p_hwfn            740 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	if (!list_empty(&p_hwfn->p_iscsi_info->free_list))
p_hwfn            741 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		p_conn = list_first_entry(&p_hwfn->p_iscsi_info->free_list,
p_hwfn            745 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		spin_unlock_bh(&p_hwfn->p_iscsi_info->lock);
p_hwfn            749 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	spin_unlock_bh(&p_hwfn->p_iscsi_info->lock);
p_hwfn            752 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	p_params = &p_hwfn->pf_params.iscsi_pf_params;
p_hwfn            758 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	p_q_cnts = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            766 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	p_tcp = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            776 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	rc = qed_chain_alloc(p_hwfn->cdev,
p_hwfn            786 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	rc = qed_chain_alloc(p_hwfn->cdev,
p_hwfn            796 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	rc = qed_chain_alloc(p_hwfn->cdev,
p_hwfn            810 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	qed_chain_free(p_hwfn->cdev, &p_conn->uhq);
p_hwfn            812 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	qed_chain_free(p_hwfn->cdev, &p_conn->r2tq);
p_hwfn            814 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            819 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            829 drivers/net/ethernet/qlogic/qed/qed_iscsi.c static int qed_iscsi_acquire_connection(struct qed_hwfn *p_hwfn,
p_hwfn            837 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	spin_lock_bh(&p_hwfn->p_iscsi_info->lock);
p_hwfn            838 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	rc = qed_cxt_acquire_cid(p_hwfn, PROTOCOLID_ISCSI, &icid);
p_hwfn            839 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	spin_unlock_bh(&p_hwfn->p_iscsi_info->lock);
p_hwfn            847 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		rc = qed_iscsi_allocate_connection(p_hwfn, &p_conn);
p_hwfn            853 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		spin_lock_bh(&p_hwfn->p_iscsi_info->lock);
p_hwfn            854 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		qed_cxt_release_cid(p_hwfn, icid);
p_hwfn            855 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		spin_unlock_bh(&p_hwfn->p_iscsi_info->lock);
p_hwfn            861 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	p_conn->fw_cid = (p_hwfn->hw_info.opaque_fid << 16) | icid;
p_hwfn            868 drivers/net/ethernet/qlogic/qed/qed_iscsi.c static void qed_iscsi_release_connection(struct qed_hwfn *p_hwfn,
p_hwfn            871 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	spin_lock_bh(&p_hwfn->p_iscsi_info->lock);
p_hwfn            872 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	list_add_tail(&p_conn->list_entry, &p_hwfn->p_iscsi_info->free_list);
p_hwfn            873 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	qed_cxt_release_cid(p_hwfn, p_conn->icid);
p_hwfn            874 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	spin_unlock_bh(&p_hwfn->p_iscsi_info->lock);
p_hwfn            877 drivers/net/ethernet/qlogic/qed/qed_iscsi.c static void qed_iscsi_free_connection(struct qed_hwfn *p_hwfn,
p_hwfn            880 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	qed_chain_free(p_hwfn->cdev, &p_conn->xhq);
p_hwfn            881 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	qed_chain_free(p_hwfn->cdev, &p_conn->uhq);
p_hwfn            882 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	qed_chain_free(p_hwfn->cdev, &p_conn->r2tq);
p_hwfn            883 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            887 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            894 drivers/net/ethernet/qlogic/qed/qed_iscsi.c int qed_iscsi_alloc(struct qed_hwfn *p_hwfn)
p_hwfn            904 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	p_hwfn->p_iscsi_info = p_iscsi_info;
p_hwfn            908 drivers/net/ethernet/qlogic/qed/qed_iscsi.c void qed_iscsi_setup(struct qed_hwfn *p_hwfn)
p_hwfn            910 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	spin_lock_init(&p_hwfn->p_iscsi_info->lock);
p_hwfn            913 drivers/net/ethernet/qlogic/qed/qed_iscsi.c void qed_iscsi_free(struct qed_hwfn *p_hwfn)
p_hwfn            917 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	if (!p_hwfn->p_iscsi_info)
p_hwfn            920 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	while (!list_empty(&p_hwfn->p_iscsi_info->free_list)) {
p_hwfn            921 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		p_conn = list_first_entry(&p_hwfn->p_iscsi_info->free_list,
p_hwfn            925 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 			qed_iscsi_free_connection(p_hwfn, p_conn);
p_hwfn            929 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	kfree(p_hwfn->p_iscsi_info);
p_hwfn            930 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	p_hwfn->p_iscsi_info = NULL;
p_hwfn            933 drivers/net/ethernet/qlogic/qed/qed_iscsi.c static void _qed_iscsi_get_tstats(struct qed_hwfn *p_hwfn,
p_hwfn            942 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		      TSTORM_ISCSI_RX_STATS_OFFSET(p_hwfn->rel_pf_id);
p_hwfn            943 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	qed_memcpy_from(p_hwfn, p_ptt, &tstats, tstats_addr, sizeof(tstats));
p_hwfn            959 drivers/net/ethernet/qlogic/qed/qed_iscsi.c static void _qed_iscsi_get_mstats(struct qed_hwfn *p_hwfn,
p_hwfn            968 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		      MSTORM_ISCSI_RX_STATS_OFFSET(p_hwfn->rel_pf_id);
p_hwfn            969 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	qed_memcpy_from(p_hwfn, p_ptt, &mstats, mstats_addr, sizeof(mstats));
p_hwfn            975 drivers/net/ethernet/qlogic/qed/qed_iscsi.c static void _qed_iscsi_get_ustats(struct qed_hwfn *p_hwfn,
p_hwfn            984 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		      USTORM_ISCSI_RX_STATS_OFFSET(p_hwfn->rel_pf_id);
p_hwfn            985 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	qed_memcpy_from(p_hwfn, p_ptt, &ustats, ustats_addr, sizeof(ustats));
p_hwfn            995 drivers/net/ethernet/qlogic/qed/qed_iscsi.c static void _qed_iscsi_get_xstats(struct qed_hwfn *p_hwfn,
p_hwfn           1004 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		      XSTORM_ISCSI_TX_STATS_OFFSET(p_hwfn->rel_pf_id);
p_hwfn           1005 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	qed_memcpy_from(p_hwfn, p_ptt, &xstats, xstats_addr, sizeof(xstats));
p_hwfn           1013 drivers/net/ethernet/qlogic/qed/qed_iscsi.c static void _qed_iscsi_get_ystats(struct qed_hwfn *p_hwfn,
p_hwfn           1022 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		      YSTORM_ISCSI_TX_STATS_OFFSET(p_hwfn->rel_pf_id);
p_hwfn           1023 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	qed_memcpy_from(p_hwfn, p_ptt, &ystats, ystats_addr, sizeof(ystats));
p_hwfn           1033 drivers/net/ethernet/qlogic/qed/qed_iscsi.c static void _qed_iscsi_get_pstats(struct qed_hwfn *p_hwfn,
p_hwfn           1042 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		      PSTORM_ISCSI_TX_STATS_OFFSET(p_hwfn->rel_pf_id);
p_hwfn           1043 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	qed_memcpy_from(p_hwfn, p_ptt, &pstats, pstats_addr, sizeof(pstats));
p_hwfn           1051 drivers/net/ethernet/qlogic/qed/qed_iscsi.c static int qed_iscsi_get_stats(struct qed_hwfn *p_hwfn,
p_hwfn           1058 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           1060 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 		DP_ERR(p_hwfn, "Failed to acquire ptt\n");
p_hwfn           1064 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	_qed_iscsi_get_tstats(p_hwfn, p_ptt, stats);
p_hwfn           1065 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	_qed_iscsi_get_mstats(p_hwfn, p_ptt, stats);
p_hwfn           1066 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	_qed_iscsi_get_ustats(p_hwfn, p_ptt, stats);
p_hwfn           1068 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	_qed_iscsi_get_xstats(p_hwfn, p_ptt, stats);
p_hwfn           1069 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	_qed_iscsi_get_ystats(p_hwfn, p_ptt, stats);
p_hwfn           1070 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	_qed_iscsi_get_pstats(p_hwfn, p_ptt, stats);
p_hwfn           1072 drivers/net/ethernet/qlogic/qed/qed_iscsi.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn             60 drivers/net/ethernet/qlogic/qed/qed_iscsi.h int qed_iscsi_alloc(struct qed_hwfn *p_hwfn);
p_hwfn             62 drivers/net/ethernet/qlogic/qed/qed_iscsi.h void qed_iscsi_setup(struct qed_hwfn *p_hwfn);
p_hwfn             64 drivers/net/ethernet/qlogic/qed/qed_iscsi.h void qed_iscsi_free(struct qed_hwfn *p_hwfn);
p_hwfn             75 drivers/net/ethernet/qlogic/qed/qed_iscsi.h static inline int qed_iscsi_alloc(struct qed_hwfn *p_hwfn)
p_hwfn             80 drivers/net/ethernet/qlogic/qed/qed_iscsi.h static inline void qed_iscsi_setup(struct qed_hwfn *p_hwfn) {}
p_hwfn             82 drivers/net/ethernet/qlogic/qed/qed_iscsi.h static inline void qed_iscsi_free(struct qed_hwfn *p_hwfn) {}
p_hwfn             87 drivers/net/ethernet/qlogic/qed/qed_iwarp.c static int qed_iwarp_async_event(struct qed_hwfn *p_hwfn,
p_hwfn             93 drivers/net/ethernet/qlogic/qed/qed_iwarp.c void qed_iwarp_init_devinfo(struct qed_hwfn *p_hwfn)
p_hwfn             95 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	struct qed_rdma_device *dev = p_hwfn->p_rdma_info->dev;
p_hwfn            100 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			    p_hwfn->p_rdma_info->num_qps) -
p_hwfn            109 drivers/net/ethernet/qlogic/qed/qed_iwarp.c void qed_iwarp_init_hw(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn            111 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	p_hwfn->rdma_prs_search_reg = PRS_REG_SEARCH_TCP;
p_hwfn            112 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_wr(p_hwfn, p_ptt, p_hwfn->rdma_prs_search_reg, 1);
p_hwfn            113 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	p_hwfn->b_rdma_enabled_in_prs = true;
p_hwfn            120 drivers/net/ethernet/qlogic/qed/qed_iwarp.c static void qed_iwarp_cid_cleaned(struct qed_hwfn *p_hwfn, u32 cid)
p_hwfn            122 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	cid -= qed_cxt_get_proto_cid_start(p_hwfn, p_hwfn->p_rdma_info->proto);
p_hwfn            124 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_lock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            127 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_bmap_release_id(p_hwfn, &p_hwfn->p_rdma_info->tcp_cid_map,
p_hwfn            130 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_bmap_release_id(p_hwfn, &p_hwfn->p_rdma_info->cid_map, cid);
p_hwfn            132 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            136 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_init_fw_ramrod(struct qed_hwfn *p_hwfn,
p_hwfn            140 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		RESC_START(p_hwfn, QED_LL2_QUEUE) +
p_hwfn            141 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		p_hwfn->p_rdma_info->iwarp.ll2_ooo_handle;
p_hwfn            148 drivers/net/ethernet/qlogic/qed/qed_iwarp.c static int qed_iwarp_alloc_cid(struct qed_hwfn *p_hwfn, u32 *cid)
p_hwfn            152 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_lock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            153 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_rdma_bmap_alloc_id(p_hwfn, &p_hwfn->p_rdma_info->cid_map, cid);
p_hwfn            154 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            156 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn, "Failed in allocating iwarp cid\n");
p_hwfn            159 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	*cid += qed_cxt_get_proto_cid_start(p_hwfn, p_hwfn->p_rdma_info->proto);
p_hwfn            161 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_cxt_dynamic_ilt_alloc(p_hwfn, QED_ELEM_CXT, *cid);
p_hwfn            163 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_iwarp_cid_cleaned(p_hwfn, *cid);
p_hwfn            168 drivers/net/ethernet/qlogic/qed/qed_iwarp.c static void qed_iwarp_set_tcp_cid(struct qed_hwfn *p_hwfn, u32 cid)
p_hwfn            170 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	cid -= qed_cxt_get_proto_cid_start(p_hwfn, p_hwfn->p_rdma_info->proto);
p_hwfn            172 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_lock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            173 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_bmap_set_id(p_hwfn, &p_hwfn->p_rdma_info->tcp_cid_map, cid);
p_hwfn            174 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            182 drivers/net/ethernet/qlogic/qed/qed_iwarp.c static int qed_iwarp_alloc_tcp_cid(struct qed_hwfn *p_hwfn, u32 *cid)
p_hwfn            186 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_lock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            188 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_rdma_bmap_alloc_id(p_hwfn,
p_hwfn            189 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 				    &p_hwfn->p_rdma_info->tcp_cid_map, cid);
p_hwfn            191 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            194 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn            196 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			   p_hwfn->p_rdma_info->tcp_cid_map.max_count);
p_hwfn            202 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	*cid += qed_cxt_get_proto_cid_start(p_hwfn,
p_hwfn            203 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 					    p_hwfn->p_rdma_info->proto);
p_hwfn            207 drivers/net/ethernet/qlogic/qed/qed_iwarp.c int qed_iwarp_create_qp(struct qed_hwfn *p_hwfn,
p_hwfn            218 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qp->shared_queue = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            234 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_iwarp_alloc_cid(p_hwfn, &cid);
p_hwfn            241 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            245 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            280 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	p_ramrod->srq_id.opaque_fid = cpu_to_le16(p_hwfn->hw_info.opaque_fid);
p_hwfn            285 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	    cpu_to_le32((p_hwfn->hw_info.opaque_fid << 16) | qp->sq_cq_id);
p_hwfn            287 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	    cpu_to_le32((p_hwfn->hw_info.opaque_fid << 16) | qp->rq_cq_id);
p_hwfn            291 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	physical_queue = qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_OFLD);
p_hwfn            293 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	physical_queue = qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_ACK);
p_hwfn            296 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            303 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_iwarp_cid_cleaned(p_hwfn, cid);
p_hwfn            305 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            312 drivers/net/ethernet/qlogic/qed/qed_iwarp.c static int qed_iwarp_modify_fw(struct qed_hwfn *p_hwfn, struct qed_rdma_qp *qp)
p_hwfn            322 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            325 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            327 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 				 p_hwfn->p_rdma_info->proto, &init_data);
p_hwfn            339 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            341 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "QP(0x%x)rc=%d\n", qp->icid, rc);
p_hwfn            394 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_modify_qp(struct qed_hwfn *p_hwfn,
p_hwfn            405 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_lock_bh(&p_hwfn->p_rdma_info->iwarp.qp_lock);
p_hwfn            409 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		spin_unlock_bh(&p_hwfn->p_rdma_info->iwarp.qp_lock);
p_hwfn            466 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "QP(0x%x) %s --> %s%s\n",
p_hwfn            472 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->iwarp.qp_lock);
p_hwfn            475 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		rc = qed_iwarp_modify_fw(p_hwfn, qp);
p_hwfn            480 drivers/net/ethernet/qlogic/qed/qed_iwarp.c int qed_iwarp_fw_destroy(struct qed_hwfn *p_hwfn, struct qed_rdma_qp *qp)
p_hwfn            489 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            492 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            494 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 				 p_hwfn->p_rdma_info->proto, &init_data);
p_hwfn            498 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            500 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "QP(0x%x) rc = %d\n", qp->icid, rc);
p_hwfn            505 drivers/net/ethernet/qlogic/qed/qed_iwarp.c static void qed_iwarp_destroy_ep(struct qed_hwfn *p_hwfn,
p_hwfn            509 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            514 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		spin_lock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn            516 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		spin_unlock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn            525 drivers/net/ethernet/qlogic/qed/qed_iwarp.c int qed_iwarp_destroy_qp(struct qed_hwfn *p_hwfn, struct qed_rdma_qp *qp)
p_hwfn            532 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		rc = qed_iwarp_modify_qp(p_hwfn, qp,
p_hwfn            545 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			DP_NOTICE(p_hwfn, "ep state close timeout state=%x\n",
p_hwfn            548 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_iwarp_destroy_ep(p_hwfn, ep, false);
p_hwfn            551 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_iwarp_fw_destroy(p_hwfn, qp);
p_hwfn            554 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            562 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_create_ep(struct qed_hwfn *p_hwfn, struct qed_iwarp_ep **ep_out)
p_hwfn            573 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	ep->ep_buffer_virt = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            594 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_print_tcp_ramrod(struct qed_hwfn *p_hwfn,
p_hwfn            597 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "local_mac=%x %x %x, remote_mac=%x %x %x\n",
p_hwfn            606 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn            614 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn            623 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn            633 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "syn_ip_payload_length=%x, lo=%x, hi=%x\n",
p_hwfn            640 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_tcp_offload(struct qed_hwfn *p_hwfn, struct qed_iwarp_ep *ep)
p_hwfn            642 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	struct qed_iwarp_info *iwarp_info = &p_hwfn->p_rdma_info->iwarp;
p_hwfn            656 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            662 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            686 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	physical_q = qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_OFLD);
p_hwfn            688 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	physical_q = qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_ACK);
p_hwfn            701 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	tcp_flags = p_hwfn->p_rdma_info->iwarp.tcp_flags;
p_hwfn            729 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	tcp->rcv_wnd_scale = (u8)p_hwfn->p_rdma_info->iwarp.rcv_wnd_scale;
p_hwfn            739 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_iwarp_print_tcp_ramrod(p_hwfn, p_tcp_ramrod);
p_hwfn            741 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            743 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn            750 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_mpa_received(struct qed_hwfn *p_hwfn, struct qed_iwarp_ep *ep)
p_hwfn            752 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	struct qed_iwarp_info *iwarp_info = &p_hwfn->p_rdma_info->iwarp;
p_hwfn            763 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn            813 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn            834 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_mpa_offload(struct qed_hwfn *p_hwfn, struct qed_iwarp_ep *ep)
p_hwfn            855 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            862 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            875 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	p_mpa_ramrod->common.crc_needed = p_hwfn->p_rdma_info->iwarp.crc_needed;
p_hwfn            880 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	p_mpa_ramrod->tcp_cid = p_hwfn->hw_info.opaque_fid << 16 | ep->tcp_cid;
p_hwfn            900 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		    RESC_START(p_hwfn, QED_RDMA_STATS_QUEUE) + qp->stats_queue;
p_hwfn            905 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	iwarp_info = &p_hwfn->p_rdma_info->iwarp;
p_hwfn            912 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            916 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn,
p_hwfn            928 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_return_ep(struct qed_hwfn *p_hwfn, struct qed_iwarp_ep *ep)
p_hwfn            940 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_iwarp_alloc_tcp_cid(p_hwfn, &ep->tcp_cid);
p_hwfn            942 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_lock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn            945 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		       &p_hwfn->p_rdma_info->iwarp.ep_free_list);
p_hwfn            947 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn            951 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_parse_private_data(struct qed_hwfn *p_hwfn, struct qed_iwarp_ep *ep)
p_hwfn            958 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	if (MPA_REV2(p_hwfn->p_rdma_info->iwarp.mpa_rev)) {
p_hwfn            976 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_mpa_reply_arrived(struct qed_hwfn *p_hwfn, struct qed_iwarp_ep *ep)
p_hwfn            981 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn,
p_hwfn            988 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_iwarp_parse_private_data(p_hwfn, ep);
p_hwfn            990 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           1010 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_mpa_complete(struct qed_hwfn *p_hwfn,
p_hwfn           1021 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_iwarp_parse_private_data(p_hwfn, ep);
p_hwfn           1023 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           1035 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_iwarp_modify_qp(p_hwfn, ep->qp, QED_IWARP_QP_STATE_RTS, 1);
p_hwfn           1040 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn, "%s(0x%x) MPA timeout\n",
p_hwfn           1045 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn, "%s(0x%x) MPA Reject\n",
p_hwfn           1050 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn, "%s(0x%x) MPA reset(tcp cid: 0x%x)\n",
p_hwfn           1056 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn, "%s(0x%x) MPA received FIN\n",
p_hwfn           1061 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn, "%s(0x%x) MPA insufficient ird\n",
p_hwfn           1066 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn, "%s(0x%x) MPA RTR MISMATCH\n",
p_hwfn           1071 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn, "%s(0x%x) MPA Invalid Packet\n",
p_hwfn           1076 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn, "%s(0x%x) MPA Local Error\n",
p_hwfn           1081 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn, "%s(0x%x) MPA TERMINATE\n",
p_hwfn           1105 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			qed_iwarp_return_ep(p_hwfn, ep);
p_hwfn           1107 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			spin_lock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           1109 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			spin_unlock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           1115 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_mpa_v2_set_private(struct qed_hwfn *p_hwfn,
p_hwfn           1146 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn,
p_hwfn           1165 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	struct qed_hwfn *p_hwfn = rdma_cxt;
p_hwfn           1174 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn,
p_hwfn           1182 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	iwarp_info = &p_hwfn->p_rdma_info->iwarp;
p_hwfn           1185 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_iwarp_alloc_cid(p_hwfn, &cid);
p_hwfn           1189 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_iwarp_create_ep(p_hwfn, &ep);
p_hwfn           1195 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_lock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           1196 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	list_add_tail(&ep->list_entry, &p_hwfn->p_rdma_info->iwarp.ep_list);
p_hwfn           1197 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           1217 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_iwarp_mpa_v2_set_private(p_hwfn, ep, &mpa_data_size);
p_hwfn           1236 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_iwarp_tcp_offload(p_hwfn, ep);
p_hwfn           1238 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "QP(0x%x) EP(0x%x) rc = %d\n",
p_hwfn           1242 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_iwarp_destroy_ep(p_hwfn, ep, true);
p_hwfn           1248 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_iwarp_cid_cleaned(p_hwfn, cid);
p_hwfn           1253 drivers/net/ethernet/qlogic/qed/qed_iwarp.c static struct qed_iwarp_ep *qed_iwarp_get_free_ep(struct qed_hwfn *p_hwfn)
p_hwfn           1258 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_lock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           1260 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	if (list_empty(&p_hwfn->p_rdma_info->iwarp.ep_free_list)) {
p_hwfn           1261 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_ERR(p_hwfn, "Ep list is empty\n");
p_hwfn           1265 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	ep = list_first_entry(&p_hwfn->p_rdma_info->iwarp.ep_free_list,
p_hwfn           1272 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		rc = qed_iwarp_alloc_tcp_cid(p_hwfn, &ep->tcp_cid);
p_hwfn           1288 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           1300 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_wait_cid_map_cleared(struct qed_hwfn *p_hwfn, struct qed_bmap *bmap)
p_hwfn           1322 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			DP_NOTICE(p_hwfn,
p_hwfn           1331 drivers/net/ethernet/qlogic/qed/qed_iwarp.c static int qed_iwarp_wait_for_all_cids(struct qed_hwfn *p_hwfn)
p_hwfn           1336 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_iwarp_wait_cid_map_cleared(p_hwfn,
p_hwfn           1337 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 					    &p_hwfn->p_rdma_info->tcp_cid_map);
p_hwfn           1343 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_bmap_release_id(p_hwfn, &p_hwfn->p_rdma_info->cid_map, i);
p_hwfn           1346 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	return qed_iwarp_wait_cid_map_cleared(p_hwfn,
p_hwfn           1347 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 					      &p_hwfn->p_rdma_info->cid_map);
p_hwfn           1350 drivers/net/ethernet/qlogic/qed/qed_iwarp.c static void qed_iwarp_free_prealloc_ep(struct qed_hwfn *p_hwfn)
p_hwfn           1354 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	while (!list_empty(&p_hwfn->p_rdma_info->iwarp.ep_free_list)) {
p_hwfn           1355 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		spin_lock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           1357 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		ep = list_first_entry(&p_hwfn->p_rdma_info->iwarp.ep_free_list,
p_hwfn           1361 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			spin_unlock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           1366 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		spin_unlock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           1369 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			qed_iwarp_cid_cleaned(p_hwfn, ep->tcp_cid);
p_hwfn           1371 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_iwarp_destroy_ep(p_hwfn, ep, false);
p_hwfn           1375 drivers/net/ethernet/qlogic/qed/qed_iwarp.c static int qed_iwarp_prealloc_ep(struct qed_hwfn *p_hwfn, bool init)
p_hwfn           1385 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		rc = qed_iwarp_create_ep(p_hwfn, &ep);
p_hwfn           1393 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			rc = qed_iwarp_alloc_cid(p_hwfn, &cid);
p_hwfn           1396 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			qed_iwarp_set_tcp_cid(p_hwfn, cid);
p_hwfn           1402 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			qed_iwarp_alloc_tcp_cid(p_hwfn, &cid);
p_hwfn           1407 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		spin_lock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           1409 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			      &p_hwfn->p_rdma_info->iwarp.ep_free_list);
p_hwfn           1410 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		spin_unlock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           1416 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_iwarp_destroy_ep(p_hwfn, ep, false);
p_hwfn           1421 drivers/net/ethernet/qlogic/qed/qed_iwarp.c int qed_iwarp_alloc(struct qed_hwfn *p_hwfn)
p_hwfn           1429 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_rdma_bmap_alloc(p_hwfn, &p_hwfn->p_rdma_info->tcp_cid_map,
p_hwfn           1432 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           1437 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	INIT_LIST_HEAD(&p_hwfn->p_rdma_info->iwarp.ep_free_list);
p_hwfn           1438 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_lock_init(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           1440 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_iwarp_prealloc_ep(p_hwfn, true);
p_hwfn           1444 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	return qed_ooo_alloc(p_hwfn);
p_hwfn           1447 drivers/net/ethernet/qlogic/qed/qed_iwarp.c void qed_iwarp_resc_free(struct qed_hwfn *p_hwfn)
p_hwfn           1449 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	struct qed_iwarp_info *iwarp_info = &p_hwfn->p_rdma_info->iwarp;
p_hwfn           1451 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_ooo_free(p_hwfn);
p_hwfn           1452 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_rdma_bmap_free(p_hwfn, &p_hwfn->p_rdma_info->tcp_cid_map, 1);
p_hwfn           1460 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	struct qed_hwfn *p_hwfn = rdma_cxt;
p_hwfn           1467 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_ERR(p_hwfn, "Ep Context receive in accept is NULL\n");
p_hwfn           1471 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "QP(0x%x) EP(0x%x)\n",
p_hwfn           1476 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn,
p_hwfn           1484 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_iwarp_prealloc_ep(p_hwfn, false);
p_hwfn           1506 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_iwarp_mpa_v2_set_private(p_hwfn, ep, &mpa_data_size);
p_hwfn           1515 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_iwarp_mpa_offload(p_hwfn, ep);
p_hwfn           1517 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_iwarp_modify_qp(p_hwfn,
p_hwfn           1525 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	struct qed_hwfn *p_hwfn = rdma_cxt;
p_hwfn           1531 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_ERR(p_hwfn, "Ep Context receive in reject is NULL\n");
p_hwfn           1535 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "EP(0x%x)\n", ep->tcp_cid);
p_hwfn           1540 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_iwarp_mpa_v2_set_private(p_hwfn, ep, &mpa_data_size);
p_hwfn           1549 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	return qed_iwarp_mpa_offload(p_hwfn, ep);
p_hwfn           1553 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_print_cm_info(struct qed_hwfn *p_hwfn,
p_hwfn           1556 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "ip_version = %d\n",
p_hwfn           1560 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           1566 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           1572 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           1578 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_ll2_post_rx(struct qed_hwfn *p_hwfn,
p_hwfn           1583 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_ll2_post_rx_buffer(p_hwfn, handle, buf->data_phys_addr,
p_hwfn           1586 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn,
p_hwfn           1589 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev, buf->buff_size,
p_hwfn           1598 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_ep_exists(struct qed_hwfn *p_hwfn, struct qed_iwarp_cm_info *cm_info)
p_hwfn           1604 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			    &p_hwfn->p_rdma_info->iwarp.ep_list,
p_hwfn           1619 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn,
p_hwfn           1621 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_iwarp_print_cm_info(p_hwfn, cm_info);
p_hwfn           1630 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_get_listener(struct qed_hwfn *p_hwfn,
p_hwfn           1637 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_iwarp_print_cm_info(p_hwfn, cm_info);
p_hwfn           1640 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			    &p_hwfn->p_rdma_info->iwarp.listen_list,
p_hwfn           1660 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "listener found = %p\n",
p_hwfn           1665 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "listener not found\n");
p_hwfn           1670 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_parse_rx_pkt(struct qed_hwfn *p_hwfn,
p_hwfn           1700 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			      p_hwfn->p_rdma_info->iwarp.mac_addr)) {
p_hwfn           1701 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn,
p_hwfn           1704 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			   ethh->h_dest, p_hwfn->p_rdma_info->iwarp.mac_addr);
p_hwfn           1711 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "eth_type =%d source mac: %pM\n",
p_hwfn           1714 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "eth_hlen=%d destination mac: %pM\n",
p_hwfn           1721 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			DP_NOTICE(p_hwfn,
p_hwfn           1737 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			DP_NOTICE(p_hwfn,
p_hwfn           1754 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn, "Unexpected ethertype on ll2 %x\n", eth_type);
p_hwfn           1761 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn,
p_hwfn           1770 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_iwarp_print_cm_info(p_hwfn, cm_info);
p_hwfn           1777 drivers/net/ethernet/qlogic/qed/qed_iwarp.c static struct qed_iwarp_fpdu *qed_iwarp_get_curr_fpdu(struct qed_hwfn *p_hwfn,
p_hwfn           1780 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	struct qed_iwarp_info *iwarp_info = &p_hwfn->p_rdma_info->iwarp;
p_hwfn           1784 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	idx = cid - qed_cxt_get_proto_cid_start(p_hwfn, PROTOCOLID_IWARP);
p_hwfn           1786 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_ERR(p_hwfn, "Invalid cid %x max_num_partial_fpdus=%x\n", cid,
p_hwfn           1823 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_recycle_pkt(struct qed_hwfn *p_hwfn,
p_hwfn           1828 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_mpa_classify(struct qed_hwfn *p_hwfn,
p_hwfn           1858 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           1888 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_cp_pkt(struct qed_hwfn *p_hwfn,
p_hwfn           1893 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	u8 *tmp_buf = p_hwfn->p_rdma_info->iwarp.mpa_intermediate_buf;
p_hwfn           1903 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_ERR(p_hwfn,
p_hwfn           1910 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           1921 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_iwarp_recycle_pkt(p_hwfn, fpdu, fpdu->mpa_buf);
p_hwfn           1940 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn,
p_hwfn           1950 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_update_fpdu_length(struct qed_hwfn *p_hwfn,
p_hwfn           1963 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn,
p_hwfn           1985 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_recycle_pkt(struct qed_hwfn *p_hwfn,
p_hwfn           2002 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	ll2_handle = p_hwfn->p_rdma_info->iwarp.ll2_mpa_handle;
p_hwfn           2004 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_ll2_prepare_tx_packet(p_hwfn, ll2_handle, &tx_pkt, true);
p_hwfn           2006 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           2009 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn,
p_hwfn           2019 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_win_right_edge(struct qed_hwfn *p_hwfn, struct qed_iwarp_fpdu *fpdu)
p_hwfn           2038 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	ll2_handle = p_hwfn->p_rdma_info->iwarp.ll2_mpa_handle;
p_hwfn           2040 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_ll2_prepare_tx_packet(p_hwfn, ll2_handle, &tx_pkt, true);
p_hwfn           2042 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           2044 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn,
p_hwfn           2055 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_send_fpdu(struct qed_hwfn *p_hwfn,
p_hwfn           2096 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	ll2_handle = p_hwfn->p_rdma_info->iwarp.ll2_mpa_handle;
p_hwfn           2099 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_ll2_prepare_tx_packet(p_hwfn, ll2_handle, &tx_pkt, true);
p_hwfn           2104 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_ll2_set_fragment_of_tx_packet(p_hwfn, ll2_handle,
p_hwfn           2114 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_ll2_set_fragment_of_tx_packet(p_hwfn,
p_hwfn           2120 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn,
p_hwfn           2132 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_mpa_get_data(struct qed_hwfn *p_hwfn,
p_hwfn           2151 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_process_mpa_pkt(struct qed_hwfn *p_hwfn,
p_hwfn           2161 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	fpdu = qed_iwarp_get_curr_fpdu(p_hwfn, curr_pkt->cid & 0xffff);
p_hwfn           2163 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_ERR(p_hwfn, "Invalid cid, drop and post back to rx cid=%x\n",
p_hwfn           2171 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		pkt_type = qed_iwarp_mpa_classify(p_hwfn, fpdu,
p_hwfn           2187 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			rc = qed_iwarp_win_right_edge(p_hwfn, fpdu);
p_hwfn           2190 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 				DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           2204 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			rc = qed_iwarp_send_fpdu(p_hwfn, fpdu, curr_pkt, buf,
p_hwfn           2208 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 				DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           2218 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			qed_iwarp_update_fpdu_length(p_hwfn, fpdu, mpa_data);
p_hwfn           2224 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 					rc = qed_iwarp_win_right_edge(p_hwfn,
p_hwfn           2231 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 				rc = qed_iwarp_cp_pkt(p_hwfn, fpdu, curr_pkt,
p_hwfn           2241 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			rc = qed_iwarp_send_fpdu(p_hwfn, fpdu, curr_pkt, buf,
p_hwfn           2245 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 				DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           2264 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_iwarp_ll2_post_rx(p_hwfn,
p_hwfn           2266 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			      p_hwfn->p_rdma_info->iwarp.ll2_mpa_handle);
p_hwfn           2270 drivers/net/ethernet/qlogic/qed/qed_iwarp.c static void qed_iwarp_process_pending_pkts(struct qed_hwfn *p_hwfn)
p_hwfn           2272 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	struct qed_iwarp_info *iwarp_info = &p_hwfn->p_rdma_info->iwarp;
p_hwfn           2281 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		rc = qed_iwarp_process_mpa_pkt(p_hwfn, mpa_buf);
p_hwfn           2293 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			DP_NOTICE(p_hwfn, "process pkts failed rc=%d\n", rc);
p_hwfn           2304 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	struct qed_hwfn *p_hwfn = cxt;
p_hwfn           2306 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	iwarp_info = &p_hwfn->p_rdma_info->iwarp;
p_hwfn           2310 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_ERR(p_hwfn, "No free mpa buf\n");
p_hwfn           2315 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_iwarp_mpa_get_data(p_hwfn, &mpa_buf->data,
p_hwfn           2318 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn,
p_hwfn           2333 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_iwarp_process_pending_pkts(p_hwfn);
p_hwfn           2336 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_iwarp_ll2_post_rx(p_hwfn, data->cookie,
p_hwfn           2347 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	struct qed_hwfn *p_hwfn = cxt;
p_hwfn           2358 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	ll2_syn_handle = p_hwfn->p_rdma_info->iwarp.ll2_syn_handle;
p_hwfn           2362 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn, "Error received on SYN packet: 0x%x\n",
p_hwfn           2370 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn, "Syn packet received with checksum error\n");
p_hwfn           2374 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_iwarp_parse_rx_pkt(p_hwfn, &cm_info, (u8 *)(buf->data) +
p_hwfn           2382 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	listener = qed_iwarp_get_listener(p_hwfn, &cm_info);
p_hwfn           2384 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn,
p_hwfn           2398 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		rc = qed_ll2_prepare_tx_packet(p_hwfn, ll2_syn_handle,
p_hwfn           2402 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			DP_NOTICE(p_hwfn,
p_hwfn           2409 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Received syn on listening port\n");
p_hwfn           2413 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	if (qed_iwarp_ep_exists(p_hwfn, &cm_info))
p_hwfn           2416 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	ep = qed_iwarp_get_free_ep(p_hwfn);
p_hwfn           2420 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_lock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           2421 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	list_add_tail(&ep->list_entry, &p_hwfn->p_rdma_info->iwarp.ep_list);
p_hwfn           2422 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           2430 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	ep->mss = p_hwfn->p_rdma_info->iwarp.max_mtu - hdr_size;
p_hwfn           2442 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_iwarp_tcp_offload(p_hwfn, ep);
p_hwfn           2444 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_iwarp_return_ep(p_hwfn, ep);
p_hwfn           2450 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_iwarp_ll2_post_rx(p_hwfn, buf, ll2_syn_handle);
p_hwfn           2458 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	struct qed_hwfn *p_hwfn = cxt;
p_hwfn           2460 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev, buffer->buff_size,
p_hwfn           2471 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	struct qed_hwfn *p_hwfn = cxt;
p_hwfn           2480 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_iwarp_ll2_post_rx(p_hwfn, piggy, connection_handle);
p_hwfn           2483 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_iwarp_ll2_post_rx(p_hwfn, buffer, connection_handle);
p_hwfn           2485 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	if (connection_handle == p_hwfn->p_rdma_info->iwarp.ll2_mpa_handle)
p_hwfn           2486 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_iwarp_process_pending_pkts(p_hwfn);
p_hwfn           2496 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	struct qed_hwfn *p_hwfn = cxt;
p_hwfn           2502 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn           2510 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev, buffer->buff_size,
p_hwfn           2525 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	struct qed_hwfn *p_hwfn = cxt;
p_hwfn           2528 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_iwarp_mpa_get_data(p_hwfn, &unalign_data,
p_hwfn           2531 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "(0x%x) Flush fpdu\n",
p_hwfn           2534 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	fpdu = qed_iwarp_get_curr_fpdu(p_hwfn, (u16)unalign_data.cid);
p_hwfn           2539 drivers/net/ethernet/qlogic/qed/qed_iwarp.c static int qed_iwarp_ll2_stop(struct qed_hwfn *p_hwfn)
p_hwfn           2541 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	struct qed_iwarp_info *iwarp_info = &p_hwfn->p_rdma_info->iwarp;
p_hwfn           2545 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		rc = qed_ll2_terminate_connection(p_hwfn,
p_hwfn           2548 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			DP_INFO(p_hwfn, "Failed to terminate syn connection\n");
p_hwfn           2550 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_ll2_release_connection(p_hwfn, iwarp_info->ll2_syn_handle);
p_hwfn           2555 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		rc = qed_ll2_terminate_connection(p_hwfn,
p_hwfn           2558 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			DP_INFO(p_hwfn, "Failed to terminate ooo connection\n");
p_hwfn           2560 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_ll2_release_connection(p_hwfn, iwarp_info->ll2_ooo_handle);
p_hwfn           2565 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		rc = qed_ll2_terminate_connection(p_hwfn,
p_hwfn           2568 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			DP_INFO(p_hwfn, "Failed to terminate mpa connection\n");
p_hwfn           2570 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_ll2_release_connection(p_hwfn, iwarp_info->ll2_mpa_handle);
p_hwfn           2574 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_llh_remove_mac_filter(p_hwfn->cdev, 0,
p_hwfn           2575 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 				  p_hwfn->p_rdma_info->iwarp.mac_addr);
p_hwfn           2581 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_ll2_alloc_buffers(struct qed_hwfn *p_hwfn,
p_hwfn           2595 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		buffer->data = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn           2606 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		rc = qed_iwarp_ll2_post_rx(p_hwfn, buffer, ll2_handle);
p_hwfn           2619 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_ll2_start(struct qed_hwfn *p_hwfn,
p_hwfn           2631 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	iwarp_info = &p_hwfn->p_rdma_info->iwarp;
p_hwfn           2638 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	ether_addr_copy(p_hwfn->p_rdma_info->iwarp.mac_addr, params->mac_addr);
p_hwfn           2640 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_llh_add_mac_filter(p_hwfn->cdev, 0, params->mac_addr);
p_hwfn           2650 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	cbs.cookie = p_hwfn;
p_hwfn           2663 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_ll2_acquire_connection(p_hwfn, &data);
p_hwfn           2665 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn, "Failed to acquire LL2 connection\n");
p_hwfn           2666 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_llh_remove_mac_filter(p_hwfn->cdev, 0, params->mac_addr);
p_hwfn           2670 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_ll2_establish_connection(p_hwfn, iwarp_info->ll2_syn_handle);
p_hwfn           2672 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn, "Failed to establish LL2 connection\n");
p_hwfn           2677 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_iwarp_ll2_alloc_buffers(p_hwfn,
p_hwfn           2699 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_ll2_acquire_connection(p_hwfn, &data);
p_hwfn           2703 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_ll2_establish_connection(p_hwfn, iwarp_info->ll2_ooo_handle);
p_hwfn           2727 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_ll2_acquire_connection(p_hwfn, &data);
p_hwfn           2731 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_ll2_establish_connection(p_hwfn, iwarp_info->ll2_mpa_handle);
p_hwfn           2735 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_iwarp_ll2_alloc_buffers(p_hwfn,
p_hwfn           2742 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	iwarp_info->partial_fpdus = kcalloc((u16)p_hwfn->p_rdma_info->num_qps,
p_hwfn           2748 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	iwarp_info->max_num_partial_fpdus = (u16)p_hwfn->p_rdma_info->num_qps;
p_hwfn           2772 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_iwarp_ll2_stop(p_hwfn);
p_hwfn           2785 drivers/net/ethernet/qlogic/qed/qed_iwarp.c int qed_iwarp_setup(struct qed_hwfn *p_hwfn,
p_hwfn           2788 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn           2793 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	iwarp_info = &p_hwfn->p_rdma_info->iwarp;
p_hwfn           2815 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_lock_init(&p_hwfn->p_rdma_info->iwarp.qp_lock);
p_hwfn           2816 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	INIT_LIST_HEAD(&p_hwfn->p_rdma_info->iwarp.ep_list);
p_hwfn           2817 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	INIT_LIST_HEAD(&p_hwfn->p_rdma_info->iwarp.listen_list);
p_hwfn           2819 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_spq_register_async_cb(p_hwfn, PROTOCOLID_IWARP,
p_hwfn           2821 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_ooo_setup(p_hwfn);
p_hwfn           2823 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	return qed_iwarp_ll2_start(p_hwfn, params, rcv_wnd_size);
p_hwfn           2826 drivers/net/ethernet/qlogic/qed/qed_iwarp.c int qed_iwarp_stop(struct qed_hwfn *p_hwfn)
p_hwfn           2830 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_iwarp_free_prealloc_ep(p_hwfn);
p_hwfn           2831 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_iwarp_wait_for_all_cids(p_hwfn);
p_hwfn           2835 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_spq_unregister_async_cb(p_hwfn, PROTOCOLID_IWARP);
p_hwfn           2837 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	return qed_iwarp_ll2_stop(p_hwfn);
p_hwfn           2840 drivers/net/ethernet/qlogic/qed/qed_iwarp.c static void qed_iwarp_qp_in_error(struct qed_hwfn *p_hwfn,
p_hwfn           2846 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	qed_iwarp_modify_qp(p_hwfn, ep->qp, QED_IWARP_QP_STATE_ERROR, true);
p_hwfn           2857 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_lock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           2859 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           2864 drivers/net/ethernet/qlogic/qed/qed_iwarp.c static void qed_iwarp_exception_received(struct qed_hwfn *p_hwfn,
p_hwfn           2871 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "EP(0x%x) fw_ret_code=%d\n",
p_hwfn           2922 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           2936 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_tcp_connect_unsuccessful(struct qed_hwfn *p_hwfn,
p_hwfn           2950 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           2956 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           2962 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn, "%s(0x%x) TCP timeout\n",
p_hwfn           2967 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn, "%s(0x%x) MPA not supported VER\n",
p_hwfn           2972 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn, "%s(0x%x) MPA Invalid Packet\n",
p_hwfn           2977 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_ERR(p_hwfn,
p_hwfn           2987 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_iwarp_return_ep(p_hwfn, ep);
p_hwfn           2990 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		spin_lock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           2992 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		spin_unlock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           2997 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_connect_complete(struct qed_hwfn *p_hwfn,
p_hwfn           3000 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	u8 ll2_syn_handle = p_hwfn->p_rdma_info->iwarp.ll2_syn_handle;
p_hwfn           3004 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_iwarp_ll2_post_rx(p_hwfn, ep->syn, ll2_syn_handle);
p_hwfn           3010 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			qed_iwarp_mpa_received(p_hwfn, ep);
p_hwfn           3012 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			qed_iwarp_tcp_connect_unsuccessful(p_hwfn, ep,
p_hwfn           3016 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			qed_iwarp_mpa_offload(p_hwfn, ep);
p_hwfn           3018 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			qed_iwarp_tcp_connect_unsuccessful(p_hwfn, ep,
p_hwfn           3024 drivers/net/ethernet/qlogic/qed/qed_iwarp.c qed_iwarp_check_ep_ok(struct qed_hwfn *p_hwfn, struct qed_iwarp_ep *ep)
p_hwfn           3027 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_ERR(p_hwfn, "ERROR ON ASYNC ep=%p\n", ep);
p_hwfn           3034 drivers/net/ethernet/qlogic/qed/qed_iwarp.c static int qed_iwarp_async_event(struct qed_hwfn *p_hwfn,
p_hwfn           3039 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	struct qed_rdma_events events = p_hwfn->p_rdma_info->events;
p_hwfn           3052 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		if (!qed_iwarp_check_ep_ok(p_hwfn, ep))
p_hwfn           3054 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn,
p_hwfn           3058 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_iwarp_connect_complete(p_hwfn, ep, fw_return_code);
p_hwfn           3061 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		if (!qed_iwarp_check_ep_ok(p_hwfn, ep))
p_hwfn           3063 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn,
p_hwfn           3067 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_iwarp_exception_received(p_hwfn, ep, fw_return_code);
p_hwfn           3071 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		if (!qed_iwarp_check_ep_ok(p_hwfn, ep))
p_hwfn           3073 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn,
p_hwfn           3077 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_iwarp_qp_in_error(p_hwfn, ep, fw_return_code);
p_hwfn           3081 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		if (!qed_iwarp_check_ep_ok(p_hwfn, ep))
p_hwfn           3083 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn,
p_hwfn           3087 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_iwarp_mpa_reply_arrived(p_hwfn, ep);
p_hwfn           3090 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		if (!qed_iwarp_check_ep_ok(p_hwfn, ep))
p_hwfn           3092 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn,
p_hwfn           3096 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_iwarp_mpa_complete(p_hwfn, ep, fw_return_code);
p_hwfn           3100 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           3102 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		qed_iwarp_cid_cleaned(p_hwfn, cid);
p_hwfn           3106 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn, "IWARP_EVENT_TYPE_ASYNC_SRQ_EMPTY\n");
p_hwfn           3107 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		srq_offset = p_hwfn->p_rdma_info->srq_id_offset;
p_hwfn           3115 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn, "IWARP_EVENT_TYPE_ASYNC_SRQ_LIMIT\n");
p_hwfn           3116 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		srq_offset = p_hwfn->p_rdma_info->srq_id_offset;
p_hwfn           3124 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_NOTICE(p_hwfn, "IWARP_EVENT_TYPE_ASYNC_CQ_OVERFLOW\n");
p_hwfn           3126 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		p_hwfn->p_rdma_info->events.affiliated_event(
p_hwfn           3127 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 			p_hwfn->p_rdma_info->events.context,
p_hwfn           3132 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_ERR(p_hwfn, "Received unexpected async iwarp event %d\n",
p_hwfn           3144 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	struct qed_hwfn *p_hwfn = rdma_cxt;
p_hwfn           3161 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_lock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           3163 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		      &p_hwfn->p_rdma_info->iwarp.listen_list);
p_hwfn           3164 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           3166 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn,
p_hwfn           3182 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	struct qed_hwfn *p_hwfn = rdma_cxt;
p_hwfn           3184 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "handle=%p\n", handle);
p_hwfn           3186 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_lock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           3188 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
p_hwfn           3197 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	struct qed_hwfn *p_hwfn = rdma_cxt;
p_hwfn           3206 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 		DP_ERR(p_hwfn, "Ep Context receive in send_rtr is NULL\n");
p_hwfn           3212 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "QP(0x%x) EP(0x%x)\n",
p_hwfn           3217 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn           3220 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn           3227 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn           3229 drivers/net/ethernet/qlogic/qed/qed_iwarp.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "rc = 0x%x\n", rc);
p_hwfn            184 drivers/net/ethernet/qlogic/qed/qed_iwarp.h int qed_iwarp_alloc(struct qed_hwfn *p_hwfn);
p_hwfn            186 drivers/net/ethernet/qlogic/qed/qed_iwarp.h int qed_iwarp_setup(struct qed_hwfn *p_hwfn,
p_hwfn            189 drivers/net/ethernet/qlogic/qed/qed_iwarp.h void qed_iwarp_init_fw_ramrod(struct qed_hwfn *p_hwfn,
p_hwfn            192 drivers/net/ethernet/qlogic/qed/qed_iwarp.h int qed_iwarp_stop(struct qed_hwfn *p_hwfn);
p_hwfn            194 drivers/net/ethernet/qlogic/qed/qed_iwarp.h void qed_iwarp_resc_free(struct qed_hwfn *p_hwfn);
p_hwfn            196 drivers/net/ethernet/qlogic/qed/qed_iwarp.h void qed_iwarp_init_devinfo(struct qed_hwfn *p_hwfn);
p_hwfn            198 drivers/net/ethernet/qlogic/qed/qed_iwarp.h void qed_iwarp_init_hw(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn            200 drivers/net/ethernet/qlogic/qed/qed_iwarp.h int qed_iwarp_create_qp(struct qed_hwfn *p_hwfn,
p_hwfn            204 drivers/net/ethernet/qlogic/qed/qed_iwarp.h int qed_iwarp_modify_qp(struct qed_hwfn *p_hwfn, struct qed_rdma_qp *qp,
p_hwfn            207 drivers/net/ethernet/qlogic/qed/qed_iwarp.h int qed_iwarp_destroy_qp(struct qed_hwfn *p_hwfn, struct qed_rdma_qp *qp);
p_hwfn            209 drivers/net/ethernet/qlogic/qed/qed_iwarp.h int qed_iwarp_fw_destroy(struct qed_hwfn *p_hwfn, struct qed_rdma_qp *qp);
p_hwfn             76 drivers/net/ethernet/qlogic/qed/qed_l2.c int qed_l2_alloc(struct qed_hwfn *p_hwfn)
p_hwfn             82 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (!QED_IS_L2_PERSONALITY(p_hwfn))
p_hwfn             88 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_hwfn->p_l2_info = p_l2_info;
p_hwfn             90 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (IS_PF(p_hwfn->cdev)) {
p_hwfn             91 drivers/net/ethernet/qlogic/qed/qed_l2.c 		p_l2_info->queues = RESC_NUM(p_hwfn, QED_L2_QUEUE);
p_hwfn             95 drivers/net/ethernet/qlogic/qed/qed_l2.c 		qed_vf_get_num_rxqs(p_hwfn, &rx);
p_hwfn             96 drivers/net/ethernet/qlogic/qed/qed_l2.c 		qed_vf_get_num_txqs(p_hwfn, &tx);
p_hwfn            116 drivers/net/ethernet/qlogic/qed/qed_l2.c void qed_l2_setup(struct qed_hwfn *p_hwfn)
p_hwfn            118 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (!QED_IS_L2_PERSONALITY(p_hwfn))
p_hwfn            121 drivers/net/ethernet/qlogic/qed/qed_l2.c 	mutex_init(&p_hwfn->p_l2_info->lock);
p_hwfn            124 drivers/net/ethernet/qlogic/qed/qed_l2.c void qed_l2_free(struct qed_hwfn *p_hwfn)
p_hwfn            128 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (!QED_IS_L2_PERSONALITY(p_hwfn))
p_hwfn            131 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (!p_hwfn->p_l2_info)
p_hwfn            134 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (!p_hwfn->p_l2_info->pp_qid_usage)
p_hwfn            138 drivers/net/ethernet/qlogic/qed/qed_l2.c 	for (i = 0; i < p_hwfn->p_l2_info->queues; i++) {
p_hwfn            139 drivers/net/ethernet/qlogic/qed/qed_l2.c 		if (!p_hwfn->p_l2_info->pp_qid_usage[i])
p_hwfn            141 drivers/net/ethernet/qlogic/qed/qed_l2.c 		kfree(p_hwfn->p_l2_info->pp_qid_usage[i]);
p_hwfn            144 drivers/net/ethernet/qlogic/qed/qed_l2.c 	kfree(p_hwfn->p_l2_info->pp_qid_usage);
p_hwfn            147 drivers/net/ethernet/qlogic/qed/qed_l2.c 	kfree(p_hwfn->p_l2_info);
p_hwfn            148 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_hwfn->p_l2_info = NULL;
p_hwfn            151 drivers/net/ethernet/qlogic/qed/qed_l2.c static bool qed_eth_queue_qid_usage_add(struct qed_hwfn *p_hwfn,
p_hwfn            154 drivers/net/ethernet/qlogic/qed/qed_l2.c 	struct qed_l2_info *p_l2_info = p_hwfn->p_l2_info;
p_hwfn            162 drivers/net/ethernet/qlogic/qed/qed_l2.c 		DP_NOTICE(p_hwfn,
p_hwfn            184 drivers/net/ethernet/qlogic/qed/qed_l2.c static void qed_eth_queue_qid_usage_del(struct qed_hwfn *p_hwfn,
p_hwfn            187 drivers/net/ethernet/qlogic/qed/qed_l2.c 	mutex_lock(&p_hwfn->p_l2_info->lock);
p_hwfn            190 drivers/net/ethernet/qlogic/qed/qed_l2.c 		  p_hwfn->p_l2_info->pp_qid_usage[p_cid->rel.queue_id]);
p_hwfn            192 drivers/net/ethernet/qlogic/qed/qed_l2.c 	mutex_unlock(&p_hwfn->p_l2_info->lock);
p_hwfn            195 drivers/net/ethernet/qlogic/qed/qed_l2.c void qed_eth_queue_cid_release(struct qed_hwfn *p_hwfn,
p_hwfn            200 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (IS_PF(p_hwfn->cdev) && !b_legacy_vf)
p_hwfn            201 drivers/net/ethernet/qlogic/qed/qed_l2.c 		_qed_cxt_release_cid(p_hwfn, p_cid->cid, p_cid->vfid);
p_hwfn            205 drivers/net/ethernet/qlogic/qed/qed_l2.c 		qed_eth_queue_qid_usage_del(p_hwfn, p_cid);
p_hwfn            214 drivers/net/ethernet/qlogic/qed/qed_l2.c _qed_eth_queue_to_cid(struct qed_hwfn *p_hwfn,
p_hwfn            230 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_cid->p_owner = p_hwfn;
p_hwfn            250 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (IS_VF(p_hwfn->cdev)) {
p_hwfn            259 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_fw_vport(p_hwfn, p_cid->rel.vport_id, &p_cid->abs.vport_id);
p_hwfn            263 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_fw_l2_queue(p_hwfn, p_cid->rel.queue_id, &p_cid->abs.queue_id);
p_hwfn            271 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_fw_vport(p_hwfn, p_cid->rel.stats_id,
p_hwfn            284 drivers/net/ethernet/qlogic/qed/qed_l2.c 		if (!qed_eth_queue_qid_usage_add(p_hwfn, p_cid))
p_hwfn            290 drivers/net/ethernet/qlogic/qed/qed_l2.c 	DP_VERBOSE(p_hwfn,
p_hwfn            311 drivers/net/ethernet/qlogic/qed/qed_l2.c qed_eth_queue_to_cid(struct qed_hwfn *p_hwfn,
p_hwfn            339 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (IS_PF(p_hwfn->cdev) && !b_legacy_vf) {
p_hwfn            340 drivers/net/ethernet/qlogic/qed/qed_l2.c 		if (_qed_cxt_acquire_cid(p_hwfn, PROTOCOLID_ETH,
p_hwfn            342 drivers/net/ethernet/qlogic/qed/qed_l2.c 			DP_NOTICE(p_hwfn, "Failed to acquire cid\n");
p_hwfn            347 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_cid = _qed_eth_queue_to_cid(p_hwfn, opaque_fid, cid,
p_hwfn            349 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (!p_cid && IS_PF(p_hwfn->cdev) && !b_legacy_vf)
p_hwfn            350 drivers/net/ethernet/qlogic/qed/qed_l2.c 		_qed_cxt_release_cid(p_hwfn, cid, vfid);
p_hwfn            356 drivers/net/ethernet/qlogic/qed/qed_l2.c qed_eth_queue_to_cid_pf(struct qed_hwfn *p_hwfn,
p_hwfn            361 drivers/net/ethernet/qlogic/qed/qed_l2.c 	return qed_eth_queue_to_cid(p_hwfn, opaque_fid, p_params, b_is_rx,
p_hwfn            365 drivers/net/ethernet/qlogic/qed/qed_l2.c int qed_sp_eth_vport_start(struct qed_hwfn *p_hwfn,
p_hwfn            375 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_fw_vport(p_hwfn, p_params->vport_id, &abs_vport_id);
p_hwfn            380 drivers/net/ethernet/qlogic/qed/qed_l2.c 	init_data.cid = qed_spq_get_cid(p_hwfn);
p_hwfn            384 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            430 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_ramrod->sw_fid = qed_concrete_to_sw_fid(p_hwfn->cdev,
p_hwfn            433 drivers/net/ethernet/qlogic/qed/qed_l2.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            436 drivers/net/ethernet/qlogic/qed/qed_l2.c static int qed_sp_vport_start(struct qed_hwfn *p_hwfn,
p_hwfn            439 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (IS_VF(p_hwfn->cdev)) {
p_hwfn            440 drivers/net/ethernet/qlogic/qed/qed_l2.c 		return qed_vf_pf_vport_start(p_hwfn, p_params->vport_id,
p_hwfn            448 drivers/net/ethernet/qlogic/qed/qed_l2.c 	return qed_sp_eth_vport_start(p_hwfn, p_params);
p_hwfn            452 drivers/net/ethernet/qlogic/qed/qed_l2.c qed_sp_vport_update_rss(struct qed_hwfn *p_hwfn,
p_hwfn            469 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_fw_rss_eng(p_hwfn, p_rss->rss_eng_id, &p_config->rss_id);
p_hwfn            504 drivers/net/ethernet/qlogic/qed/qed_l2.c 	DP_VERBOSE(p_hwfn, NETIF_MSG_IFUP,
p_hwfn            524 drivers/net/ethernet/qlogic/qed/qed_l2.c 	DP_VERBOSE(p_hwfn, NETIF_MSG_IFUP,
p_hwfn            528 drivers/net/ethernet/qlogic/qed/qed_l2.c 		DP_VERBOSE(p_hwfn,
p_hwfn            556 drivers/net/ethernet/qlogic/qed/qed_l2.c qed_sp_update_accept_mode(struct qed_hwfn *p_hwfn,
p_hwfn            593 drivers/net/ethernet/qlogic/qed/qed_l2.c 		DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn            620 drivers/net/ethernet/qlogic/qed/qed_l2.c 		DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn            626 drivers/net/ethernet/qlogic/qed/qed_l2.c qed_sp_vport_update_sge_tpa(struct qed_hwfn *p_hwfn,
p_hwfn            658 drivers/net/ethernet/qlogic/qed/qed_l2.c qed_sp_update_mcast_bin(struct qed_hwfn *p_hwfn,
p_hwfn            678 drivers/net/ethernet/qlogic/qed/qed_l2.c int qed_sp_vport_update(struct qed_hwfn *p_hwfn,
p_hwfn            691 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (IS_VF(p_hwfn->cdev)) {
p_hwfn            692 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_vf_pf_vport_update(p_hwfn, p_params);
p_hwfn            696 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_fw_vport(p_hwfn, p_params->vport_id, &abs_vport_id);
p_hwfn            701 drivers/net/ethernet/qlogic/qed/qed_l2.c 	init_data.cid = qed_spq_get_cid(p_hwfn);
p_hwfn            706 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            745 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_sp_vport_update_rss(p_hwfn, p_ramrod, p_rss_params);
p_hwfn            747 drivers/net/ethernet/qlogic/qed/qed_l2.c 		qed_sp_destroy_request(p_hwfn, p_ent);
p_hwfn            757 drivers/net/ethernet/qlogic/qed/qed_l2.c 	qed_sp_update_mcast_bin(p_hwfn, p_ramrod, p_params);
p_hwfn            759 drivers/net/ethernet/qlogic/qed/qed_l2.c 	qed_sp_update_accept_mode(p_hwfn, p_ramrod, p_params->accept_flags);
p_hwfn            760 drivers/net/ethernet/qlogic/qed/qed_l2.c 	qed_sp_vport_update_sge_tpa(p_hwfn, p_ramrod, p_params->sge_tpa_params);
p_hwfn            761 drivers/net/ethernet/qlogic/qed/qed_l2.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            764 drivers/net/ethernet/qlogic/qed/qed_l2.c int qed_sp_vport_stop(struct qed_hwfn *p_hwfn, u16 opaque_fid, u8 vport_id)
p_hwfn            772 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (IS_VF(p_hwfn->cdev))
p_hwfn            773 drivers/net/ethernet/qlogic/qed/qed_l2.c 		return qed_vf_pf_vport_stop(p_hwfn);
p_hwfn            775 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_fw_vport(p_hwfn, vport_id, &abs_vport_id);
p_hwfn            780 drivers/net/ethernet/qlogic/qed/qed_l2.c 	init_data.cid = qed_spq_get_cid(p_hwfn);
p_hwfn            784 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            793 drivers/net/ethernet/qlogic/qed/qed_l2.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            797 drivers/net/ethernet/qlogic/qed/qed_l2.c qed_vf_pf_accept_flags(struct qed_hwfn *p_hwfn,
p_hwfn            806 drivers/net/ethernet/qlogic/qed/qed_l2.c 	return qed_vf_pf_vport_update(p_hwfn, &s_params);
p_hwfn            828 drivers/net/ethernet/qlogic/qed/qed_l2.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn            830 drivers/net/ethernet/qlogic/qed/qed_l2.c 		vport_update_params.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            833 drivers/net/ethernet/qlogic/qed/qed_l2.c 			rc = qed_vf_pf_accept_flags(p_hwfn, &accept_flags);
p_hwfn            839 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_sp_vport_update(p_hwfn, &vport_update_params,
p_hwfn            846 drivers/net/ethernet/qlogic/qed/qed_l2.c 		DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn            851 drivers/net/ethernet/qlogic/qed/qed_l2.c 			DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn            859 drivers/net/ethernet/qlogic/qed/qed_l2.c int qed_eth_rxq_start_ramrod(struct qed_hwfn *p_hwfn,
p_hwfn            870 drivers/net/ethernet/qlogic/qed/qed_l2.c 	DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn            881 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            908 drivers/net/ethernet/qlogic/qed/qed_l2.c 		DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn            914 drivers/net/ethernet/qlogic/qed/qed_l2.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            918 drivers/net/ethernet/qlogic/qed/qed_l2.c qed_eth_pf_rx_queue_start(struct qed_hwfn *p_hwfn,
p_hwfn            927 drivers/net/ethernet/qlogic/qed/qed_l2.c 	*pp_prod = p_hwfn->regview +
p_hwfn            932 drivers/net/ethernet/qlogic/qed/qed_l2.c 	__internal_ram_wr(p_hwfn, *pp_prod, sizeof(u32),
p_hwfn            935 drivers/net/ethernet/qlogic/qed/qed_l2.c 	return qed_eth_rxq_start_ramrod(p_hwfn, p_cid,
p_hwfn            942 drivers/net/ethernet/qlogic/qed/qed_l2.c qed_eth_rx_queue_start(struct qed_hwfn *p_hwfn,
p_hwfn            955 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_cid = qed_eth_queue_to_cid_pf(p_hwfn, opaque_fid, true, p_params);
p_hwfn            959 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (IS_PF(p_hwfn->cdev)) {
p_hwfn            960 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_eth_pf_rx_queue_start(p_hwfn, p_cid,
p_hwfn            966 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_vf_pf_rxq_start(p_hwfn, p_cid,
p_hwfn            975 drivers/net/ethernet/qlogic/qed/qed_l2.c 		qed_eth_queue_cid_release(p_hwfn, p_cid);
p_hwfn            982 drivers/net/ethernet/qlogic/qed/qed_l2.c int qed_sp_eth_rx_queues_update(struct qed_hwfn *p_hwfn,
p_hwfn           1008 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn           1021 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn           1030 drivers/net/ethernet/qlogic/qed/qed_l2.c qed_eth_pf_rx_queue_stop(struct qed_hwfn *p_hwfn,
p_hwfn           1044 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn           1063 drivers/net/ethernet/qlogic/qed/qed_l2.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn           1066 drivers/net/ethernet/qlogic/qed/qed_l2.c int qed_eth_rx_queue_stop(struct qed_hwfn *p_hwfn,
p_hwfn           1073 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (IS_PF(p_hwfn->cdev))
p_hwfn           1074 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_eth_pf_rx_queue_stop(p_hwfn, p_cid,
p_hwfn           1078 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_vf_pf_rxq_stop(p_hwfn, p_cid, cqe_completion);
p_hwfn           1081 drivers/net/ethernet/qlogic/qed/qed_l2.c 		qed_eth_queue_cid_release(p_hwfn, p_cid);
p_hwfn           1086 drivers/net/ethernet/qlogic/qed/qed_l2.c qed_eth_txq_start_ramrod(struct qed_hwfn *p_hwfn,
p_hwfn           1101 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn           1122 drivers/net/ethernet/qlogic/qed/qed_l2.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn           1126 drivers/net/ethernet/qlogic/qed/qed_l2.c qed_eth_pf_tx_queue_start(struct qed_hwfn *p_hwfn,
p_hwfn           1135 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_eth_txq_start_ramrod(p_hwfn, p_cid,
p_hwfn           1137 drivers/net/ethernet/qlogic/qed/qed_l2.c 				      qed_get_cm_pq_idx_mcos(p_hwfn, tc));
p_hwfn           1142 drivers/net/ethernet/qlogic/qed/qed_l2.c 	*pp_doorbell = p_hwfn->doorbells +
p_hwfn           1149 drivers/net/ethernet/qlogic/qed/qed_l2.c qed_eth_tx_queue_start(struct qed_hwfn *p_hwfn,
p_hwfn           1160 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_cid = qed_eth_queue_to_cid_pf(p_hwfn, opaque_fid, false, p_params);
p_hwfn           1164 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (IS_PF(p_hwfn->cdev))
p_hwfn           1165 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_eth_pf_tx_queue_start(p_hwfn, p_cid, tc,
p_hwfn           1169 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_vf_pf_txq_start(p_hwfn, p_cid,
p_hwfn           1174 drivers/net/ethernet/qlogic/qed/qed_l2.c 		qed_eth_queue_cid_release(p_hwfn, p_cid);
p_hwfn           1182 drivers/net/ethernet/qlogic/qed/qed_l2.c qed_eth_pf_tx_queue_stop(struct qed_hwfn *p_hwfn, struct qed_queue_cid *p_cid)
p_hwfn           1193 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn           1199 drivers/net/ethernet/qlogic/qed/qed_l2.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn           1202 drivers/net/ethernet/qlogic/qed/qed_l2.c int qed_eth_tx_queue_stop(struct qed_hwfn *p_hwfn, void *p_handle)
p_hwfn           1207 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (IS_PF(p_hwfn->cdev))
p_hwfn           1208 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_eth_pf_tx_queue_stop(p_hwfn, p_cid);
p_hwfn           1210 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_vf_pf_txq_stop(p_hwfn, p_cid);
p_hwfn           1213 drivers/net/ethernet/qlogic/qed/qed_l2.c 		qed_eth_queue_cid_release(p_hwfn, p_cid);
p_hwfn           1239 drivers/net/ethernet/qlogic/qed/qed_l2.c qed_filter_ucast_common(struct qed_hwfn *p_hwfn,
p_hwfn           1255 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_fw_vport(p_hwfn, p_filter_cmd->vport_to_remove_from,
p_hwfn           1260 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_fw_vport(p_hwfn, p_filter_cmd->vport_to_add_to,
p_hwfn           1267 drivers/net/ethernet/qlogic/qed/qed_l2.c 	init_data.cid = qed_spq_get_cid(p_hwfn);
p_hwfn           1272 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_sp_init_request(p_hwfn, pp_ent,
p_hwfn           1363 drivers/net/ethernet/qlogic/qed/qed_l2.c 			DP_NOTICE(p_hwfn,
p_hwfn           1366 drivers/net/ethernet/qlogic/qed/qed_l2.c 			qed_sp_destroy_request(p_hwfn, *pp_ent);
p_hwfn           1380 drivers/net/ethernet/qlogic/qed/qed_l2.c int qed_sp_eth_filter_ucast(struct qed_hwfn *p_hwfn,
p_hwfn           1391 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_filter_ucast_common(p_hwfn, opaque_fid, p_filter_cmd,
p_hwfn           1395 drivers/net/ethernet/qlogic/qed/qed_l2.c 		DP_ERR(p_hwfn, "Uni. filter command failed %d\n", rc);
p_hwfn           1401 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn           1403 drivers/net/ethernet/qlogic/qed/qed_l2.c 		DP_ERR(p_hwfn, "Unicast filter ADD command failed %d\n", rc);
p_hwfn           1407 drivers/net/ethernet/qlogic/qed/qed_l2.c 	DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn           1420 drivers/net/ethernet/qlogic/qed/qed_l2.c 	DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn           1482 drivers/net/ethernet/qlogic/qed/qed_l2.c qed_sp_eth_filter_mcast(struct qed_hwfn *p_hwfn,
p_hwfn           1496 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_fw_vport(p_hwfn, p_filter_cmd->vport_to_add_to,
p_hwfn           1499 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_fw_vport(p_hwfn, p_filter_cmd->vport_to_remove_from,
p_hwfn           1506 drivers/net/ethernet/qlogic/qed/qed_l2.c 	init_data.cid = qed_spq_get_cid(p_hwfn);
p_hwfn           1507 drivers/net/ethernet/qlogic/qed/qed_l2.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn           1511 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn           1515 drivers/net/ethernet/qlogic/qed/qed_l2.c 		DP_ERR(p_hwfn, "Multi-cast command failed %d\n", rc);
p_hwfn           1549 drivers/net/ethernet/qlogic/qed/qed_l2.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn           1567 drivers/net/ethernet/qlogic/qed/qed_l2.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           1572 drivers/net/ethernet/qlogic/qed/qed_l2.c 			qed_vf_pf_filter_mcast(p_hwfn, p_filter_cmd);
p_hwfn           1576 drivers/net/ethernet/qlogic/qed/qed_l2.c 		opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn           1578 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_sp_eth_filter_mcast(p_hwfn,
p_hwfn           1595 drivers/net/ethernet/qlogic/qed/qed_l2.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           1599 drivers/net/ethernet/qlogic/qed/qed_l2.c 			rc = qed_vf_pf_filter_ucast(p_hwfn, p_filter_cmd);
p_hwfn           1603 drivers/net/ethernet/qlogic/qed/qed_l2.c 		opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn           1605 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_sp_eth_filter_ucast(p_hwfn,
p_hwfn           1617 drivers/net/ethernet/qlogic/qed/qed_l2.c static void __qed_get_vport_pstats_addrlen(struct qed_hwfn *p_hwfn,
p_hwfn           1621 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (IS_PF(p_hwfn->cdev)) {
p_hwfn           1626 drivers/net/ethernet/qlogic/qed/qed_l2.c 		struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn           1635 drivers/net/ethernet/qlogic/qed/qed_l2.c __qed_get_vport_pstats(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
p_hwfn           1641 drivers/net/ethernet/qlogic/qed/qed_l2.c 	__qed_get_vport_pstats_addrlen(p_hwfn, &pstats_addr, &pstats_len,
p_hwfn           1645 drivers/net/ethernet/qlogic/qed/qed_l2.c 	qed_memcpy_from(p_hwfn, p_ptt, &pstats, pstats_addr, pstats_len);
p_hwfn           1664 drivers/net/ethernet/qlogic/qed/qed_l2.c __qed_get_vport_tstats(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
p_hwfn           1670 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (IS_PF(p_hwfn->cdev)) {
p_hwfn           1672 drivers/net/ethernet/qlogic/qed/qed_l2.c 		    TSTORM_PORT_STAT_OFFSET(MFW_PORT(p_hwfn));
p_hwfn           1675 drivers/net/ethernet/qlogic/qed/qed_l2.c 		struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn           1683 drivers/net/ethernet/qlogic/qed/qed_l2.c 	qed_memcpy_from(p_hwfn, p_ptt, &tstats, tstats_addr, tstats_len);
p_hwfn           1693 drivers/net/ethernet/qlogic/qed/qed_l2.c static void __qed_get_vport_ustats_addrlen(struct qed_hwfn *p_hwfn,
p_hwfn           1697 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (IS_PF(p_hwfn->cdev)) {
p_hwfn           1702 drivers/net/ethernet/qlogic/qed/qed_l2.c 		struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn           1711 drivers/net/ethernet/qlogic/qed/qed_l2.c void __qed_get_vport_ustats(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
p_hwfn           1717 drivers/net/ethernet/qlogic/qed/qed_l2.c 	__qed_get_vport_ustats_addrlen(p_hwfn, &ustats_addr, &ustats_len,
p_hwfn           1721 drivers/net/ethernet/qlogic/qed/qed_l2.c 	qed_memcpy_from(p_hwfn, p_ptt, &ustats, ustats_addr, ustats_len);
p_hwfn           1734 drivers/net/ethernet/qlogic/qed/qed_l2.c static void __qed_get_vport_mstats_addrlen(struct qed_hwfn *p_hwfn,
p_hwfn           1738 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (IS_PF(p_hwfn->cdev)) {
p_hwfn           1743 drivers/net/ethernet/qlogic/qed/qed_l2.c 		struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn           1752 drivers/net/ethernet/qlogic/qed/qed_l2.c __qed_get_vport_mstats(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
p_hwfn           1758 drivers/net/ethernet/qlogic/qed/qed_l2.c 	__qed_get_vport_mstats_addrlen(p_hwfn, &mstats_addr, &mstats_len,
p_hwfn           1762 drivers/net/ethernet/qlogic/qed/qed_l2.c 	qed_memcpy_from(p_hwfn, p_ptt, &mstats, mstats_addr, mstats_len);
p_hwfn           1780 drivers/net/ethernet/qlogic/qed/qed_l2.c __qed_get_vport_port_stats(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
p_hwfn           1789 drivers/net/ethernet/qlogic/qed/qed_l2.c 	qed_memcpy_from(p_hwfn, p_ptt, &port_stats,
p_hwfn           1790 drivers/net/ethernet/qlogic/qed/qed_l2.c 			p_hwfn->mcp_info->port_addr +
p_hwfn           1833 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (QED_IS_BB(p_hwfn->cdev)) {
p_hwfn           1865 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_common->link_change_count = qed_rd(p_hwfn, p_ptt,
p_hwfn           1866 drivers/net/ethernet/qlogic/qed/qed_l2.c 					     p_hwfn->mcp_info->port_addr +
p_hwfn           1871 drivers/net/ethernet/qlogic/qed/qed_l2.c static void __qed_get_vport_stats(struct qed_hwfn *p_hwfn,
p_hwfn           1876 drivers/net/ethernet/qlogic/qed/qed_l2.c 	__qed_get_vport_mstats(p_hwfn, p_ptt, stats, statistics_bin);
p_hwfn           1877 drivers/net/ethernet/qlogic/qed/qed_l2.c 	__qed_get_vport_ustats(p_hwfn, p_ptt, stats, statistics_bin);
p_hwfn           1878 drivers/net/ethernet/qlogic/qed/qed_l2.c 	__qed_get_vport_tstats(p_hwfn, p_ptt, stats, statistics_bin);
p_hwfn           1879 drivers/net/ethernet/qlogic/qed/qed_l2.c 	__qed_get_vport_pstats(p_hwfn, p_ptt, stats, statistics_bin);
p_hwfn           1881 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (b_get_port_stats && p_hwfn->mcp_info)
p_hwfn           1882 drivers/net/ethernet/qlogic/qed/qed_l2.c 		__qed_get_vport_port_stats(p_hwfn, p_ptt, stats);
p_hwfn           1894 drivers/net/ethernet/qlogic/qed/qed_l2.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           1895 drivers/net/ethernet/qlogic/qed/qed_l2.c 		struct qed_ptt *p_ptt = IS_PF(cdev) ? qed_ptt_acquire(p_hwfn)
p_hwfn           1901 drivers/net/ethernet/qlogic/qed/qed_l2.c 			if (qed_fw_vport(p_hwfn, 0, &fw_vport)) {
p_hwfn           1902 drivers/net/ethernet/qlogic/qed/qed_l2.c 				DP_ERR(p_hwfn, "No vport available!\n");
p_hwfn           1908 drivers/net/ethernet/qlogic/qed/qed_l2.c 			DP_ERR(p_hwfn, "Failed to acquire ptt\n");
p_hwfn           1912 drivers/net/ethernet/qlogic/qed/qed_l2.c 		b_get_port_stats = IS_PF(cdev) && IS_LEAD_HWFN(p_hwfn);
p_hwfn           1913 drivers/net/ethernet/qlogic/qed/qed_l2.c 		__qed_get_vport_stats(p_hwfn, p_ptt, stats, fw_vport,
p_hwfn           1918 drivers/net/ethernet/qlogic/qed/qed_l2.c 			qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           1947 drivers/net/ethernet/qlogic/qed/qed_l2.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           1951 drivers/net/ethernet/qlogic/qed/qed_l2.c 		struct qed_ptt *p_ptt = IS_PF(cdev) ? qed_ptt_acquire(p_hwfn)
p_hwfn           1956 drivers/net/ethernet/qlogic/qed/qed_l2.c 			DP_ERR(p_hwfn, "Failed to acquire ptt\n");
p_hwfn           1961 drivers/net/ethernet/qlogic/qed/qed_l2.c 		__qed_get_vport_mstats_addrlen(p_hwfn, &addr, &len, 0);
p_hwfn           1962 drivers/net/ethernet/qlogic/qed/qed_l2.c 		qed_memcpy_to(p_hwfn, p_ptt, addr, &mstats, len);
p_hwfn           1965 drivers/net/ethernet/qlogic/qed/qed_l2.c 		__qed_get_vport_ustats_addrlen(p_hwfn, &addr, &len, 0);
p_hwfn           1966 drivers/net/ethernet/qlogic/qed/qed_l2.c 		qed_memcpy_to(p_hwfn, p_ptt, addr, &ustats, len);
p_hwfn           1969 drivers/net/ethernet/qlogic/qed/qed_l2.c 		__qed_get_vport_pstats_addrlen(p_hwfn, &addr, &len, 0);
p_hwfn           1970 drivers/net/ethernet/qlogic/qed/qed_l2.c 		qed_memcpy_to(p_hwfn, p_ptt, addr, &pstats, len);
p_hwfn           1973 drivers/net/ethernet/qlogic/qed/qed_l2.c 			qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           2000 drivers/net/ethernet/qlogic/qed/qed_l2.c void qed_arfs_mode_configure(struct qed_hwfn *p_hwfn,
p_hwfn           2005 drivers/net/ethernet/qlogic/qed/qed_l2.c 		qed_gft_config(p_hwfn, p_ptt, p_hwfn->rel_pf_id,
p_hwfn           2011 drivers/net/ethernet/qlogic/qed/qed_l2.c 		DP_VERBOSE(p_hwfn,
p_hwfn           2020 drivers/net/ethernet/qlogic/qed/qed_l2.c 		DP_VERBOSE(p_hwfn, QED_MSG_SP, "Disabled Filtering\n");
p_hwfn           2021 drivers/net/ethernet/qlogic/qed/qed_l2.c 		qed_gft_disable(p_hwfn, p_ptt, p_hwfn->rel_pf_id);
p_hwfn           2026 drivers/net/ethernet/qlogic/qed/qed_l2.c qed_configure_rfs_ntuple_filter(struct qed_hwfn *p_hwfn,
p_hwfn           2039 drivers/net/ethernet/qlogic/qed/qed_l2.c 	init_data.cid = qed_spq_get_cid(p_hwfn);
p_hwfn           2041 drivers/net/ethernet/qlogic/qed/qed_l2.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn           2050 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn           2064 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_fw_vport(p_hwfn, p_params->vport_id, &abs_vport_id);
p_hwfn           2069 drivers/net/ethernet/qlogic/qed/qed_l2.c 			rc = qed_fw_l2_queue(p_hwfn, p_params->qid,
p_hwfn           2086 drivers/net/ethernet/qlogic/qed/qed_l2.c 	DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn           2092 drivers/net/ethernet/qlogic/qed/qed_l2.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn           2095 drivers/net/ethernet/qlogic/qed/qed_l2.c 	qed_sp_destroy_request(p_hwfn, p_ent);
p_hwfn           2099 drivers/net/ethernet/qlogic/qed/qed_l2.c int qed_get_rxq_coalesce(struct qed_hwfn *p_hwfn,
p_hwfn           2108 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_dmae_grc2host(p_hwfn, p_ptt, CAU_REG_SB_VAR_MEMORY +
p_hwfn           2112 drivers/net/ethernet/qlogic/qed/qed_l2.c 		DP_ERR(p_hwfn, "dmae_grc2host failed %d\n", rc);
p_hwfn           2120 drivers/net/ethernet/qlogic/qed/qed_l2.c 	coalesce = qed_rd(p_hwfn, p_ptt, address);
p_hwfn           2132 drivers/net/ethernet/qlogic/qed/qed_l2.c int qed_get_txq_coalesce(struct qed_hwfn *p_hwfn,
p_hwfn           2141 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_dmae_grc2host(p_hwfn, p_ptt, CAU_REG_SB_VAR_MEMORY +
p_hwfn           2145 drivers/net/ethernet/qlogic/qed/qed_l2.c 		DP_ERR(p_hwfn, "dmae_grc2host failed %d\n", rc);
p_hwfn           2153 drivers/net/ethernet/qlogic/qed/qed_l2.c 	coalesce = qed_rd(p_hwfn, p_ptt, address);
p_hwfn           2165 drivers/net/ethernet/qlogic/qed/qed_l2.c int qed_get_queue_coalesce(struct qed_hwfn *p_hwfn, u16 *p_coal, void *handle)
p_hwfn           2171 drivers/net/ethernet/qlogic/qed/qed_l2.c 	if (IS_VF(p_hwfn->cdev)) {
p_hwfn           2172 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_vf_pf_get_coalesce(p_hwfn, p_coal, p_cid);
p_hwfn           2174 drivers/net/ethernet/qlogic/qed/qed_l2.c 			DP_NOTICE(p_hwfn, "Unable to read queue coalescing\n");
p_hwfn           2179 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           2184 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_get_rxq_coalesce(p_hwfn, p_ptt, p_cid, p_coal);
p_hwfn           2188 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_get_txq_coalesce(p_hwfn, p_ptt, p_cid, p_coal);
p_hwfn           2194 drivers/net/ethernet/qlogic/qed/qed_l2.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           2202 drivers/net/ethernet/qlogic/qed/qed_l2.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn           2211 drivers/net/ethernet/qlogic/qed/qed_l2.c 		info->num_tc = p_hwfn->hw_info.num_hw_tc;
p_hwfn           2268 drivers/net/ethernet/qlogic/qed/qed_l2.c 			struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           2271 drivers/net/ethernet/qlogic/qed/qed_l2.c 			qed_vf_get_num_cids(p_hwfn, &cids);
p_hwfn           2272 drivers/net/ethernet/qlogic/qed/qed_l2.c 			qed_vf_get_num_rxqs(p_hwfn, &queues);
p_hwfn           2324 drivers/net/ethernet/qlogic/qed/qed_l2.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           2331 drivers/net/ethernet/qlogic/qed/qed_l2.c 		start.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn           2332 drivers/net/ethernet/qlogic/qed/qed_l2.c 		start.concrete_fid = p_hwfn->hw_info.concrete_fid;
p_hwfn           2338 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_sp_vport_start(p_hwfn, &start);
p_hwfn           2344 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_hw_start_fastpath(p_hwfn);
p_hwfn           2366 drivers/net/ethernet/qlogic/qed/qed_l2.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           2368 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_sp_vport_stop(p_hwfn,
p_hwfn           2369 drivers/net/ethernet/qlogic/qed/qed_l2.c 				       p_hwfn->hw_info.opaque_fid, vport_id);
p_hwfn           2476 drivers/net/ethernet/qlogic/qed/qed_l2.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           2481 drivers/net/ethernet/qlogic/qed/qed_l2.c 		sp_params.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn           2482 drivers/net/ethernet/qlogic/qed/qed_l2.c 		rc = qed_sp_vport_update(p_hwfn, &sp_params,
p_hwfn           2510 drivers/net/ethernet/qlogic/qed/qed_l2.c 	struct qed_hwfn *p_hwfn;
p_hwfn           2514 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_hwfn = &cdev->hwfns[hwfn_index];
p_hwfn           2519 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_eth_rx_queue_start(p_hwfn,
p_hwfn           2520 drivers/net/ethernet/qlogic/qed/qed_l2.c 				    p_hwfn->hw_info.opaque_fid,
p_hwfn           2541 drivers/net/ethernet/qlogic/qed/qed_l2.c 	struct qed_hwfn *p_hwfn;
p_hwfn           2544 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_hwfn = &cdev->hwfns[hwfn_index];
p_hwfn           2546 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_eth_rx_queue_stop(p_hwfn, handle, false, false);
p_hwfn           2562 drivers/net/ethernet/qlogic/qed/qed_l2.c 	struct qed_hwfn *p_hwfn;
p_hwfn           2566 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_hwfn = &cdev->hwfns[hwfn_index];
p_hwfn           2570 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_eth_tx_queue_start(p_hwfn,
p_hwfn           2571 drivers/net/ethernet/qlogic/qed/qed_l2.c 				    p_hwfn->hw_info.opaque_fid,
p_hwfn           2604 drivers/net/ethernet/qlogic/qed/qed_l2.c 	struct qed_hwfn *p_hwfn;
p_hwfn           2608 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_hwfn = &cdev->hwfns[hwfn_index];
p_hwfn           2610 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_eth_tx_queue_stop(p_hwfn, handle);
p_hwfn           2803 drivers/net/ethernet/qlogic/qed/qed_l2.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn           2812 drivers/net/ethernet/qlogic/qed/qed_l2.c 	qed_arfs_mode_configure(p_hwfn, p_hwfn->p_arfs_ptt,
p_hwfn           2818 drivers/net/ethernet/qlogic/qed/qed_l2.c qed_arfs_sp_response_handler(struct qed_hwfn *p_hwfn,
p_hwfn           2822 drivers/net/ethernet/qlogic/qed/qed_l2.c 	struct qed_common_cb_ops *op = p_hwfn->cdev->protocol_ops.common;
p_hwfn           2823 drivers/net/ethernet/qlogic/qed/qed_l2.c 	void *dev = p_hwfn->cdev->ops_cookie;
p_hwfn           2833 drivers/net/ethernet/qlogic/qed/qed_l2.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn           2841 drivers/net/ethernet/qlogic/qed/qed_l2.c 		if (!qed_iov_is_valid_vfid(p_hwfn, params->vf_id, false,
p_hwfn           2843 drivers/net/ethernet/qlogic/qed/qed_l2.c 			DP_INFO(p_hwfn, "vfid 0x%02x is out of bounds\n",
p_hwfn           2852 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_configure_rfs_ntuple_filter(p_hwfn, &cb, params);
p_hwfn           2854 drivers/net/ethernet/qlogic/qed/qed_l2.c 		DP_NOTICE(p_hwfn,
p_hwfn           2857 drivers/net/ethernet/qlogic/qed/qed_l2.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_DRV,
p_hwfn           2866 drivers/net/ethernet/qlogic/qed/qed_l2.c 	struct qed_hwfn *p_hwfn;
p_hwfn           2869 drivers/net/ethernet/qlogic/qed/qed_l2.c 	p_hwfn = p_cid->p_owner;
p_hwfn           2870 drivers/net/ethernet/qlogic/qed/qed_l2.c 	rc = qed_get_queue_coalesce(p_hwfn, coal, handle);
p_hwfn           2893 drivers/net/ethernet/qlogic/qed/qed_l2.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           2895 drivers/net/ethernet/qlogic/qed/qed_l2.c 		ret = qed_vf_pf_bulletin_update_mac(p_hwfn, mac);
p_hwfn            134 drivers/net/ethernet/qlogic/qed/qed_l2.h qed_eth_rx_queue_stop(struct qed_hwfn *p_hwfn,
p_hwfn            146 drivers/net/ethernet/qlogic/qed/qed_l2.h int qed_eth_tx_queue_stop(struct qed_hwfn *p_hwfn, void *p_txq);
p_hwfn            171 drivers/net/ethernet/qlogic/qed/qed_l2.h int qed_sp_eth_vport_start(struct qed_hwfn *p_hwfn,
p_hwfn            227 drivers/net/ethernet/qlogic/qed/qed_l2.h int qed_sp_vport_update(struct qed_hwfn *p_hwfn,
p_hwfn            244 drivers/net/ethernet/qlogic/qed/qed_l2.h int qed_sp_vport_stop(struct qed_hwfn *p_hwfn, u16 opaque_fid, u8 vport_id);
p_hwfn            246 drivers/net/ethernet/qlogic/qed/qed_l2.h int qed_sp_eth_filter_ucast(struct qed_hwfn *p_hwfn,
p_hwfn            272 drivers/net/ethernet/qlogic/qed/qed_l2.h qed_sp_eth_rx_queues_update(struct qed_hwfn *p_hwfn,
p_hwfn            295 drivers/net/ethernet/qlogic/qed/qed_l2.h void qed_arfs_mode_configure(struct qed_hwfn *p_hwfn,
p_hwfn            311 drivers/net/ethernet/qlogic/qed/qed_l2.h qed_configure_rfs_ntuple_filter(struct qed_hwfn *p_hwfn,
p_hwfn            383 drivers/net/ethernet/qlogic/qed/qed_l2.h int qed_l2_alloc(struct qed_hwfn *p_hwfn);
p_hwfn            384 drivers/net/ethernet/qlogic/qed/qed_l2.h void qed_l2_setup(struct qed_hwfn *p_hwfn);
p_hwfn            385 drivers/net/ethernet/qlogic/qed/qed_l2.h void qed_l2_free(struct qed_hwfn *p_hwfn);
p_hwfn            387 drivers/net/ethernet/qlogic/qed/qed_l2.h void qed_eth_queue_cid_release(struct qed_hwfn *p_hwfn,
p_hwfn            391 drivers/net/ethernet/qlogic/qed/qed_l2.h qed_eth_queue_to_cid(struct qed_hwfn *p_hwfn,
p_hwfn            398 drivers/net/ethernet/qlogic/qed/qed_l2.h qed_sp_eth_vport_start(struct qed_hwfn *p_hwfn,
p_hwfn            414 drivers/net/ethernet/qlogic/qed/qed_l2.h qed_eth_rxq_start_ramrod(struct qed_hwfn *p_hwfn,
p_hwfn            432 drivers/net/ethernet/qlogic/qed/qed_l2.h qed_eth_txq_start_ramrod(struct qed_hwfn *p_hwfn,
p_hwfn            438 drivers/net/ethernet/qlogic/qed/qed_l2.h int qed_set_rxq_coalesce(struct qed_hwfn *p_hwfn,
p_hwfn            442 drivers/net/ethernet/qlogic/qed/qed_l2.h int qed_set_txq_coalesce(struct qed_hwfn *p_hwfn,
p_hwfn            446 drivers/net/ethernet/qlogic/qed/qed_l2.h int qed_get_rxq_coalesce(struct qed_hwfn *p_hwfn,
p_hwfn            450 drivers/net/ethernet/qlogic/qed/qed_l2.h int qed_get_txq_coalesce(struct qed_hwfn *p_hwfn,
p_hwfn             98 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	struct qed_hwfn *p_hwfn = cxt;
p_hwfn             99 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn            103 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	dma_unmap_single(&p_hwfn->cdev->pdev->dev, first_frag_addr,
p_hwfn            164 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	struct qed_hwfn *p_hwfn = cxt;
p_hwfn            166 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn            173 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	DP_VERBOSE(p_hwfn,
p_hwfn            194 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		rc = qed_ll2_alloc_buffer(p_hwfn->cdev, &new_data,
p_hwfn            230 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		DP_VERBOSE(p_hwfn, (NETIF_MSG_RX_STATUS | NETIF_MSG_PKTDATA |
p_hwfn            242 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_ll2_post_rx_buffer(p_hwfn, cdev->ll2->handle,
p_hwfn            248 drivers/net/ethernet/qlogic/qed/qed_ll2.c static struct qed_ll2_info *__qed_ll2_handle_sanity(struct qed_hwfn *p_hwfn,
p_hwfn            258 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	if (!p_hwfn->p_ll2_info)
p_hwfn            261 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	p_ll2_conn = &p_hwfn->p_ll2_info[connection_handle];
p_hwfn            277 drivers/net/ethernet/qlogic/qed/qed_ll2.c static struct qed_ll2_info *qed_ll2_handle_sanity(struct qed_hwfn *p_hwfn,
p_hwfn            280 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	return __qed_ll2_handle_sanity(p_hwfn, connection_handle, false, true);
p_hwfn            283 drivers/net/ethernet/qlogic/qed/qed_ll2.c static struct qed_ll2_info *qed_ll2_handle_sanity_lock(struct qed_hwfn *p_hwfn,
p_hwfn            286 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	return __qed_ll2_handle_sanity(p_hwfn, connection_handle, true, true);
p_hwfn            290 drivers/net/ethernet/qlogic/qed/qed_ll2.c 							   *p_hwfn,
p_hwfn            293 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	return __qed_ll2_handle_sanity(p_hwfn, connection_handle, false, false);
p_hwfn            296 drivers/net/ethernet/qlogic/qed/qed_ll2.c static void qed_ll2_txq_flush(struct qed_hwfn *p_hwfn, u8 connection_handle)
p_hwfn            305 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	p_ll2_conn = qed_ll2_handle_sanity_inactive(p_hwfn, connection_handle);
p_hwfn            326 drivers/net/ethernet/qlogic/qed/qed_ll2.c 			qed_ooo_put_free_buffer(p_hwfn, p_hwfn->p_ooo_info,
p_hwfn            346 drivers/net/ethernet/qlogic/qed/qed_ll2.c static int qed_ll2_txq_completion(struct qed_hwfn *p_hwfn, void *p_cookie)
p_hwfn            379 drivers/net/ethernet/qlogic/qed/qed_ll2.c 			DP_NOTICE(p_hwfn,
p_hwfn            411 drivers/net/ethernet/qlogic/qed/qed_ll2.c static void qed_ll2_rxq_parse_gsi(struct qed_hwfn *p_hwfn,
p_hwfn            426 drivers/net/ethernet/qlogic/qed/qed_ll2.c static void qed_ll2_rxq_parse_reg(struct qed_hwfn *p_hwfn,
p_hwfn            441 drivers/net/ethernet/qlogic/qed/qed_ll2.c qed_ll2_handle_slowpath(struct qed_hwfn *p_hwfn,
p_hwfn            451 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		DP_NOTICE(p_hwfn,
p_hwfn            458 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		DP_NOTICE(p_hwfn,
p_hwfn            476 drivers/net/ethernet/qlogic/qed/qed_ll2.c qed_ll2_rxq_handle_completion(struct qed_hwfn *p_hwfn,
p_hwfn            489 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		DP_NOTICE(p_hwfn,
p_hwfn            498 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		qed_ll2_rxq_parse_reg(p_hwfn, p_cqe, &data);
p_hwfn            500 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		qed_ll2_rxq_parse_gsi(p_hwfn, p_cqe, &data);
p_hwfn            502 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		DP_NOTICE(p_hwfn,
p_hwfn            520 drivers/net/ethernet/qlogic/qed/qed_ll2.c static int qed_ll2_rxq_completion(struct qed_hwfn *p_hwfn, void *cookie)
p_hwfn            541 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		DP_VERBOSE(p_hwfn,
p_hwfn            548 drivers/net/ethernet/qlogic/qed/qed_ll2.c 			rc = qed_ll2_handle_slowpath(p_hwfn, p_ll2_conn,
p_hwfn            553 drivers/net/ethernet/qlogic/qed/qed_ll2.c 			rc = qed_ll2_rxq_handle_completion(p_hwfn, p_ll2_conn,
p_hwfn            566 drivers/net/ethernet/qlogic/qed/qed_ll2.c static void qed_ll2_rxq_flush(struct qed_hwfn *p_hwfn, u8 connection_handle)
p_hwfn            573 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	p_ll2_conn = qed_ll2_handle_sanity_inactive(p_hwfn, connection_handle);
p_hwfn            592 drivers/net/ethernet/qlogic/qed/qed_ll2.c 			qed_ooo_put_free_buffer(p_hwfn, p_hwfn->p_ooo_info,
p_hwfn            611 drivers/net/ethernet/qlogic/qed/qed_ll2.c qed_ll2_lb_rxq_handler_slowpath(struct qed_hwfn *p_hwfn,
p_hwfn            626 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ooo_release_connection_isles(p_hwfn, p_hwfn->p_ooo_info, cid);
p_hwfn            631 drivers/net/ethernet/qlogic/qed/qed_ll2.c static int qed_ll2_lb_rxq_handler(struct qed_hwfn *p_hwfn,
p_hwfn            658 drivers/net/ethernet/qlogic/qed/qed_ll2.c 			if (qed_ll2_lb_rxq_handler_slowpath(p_hwfn,
p_hwfn            663 drivers/net/ethernet/qlogic/qed/qed_ll2.c 			DP_NOTICE(p_hwfn,
p_hwfn            675 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		qed_ooo_save_history_entry(p_hwfn, p_hwfn->p_ooo_info,
p_hwfn            681 drivers/net/ethernet/qlogic/qed/qed_ll2.c 			qed_ooo_delete_isles(p_hwfn, p_hwfn->p_ooo_info, cid,
p_hwfn            690 drivers/net/ethernet/qlogic/qed/qed_ll2.c 			DP_NOTICE(p_hwfn,
p_hwfn            705 drivers/net/ethernet/qlogic/qed/qed_ll2.c 				DP_NOTICE(p_hwfn,
p_hwfn            720 drivers/net/ethernet/qlogic/qed/qed_ll2.c 				qed_ooo_add_new_isle(p_hwfn,
p_hwfn            721 drivers/net/ethernet/qlogic/qed/qed_ll2.c 						     p_hwfn->p_ooo_info,
p_hwfn            727 drivers/net/ethernet/qlogic/qed/qed_ll2.c 				qed_ooo_add_new_buffer(p_hwfn,
p_hwfn            728 drivers/net/ethernet/qlogic/qed/qed_ll2.c 						       p_hwfn->p_ooo_info,
p_hwfn            735 drivers/net/ethernet/qlogic/qed/qed_ll2.c 				qed_ooo_add_new_buffer(p_hwfn,
p_hwfn            736 drivers/net/ethernet/qlogic/qed/qed_ll2.c 						       p_hwfn->p_ooo_info,
p_hwfn            743 drivers/net/ethernet/qlogic/qed/qed_ll2.c 				qed_ooo_add_new_buffer(p_hwfn,
p_hwfn            744 drivers/net/ethernet/qlogic/qed/qed_ll2.c 						       p_hwfn->p_ooo_info,
p_hwfn            750 drivers/net/ethernet/qlogic/qed/qed_ll2.c 				qed_ooo_join_isles(p_hwfn,
p_hwfn            751 drivers/net/ethernet/qlogic/qed/qed_ll2.c 						   p_hwfn->p_ooo_info,
p_hwfn            756 drivers/net/ethernet/qlogic/qed/qed_ll2.c 				qed_ooo_put_ready_buffer(p_hwfn,
p_hwfn            757 drivers/net/ethernet/qlogic/qed/qed_ll2.c 							 p_hwfn->p_ooo_info,
p_hwfn            762 drivers/net/ethernet/qlogic/qed/qed_ll2.c 			DP_NOTICE(p_hwfn,
p_hwfn            772 drivers/net/ethernet/qlogic/qed/qed_ll2.c qed_ooo_submit_tx_buffers(struct qed_hwfn *p_hwfn,
p_hwfn            783 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	while ((p_buffer = qed_ooo_get_ready_buffer(p_hwfn,
p_hwfn            784 drivers/net/ethernet/qlogic/qed/qed_ll2.c 						    p_hwfn->p_ooo_info))) {
p_hwfn            814 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		rc = qed_ll2_prepare_tx_packet(p_hwfn, p_ll2_conn->my_id,
p_hwfn            817 drivers/net/ethernet/qlogic/qed/qed_ll2.c 			qed_ooo_put_ready_buffer(p_hwfn, p_hwfn->p_ooo_info,
p_hwfn            825 drivers/net/ethernet/qlogic/qed/qed_ll2.c qed_ooo_submit_rx_buffers(struct qed_hwfn *p_hwfn,
p_hwfn            831 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	while ((p_buffer = qed_ooo_get_free_buffer(p_hwfn,
p_hwfn            832 drivers/net/ethernet/qlogic/qed/qed_ll2.c 						   p_hwfn->p_ooo_info))) {
p_hwfn            833 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		rc = qed_ll2_post_rx_buffer(p_hwfn,
p_hwfn            838 drivers/net/ethernet/qlogic/qed/qed_ll2.c 			qed_ooo_put_free_buffer(p_hwfn,
p_hwfn            839 drivers/net/ethernet/qlogic/qed/qed_ll2.c 						p_hwfn->p_ooo_info, p_buffer);
p_hwfn            845 drivers/net/ethernet/qlogic/qed/qed_ll2.c static int qed_ll2_lb_rxq_completion(struct qed_hwfn *p_hwfn, void *p_cookie)
p_hwfn            853 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_ll2_lb_rxq_handler(p_hwfn, p_ll2_conn);
p_hwfn            857 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ooo_submit_rx_buffers(p_hwfn, p_ll2_conn);
p_hwfn            858 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ooo_submit_tx_buffers(p_hwfn, p_ll2_conn);
p_hwfn            863 drivers/net/ethernet/qlogic/qed/qed_ll2.c static int qed_ll2_lb_txq_completion(struct qed_hwfn *p_hwfn, void *p_cookie)
p_hwfn            892 drivers/net/ethernet/qlogic/qed/qed_ll2.c 			DP_NOTICE(p_hwfn,
p_hwfn            908 drivers/net/ethernet/qlogic/qed/qed_ll2.c 			qed_ooo_put_free_buffer(p_hwfn, p_hwfn->p_ooo_info,
p_hwfn            913 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		rc = qed_ll2_post_rx_buffer(p_hwfn, p_ll2_conn->my_id,
p_hwfn            917 drivers/net/ethernet/qlogic/qed/qed_ll2.c 			qed_ooo_put_free_buffer(p_hwfn,
p_hwfn            918 drivers/net/ethernet/qlogic/qed/qed_ll2.c 						p_hwfn->p_ooo_info, p_buffer);
p_hwfn            923 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ooo_submit_tx_buffers(p_hwfn, p_ll2_conn);
p_hwfn            928 drivers/net/ethernet/qlogic/qed/qed_ll2.c static void qed_ll2_stop_ooo(struct qed_hwfn *p_hwfn)
p_hwfn            930 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	u8 *handle = &p_hwfn->pf_params.iscsi_pf_params.ll2_ooo_queue_id;
p_hwfn            932 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	DP_VERBOSE(p_hwfn, (QED_MSG_STORAGE | QED_MSG_LL2),
p_hwfn            935 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ll2_terminate_connection(p_hwfn, *handle);
p_hwfn            936 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ll2_release_connection(p_hwfn, *handle);
p_hwfn            940 drivers/net/ethernet/qlogic/qed/qed_ll2.c static int qed_sp_ll2_rx_queue_start(struct qed_hwfn *p_hwfn,
p_hwfn            955 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            958 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            966 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	p_ramrod->sb_id = cpu_to_le16(qed_int_get_sp_sb_id(p_hwfn));
p_hwfn            981 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	if (test_bit(QED_MF_UFP_SPECIFIC, &p_hwfn->cdev->mf_bits) &&
p_hwfn            987 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	if (test_bit(QED_MF_LL2_NON_UNICAST, &p_hwfn->cdev->mf_bits) &&
p_hwfn            999 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn           1002 drivers/net/ethernet/qlogic/qed/qed_ll2.c static int qed_sp_ll2_tx_queue_start(struct qed_hwfn *p_hwfn,
p_hwfn           1024 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn           1027 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn           1035 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	p_ramrod->sb_id = cpu_to_le16(qed_int_get_sp_sb_id(p_hwfn));
p_hwfn           1048 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		pq_id = qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_LB);
p_hwfn           1051 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		pq_id = qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_OOO);
p_hwfn           1054 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		pq_id = qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_OFLD);
p_hwfn           1074 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		if (p_hwfn->hw_info.personality == QED_PCI_ISCSI)
p_hwfn           1081 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		DP_NOTICE(p_hwfn, "Unknown connection type: %d\n", conn_type);
p_hwfn           1086 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn           1090 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_db_recovery_add(p_hwfn->cdev, p_tx->doorbell_addr,
p_hwfn           1096 drivers/net/ethernet/qlogic/qed/qed_ll2.c static int qed_sp_ll2_rx_queue_stop(struct qed_hwfn *p_hwfn,
p_hwfn           1107 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn           1110 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn           1121 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn           1124 drivers/net/ethernet/qlogic/qed/qed_ll2.c static int qed_sp_ll2_tx_queue_stop(struct qed_hwfn *p_hwfn,
p_hwfn           1131 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_db_recovery_del(p_hwfn->cdev, p_tx->doorbell_addr, &p_tx->db_msg);
p_hwfn           1136 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn           1139 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn           1145 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn           1149 drivers/net/ethernet/qlogic/qed/qed_ll2.c qed_ll2_acquire_connection_rx(struct qed_hwfn *p_hwfn,
p_hwfn           1159 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_chain_alloc(p_hwfn->cdev,
p_hwfn           1167 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		DP_NOTICE(p_hwfn, "Failed to allocate ll2 rxq chain\n");
p_hwfn           1176 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		DP_NOTICE(p_hwfn, "Failed to allocate ll2 Rx desc\n");
p_hwfn           1181 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_chain_alloc(p_hwfn->cdev,
p_hwfn           1189 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		DP_NOTICE(p_hwfn, "Failed to allocate ll2 rcq chain\n");
p_hwfn           1193 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	DP_VERBOSE(p_hwfn, QED_MSG_LL2,
p_hwfn           1201 drivers/net/ethernet/qlogic/qed/qed_ll2.c static int qed_ll2_acquire_connection_tx(struct qed_hwfn *p_hwfn,
p_hwfn           1212 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_chain_alloc(p_hwfn->cdev,
p_hwfn           1235 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	DP_VERBOSE(p_hwfn, QED_MSG_LL2,
p_hwfn           1241 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		DP_NOTICE(p_hwfn,
p_hwfn           1248 drivers/net/ethernet/qlogic/qed/qed_ll2.c qed_ll2_acquire_connection_ooo(struct qed_hwfn *p_hwfn,
p_hwfn           1280 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		p_virt = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn           1291 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		qed_ooo_put_free_buffer(p_hwfn, p_hwfn->p_ooo_info, p_buf);
p_hwfn           1294 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	DP_VERBOSE(p_hwfn, QED_MSG_LL2,
p_hwfn           1337 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	struct qed_hwfn *p_hwfn = cxt;
p_hwfn           1343 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	if (!data->p_connection_handle || !p_hwfn->p_ll2_info)
p_hwfn           1348 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		mutex_lock(&p_hwfn->p_ll2_info[i].mutex);
p_hwfn           1349 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		if (p_hwfn->p_ll2_info[i].b_active) {
p_hwfn           1350 drivers/net/ethernet/qlogic/qed/qed_ll2.c 			mutex_unlock(&p_hwfn->p_ll2_info[i].mutex);
p_hwfn           1354 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		p_hwfn->p_ll2_info[i].b_active = true;
p_hwfn           1355 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		p_ll2_info = &p_hwfn->p_ll2_info[i];
p_hwfn           1356 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		mutex_unlock(&p_hwfn->p_ll2_info[i].mutex);
p_hwfn           1394 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		DP_NOTICE(p_hwfn, "Invalid callback functions\n");
p_hwfn           1398 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_ll2_acquire_connection_rx(p_hwfn, p_ll2_info);
p_hwfn           1402 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_ll2_acquire_connection_tx(p_hwfn, p_ll2_info);
p_hwfn           1406 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_ll2_acquire_connection_ooo(p_hwfn, p_ll2_info,
p_hwfn           1421 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		qed_int_register_cb(p_hwfn, comp_rx_cb,
p_hwfn           1422 drivers/net/ethernet/qlogic/qed/qed_ll2.c 				    &p_hwfn->p_ll2_info[i],
p_hwfn           1429 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		qed_int_register_cb(p_hwfn,
p_hwfn           1431 drivers/net/ethernet/qlogic/qed/qed_ll2.c 				    &p_hwfn->p_ll2_info[i],
p_hwfn           1441 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ll2_release_connection(p_hwfn, i);
p_hwfn           1445 drivers/net/ethernet/qlogic/qed/qed_ll2.c static int qed_ll2_establish_connection_rx(struct qed_hwfn *p_hwfn,
p_hwfn           1464 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	return qed_sp_ll2_rx_queue_start(p_hwfn, p_ll2_conn, action_on_error);
p_hwfn           1468 drivers/net/ethernet/qlogic/qed/qed_ll2.c qed_ll2_establish_connection_ooo(struct qed_hwfn *p_hwfn,
p_hwfn           1474 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ooo_release_all_isles(p_hwfn, p_hwfn->p_ooo_info);
p_hwfn           1475 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ooo_submit_rx_buffers(p_hwfn, p_ll2_conn);
p_hwfn           1480 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	struct qed_hwfn *p_hwfn = cxt;
p_hwfn           1491 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           1495 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	p_ll2_conn = qed_ll2_handle_sanity_lock(p_hwfn, connection_handle);
p_hwfn           1539 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_cxt_acquire_cid(p_hwfn, PROTOCOLID_CORE, &p_ll2_conn->cid);
p_hwfn           1543 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qid = p_hwfn->hw_info.resc_start[QED_LL2_QUEUE] + connection_handle;
p_hwfn           1546 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	p_rx->set_prod_addr = (u8 __iomem *)p_hwfn->regview +
p_hwfn           1549 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	p_tx->doorbell_addr = (u8 __iomem *)p_hwfn->doorbells +
p_hwfn           1560 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_ll2_establish_connection_rx(p_hwfn, p_ll2_conn);
p_hwfn           1564 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_sp_ll2_tx_queue_start(p_hwfn, p_ll2_conn);
p_hwfn           1568 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	if (!QED_IS_RDMA_PERSONALITY(p_hwfn))
p_hwfn           1569 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		qed_wr(p_hwfn, p_ptt, PRS_REG_USE_LIGHT_L2, 1);
p_hwfn           1571 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ll2_establish_connection_ooo(p_hwfn, p_ll2_conn);
p_hwfn           1574 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		if (!test_bit(QED_MF_UFP_SPECIFIC, &p_hwfn->cdev->mf_bits))
p_hwfn           1575 drivers/net/ethernet/qlogic/qed/qed_ll2.c 			qed_llh_add_protocol_filter(p_hwfn->cdev, 0,
p_hwfn           1578 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		qed_llh_add_protocol_filter(p_hwfn->cdev, 0,
p_hwfn           1584 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           1588 drivers/net/ethernet/qlogic/qed/qed_ll2.c static void qed_ll2_post_rx_buffer_notify_fw(struct qed_hwfn *p_hwfn,
p_hwfn           1632 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	struct qed_hwfn *p_hwfn = cxt;
p_hwfn           1641 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	p_ll2_conn = qed_ll2_handle_sanity(p_hwfn, connection_handle);
p_hwfn           1682 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ll2_post_rx_buffer_notify_fw(p_hwfn, p_rx, p_curp);
p_hwfn           1688 drivers/net/ethernet/qlogic/qed/qed_ll2.c static void qed_ll2_prepare_tx_packet_set(struct qed_hwfn *p_hwfn,
p_hwfn           1707 drivers/net/ethernet/qlogic/qed/qed_ll2.c qed_ll2_prepare_tx_packet_set_bd(struct qed_hwfn *p_hwfn,
p_hwfn           1738 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	if (QED_IS_IWARP_PERSONALITY(p_hwfn) &&
p_hwfn           1744 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		if (test_bit(QED_MF_UFP_SPECIFIC, &p_hwfn->cdev->mf_bits) &&
p_hwfn           1766 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	DP_VERBOSE(p_hwfn,
p_hwfn           1795 drivers/net/ethernet/qlogic/qed/qed_ll2.c static void qed_ll2_tx_packet_notify(struct qed_hwfn *p_hwfn,
p_hwfn           1836 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	DP_VERBOSE(p_hwfn,
p_hwfn           1849 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	struct qed_hwfn *p_hwfn = cxt;
p_hwfn           1857 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	p_ll2_conn = qed_ll2_handle_sanity(p_hwfn, connection_handle);
p_hwfn           1885 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ll2_prepare_tx_packet_set(p_hwfn, p_tx, p_curp, pkt, notify_fw);
p_hwfn           1887 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ll2_prepare_tx_packet_set_bd(p_hwfn, p_ll2_conn, p_curp, pkt);
p_hwfn           1889 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ll2_tx_packet_notify(p_hwfn, p_ll2_conn);
p_hwfn           1901 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	struct qed_hwfn *p_hwfn = cxt;
p_hwfn           1907 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	p_ll2_conn = qed_ll2_handle_sanity(p_hwfn, connection_handle);
p_hwfn           1930 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ll2_tx_packet_notify(p_hwfn, p_ll2_conn);
p_hwfn           1938 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	struct qed_hwfn *p_hwfn = cxt;
p_hwfn           1943 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           1947 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	p_ll2_conn = qed_ll2_handle_sanity_lock(p_hwfn, connection_handle);
p_hwfn           1957 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		rc = qed_sp_ll2_tx_queue_stop(p_hwfn, p_ll2_conn);
p_hwfn           1961 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		qed_ll2_txq_flush(p_hwfn, connection_handle);
p_hwfn           1962 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		qed_int_unregister_cb(p_hwfn, p_ll2_conn->tx_queue.tx_sb_index);
p_hwfn           1968 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		rc = qed_sp_ll2_rx_queue_stop(p_hwfn, p_ll2_conn);
p_hwfn           1972 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		qed_ll2_rxq_flush(p_hwfn, connection_handle);
p_hwfn           1973 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		qed_int_unregister_cb(p_hwfn, p_ll2_conn->rx_queue.rx_sb_index);
p_hwfn           1977 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		qed_ooo_release_all_isles(p_hwfn, p_hwfn->p_ooo_info);
p_hwfn           1980 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		if (!test_bit(QED_MF_UFP_SPECIFIC, &p_hwfn->cdev->mf_bits))
p_hwfn           1981 drivers/net/ethernet/qlogic/qed/qed_ll2.c 			qed_llh_remove_protocol_filter(p_hwfn->cdev, 0,
p_hwfn           1984 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		qed_llh_remove_protocol_filter(p_hwfn->cdev, 0,
p_hwfn           1990 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           1994 drivers/net/ethernet/qlogic/qed/qed_ll2.c static void qed_ll2_release_connection_ooo(struct qed_hwfn *p_hwfn,
p_hwfn           2002 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ooo_release_all_isles(p_hwfn, p_hwfn->p_ooo_info);
p_hwfn           2003 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	while ((p_buffer = qed_ooo_get_free_buffer(p_hwfn,
p_hwfn           2004 drivers/net/ethernet/qlogic/qed/qed_ll2.c 						   p_hwfn->p_ooo_info))) {
p_hwfn           2005 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn           2015 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	struct qed_hwfn *p_hwfn = cxt;
p_hwfn           2018 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	p_ll2_conn = qed_ll2_handle_sanity(p_hwfn, connection_handle);
p_hwfn           2023 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_chain_free(p_hwfn->cdev, &p_ll2_conn->tx_queue.txq_chain);
p_hwfn           2026 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_chain_free(p_hwfn->cdev, &p_ll2_conn->rx_queue.rxq_chain);
p_hwfn           2027 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_chain_free(p_hwfn->cdev, &p_ll2_conn->rx_queue.rcq_chain);
p_hwfn           2029 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_cxt_release_cid(p_hwfn, p_ll2_conn->cid);
p_hwfn           2031 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ll2_release_connection_ooo(p_hwfn, p_ll2_conn);
p_hwfn           2038 drivers/net/ethernet/qlogic/qed/qed_ll2.c int qed_ll2_alloc(struct qed_hwfn *p_hwfn)
p_hwfn           2047 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		DP_NOTICE(p_hwfn, "Failed to allocate `struct qed_ll2'\n");
p_hwfn           2054 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	p_hwfn->p_ll2_info = p_ll2_connections;
p_hwfn           2058 drivers/net/ethernet/qlogic/qed/qed_ll2.c void qed_ll2_setup(struct qed_hwfn *p_hwfn)
p_hwfn           2063 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		mutex_init(&p_hwfn->p_ll2_info[i].mutex);
p_hwfn           2066 drivers/net/ethernet/qlogic/qed/qed_ll2.c void qed_ll2_free(struct qed_hwfn *p_hwfn)
p_hwfn           2068 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	if (!p_hwfn->p_ll2_info)
p_hwfn           2071 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	kfree(p_hwfn->p_ll2_info);
p_hwfn           2072 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	p_hwfn->p_ll2_info = NULL;
p_hwfn           2075 drivers/net/ethernet/qlogic/qed/qed_ll2.c static void _qed_ll2_get_port_stats(struct qed_hwfn *p_hwfn,
p_hwfn           2082 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_memcpy_from(p_hwfn, p_ptt, &port_stats,
p_hwfn           2084 drivers/net/ethernet/qlogic/qed/qed_ll2.c 			TSTORM_LL2_PORT_STAT_OFFSET(MFW_PORT(p_hwfn)),
p_hwfn           2096 drivers/net/ethernet/qlogic/qed/qed_ll2.c static void _qed_ll2_get_tstats(struct qed_hwfn *p_hwfn,
p_hwfn           2108 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_memcpy_from(p_hwfn, p_ptt, &tstats, tstats_addr, sizeof(tstats));
p_hwfn           2115 drivers/net/ethernet/qlogic/qed/qed_ll2.c static void _qed_ll2_get_ustats(struct qed_hwfn *p_hwfn,
p_hwfn           2127 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_memcpy_from(p_hwfn, p_ptt, &ustats, ustats_addr, sizeof(ustats));
p_hwfn           2137 drivers/net/ethernet/qlogic/qed/qed_ll2.c static void _qed_ll2_get_pstats(struct qed_hwfn *p_hwfn,
p_hwfn           2149 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_memcpy_from(p_hwfn, p_ptt, &pstats, pstats_addr, sizeof(pstats));
p_hwfn           2162 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	struct qed_hwfn *p_hwfn = cxt;
p_hwfn           2167 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	    !p_hwfn->p_ll2_info)
p_hwfn           2170 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	p_ll2_conn = &p_hwfn->p_ll2_info[connection_handle];
p_hwfn           2172 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           2174 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		DP_ERR(p_hwfn, "Failed to acquire ptt\n");
p_hwfn           2179 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		_qed_ll2_get_port_stats(p_hwfn, p_ptt, p_stats);
p_hwfn           2181 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	_qed_ll2_get_tstats(p_hwfn, p_ptt, p_ll2_conn, p_stats);
p_hwfn           2183 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	_qed_ll2_get_ustats(p_hwfn, p_ptt, p_ll2_conn, p_stats);
p_hwfn           2186 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		_qed_ll2_get_pstats(p_hwfn, p_ptt, p_ll2_conn, p_stats);
p_hwfn           2188 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           2206 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	struct qed_hwfn *p_hwfn = cxt;
p_hwfn           2208 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ll2_dealloc_buffer(p_hwfn->cdev, cookie);
p_hwfn           2226 drivers/net/ethernet/qlogic/qed/qed_ll2.c static void qed_ll2_set_conn_data(struct qed_hwfn *p_hwfn,
p_hwfn           2242 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	ll2_cbs.cookie = p_hwfn;
p_hwfn           2253 drivers/net/ethernet/qlogic/qed/qed_ll2.c static int qed_ll2_start_ooo(struct qed_hwfn *p_hwfn,
p_hwfn           2256 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	u8 *handle = &p_hwfn->pf_params.iscsi_pf_params.ll2_ooo_queue_id;
p_hwfn           2260 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ll2_set_conn_data(p_hwfn, &data, params,
p_hwfn           2263 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_ll2_acquire_connection(p_hwfn, &data);
p_hwfn           2265 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		DP_INFO(p_hwfn, "Failed to acquire LL2 OOO connection\n");
p_hwfn           2269 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_ll2_establish_connection(p_hwfn, *handle);
p_hwfn           2271 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		DP_INFO(p_hwfn, "Failed to establish LL2 OOO connection\n");
p_hwfn           2278 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ll2_release_connection(p_hwfn, *handle);
p_hwfn           2291 drivers/net/ethernet/qlogic/qed/qed_ll2.c static int __qed_ll2_stop(struct qed_hwfn *p_hwfn)
p_hwfn           2293 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn           2296 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_ll2_terminate_connection(p_hwfn, cdev->ll2->handle);
p_hwfn           2300 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ll2_release_connection(p_hwfn, cdev->ll2->handle);
p_hwfn           2308 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	struct qed_hwfn *p_hwfn = QED_AFFIN_HWFN(cdev);
p_hwfn           2317 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	if (QED_IS_ISCSI_PERSONALITY(p_hwfn))
p_hwfn           2318 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		qed_ll2_stop_ooo(p_hwfn);
p_hwfn           2328 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = __qed_ll2_stop(p_hwfn);
p_hwfn           2330 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		DP_NOTICE(p_hwfn, "Failed to stop LL2\n");
p_hwfn           2339 drivers/net/ethernet/qlogic/qed/qed_ll2.c static int __qed_ll2_start(struct qed_hwfn *p_hwfn,
p_hwfn           2343 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn           2348 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	switch (p_hwfn->hw_info.personality) {
p_hwfn           2363 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ll2_set_conn_data(p_hwfn, &data, params, conn_type,
p_hwfn           2366 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_ll2_acquire_connection(p_hwfn, &data);
p_hwfn           2368 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		DP_INFO(p_hwfn, "Failed to acquire LL2 connection\n");
p_hwfn           2372 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_ll2_establish_connection(p_hwfn, cdev->ll2->handle);
p_hwfn           2374 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		DP_INFO(p_hwfn, "Failed to establish LL2 connection\n");
p_hwfn           2382 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		rc = qed_ll2_post_rx_buffer(p_hwfn,
p_hwfn           2386 drivers/net/ethernet/qlogic/qed/qed_ll2.c 			DP_INFO(p_hwfn,
p_hwfn           2400 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		DP_NOTICE(p_hwfn, "Failed passing even a single Rx buffer\n");
p_hwfn           2408 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ll2_terminate_connection(p_hwfn, cdev->ll2->handle);
p_hwfn           2410 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	qed_ll2_release_connection(p_hwfn, cdev->ll2->handle);
p_hwfn           2417 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	struct qed_hwfn *p_hwfn = QED_AFFIN_HWFN(cdev);
p_hwfn           2460 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = __qed_ll2_start(p_hwfn, params);
p_hwfn           2478 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	if (QED_IS_ISCSI_PERSONALITY(p_hwfn)) {
p_hwfn           2480 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		rc = qed_ll2_start_ooo(p_hwfn, params);
p_hwfn           2498 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	if (QED_IS_ISCSI_PERSONALITY(p_hwfn))
p_hwfn           2499 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		qed_ll2_stop_ooo(p_hwfn);
p_hwfn           2504 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	__qed_ll2_stop(p_hwfn);
p_hwfn           2514 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	struct qed_hwfn *p_hwfn = QED_AFFIN_HWFN(cdev);
p_hwfn           2572 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_ll2_prepare_tx_packet(p_hwfn, cdev->ll2->handle,
p_hwfn           2590 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		rc = qed_ll2_set_fragment_of_tx_packet(p_hwfn,
p_hwfn           2613 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	struct qed_hwfn *p_hwfn = QED_AFFIN_HWFN(cdev);
p_hwfn           2619 drivers/net/ethernet/qlogic/qed/qed_ll2.c 	rc = qed_ll2_get_stats(p_hwfn, cdev->ll2->handle, stats);
p_hwfn           2621 drivers/net/ethernet/qlogic/qed/qed_ll2.c 		DP_NOTICE(p_hwfn, "Failed to get LL2 stats\n");
p_hwfn            251 drivers/net/ethernet/qlogic/qed/qed_ll2.h int qed_ll2_alloc(struct qed_hwfn *p_hwfn);
p_hwfn            259 drivers/net/ethernet/qlogic/qed/qed_ll2.h void qed_ll2_setup(struct qed_hwfn *p_hwfn);
p_hwfn            267 drivers/net/ethernet/qlogic/qed/qed_ll2.h void qed_ll2_free(struct qed_hwfn *p_hwfn);
p_hwfn            247 drivers/net/ethernet/qlogic/qed/qed_main.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn            248 drivers/net/ethernet/qlogic/qed/qed_main.c 	struct qed_hw_info *hw_info = &p_hwfn->hw_info;
p_hwfn            272 drivers/net/ethernet/qlogic/qed/qed_main.c 	dev_info->rdma_supported = QED_IS_RDMA_PERSONALITY(p_hwfn);
p_hwfn            288 drivers/net/ethernet/qlogic/qed/qed_main.c 		dev_info->smart_an = qed_mcp_is_smart_an_supported(p_hwfn);
p_hwfn            751 drivers/net/ethernet/qlogic/qed/qed_main.c static void qed_slowpath_tasklet_flush(struct qed_hwfn *p_hwfn)
p_hwfn            757 drivers/net/ethernet/qlogic/qed/qed_main.c 	if (p_hwfn->b_sp_dpc_enabled) {
p_hwfn            758 drivers/net/ethernet/qlogic/qed/qed_main.c 		tasklet_disable(p_hwfn->sp_dpc);
p_hwfn            759 drivers/net/ethernet/qlogic/qed/qed_main.c 		tasklet_enable(p_hwfn->sp_dpc);
p_hwfn            763 drivers/net/ethernet/qlogic/qed/qed_main.c void qed_slowpath_irq_sync(struct qed_hwfn *p_hwfn)
p_hwfn            765 drivers/net/ethernet/qlogic/qed/qed_main.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn            766 drivers/net/ethernet/qlogic/qed/qed_main.c 	u8 id = p_hwfn->my_id;
p_hwfn            775 drivers/net/ethernet/qlogic/qed/qed_main.c 	qed_slowpath_tasklet_flush(p_hwfn);
p_hwfn            804 drivers/net/ethernet/qlogic/qed/qed_main.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn            806 drivers/net/ethernet/qlogic/qed/qed_main.c 		if (p_hwfn->b_sp_dpc_enabled) {
p_hwfn            807 drivers/net/ethernet/qlogic/qed/qed_main.c 			tasklet_disable(p_hwfn->sp_dpc);
p_hwfn            808 drivers/net/ethernet/qlogic/qed/qed_main.c 			p_hwfn->b_sp_dpc_enabled = false;
p_hwfn            811 drivers/net/ethernet/qlogic/qed/qed_main.c 				   i, p_hwfn->sp_dpc);
p_hwfn            827 drivers/net/ethernet/qlogic/qed/qed_main.c 			struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn            829 drivers/net/ethernet/qlogic/qed/qed_main.c 			p_hwfn->using_ll2 = true;
p_hwfn            986 drivers/net/ethernet/qlogic/qed/qed_main.c u32 qed_unzip_data(struct qed_hwfn *p_hwfn, u32 input_len,
p_hwfn            991 drivers/net/ethernet/qlogic/qed/qed_main.c 	p_hwfn->stream->next_in = input_buf;
p_hwfn            992 drivers/net/ethernet/qlogic/qed/qed_main.c 	p_hwfn->stream->avail_in = input_len;
p_hwfn            993 drivers/net/ethernet/qlogic/qed/qed_main.c 	p_hwfn->stream->next_out = unzip_buf;
p_hwfn            994 drivers/net/ethernet/qlogic/qed/qed_main.c 	p_hwfn->stream->avail_out = max_size;
p_hwfn            996 drivers/net/ethernet/qlogic/qed/qed_main.c 	rc = zlib_inflateInit2(p_hwfn->stream, MAX_WBITS);
p_hwfn            999 drivers/net/ethernet/qlogic/qed/qed_main.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_DRV, "zlib init failed, rc = %d\n",
p_hwfn           1004 drivers/net/ethernet/qlogic/qed/qed_main.c 	rc = zlib_inflate(p_hwfn->stream, Z_FINISH);
p_hwfn           1005 drivers/net/ethernet/qlogic/qed/qed_main.c 	zlib_inflateEnd(p_hwfn->stream);
p_hwfn           1008 drivers/net/ethernet/qlogic/qed/qed_main.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_DRV, "FW unzip error: %s, rc=%d\n",
p_hwfn           1009 drivers/net/ethernet/qlogic/qed/qed_main.c 			   p_hwfn->stream->msg, rc);
p_hwfn           1013 drivers/net/ethernet/qlogic/qed/qed_main.c 	return p_hwfn->stream->total_out / 4;
p_hwfn           1022 drivers/net/ethernet/qlogic/qed/qed_main.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           1024 drivers/net/ethernet/qlogic/qed/qed_main.c 		p_hwfn->stream = kzalloc(sizeof(*p_hwfn->stream), GFP_KERNEL);
p_hwfn           1025 drivers/net/ethernet/qlogic/qed/qed_main.c 		if (!p_hwfn->stream)
p_hwfn           1031 drivers/net/ethernet/qlogic/qed/qed_main.c 		p_hwfn->stream->workspace = workspace;
p_hwfn           1042 drivers/net/ethernet/qlogic/qed/qed_main.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           1044 drivers/net/ethernet/qlogic/qed/qed_main.c 		if (!p_hwfn->stream)
p_hwfn           1047 drivers/net/ethernet/qlogic/qed/qed_main.c 		vfree(p_hwfn->stream->workspace);
p_hwfn           1048 drivers/net/ethernet/qlogic/qed/qed_main.c 		kfree(p_hwfn->stream);
p_hwfn           1080 drivers/net/ethernet/qlogic/qed/qed_main.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           1082 drivers/net/ethernet/qlogic/qed/qed_main.c 		p_hwfn->pf_params = *params;
p_hwfn           1107 drivers/net/ethernet/qlogic/qed/qed_main.c void qed_periodic_db_rec_start(struct qed_hwfn *p_hwfn)
p_hwfn           1110 drivers/net/ethernet/qlogic/qed/qed_main.c 	p_hwfn->periodic_db_rec_count = QED_PERIODIC_DB_REC_COUNT;
p_hwfn           1114 drivers/net/ethernet/qlogic/qed/qed_main.c 		     &p_hwfn->slowpath_task_flags))
p_hwfn           1117 drivers/net/ethernet/qlogic/qed/qed_main.c 	qed_slowpath_delayed_work(p_hwfn, QED_SLOWPATH_PERIODIC_DB_REC,
p_hwfn           1408 drivers/net/ethernet/qlogic/qed/qed_main.c 	struct qed_hwfn *p_hwfn;
p_hwfn           1415 drivers/net/ethernet/qlogic/qed/qed_main.c 		p_hwfn = &cdev->hwfns[sb_id % cdev->num_hwfns];
p_hwfn           1418 drivers/net/ethernet/qlogic/qed/qed_main.c 		p_hwfn = QED_AFFIN_HWFN(cdev);
p_hwfn           1424 drivers/net/ethernet/qlogic/qed/qed_main.c 		   IS_LEAD_HWFN(p_hwfn) ? 0 : 1, rel_sb_id, sb_id);
p_hwfn           1426 drivers/net/ethernet/qlogic/qed/qed_main.c 	if (IS_PF(p_hwfn->cdev)) {
p_hwfn           1427 drivers/net/ethernet/qlogic/qed/qed_main.c 		p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           1431 drivers/net/ethernet/qlogic/qed/qed_main.c 		rc = qed_int_sb_init(p_hwfn, p_ptt, sb_info, sb_virt_addr,
p_hwfn           1433 drivers/net/ethernet/qlogic/qed/qed_main.c 		qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           1435 drivers/net/ethernet/qlogic/qed/qed_main.c 		rc = qed_int_sb_init(p_hwfn, NULL, sb_info, sb_virt_addr,
p_hwfn           1447 drivers/net/ethernet/qlogic/qed/qed_main.c 	struct qed_hwfn *p_hwfn;
p_hwfn           1453 drivers/net/ethernet/qlogic/qed/qed_main.c 		p_hwfn = &cdev->hwfns[sb_id % cdev->num_hwfns];
p_hwfn           1456 drivers/net/ethernet/qlogic/qed/qed_main.c 		p_hwfn = QED_AFFIN_HWFN(cdev);
p_hwfn           1462 drivers/net/ethernet/qlogic/qed/qed_main.c 		   IS_LEAD_HWFN(p_hwfn) ? 0 : 1, rel_sb_id, sb_id);
p_hwfn           1464 drivers/net/ethernet/qlogic/qed/qed_main.c 	rc = qed_int_sb_release(p_hwfn, sb_info, rel_sb_id);
p_hwfn           2023 drivers/net/ethernet/qlogic/qed/qed_main.c 	struct qed_hwfn *p_hwfn;
p_hwfn           2031 drivers/net/ethernet/qlogic/qed/qed_main.c 	p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn           2032 drivers/net/ethernet/qlogic/qed/qed_main.c 	for (i = 0; i < p_hwfn->nvm_info.num_images; i++)
p_hwfn           2033 drivers/net/ethernet/qlogic/qed/qed_main.c 		if (image_type == p_hwfn->nvm_info.image_att[i].image_type)
p_hwfn           2035 drivers/net/ethernet/qlogic/qed/qed_main.c 	if (i == p_hwfn->nvm_info.num_images) {
p_hwfn           2041 drivers/net/ethernet/qlogic/qed/qed_main.c 	nvm_image.start_addr = p_hwfn->nvm_info.image_att[i].nvm_start_addr;
p_hwfn           2042 drivers/net/ethernet/qlogic/qed/qed_main.c 	nvm_image.length = p_hwfn->nvm_info.image_att[i].len;
p_hwfn           2453 drivers/net/ethernet/qlogic/qed/qed_main.c void qed_schedule_recovery_handler(struct qed_hwfn *p_hwfn)
p_hwfn           2455 drivers/net/ethernet/qlogic/qed/qed_main.c 	struct qed_common_cb_ops *ops = p_hwfn->cdev->protocol_ops.common;
p_hwfn           2456 drivers/net/ethernet/qlogic/qed/qed_main.c 	void *cookie = p_hwfn->cdev->ops_cookie;
p_hwfn           2487 drivers/net/ethernet/qlogic/qed/qed_main.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn           2491 drivers/net/ethernet/qlogic/qed/qed_main.c 	p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           2495 drivers/net/ethernet/qlogic/qed/qed_main.c 	rc = qed_start_recovery_process(p_hwfn, p_ptt);
p_hwfn           2497 drivers/net/ethernet/qlogic/qed/qed_main.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn             64 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DRV_INNER_WR(p_hwfn, _p_ptt, drv_mb_addr, \
p_hwfn             76 drivers/net/ethernet/qlogic/qed/qed_mcp.c bool qed_mcp_is_init(struct qed_hwfn *p_hwfn)
p_hwfn             78 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (!p_hwfn->mcp_info || !p_hwfn->mcp_info->public_base)
p_hwfn             83 drivers/net/ethernet/qlogic/qed/qed_mcp.c void qed_mcp_cmd_port_init(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn             85 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	u32 addr = SECTION_OFFSIZE_ADDR(p_hwfn->mcp_info->public_base,
p_hwfn             87 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	u32 mfw_mb_offsize = qed_rd(p_hwfn, p_ptt, addr);
p_hwfn             89 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_hwfn->mcp_info->port_addr = SECTION_ADDR(mfw_mb_offsize,
p_hwfn             90 drivers/net/ethernet/qlogic/qed/qed_mcp.c 						   MFW_PORT(p_hwfn));
p_hwfn             91 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn             93 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		   p_hwfn->mcp_info->port_addr, MFW_PORT(p_hwfn));
p_hwfn             96 drivers/net/ethernet/qlogic/qed/qed_mcp.c void qed_mcp_read_mb(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn             98 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	u32 length = MFW_DRV_MSG_MAX_DWORDS(p_hwfn->mcp_info->mfw_mb_length);
p_hwfn            101 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (!p_hwfn->mcp_info->public_base)
p_hwfn            105 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		tmp = qed_rd(p_hwfn, p_ptt,
p_hwfn            106 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			     p_hwfn->mcp_info->mfw_mb_addr +
p_hwfn            110 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		((u32 *)p_hwfn->mcp_info->mfw_mb_cur)[i] =
p_hwfn            124 drivers/net/ethernet/qlogic/qed/qed_mcp.c qed_mcp_cmd_add_elem(struct qed_hwfn *p_hwfn,
p_hwfn            136 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	list_add(&p_cmd_elem->list, &p_hwfn->mcp_info->cmd_list);
p_hwfn            142 drivers/net/ethernet/qlogic/qed/qed_mcp.c static void qed_mcp_cmd_del_elem(struct qed_hwfn *p_hwfn,
p_hwfn            150 drivers/net/ethernet/qlogic/qed/qed_mcp.c static struct qed_mcp_cmd_elem *qed_mcp_cmd_get_elem(struct qed_hwfn *p_hwfn,
p_hwfn            155 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	list_for_each_entry(p_cmd_elem, &p_hwfn->mcp_info->cmd_list, list) {
p_hwfn            163 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_free(struct qed_hwfn *p_hwfn)
p_hwfn            165 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (p_hwfn->mcp_info) {
p_hwfn            168 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		kfree(p_hwfn->mcp_info->mfw_mb_cur);
p_hwfn            169 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		kfree(p_hwfn->mcp_info->mfw_mb_shadow);
p_hwfn            171 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		spin_lock_bh(&p_hwfn->mcp_info->cmd_lock);
p_hwfn            174 drivers/net/ethernet/qlogic/qed/qed_mcp.c 					 &p_hwfn->mcp_info->cmd_list, list) {
p_hwfn            175 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_mcp_cmd_del_elem(p_hwfn, p_cmd_elem);
p_hwfn            177 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
p_hwfn            180 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	kfree(p_hwfn->mcp_info);
p_hwfn            181 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_hwfn->mcp_info = NULL;
p_hwfn            190 drivers/net/ethernet/qlogic/qed/qed_mcp.c static int qed_load_mcp_offsets(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn            192 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	struct qed_mcp_info *p_info = p_hwfn->mcp_info;
p_hwfn            196 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	u32 mcp_pf_id = MCP_PF_ID(p_hwfn);
p_hwfn            198 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_info->public_base = qed_rd(p_hwfn, p_ptt, MISC_REG_SHARED_MEM_ADDR);
p_hwfn            200 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn            208 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	mfw_mb_offsize = qed_rd(p_hwfn, p_ptt,
p_hwfn            212 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_info->mfw_mb_length = (u16)qed_rd(p_hwfn, p_ptt,
p_hwfn            225 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			(u16)qed_rd(p_hwfn, p_ptt,
p_hwfn            231 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn            238 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	drv_mb_offsize = qed_rd(p_hwfn, p_ptt,
p_hwfn            242 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn            249 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_info->drv_mb_seq = DRV_MB_RD(p_hwfn, p_ptt, drv_mb_header) &
p_hwfn            253 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_info->drv_pulse_seq = DRV_MB_RD(p_hwfn, p_ptt, drv_pulse_mb) &
p_hwfn            256 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_info->mcp_hist = qed_rd(p_hwfn, p_ptt, MISCS_REG_GENERIC_POR_0);
p_hwfn            261 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_cmd_init(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn            267 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_hwfn->mcp_info = kzalloc(sizeof(*p_hwfn->mcp_info), GFP_KERNEL);
p_hwfn            268 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (!p_hwfn->mcp_info)
p_hwfn            270 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_info = p_hwfn->mcp_info;
p_hwfn            278 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (qed_load_mcp_offsets(p_hwfn, p_ptt) != 0) {
p_hwfn            279 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn, "MCP is not initialized\n");
p_hwfn            295 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_mcp_free(p_hwfn);
p_hwfn            299 drivers/net/ethernet/qlogic/qed/qed_mcp.c static void qed_mcp_reread_offsets(struct qed_hwfn *p_hwfn,
p_hwfn            302 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	u32 generic_por_0 = qed_rd(p_hwfn, p_ptt, MISCS_REG_GENERIC_POR_0);
p_hwfn            307 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (p_hwfn->mcp_info->mcp_hist != generic_por_0) {
p_hwfn            308 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_VERBOSE(p_hwfn,
p_hwfn            311 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			   p_hwfn->mcp_info->mcp_hist, generic_por_0);
p_hwfn            313 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		qed_load_mcp_offsets(p_hwfn, p_ptt);
p_hwfn            314 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		qed_mcp_cmd_port_init(p_hwfn, p_ptt);
p_hwfn            318 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_reset(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn            323 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (p_hwfn->mcp_info->b_block_cmd) {
p_hwfn            324 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn            330 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	spin_lock_bh(&p_hwfn->mcp_info->cmd_lock);
p_hwfn            332 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	org_mcp_reset_seq = qed_rd(p_hwfn, p_ptt, MISCS_REG_GENERIC_POR_0);
p_hwfn            335 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_mcp_reread_offsets(p_hwfn, p_ptt);
p_hwfn            336 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	seq = ++p_hwfn->mcp_info->drv_mb_seq;
p_hwfn            337 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DRV_MB_WR(p_hwfn, p_ptt, drv_mb_header, (DRV_MSG_CODE_MCP_RESET | seq));
p_hwfn            343 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	} while ((org_mcp_reset_seq == qed_rd(p_hwfn, p_ptt,
p_hwfn            348 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	    qed_rd(p_hwfn, p_ptt, MISCS_REG_GENERIC_POR_0)) {
p_hwfn            349 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn            352 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn, "Failed to reset MCP\n");
p_hwfn            356 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
p_hwfn            362 drivers/net/ethernet/qlogic/qed/qed_mcp.c static bool qed_mcp_has_pending_cmd(struct qed_hwfn *p_hwfn)
p_hwfn            369 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (!list_empty(&p_hwfn->mcp_info->cmd_list)) {
p_hwfn            370 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		p_cmd_elem = list_first_entry(&p_hwfn->mcp_info->cmd_list,
p_hwfn            380 drivers/net/ethernet/qlogic/qed/qed_mcp.c qed_mcp_update_pending_cmd(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn            387 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	mcp_resp = DRV_MB_RD(p_hwfn, p_ptt, fw_mb_header);
p_hwfn            391 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (seq_num != p_hwfn->mcp_info->drv_mb_seq)
p_hwfn            394 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_cmd_elem = qed_mcp_cmd_get_elem(p_hwfn, seq_num);
p_hwfn            396 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn,
p_hwfn            408 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_mb_params->mcp_param = DRV_MB_RD(p_hwfn, p_ptt, fw_mb_param);
p_hwfn            412 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		u32 union_data_addr = p_hwfn->mcp_info->drv_mb_addr +
p_hwfn            415 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		qed_memcpy_from(p_hwfn, p_ptt, p_mb_params->p_data_dst,
p_hwfn            425 drivers/net/ethernet/qlogic/qed/qed_mcp.c static void __qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
p_hwfn            434 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	union_data_addr = p_hwfn->mcp_info->drv_mb_addr +
p_hwfn            440 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_memcpy_to(p_hwfn, p_ptt, union_data_addr, &union_data,
p_hwfn            444 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DRV_MB_WR(p_hwfn, p_ptt, drv_mb_param, p_mb_params->param);
p_hwfn            447 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DRV_MB_WR(p_hwfn, p_ptt, drv_mb_header, (p_mb_params->cmd | seq_num));
p_hwfn            449 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn            454 drivers/net/ethernet/qlogic/qed/qed_mcp.c static void qed_mcp_cmd_set_blocking(struct qed_hwfn *p_hwfn, bool block_cmd)
p_hwfn            456 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_hwfn->mcp_info->b_block_cmd = block_cmd;
p_hwfn            458 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_INFO(p_hwfn, "%s sending of mailbox commands to the MFW\n",
p_hwfn            462 drivers/net/ethernet/qlogic/qed/qed_mcp.c static void qed_mcp_print_cpu_info(struct qed_hwfn *p_hwfn,
p_hwfn            468 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	cpu_mode = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_MODE);
p_hwfn            469 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	cpu_state = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_STATE);
p_hwfn            470 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	cpu_pc_0 = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_PROGRAM_COUNTER);
p_hwfn            472 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	cpu_pc_1 = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_PROGRAM_COUNTER);
p_hwfn            474 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	cpu_pc_2 = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_PROGRAM_COUNTER);
p_hwfn            476 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_NOTICE(p_hwfn,
p_hwfn            482 drivers/net/ethernet/qlogic/qed/qed_mcp.c _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
p_hwfn            499 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		spin_lock_bh(&p_hwfn->mcp_info->cmd_lock);
p_hwfn            501 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		if (!qed_mcp_has_pending_cmd(p_hwfn))
p_hwfn            504 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		rc = qed_mcp_update_pending_cmd(p_hwfn, p_ptt);
p_hwfn            510 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
p_hwfn            519 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn            526 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_mcp_reread_offsets(p_hwfn, p_ptt);
p_hwfn            527 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	seq_num = ++p_hwfn->mcp_info->drv_mb_seq;
p_hwfn            528 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_cmd_elem = qed_mcp_cmd_add_elem(p_hwfn, p_mb_params, seq_num);
p_hwfn            534 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	__qed_mcp_cmd_and_union(p_hwfn, p_ptt, p_mb_params, seq_num);
p_hwfn            535 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
p_hwfn            549 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		spin_lock_bh(&p_hwfn->mcp_info->cmd_lock);
p_hwfn            554 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		rc = qed_mcp_update_pending_cmd(p_hwfn, p_ptt);
p_hwfn            560 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
p_hwfn            564 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn            567 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		qed_mcp_print_cpu_info(p_hwfn, p_ptt);
p_hwfn            569 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		spin_lock_bh(&p_hwfn->mcp_info->cmd_lock);
p_hwfn            570 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		qed_mcp_cmd_del_elem(p_hwfn, p_cmd_elem);
p_hwfn            571 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
p_hwfn            574 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_mcp_cmd_set_blocking(p_hwfn, true);
p_hwfn            579 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_mcp_cmd_del_elem(p_hwfn, p_cmd_elem);
p_hwfn            580 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
p_hwfn            582 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_VERBOSE(p_hwfn,
p_hwfn            595 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
p_hwfn            599 drivers/net/ethernet/qlogic/qed/qed_mcp.c static int qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
p_hwfn            608 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (!qed_mcp_is_init(p_hwfn)) {
p_hwfn            609 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn, "MFW is not initialized!\n");
p_hwfn            613 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (p_hwfn->mcp_info->b_block_cmd) {
p_hwfn            614 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn            622 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn,
p_hwfn            634 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	return _qed_mcp_cmd_and_union(p_hwfn, p_ptt, p_mb_params, max_retries,
p_hwfn            638 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_cmd(struct qed_hwfn *p_hwfn,
p_hwfn            652 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
p_hwfn            663 drivers/net/ethernet/qlogic/qed/qed_mcp.c qed_mcp_nvm_wr_cmd(struct qed_hwfn *p_hwfn,
p_hwfn            678 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
p_hwfn            686 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_hwfn->nvm_info.valid = false;
p_hwfn            691 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_nvm_rd_cmd(struct qed_hwfn *p_hwfn,
p_hwfn            710 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
p_hwfn            748 drivers/net/ethernet/qlogic/qed/qed_mcp.c static int qed_mcp_cancel_load_req(struct qed_hwfn *p_hwfn,
p_hwfn            754 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_CANCEL_LOAD_REQ, 0,
p_hwfn            757 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn            819 drivers/net/ethernet/qlogic/qed/qed_mcp.c __qed_mcp_load_req(struct qed_hwfn *p_hwfn,
p_hwfn            848 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	mb_params.param = PDA_COMP | hsi_ver | p_hwfn->cdev->drv_type;
p_hwfn            855 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn            864 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn            877 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
p_hwfn            879 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn, "Failed to send load request, rc = %d\n", rc);
p_hwfn            883 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn            889 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_VERBOSE(p_hwfn,
p_hwfn            915 drivers/net/ethernet/qlogic/qed/qed_mcp.c static int eocre_get_mfw_drv_role(struct qed_hwfn *p_hwfn,
p_hwfn            927 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn, "Unexpected driver role %d\n", drv_role);
p_hwfn            940 drivers/net/ethernet/qlogic/qed/qed_mcp.c static void qed_get_mfw_force_cmd(struct qed_hwfn *p_hwfn,
p_hwfn            958 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_load_req(struct qed_hwfn *p_hwfn,
p_hwfn            972 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = eocre_get_mfw_drv_role(p_hwfn, p_params->drv_role, &mfw_drv_role);
p_hwfn            978 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_get_mfw_force_cmd(p_hwfn,
p_hwfn            985 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = __qed_mcp_load_req(p_hwfn, p_ptt, &in_params, &out_params);
p_hwfn            994 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_INFO(p_hwfn,
p_hwfn            999 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		rc = __qed_mcp_load_req(p_hwfn, p_ptt, &in_params, &out_params);
p_hwfn           1007 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			DP_INFO(p_hwfn,
p_hwfn           1016 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_get_mfw_force_cmd(p_hwfn,
p_hwfn           1022 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			rc = __qed_mcp_load_req(p_hwfn, p_ptt, &in_params,
p_hwfn           1027 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			DP_NOTICE(p_hwfn,
p_hwfn           1035 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			DP_NOTICE(p_hwfn,
p_hwfn           1038 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_mcp_cancel_load_req(p_hwfn, p_ptt);
p_hwfn           1056 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			DP_NOTICE(p_hwfn,
p_hwfn           1062 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn           1073 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_load_done(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           1078 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_LOAD_DONE, 0, &resp,
p_hwfn           1081 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn           1088 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn           1094 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_unload_req(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           1099 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	switch (p_hwfn->cdev->wol_config) {
p_hwfn           1107 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn           1109 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			  p_hwfn->cdev->wol_config);
p_hwfn           1120 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	return qed_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
p_hwfn           1123 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_unload_done(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           1132 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (p_hwfn->cdev->wol_config == QED_OV_WOL_ENABLED) {
p_hwfn           1133 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		u8 *p_mac = p_hwfn->cdev->wol_mac;
p_hwfn           1140 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_VERBOSE(p_hwfn,
p_hwfn           1149 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	return qed_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
p_hwfn           1152 drivers/net/ethernet/qlogic/qed/qed_mcp.c static void qed_mcp_handle_vf_flr(struct qed_hwfn *p_hwfn,
p_hwfn           1155 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	u32 addr = SECTION_OFFSIZE_ADDR(p_hwfn->mcp_info->public_base,
p_hwfn           1157 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	u32 mfw_path_offsize = qed_rd(p_hwfn, p_ptt, addr);
p_hwfn           1159 drivers/net/ethernet/qlogic/qed/qed_mcp.c 				     QED_PATH_ID(p_hwfn));
p_hwfn           1163 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_VERBOSE(p_hwfn,
p_hwfn           1169 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		disabled_vfs[i] = qed_rd(p_hwfn, p_ptt,
p_hwfn           1174 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_VERBOSE(p_hwfn, (QED_MSG_SP | QED_MSG_IOV),
p_hwfn           1179 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (qed_iov_mark_vf_flr(p_hwfn, disabled_vfs))
p_hwfn           1180 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		qed_schedule_iov(p_hwfn, QED_IOV_WQ_FLR_FLAG);
p_hwfn           1183 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_ack_vf_flr(struct qed_hwfn *p_hwfn,
p_hwfn           1186 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	u32 addr = SECTION_OFFSIZE_ADDR(p_hwfn->mcp_info->public_base,
p_hwfn           1188 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	u32 mfw_func_offsize = qed_rd(p_hwfn, p_ptt, addr);
p_hwfn           1190 drivers/net/ethernet/qlogic/qed/qed_mcp.c 				     MCP_PF_ID(p_hwfn));
p_hwfn           1196 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_VERBOSE(p_hwfn, (QED_MSG_SP | QED_MSG_IOV),
p_hwfn           1204 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
p_hwfn           1206 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn, "Failed to pass ACK for VF flr to MFW\n");
p_hwfn           1212 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		qed_wr(p_hwfn, p_ptt,
p_hwfn           1220 drivers/net/ethernet/qlogic/qed/qed_mcp.c static void qed_mcp_handle_transceiver_change(struct qed_hwfn *p_hwfn,
p_hwfn           1225 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	transceiver_state = qed_rd(p_hwfn, p_ptt,
p_hwfn           1226 drivers/net/ethernet/qlogic/qed/qed_mcp.c 				   p_hwfn->mcp_info->port_addr +
p_hwfn           1230 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_VERBOSE(p_hwfn,
p_hwfn           1234 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		   (u32)(p_hwfn->mcp_info->port_addr +
p_hwfn           1241 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn, "Transceiver is present.\n");
p_hwfn           1243 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn, "Transceiver is unplugged.\n");
p_hwfn           1246 drivers/net/ethernet/qlogic/qed/qed_mcp.c static void qed_mcp_read_eee_config(struct qed_hwfn *p_hwfn,
p_hwfn           1254 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	eee_status = qed_rd(p_hwfn,
p_hwfn           1256 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			    p_hwfn->mcp_info->port_addr +
p_hwfn           1271 drivers/net/ethernet/qlogic/qed/qed_mcp.c static u32 qed_mcp_get_shmem_func(struct qed_hwfn *p_hwfn,
p_hwfn           1275 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	u32 addr = SECTION_OFFSIZE_ADDR(p_hwfn->mcp_info->public_base,
p_hwfn           1277 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	u32 mfw_path_offsize = qed_rd(p_hwfn, p_ptt, addr);
p_hwfn           1286 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		((u32 *)p_data)[i] = qed_rd(p_hwfn, p_ptt,
p_hwfn           1291 drivers/net/ethernet/qlogic/qed/qed_mcp.c static void qed_read_pf_bandwidth(struct qed_hwfn *p_hwfn,
p_hwfn           1296 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_info = &p_hwfn->mcp_info->func_info;
p_hwfn           1301 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_INFO(p_hwfn,
p_hwfn           1310 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_INFO(p_hwfn,
p_hwfn           1317 drivers/net/ethernet/qlogic/qed/qed_mcp.c static void qed_mcp_handle_link_change(struct qed_hwfn *p_hwfn,
p_hwfn           1325 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	spin_lock_bh(&p_hwfn->mcp_info->link_lock);
p_hwfn           1327 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_link = &p_hwfn->mcp_info->link_output;
p_hwfn           1330 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		status = qed_rd(p_hwfn, p_ptt,
p_hwfn           1331 drivers/net/ethernet/qlogic/qed/qed_mcp.c 				p_hwfn->mcp_info->port_addr +
p_hwfn           1333 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_VERBOSE(p_hwfn, (NETIF_MSG_LINK | QED_MSG_SP),
p_hwfn           1336 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			   (u32)(p_hwfn->mcp_info->port_addr +
p_hwfn           1339 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_LINK,
p_hwfn           1344 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (p_hwfn->b_drv_link_init) {
p_hwfn           1348 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		if (p_hwfn->mcp_info->capabilities &
p_hwfn           1352 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_mcp_get_shmem_func(p_hwfn, p_ptt, &shmem_info,
p_hwfn           1353 drivers/net/ethernet/qlogic/qed/qed_mcp.c 					       MCP_PF_ID(p_hwfn));
p_hwfn           1356 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_read_pf_bandwidth(p_hwfn, &shmem_info);
p_hwfn           1357 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			DP_VERBOSE(p_hwfn, NETIF_MSG_LINK,
p_hwfn           1361 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			DP_VERBOSE(p_hwfn, NETIF_MSG_LINK,
p_hwfn           1404 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	max_bw = p_hwfn->mcp_info->func_info.bandwidth_max;
p_hwfn           1405 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	min_bw = p_hwfn->mcp_info->func_info.bandwidth_min;
p_hwfn           1408 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	__qed_configure_pf_max_bandwidth(p_hwfn, p_ptt, p_link, max_bw);
p_hwfn           1411 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	__qed_configure_pf_min_bandwidth(p_hwfn, p_ptt, p_link, min_bw);
p_hwfn           1412 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_configure_vp_wfq_on_link_change(p_hwfn->cdev, p_ptt,
p_hwfn           1468 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (p_hwfn->mcp_info->capabilities & FW_MB_PARAM_FEATURE_SUPPORT_EEE)
p_hwfn           1469 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		qed_mcp_read_eee_config(p_hwfn, p_ptt, p_link);
p_hwfn           1471 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_link_update(p_hwfn, p_ptt);
p_hwfn           1473 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	spin_unlock_bh(&p_hwfn->mcp_info->link_lock);
p_hwfn           1476 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_set_link(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, bool b_up)
p_hwfn           1478 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	struct qed_mcp_link_params *params = &p_hwfn->mcp_info->link_input;
p_hwfn           1500 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if ((p_hwfn->mcp_info->capabilities &
p_hwfn           1514 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_hwfn->b_drv_link_init = b_up;
p_hwfn           1517 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_LINK,
p_hwfn           1525 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_LINK,
p_hwfn           1533 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
p_hwfn           1537 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn, "MCP response failure, aborting\n");
p_hwfn           1547 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_mcp_handle_link_change(p_hwfn, p_ptt, !b_up);
p_hwfn           1552 drivers/net/ethernet/qlogic/qed/qed_mcp.c u32 qed_get_process_kill_counter(struct qed_hwfn *p_hwfn,
p_hwfn           1557 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (IS_VF(p_hwfn->cdev))
p_hwfn           1560 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	path_offsize_addr = SECTION_OFFSIZE_ADDR(p_hwfn->mcp_info->public_base,
p_hwfn           1562 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	path_offsize = qed_rd(p_hwfn, p_ptt, path_offsize_addr);
p_hwfn           1563 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	path_addr = SECTION_ADDR(path_offsize, QED_PATH_ID(p_hwfn));
p_hwfn           1565 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	proc_kill_cnt = qed_rd(p_hwfn, p_ptt,
p_hwfn           1573 drivers/net/ethernet/qlogic/qed/qed_mcp.c static void qed_mcp_handle_process_kill(struct qed_hwfn *p_hwfn,
p_hwfn           1576 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn           1582 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_int_igu_disable_int(p_hwfn, p_ptt);
p_hwfn           1584 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_NOTICE(p_hwfn, "Received a process kill indication\n");
p_hwfn           1589 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (p_hwfn != QED_LEADING_HWFN(cdev))
p_hwfn           1593 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn           1600 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	proc_kill_cnt = qed_get_process_kill_counter(p_hwfn, p_ptt);
p_hwfn           1601 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_NOTICE(p_hwfn, "Process kill counter: %d\n", proc_kill_cnt);
p_hwfn           1603 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_schedule_recovery_handler(p_hwfn);
p_hwfn           1606 drivers/net/ethernet/qlogic/qed/qed_mcp.c static void qed_mcp_send_protocol_stats(struct qed_hwfn *p_hwfn,
p_hwfn           1633 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn, "Invalid protocol type %d\n", type);
p_hwfn           1637 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_get_protocol_stats(p_hwfn->cdev, stats_type, &stats);
p_hwfn           1644 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
p_hwfn           1647 drivers/net/ethernet/qlogic/qed/qed_mcp.c static void qed_mcp_update_bw(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           1653 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_mcp_get_shmem_func(p_hwfn, p_ptt, &shmem_info, MCP_PF_ID(p_hwfn));
p_hwfn           1655 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_read_pf_bandwidth(p_hwfn, &shmem_info);
p_hwfn           1657 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_info = &p_hwfn->mcp_info->func_info;
p_hwfn           1659 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_configure_pf_min_bandwidth(p_hwfn->cdev, p_info->bandwidth_min);
p_hwfn           1660 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_configure_pf_max_bandwidth(p_hwfn->cdev, p_info->bandwidth_max);
p_hwfn           1663 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_BW_UPDATE_ACK, 0, &resp,
p_hwfn           1667 drivers/net/ethernet/qlogic/qed/qed_mcp.c static void qed_mcp_update_stag(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           1672 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_mcp_get_shmem_func(p_hwfn, p_ptt, &shmem_info, MCP_PF_ID(p_hwfn));
p_hwfn           1674 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_hwfn->mcp_info->func_info.ovlan = (u16)shmem_info.ovlan_stag &
p_hwfn           1676 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_hwfn->hw_info.ovlan = p_hwfn->mcp_info->func_info.ovlan;
p_hwfn           1677 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (test_bit(QED_MF_OVLAN_CLSS, &p_hwfn->cdev->mf_bits)) {
p_hwfn           1678 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		if (p_hwfn->hw_info.ovlan != QED_MCP_VLAN_UNSET) {
p_hwfn           1679 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_wr(p_hwfn, p_ptt, NIG_REG_LLH_FUNC_TAG_VALUE,
p_hwfn           1680 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			       p_hwfn->hw_info.ovlan);
p_hwfn           1681 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_wr(p_hwfn, p_ptt, NIG_REG_LLH_FUNC_TAG_EN, 1);
p_hwfn           1684 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_wr(p_hwfn, p_ptt, DORQ_REG_TAG1_OVRD_MODE, 1);
p_hwfn           1685 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_wr(p_hwfn, p_ptt, DORQ_REG_PF_EXT_VID_BB_K2,
p_hwfn           1686 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			       p_hwfn->hw_info.ovlan);
p_hwfn           1688 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_wr(p_hwfn, p_ptt, NIG_REG_LLH_FUNC_TAG_EN, 0);
p_hwfn           1689 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_wr(p_hwfn, p_ptt, NIG_REG_LLH_FUNC_TAG_VALUE, 0);
p_hwfn           1690 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_wr(p_hwfn, p_ptt, DORQ_REG_TAG1_OVRD_MODE, 0);
p_hwfn           1691 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_wr(p_hwfn, p_ptt, DORQ_REG_PF_EXT_VID_BB_K2, 0);
p_hwfn           1694 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		qed_sp_pf_update_stag(p_hwfn);
p_hwfn           1697 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_VERBOSE(p_hwfn, QED_MSG_SP, "ovlan = %d hw_mode = 0x%x\n",
p_hwfn           1698 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		   p_hwfn->mcp_info->func_info.ovlan, p_hwfn->hw_info.hw_mode);
p_hwfn           1701 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_S_TAG_UPDATE_ACK, 0,
p_hwfn           1705 drivers/net/ethernet/qlogic/qed/qed_mcp.c void qed_mcp_read_ufp_config(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           1710 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (!test_bit(QED_MF_UFP_SPECIFIC, &p_hwfn->cdev->mf_bits))
p_hwfn           1713 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	memset(&p_hwfn->ufp_info, 0, sizeof(p_hwfn->ufp_info));
p_hwfn           1714 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	port_cfg = qed_rd(p_hwfn, p_ptt, p_hwfn->mcp_info->port_addr +
p_hwfn           1719 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn           1721 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			  val, MFW_PORT(p_hwfn));
p_hwfn           1725 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		p_hwfn->ufp_info.mode = QED_UFP_MODE_ETS;
p_hwfn           1727 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		p_hwfn->ufp_info.mode = QED_UFP_MODE_VNIC_BW;
p_hwfn           1729 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		p_hwfn->ufp_info.mode = QED_UFP_MODE_UNKNOWN;
p_hwfn           1730 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn           1732 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			  val, MFW_PORT(p_hwfn));
p_hwfn           1735 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_mcp_get_shmem_func(p_hwfn, p_ptt, &shmem_info, MCP_PF_ID(p_hwfn));
p_hwfn           1738 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_hwfn->ufp_info.tc = (u8)val;
p_hwfn           1742 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		p_hwfn->ufp_info.pri_type = QED_UFP_PRI_VNIC;
p_hwfn           1744 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		p_hwfn->ufp_info.pri_type = QED_UFP_PRI_OS;
p_hwfn           1746 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		p_hwfn->ufp_info.pri_type = QED_UFP_PRI_UNKNOWN;
p_hwfn           1747 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn           1749 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			  val, MFW_PORT(p_hwfn));
p_hwfn           1752 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_NOTICE(p_hwfn,
p_hwfn           1754 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		  p_hwfn->ufp_info.mode, p_hwfn->ufp_info.tc,
p_hwfn           1755 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		  p_hwfn->ufp_info.pri_type, MFW_PORT(p_hwfn));
p_hwfn           1759 drivers/net/ethernet/qlogic/qed/qed_mcp.c qed_mcp_handle_ufp_event(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           1761 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_mcp_read_ufp_config(p_hwfn, p_ptt);
p_hwfn           1763 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (p_hwfn->ufp_info.mode == QED_UFP_MODE_VNIC_BW) {
p_hwfn           1764 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		p_hwfn->qm_info.ooo_tc = p_hwfn->ufp_info.tc;
p_hwfn           1765 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		qed_hw_info_set_offload_tc(&p_hwfn->hw_info,
p_hwfn           1766 drivers/net/ethernet/qlogic/qed/qed_mcp.c 					   p_hwfn->ufp_info.tc);
p_hwfn           1768 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		qed_qm_reconf(p_hwfn, p_ptt);
p_hwfn           1769 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	} else if (p_hwfn->ufp_info.mode == QED_UFP_MODE_ETS) {
p_hwfn           1771 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		qed_dcbx_mib_update_event(p_hwfn, p_ptt,
p_hwfn           1774 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn, "Invalid sched type, discard the UFP config\n");
p_hwfn           1779 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_sp_pf_update_ufp(p_hwfn);
p_hwfn           1782 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_sp_pf_update_stag(p_hwfn);
p_hwfn           1787 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_handle_events(struct qed_hwfn *p_hwfn,
p_hwfn           1790 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	struct qed_mcp_info *info = p_hwfn->mcp_info;
p_hwfn           1795 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_VERBOSE(p_hwfn, QED_MSG_SP, "Received message from MFW\n");
p_hwfn           1798 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_mcp_read_mb(p_hwfn, p_ptt);
p_hwfn           1807 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_LINK,
p_hwfn           1813 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_mcp_handle_link_change(p_hwfn, p_ptt, false);
p_hwfn           1816 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_mcp_handle_vf_flr(p_hwfn, p_ptt);
p_hwfn           1819 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_dcbx_mib_update_event(p_hwfn, p_ptt,
p_hwfn           1823 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_dcbx_mib_update_event(p_hwfn, p_ptt,
p_hwfn           1827 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_dcbx_mib_update_event(p_hwfn, p_ptt,
p_hwfn           1831 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_mcp_handle_ufp_event(p_hwfn, p_ptt);
p_hwfn           1834 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_mcp_handle_transceiver_change(p_hwfn, p_ptt);
p_hwfn           1837 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_mcp_handle_process_kill(p_hwfn, p_ptt);
p_hwfn           1843 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_mcp_send_protocol_stats(p_hwfn, p_ptt, i);
p_hwfn           1846 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_mcp_update_bw(p_hwfn, p_ptt);
p_hwfn           1849 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_mcp_update_stag(p_hwfn, p_ptt);
p_hwfn           1852 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_mfw_tlv_req(p_hwfn);
p_hwfn           1855 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			DP_INFO(p_hwfn, "Unimplemented MFW message %d\n", i);
p_hwfn           1865 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		qed_wr(p_hwfn, p_ptt,
p_hwfn           1873 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn           1884 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_get_mfw_ver(struct qed_hwfn *p_hwfn,
p_hwfn           1890 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (IS_VF(p_hwfn->cdev)) {
p_hwfn           1891 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		if (p_hwfn->vf_iov_info) {
p_hwfn           1894 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			p_resp = &p_hwfn->vf_iov_info->acquire_resp;
p_hwfn           1898 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			DP_VERBOSE(p_hwfn,
p_hwfn           1905 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	global_offsize = qed_rd(p_hwfn, p_ptt,
p_hwfn           1906 drivers/net/ethernet/qlogic/qed/qed_mcp.c 				SECTION_OFFSIZE_ADDR(p_hwfn->
p_hwfn           1910 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	    qed_rd(p_hwfn, p_ptt,
p_hwfn           1915 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		*p_running_bundle_id = qed_rd(p_hwfn, p_ptt,
p_hwfn           1924 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_get_mbi_ver(struct qed_hwfn *p_hwfn,
p_hwfn           1929 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (IS_VF(p_hwfn->cdev))
p_hwfn           1933 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	nvm_cfg_addr = qed_rd(p_hwfn, p_ptt, MISC_REG_GEN_PURP_CR0);
p_hwfn           1935 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn, "Shared memory not initialized\n");
p_hwfn           1940 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	nvm_cfg1_offset = qed_rd(p_hwfn, p_ptt, nvm_cfg_addr + 4);
p_hwfn           1945 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	*p_mbi_ver = qed_rd(p_hwfn, p_ptt,
p_hwfn           1954 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_get_media_type(struct qed_hwfn *p_hwfn,
p_hwfn           1959 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (IS_VF(p_hwfn->cdev))
p_hwfn           1962 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (!qed_mcp_is_init(p_hwfn)) {
p_hwfn           1963 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn, "MFW is not initialized!\n");
p_hwfn           1972 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	*p_media_type = qed_rd(p_hwfn, p_ptt,
p_hwfn           1973 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			       p_hwfn->mcp_info->port_addr +
p_hwfn           1980 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_get_transceiver_data(struct qed_hwfn *p_hwfn,
p_hwfn           1990 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (IS_VF(p_hwfn->cdev))
p_hwfn           1993 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (!qed_mcp_is_init(p_hwfn)) {
p_hwfn           1994 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn, "MFW is not initialized!\n");
p_hwfn           1998 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	transceiver_info = qed_rd(p_hwfn, p_ptt,
p_hwfn           1999 drivers/net/ethernet/qlogic/qed/qed_mcp.c 				  p_hwfn->mcp_info->port_addr +
p_hwfn           2027 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_trans_speed_mask(struct qed_hwfn *p_hwfn,
p_hwfn           2033 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	ret = qed_mcp_get_transceiver_data(p_hwfn, p_ptt, &transceiver_state,
p_hwfn           2125 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_INFO(p_hwfn, "Unknown transceiver type 0x%x\n",
p_hwfn           2134 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_get_board_config(struct qed_hwfn *p_hwfn,
p_hwfn           2139 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (IS_VF(p_hwfn->cdev))
p_hwfn           2142 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (!qed_mcp_is_init(p_hwfn)) {
p_hwfn           2143 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn, "MFW is not initialized!\n");
p_hwfn           2151 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	nvm_cfg_addr = qed_rd(p_hwfn, p_ptt, MISC_REG_GEN_PURP_CR0);
p_hwfn           2152 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	nvm_cfg1_offset = qed_rd(p_hwfn, p_ptt, nvm_cfg_addr + 4);
p_hwfn           2154 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			offsetof(struct nvm_cfg1, port[MFW_PORT(p_hwfn)]);
p_hwfn           2155 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	*p_board_config = qed_rd(p_hwfn, p_ptt,
p_hwfn           2165 drivers/net/ethernet/qlogic/qed/qed_mcp.c qed_mcp_get_shmem_proto_legacy(struct qed_hwfn *p_hwfn,
p_hwfn           2171 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (test_bit(QED_DEV_CAP_ROCE, &p_hwfn->hw_info.device_capabilities))
p_hwfn           2176 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_VERBOSE(p_hwfn, NETIF_MSG_IFUP,
p_hwfn           2182 drivers/net/ethernet/qlogic/qed/qed_mcp.c qed_mcp_get_shmem_proto_mfw(struct qed_hwfn *p_hwfn,
p_hwfn           2189 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd(p_hwfn, p_ptt,
p_hwfn           2194 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_VERBOSE(p_hwfn, NETIF_MSG_IFUP,
p_hwfn           2214 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn           2220 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_VERBOSE(p_hwfn,
p_hwfn           2228 drivers/net/ethernet/qlogic/qed/qed_mcp.c qed_mcp_get_shmem_proto(struct qed_hwfn *p_hwfn,
p_hwfn           2239 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		else if (qed_mcp_get_shmem_proto_mfw(p_hwfn, p_ptt, p_proto))
p_hwfn           2240 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			qed_mcp_get_shmem_proto_legacy(p_hwfn, p_proto);
p_hwfn           2249 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn, "RoCE personality is not a valid value!\n");
p_hwfn           2258 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_fill_shmem_func_info(struct qed_hwfn *p_hwfn,
p_hwfn           2264 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_mcp_get_shmem_func(p_hwfn, p_ptt, &shmem_info, MCP_PF_ID(p_hwfn));
p_hwfn           2265 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	info = &p_hwfn->mcp_info->func_info;
p_hwfn           2270 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (qed_mcp_get_shmem_proto(p_hwfn, &shmem_info, p_ptt,
p_hwfn           2272 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn, "Unknown personality %08x\n",
p_hwfn           2277 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_read_pf_bandwidth(p_hwfn, &shmem_info);
p_hwfn           2288 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		memcpy(&p_hwfn->cdev->wol_mac, info->mac, ETH_ALEN);
p_hwfn           2290 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn, "MAC is 0 in shmem\n");
p_hwfn           2302 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_hwfn->hw_info.b_wol_support = QED_WOL_SUPPORT_NONE;
p_hwfn           2303 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_hwfn->cdev->wol_config = (u8)QED_OV_WOL_DEFAULT;
p_hwfn           2304 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (qed_mcp_is_init(p_hwfn)) {
p_hwfn           2308 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		rc = qed_mcp_cmd(p_hwfn, p_ptt,
p_hwfn           2313 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			p_hwfn->hw_info.b_wol_support = QED_WOL_SUPPORT_PME;
p_hwfn           2316 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_VERBOSE(p_hwfn, (QED_MSG_SP | NETIF_MSG_IFUP),
p_hwfn           2323 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		info->ovlan, (u8)p_hwfn->hw_info.b_wol_support);
p_hwfn           2329 drivers/net/ethernet/qlogic/qed/qed_mcp.c *qed_mcp_get_link_params(struct qed_hwfn *p_hwfn)
p_hwfn           2331 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (!p_hwfn || !p_hwfn->mcp_info)
p_hwfn           2333 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	return &p_hwfn->mcp_info->link_input;
p_hwfn           2337 drivers/net/ethernet/qlogic/qed/qed_mcp.c *qed_mcp_get_link_state(struct qed_hwfn *p_hwfn)
p_hwfn           2339 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (!p_hwfn || !p_hwfn->mcp_info)
p_hwfn           2341 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	return &p_hwfn->mcp_info->link_output;
p_hwfn           2345 drivers/net/ethernet/qlogic/qed/qed_mcp.c *qed_mcp_get_link_capabilities(struct qed_hwfn *p_hwfn)
p_hwfn           2347 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (!p_hwfn || !p_hwfn->mcp_info)
p_hwfn           2349 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	return &p_hwfn->mcp_info->link_capabilities;
p_hwfn           2352 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_drain(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           2357 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd(p_hwfn, p_ptt,
p_hwfn           2366 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_get_flash_size(struct qed_hwfn *p_hwfn,
p_hwfn           2371 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (IS_VF(p_hwfn->cdev))
p_hwfn           2374 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	flash_size = qed_rd(p_hwfn, p_ptt, MCP_REG_NVM_CFG4);
p_hwfn           2384 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_start_recovery_process(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           2386 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn           2389 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn           2394 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_NOTICE(p_hwfn, "Triggering a recovery process\n");
p_hwfn           2395 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_wr(p_hwfn, p_ptt, MISC_REG_AEU_GENERAL_ATTN_35, 0x1);
p_hwfn           2404 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn           2405 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	struct qed_ptt *p_ptt = p_hwfn->p_main_ptt;
p_hwfn           2412 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_pglueb_set_pfid_enable(p_hwfn, p_ptt, false);
p_hwfn           2414 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn           2422 drivers/net/ethernet/qlogic/qed/qed_mcp.c qed_mcp_config_vf_msix_bb(struct qed_hwfn *p_hwfn,
p_hwfn           2429 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (!IS_LEAD_HWFN(p_hwfn))
p_hwfn           2431 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	num *= p_hwfn->cdev->num_hwfns;
p_hwfn           2438 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_CFG_VF_MSIX, param,
p_hwfn           2442 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn, "VF[%d]: MFW failed to set MSI-X\n", vf_id);
p_hwfn           2445 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           2454 drivers/net/ethernet/qlogic/qed/qed_mcp.c qed_mcp_config_vf_msix_ah(struct qed_hwfn *p_hwfn,
p_hwfn           2460 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_CFG_PF_VFS_MSIX,
p_hwfn           2464 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn, "MFW failed to set MSI-X for VFs\n");
p_hwfn           2467 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           2474 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_config_vf_msix(struct qed_hwfn *p_hwfn,
p_hwfn           2477 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (QED_IS_BB(p_hwfn->cdev))
p_hwfn           2478 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		return qed_mcp_config_vf_msix_bb(p_hwfn, p_ptt, vf_id, num);
p_hwfn           2480 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		return qed_mcp_config_vf_msix_ah(p_hwfn, p_ptt, num);
p_hwfn           2484 drivers/net/ethernet/qlogic/qed/qed_mcp.c qed_mcp_send_drv_version(struct qed_hwfn *p_hwfn,
p_hwfn           2505 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
p_hwfn           2507 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn, "MCP response failure, aborting\n");
p_hwfn           2516 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_halt(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           2521 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_MCP_HALT, 0, &resp,
p_hwfn           2524 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn, "MCP response failure, aborting\n");
p_hwfn           2530 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		cpu_state = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_STATE);
p_hwfn           2536 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn           2538 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			  qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_MODE), cpu_state);
p_hwfn           2542 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_mcp_cmd_set_blocking(p_hwfn, true);
p_hwfn           2549 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_resume(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           2553 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_wr(p_hwfn, p_ptt, MCP_REG_CPU_STATE, 0xffffffff);
p_hwfn           2555 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	cpu_mode = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_MODE);
p_hwfn           2557 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_wr(p_hwfn, p_ptt, MCP_REG_CPU_MODE, cpu_mode);
p_hwfn           2559 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	cpu_state = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_STATE);
p_hwfn           2562 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn           2568 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_mcp_cmd_set_blocking(p_hwfn, false);
p_hwfn           2573 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_ov_update_current_config(struct qed_hwfn *p_hwfn,
p_hwfn           2592 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn, "Invalid client type %d\n", client);
p_hwfn           2596 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_OV_UPDATE_CURR_CFG,
p_hwfn           2599 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn, "MCP response failure, aborting\n");
p_hwfn           2604 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_ov_update_driver_state(struct qed_hwfn *p_hwfn,
p_hwfn           2623 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn, "Invalid driver state %d\n", drv_state);
p_hwfn           2627 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_OV_UPDATE_DRIVER_STATE,
p_hwfn           2630 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn, "Failed to send driver state\n");
p_hwfn           2635 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_ov_update_mtu(struct qed_hwfn *p_hwfn,
p_hwfn           2643 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_OV_UPDATE_MTU,
p_hwfn           2646 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn, "Failed to send mtu value, rc = %d\n", rc);
p_hwfn           2651 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_ov_update_mac(struct qed_hwfn *p_hwfn,
p_hwfn           2662 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	mb_params.param |= MCP_PF_ID(p_hwfn);
p_hwfn           2674 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
p_hwfn           2676 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn, "Failed to send mac address, rc = %d\n", rc);
p_hwfn           2679 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	memcpy(p_hwfn->cdev->wol_mac, mac, ETH_ALEN);
p_hwfn           2684 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_ov_update_wol(struct qed_hwfn *p_hwfn,
p_hwfn           2691 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (p_hwfn->hw_info.b_wol_support == QED_WOL_SUPPORT_NONE) {
p_hwfn           2692 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn           2708 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn, "Invalid wol state %d\n", wol);
p_hwfn           2712 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_OV_UPDATE_WOL,
p_hwfn           2715 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn, "Failed to send wol mode, rc = %d\n", rc);
p_hwfn           2718 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_hwfn->cdev->wol_config = (u8)wol;
p_hwfn           2723 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_ov_update_eswitch(struct qed_hwfn *p_hwfn,
p_hwfn           2742 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn, "Invalid eswitch mode %d\n", eswitch);
p_hwfn           2746 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_OV_UPDATE_ESWITCH_MODE,
p_hwfn           2749 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn, "Failed to send eswitch mode, rc = %d\n", rc);
p_hwfn           2754 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_set_led(struct qed_hwfn *p_hwfn,
p_hwfn           2771 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn, "Invalid LED mode %d\n", mode);
p_hwfn           2775 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_SET_LED_MODE,
p_hwfn           2781 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_mask_parities(struct qed_hwfn *p_hwfn,
p_hwfn           2787 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_MASK_PARITIES,
p_hwfn           2791 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn,
p_hwfn           2794 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn,
p_hwfn           2805 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn           2810 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           2817 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		rc = qed_mcp_nvm_rd_cmd(p_hwfn, p_ptt,
p_hwfn           2843 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           2850 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn           2853 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           2858 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           2867 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn           2871 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           2886 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn, "Invalid nvm write command 0x%x\n", cmd);
p_hwfn           2899 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		rc = qed_mcp_nvm_wr_cmd(p_hwfn, p_ptt, nvm_cmd, nvm_offset,
p_hwfn           2940 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           2945 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_phy_sfp_read(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
p_hwfn           2971 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		rc = qed_mcp_nvm_rd_cmd(p_hwfn, p_ptt,
p_hwfn           2976 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			DP_NOTICE(p_hwfn,
p_hwfn           2994 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_bist_register_test(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           3002 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_BIST_TEST,
p_hwfn           3015 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_bist_clock_test(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           3023 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_BIST_TEST,
p_hwfn           3036 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_bist_nvm_get_num_images(struct qed_hwfn *p_hwfn,
p_hwfn           3046 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_BIST_TEST,
p_hwfn           3057 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_bist_nvm_get_image_att(struct qed_hwfn *p_hwfn,
p_hwfn           3069 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_nvm_rd_cmd(p_hwfn, p_ptt,
p_hwfn           3084 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_nvm_info_populate(struct qed_hwfn *p_hwfn)
p_hwfn           3091 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (p_hwfn->nvm_info.valid)
p_hwfn           3094 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           3096 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn, "failed to acquire ptt\n");
p_hwfn           3102 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_bist_nvm_get_num_images(p_hwfn,
p_hwfn           3105 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_INFO(p_hwfn, "DRV_MSG_CODE_BIST_TEST is not supported\n");
p_hwfn           3108 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn, "Failed getting number of images\n");
p_hwfn           3122 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		rc = qed_mcp_bist_nvm_get_image_att(p_hwfn, p_ptt,
p_hwfn           3125 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			DP_ERR(p_hwfn,
p_hwfn           3130 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_VERBOSE(p_hwfn, QED_MSG_SP, "image index %d, size %x\n", i,
p_hwfn           3136 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		p_hwfn->nvm_info.num_images = nvm_info.num_images;
p_hwfn           3137 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		kfree(p_hwfn->nvm_info.image_att);
p_hwfn           3138 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		p_hwfn->nvm_info.image_att = nvm_info.image_att;
p_hwfn           3139 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		p_hwfn->nvm_info.valid = true;
p_hwfn           3142 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           3148 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           3153 drivers/net/ethernet/qlogic/qed/qed_mcp.c qed_mcp_get_nvm_image_att(struct qed_hwfn *p_hwfn,
p_hwfn           3178 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn, "Unknown request of image_id %08x\n",
p_hwfn           3183 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	qed_mcp_nvm_info_populate(p_hwfn);
p_hwfn           3184 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	for (i = 0; i < p_hwfn->nvm_info.num_images; i++)
p_hwfn           3185 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		if (type == p_hwfn->nvm_info.image_att[i].image_type)
p_hwfn           3187 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	if (i == p_hwfn->nvm_info.num_images) {
p_hwfn           3188 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_VERBOSE(p_hwfn, QED_MSG_STORAGE,
p_hwfn           3194 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_image_att->start_addr = p_hwfn->nvm_info.image_att[i].nvm_start_addr;
p_hwfn           3195 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	p_image_att->length = p_hwfn->nvm_info.image_att[i].len;
p_hwfn           3200 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_get_nvm_image(struct qed_hwfn *p_hwfn,
p_hwfn           3209 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_get_nvm_image_att(p_hwfn, image_id, &image_att);
p_hwfn           3215 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_VERBOSE(p_hwfn, QED_MSG_STORAGE,
p_hwfn           3222 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_VERBOSE(p_hwfn,
p_hwfn           3229 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	return qed_mcp_nvm_read(p_hwfn->cdev, image_att.start_addr,
p_hwfn           3310 drivers/net/ethernet/qlogic/qed/qed_mcp.c qed_mcp_resc_allocation_msg(struct qed_hwfn *p_hwfn,
p_hwfn           3323 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn,
p_hwfn           3337 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_ERR(p_hwfn, "Unexpected resource alloc command [0x%08x]\n",
p_hwfn           3350 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_VERBOSE(p_hwfn,
p_hwfn           3362 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
p_hwfn           3374 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_VERBOSE(p_hwfn,
p_hwfn           3390 drivers/net/ethernet/qlogic/qed/qed_mcp.c qed_mcp_set_resc_max_val(struct qed_hwfn *p_hwfn,
p_hwfn           3404 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_resc_allocation_msg(p_hwfn, p_ptt, &in_params,
p_hwfn           3415 drivers/net/ethernet/qlogic/qed/qed_mcp.c qed_mcp_get_resc_info(struct qed_hwfn *p_hwfn,
p_hwfn           3428 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_resc_allocation_msg(p_hwfn, p_ptt, &in_params,
p_hwfn           3443 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_initiate_pf_flr(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           3447 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	return qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_INITIATE_PF_FLR, 0,
p_hwfn           3451 drivers/net/ethernet/qlogic/qed/qed_mcp.c static int qed_mcp_resource_cmd(struct qed_hwfn *p_hwfn,
p_hwfn           3457 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_RESOURCE_CMD, param,
p_hwfn           3463 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_INFO(p_hwfn,
p_hwfn           3471 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn           3481 drivers/net/ethernet/qlogic/qed/qed_mcp.c __qed_mcp_resc_lock(struct qed_hwfn *p_hwfn,
p_hwfn           3507 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_VERBOSE(p_hwfn,
p_hwfn           3513 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_resource_cmd(p_hwfn, p_ptt, param, &mcp_resp, &mcp_param);
p_hwfn           3521 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_VERBOSE(p_hwfn,
p_hwfn           3534 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn           3544 drivers/net/ethernet/qlogic/qed/qed_mcp.c qed_mcp_resc_lock(struct qed_hwfn *p_hwfn,
p_hwfn           3564 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		rc = __qed_mcp_resc_lock(p_hwfn, p_ptt, p_params);
p_hwfn           3576 drivers/net/ethernet/qlogic/qed/qed_mcp.c qed_mcp_resc_unlock(struct qed_hwfn *p_hwfn,
p_hwfn           3589 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn           3594 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_resource_cmd(p_hwfn, p_ptt, param, &mcp_resp, &mcp_param);
p_hwfn           3601 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn           3607 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_INFO(p_hwfn,
p_hwfn           3618 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_NOTICE(p_hwfn,
p_hwfn           3657 drivers/net/ethernet/qlogic/qed/qed_mcp.c bool qed_mcp_is_smart_an_supported(struct qed_hwfn *p_hwfn)
p_hwfn           3659 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	return !!(p_hwfn->mcp_info->capabilities &
p_hwfn           3663 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_get_capabilities(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           3668 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_GET_MFW_FEATURE_SUPPORT,
p_hwfn           3669 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			 0, &mcp_resp, &p_hwfn->mcp_info->capabilities);
p_hwfn           3671 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_VERBOSE(p_hwfn, (QED_MSG_SP | NETIF_MSG_PROBE),
p_hwfn           3673 drivers/net/ethernet/qlogic/qed/qed_mcp.c 			   p_hwfn->mcp_info->capabilities);
p_hwfn           3678 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_set_capabilities(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           3685 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	return qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_FEATURE_SUPPORT,
p_hwfn           3689 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_get_engine_config(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           3692 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn           3697 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
p_hwfn           3702 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_INFO(p_hwfn,
p_hwfn           3721 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_INFO(p_hwfn,
p_hwfn           3728 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_get_ppfid_bitmap(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           3731 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn           3735 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
p_hwfn           3740 drivers/net/ethernet/qlogic/qed/qed_mcp.c 		DP_INFO(p_hwfn,
p_hwfn           3748 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	DP_VERBOSE(p_hwfn, QED_MSG_SP, "PPFID bitmap 0x%hhx\n",
p_hwfn           3754 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_nvm_get_cfg(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
p_hwfn           3776 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	rc = qed_mcp_nvm_rd_cmd(p_hwfn, p_ptt,
p_hwfn           3783 drivers/net/ethernet/qlogic/qed/qed_mcp.c int qed_mcp_nvm_set_cfg(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
p_hwfn           3810 drivers/net/ethernet/qlogic/qed/qed_mcp.c 	return qed_mcp_nvm_wr_cmd(p_hwfn, p_ptt,
p_hwfn            286 drivers/net/ethernet/qlogic/qed/qed_mcp.h 	*qed_mcp_get_link_capabilities(struct qed_hwfn *p_hwfn);
p_hwfn            297 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_set_link(struct qed_hwfn   *p_hwfn,
p_hwfn            311 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_get_mfw_ver(struct qed_hwfn *p_hwfn,
p_hwfn            324 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_get_mbi_ver(struct qed_hwfn *p_hwfn,
p_hwfn            338 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_get_media_type(struct qed_hwfn *p_hwfn,
p_hwfn            353 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_get_transceiver_data(struct qed_hwfn *p_hwfn,
p_hwfn            370 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_trans_speed_mask(struct qed_hwfn *p_hwfn,
p_hwfn            384 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_get_board_config(struct qed_hwfn *p_hwfn,
p_hwfn            404 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_cmd(struct qed_hwfn *p_hwfn,
p_hwfn            418 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_drain(struct qed_hwfn *p_hwfn,
p_hwfn            430 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_get_flash_size(struct qed_hwfn     *p_hwfn,
p_hwfn            445 drivers/net/ethernet/qlogic/qed/qed_mcp.h qed_mcp_send_drv_version(struct qed_hwfn *p_hwfn,
p_hwfn            457 drivers/net/ethernet/qlogic/qed/qed_mcp.h u32 qed_get_process_kill_counter(struct qed_hwfn *p_hwfn,
p_hwfn            468 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_start_recovery_process(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn            490 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_ov_update_current_config(struct qed_hwfn *p_hwfn,
p_hwfn            503 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_ov_update_driver_state(struct qed_hwfn *p_hwfn,
p_hwfn            516 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_ov_update_mtu(struct qed_hwfn *p_hwfn,
p_hwfn            528 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_ov_update_mac(struct qed_hwfn *p_hwfn,
p_hwfn            540 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_ov_update_wol(struct qed_hwfn *p_hwfn,
p_hwfn            553 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_set_led(struct qed_hwfn *p_hwfn,
p_hwfn            608 drivers/net/ethernet/qlogic/qed/qed_mcp.h qed_mcp_get_nvm_image_att(struct qed_hwfn *p_hwfn,
p_hwfn            622 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_get_nvm_image(struct qed_hwfn *p_hwfn,
p_hwfn            634 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_bist_register_test(struct qed_hwfn *p_hwfn,
p_hwfn            645 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_bist_clock_test(struct qed_hwfn *p_hwfn,
p_hwfn            658 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_bist_nvm_get_num_images(struct qed_hwfn *p_hwfn,
p_hwfn            672 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_bist_nvm_get_image_att(struct qed_hwfn *p_hwfn,
p_hwfn            686 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mfw_process_tlv_req(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn            694 drivers/net/ethernet/qlogic/qed/qed_mcp.h #define MCP_PF_ID_BY_REL(p_hwfn, rel_pfid) (QED_IS_BB((p_hwfn)->cdev) ?	       \
p_hwfn            696 drivers/net/ethernet/qlogic/qed/qed_mcp.h 					     ((p_hwfn)->abs_pf_id & 1) << 3) : \
p_hwfn            698 drivers/net/ethernet/qlogic/qed/qed_mcp.h #define MCP_PF_ID(p_hwfn) MCP_PF_ID_BY_REL(p_hwfn, (p_hwfn)->rel_pf_id)
p_hwfn            769 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_cmd_init(struct qed_hwfn *p_hwfn,
p_hwfn            779 drivers/net/ethernet/qlogic/qed/qed_mcp.h void qed_mcp_cmd_port_init(struct qed_hwfn *p_hwfn,
p_hwfn            790 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_free(struct qed_hwfn *p_hwfn);
p_hwfn            804 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_handle_events(struct qed_hwfn *p_hwfn,
p_hwfn            833 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_load_req(struct qed_hwfn *p_hwfn,
p_hwfn            845 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_load_done(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn            855 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_unload_req(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn            865 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_unload_done(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn            873 drivers/net/ethernet/qlogic/qed/qed_mcp.h void qed_mcp_read_mb(struct qed_hwfn *p_hwfn,
p_hwfn            885 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_ack_vf_flr(struct qed_hwfn *p_hwfn,
p_hwfn            895 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_fill_shmem_func_info(struct qed_hwfn *p_hwfn,
p_hwfn            906 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_reset(struct qed_hwfn *p_hwfn,
p_hwfn            925 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_nvm_rd_cmd(struct qed_hwfn *p_hwfn,
p_hwfn            945 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_phy_sfp_read(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
p_hwfn            955 drivers/net/ethernet/qlogic/qed/qed_mcp.h bool qed_mcp_is_init(struct qed_hwfn *p_hwfn);
p_hwfn            967 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_config_vf_msix(struct qed_hwfn *p_hwfn,
p_hwfn            978 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_halt(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn            988 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_resume(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn            992 drivers/net/ethernet/qlogic/qed/qed_mcp.h int __qed_configure_pf_max_bandwidth(struct qed_hwfn *p_hwfn,
p_hwfn            996 drivers/net/ethernet/qlogic/qed/qed_mcp.h int __qed_configure_pf_min_bandwidth(struct qed_hwfn *p_hwfn,
p_hwfn           1001 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_mask_parities(struct qed_hwfn *p_hwfn,
p_hwfn           1016 drivers/net/ethernet/qlogic/qed/qed_mcp.h qed_mcp_set_resc_max_val(struct qed_hwfn *p_hwfn,
p_hwfn           1034 drivers/net/ethernet/qlogic/qed/qed_mcp.h qed_mcp_get_resc_info(struct qed_hwfn *p_hwfn,
p_hwfn           1048 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_ov_update_eswitch(struct qed_hwfn *p_hwfn,
p_hwfn           1073 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_initiate_pf_flr(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn           1113 drivers/net/ethernet/qlogic/qed/qed_mcp.h qed_mcp_resc_lock(struct qed_hwfn *p_hwfn,
p_hwfn           1137 drivers/net/ethernet/qlogic/qed/qed_mcp.h qed_mcp_resc_unlock(struct qed_hwfn *p_hwfn,
p_hwfn           1161 drivers/net/ethernet/qlogic/qed/qed_mcp.h bool qed_mcp_is_smart_an_supported(struct qed_hwfn *p_hwfn);
p_hwfn           1169 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_get_capabilities(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn           1178 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_set_capabilities(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn           1186 drivers/net/ethernet/qlogic/qed/qed_mcp.h void qed_mcp_read_ufp_config(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn           1193 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_nvm_info_populate(struct qed_hwfn *p_hwfn);
p_hwfn           1201 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_get_engine_config(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn           1209 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_get_ppfid_bitmap(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn           1222 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_nvm_get_cfg(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
p_hwfn           1237 drivers/net/ethernet/qlogic/qed/qed_mcp.h int qed_mcp_nvm_set_cfg(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
p_hwfn           1177 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c static int qed_mfw_update_tlvs(struct qed_hwfn *p_hwfn,
p_hwfn           1191 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c 	if (qed_mfw_fill_tlv_data(p_hwfn, tlv_group, p_tlv_data)) {
p_hwfn           1204 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c 		DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn           1242 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c int qed_mfw_process_tlv_req(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           1249 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c 	addr = SECTION_OFFSIZE_ADDR(p_hwfn->mcp_info->public_base,
p_hwfn           1251 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c 	global_offsize = qed_rd(p_hwfn, p_ptt, addr);
p_hwfn           1254 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c 	addr = qed_rd(p_hwfn, p_ptt, addr);
p_hwfn           1255 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c 	size = qed_rd(p_hwfn, p_ptt, global_addr +
p_hwfn           1259 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c 		DP_NOTICE(p_hwfn, "Invalid TLV req size = %d\n", size);
p_hwfn           1265 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c 		DP_NOTICE(p_hwfn, "Failed allocate memory for p_mfw_buf\n");
p_hwfn           1276 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c 		val = qed_rd(p_hwfn, p_ptt, addr + offset);
p_hwfn           1288 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c 			DP_VERBOSE(p_hwfn, NETIF_MSG_DRV,
p_hwfn           1293 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c 	if ((tlv_group & QED_MFW_TLV_ETH) && !QED_IS_L2_PERSONALITY(p_hwfn)) {
p_hwfn           1294 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c 		DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn           1300 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c 	    p_hwfn->hw_info.personality != QED_PCI_FCOE) {
p_hwfn           1301 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c 		DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn           1307 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c 	    p_hwfn->hw_info.personality != QED_PCI_ISCSI) {
p_hwfn           1308 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c 		DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn           1316 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c 			if (qed_mfw_update_tlvs(p_hwfn, id, p_mfw_buf, size))
p_hwfn           1327 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c 		qed_wr(p_hwfn, p_ptt, addr + offset, val);
p_hwfn           1331 drivers/net/ethernet/qlogic/qed/qed_mng_tlv.c 	rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_GET_TLV_DONE, 0, &resp,
p_hwfn             47 drivers/net/ethernet/qlogic/qed/qed_ooo.c *qed_ooo_seek_archipelago(struct qed_hwfn *p_hwfn,
p_hwfn             66 drivers/net/ethernet/qlogic/qed/qed_ooo.c static struct qed_ooo_isle *qed_ooo_seek_isle(struct qed_hwfn *p_hwfn,
p_hwfn             74 drivers/net/ethernet/qlogic/qed/qed_ooo.c 	p_archipelago = qed_ooo_seek_archipelago(p_hwfn, p_ooo_info, cid);
p_hwfn             76 drivers/net/ethernet/qlogic/qed/qed_ooo.c 		DP_NOTICE(p_hwfn,
p_hwfn             90 drivers/net/ethernet/qlogic/qed/qed_ooo.c void qed_ooo_save_history_entry(struct qed_hwfn *p_hwfn,
p_hwfn            102 drivers/net/ethernet/qlogic/qed/qed_ooo.c int qed_ooo_alloc(struct qed_hwfn *p_hwfn)
p_hwfn            110 drivers/net/ethernet/qlogic/qed/qed_ooo.c 	switch (p_hwfn->hw_info.personality) {
p_hwfn            119 drivers/net/ethernet/qlogic/qed/qed_ooo.c 		DP_NOTICE(p_hwfn,
p_hwfn            124 drivers/net/ethernet/qlogic/qed/qed_ooo.c 	max_num_archipelagos = (u16)qed_cxt_get_proto_cid_count(p_hwfn, proto,
p_hwfn            127 drivers/net/ethernet/qlogic/qed/qed_ooo.c 	cid_base = (u16)qed_cxt_get_proto_cid_start(p_hwfn, proto);
p_hwfn            130 drivers/net/ethernet/qlogic/qed/qed_ooo.c 		DP_NOTICE(p_hwfn,
p_hwfn            177 drivers/net/ethernet/qlogic/qed/qed_ooo.c 	p_hwfn->p_ooo_info = p_ooo_info;
p_hwfn            189 drivers/net/ethernet/qlogic/qed/qed_ooo.c void qed_ooo_release_connection_isles(struct qed_hwfn *p_hwfn,
p_hwfn            196 drivers/net/ethernet/qlogic/qed/qed_ooo.c 	p_archipelago = qed_ooo_seek_archipelago(p_hwfn, p_ooo_info, cid);
p_hwfn            222 drivers/net/ethernet/qlogic/qed/qed_ooo.c void qed_ooo_release_all_isles(struct qed_hwfn *p_hwfn,
p_hwfn            261 drivers/net/ethernet/qlogic/qed/qed_ooo.c void qed_ooo_setup(struct qed_hwfn *p_hwfn)
p_hwfn            263 drivers/net/ethernet/qlogic/qed/qed_ooo.c 	qed_ooo_release_all_isles(p_hwfn, p_hwfn->p_ooo_info);
p_hwfn            264 drivers/net/ethernet/qlogic/qed/qed_ooo.c 	memset(p_hwfn->p_ooo_info->ooo_history.p_cqes, 0,
p_hwfn            265 drivers/net/ethernet/qlogic/qed/qed_ooo.c 	       p_hwfn->p_ooo_info->ooo_history.num_of_cqes *
p_hwfn            267 drivers/net/ethernet/qlogic/qed/qed_ooo.c 	p_hwfn->p_ooo_info->ooo_history.head_idx = 0;
p_hwfn            270 drivers/net/ethernet/qlogic/qed/qed_ooo.c void qed_ooo_free(struct qed_hwfn *p_hwfn)
p_hwfn            272 drivers/net/ethernet/qlogic/qed/qed_ooo.c 	struct qed_ooo_info *p_ooo_info  = p_hwfn->p_ooo_info;
p_hwfn            278 drivers/net/ethernet/qlogic/qed/qed_ooo.c 	qed_ooo_release_all_isles(p_hwfn, p_ooo_info);
p_hwfn            287 drivers/net/ethernet/qlogic/qed/qed_ooo.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            298 drivers/net/ethernet/qlogic/qed/qed_ooo.c 	p_hwfn->p_ooo_info = NULL;
p_hwfn            301 drivers/net/ethernet/qlogic/qed/qed_ooo.c void qed_ooo_put_free_buffer(struct qed_hwfn *p_hwfn,
p_hwfn            308 drivers/net/ethernet/qlogic/qed/qed_ooo.c struct qed_ooo_buffer *qed_ooo_get_free_buffer(struct qed_hwfn *p_hwfn,
p_hwfn            323 drivers/net/ethernet/qlogic/qed/qed_ooo.c void qed_ooo_put_ready_buffer(struct qed_hwfn *p_hwfn,
p_hwfn            335 drivers/net/ethernet/qlogic/qed/qed_ooo.c struct qed_ooo_buffer *qed_ooo_get_ready_buffer(struct qed_hwfn *p_hwfn,
p_hwfn            350 drivers/net/ethernet/qlogic/qed/qed_ooo.c void qed_ooo_delete_isles(struct qed_hwfn *p_hwfn,
p_hwfn            358 drivers/net/ethernet/qlogic/qed/qed_ooo.c 		p_isle = qed_ooo_seek_isle(p_hwfn, p_ooo_info, cid, drop_isle);
p_hwfn            360 drivers/net/ethernet/qlogic/qed/qed_ooo.c 			DP_NOTICE(p_hwfn,
p_hwfn            366 drivers/net/ethernet/qlogic/qed/qed_ooo.c 			DP_NOTICE(p_hwfn,
p_hwfn            378 drivers/net/ethernet/qlogic/qed/qed_ooo.c void qed_ooo_add_new_isle(struct qed_hwfn *p_hwfn,
p_hwfn            388 drivers/net/ethernet/qlogic/qed/qed_ooo.c 		p_prev_isle = qed_ooo_seek_isle(p_hwfn,
p_hwfn            391 drivers/net/ethernet/qlogic/qed/qed_ooo.c 			DP_NOTICE(p_hwfn,
p_hwfn            397 drivers/net/ethernet/qlogic/qed/qed_ooo.c 	p_archipelago = qed_ooo_seek_archipelago(p_hwfn, p_ooo_info, cid);
p_hwfn            399 drivers/net/ethernet/qlogic/qed/qed_ooo.c 		DP_NOTICE(p_hwfn,
p_hwfn            410 drivers/net/ethernet/qlogic/qed/qed_ooo.c 			DP_NOTICE(p_hwfn, "Free isle is not empty\n");
p_hwfn            414 drivers/net/ethernet/qlogic/qed/qed_ooo.c 		DP_NOTICE(p_hwfn, "No more free isles\n");
p_hwfn            437 drivers/net/ethernet/qlogic/qed/qed_ooo.c void qed_ooo_add_new_buffer(struct qed_hwfn *p_hwfn,
p_hwfn            445 drivers/net/ethernet/qlogic/qed/qed_ooo.c 	p_isle = qed_ooo_seek_isle(p_hwfn, p_ooo_info, cid, ooo_isle);
p_hwfn            447 drivers/net/ethernet/qlogic/qed/qed_ooo.c 		DP_NOTICE(p_hwfn,
p_hwfn            458 drivers/net/ethernet/qlogic/qed/qed_ooo.c void qed_ooo_join_isles(struct qed_hwfn *p_hwfn,
p_hwfn            464 drivers/net/ethernet/qlogic/qed/qed_ooo.c 	p_right_isle = qed_ooo_seek_isle(p_hwfn, p_ooo_info, cid,
p_hwfn            467 drivers/net/ethernet/qlogic/qed/qed_ooo.c 		DP_NOTICE(p_hwfn,
p_hwfn            476 drivers/net/ethernet/qlogic/qed/qed_ooo.c 		p_left_isle = qed_ooo_seek_isle(p_hwfn, p_ooo_info, cid,
p_hwfn            479 drivers/net/ethernet/qlogic/qed/qed_ooo.c 			DP_NOTICE(p_hwfn,
p_hwfn             87 drivers/net/ethernet/qlogic/qed/qed_ooo.h void qed_ooo_save_history_entry(struct qed_hwfn *p_hwfn,
p_hwfn             91 drivers/net/ethernet/qlogic/qed/qed_ooo.h int qed_ooo_alloc(struct qed_hwfn *p_hwfn);
p_hwfn             93 drivers/net/ethernet/qlogic/qed/qed_ooo.h void qed_ooo_setup(struct qed_hwfn *p_hwfn);
p_hwfn             95 drivers/net/ethernet/qlogic/qed/qed_ooo.h void qed_ooo_free(struct qed_hwfn *p_hwfn);
p_hwfn             97 drivers/net/ethernet/qlogic/qed/qed_ooo.h void qed_ooo_release_connection_isles(struct qed_hwfn *p_hwfn,
p_hwfn            101 drivers/net/ethernet/qlogic/qed/qed_ooo.h void qed_ooo_release_all_isles(struct qed_hwfn *p_hwfn,
p_hwfn            104 drivers/net/ethernet/qlogic/qed/qed_ooo.h void qed_ooo_put_free_buffer(struct qed_hwfn *p_hwfn,
p_hwfn            109 drivers/net/ethernet/qlogic/qed/qed_ooo.h qed_ooo_get_free_buffer(struct qed_hwfn *p_hwfn,
p_hwfn            112 drivers/net/ethernet/qlogic/qed/qed_ooo.h void qed_ooo_put_ready_buffer(struct qed_hwfn *p_hwfn,
p_hwfn            117 drivers/net/ethernet/qlogic/qed/qed_ooo.h qed_ooo_get_ready_buffer(struct qed_hwfn *p_hwfn,
p_hwfn            120 drivers/net/ethernet/qlogic/qed/qed_ooo.h void qed_ooo_delete_isles(struct qed_hwfn *p_hwfn,
p_hwfn            124 drivers/net/ethernet/qlogic/qed/qed_ooo.h void qed_ooo_add_new_isle(struct qed_hwfn *p_hwfn,
p_hwfn            129 drivers/net/ethernet/qlogic/qed/qed_ooo.h void qed_ooo_add_new_buffer(struct qed_hwfn *p_hwfn,
p_hwfn            135 drivers/net/ethernet/qlogic/qed/qed_ooo.h void qed_ooo_join_isles(struct qed_hwfn *p_hwfn,
p_hwfn            139 drivers/net/ethernet/qlogic/qed/qed_ooo.h static inline void qed_ooo_save_history_entry(struct qed_hwfn *p_hwfn,
p_hwfn            143 drivers/net/ethernet/qlogic/qed/qed_ooo.h static inline int qed_ooo_alloc(struct qed_hwfn *p_hwfn)
p_hwfn            148 drivers/net/ethernet/qlogic/qed/qed_ooo.h static inline void qed_ooo_setup(struct qed_hwfn *p_hwfn) {}
p_hwfn            150 drivers/net/ethernet/qlogic/qed/qed_ooo.h static inline void qed_ooo_free(struct qed_hwfn *p_hwfn) {}
p_hwfn            153 drivers/net/ethernet/qlogic/qed/qed_ooo.h qed_ooo_release_connection_isles(struct qed_hwfn *p_hwfn,
p_hwfn            157 drivers/net/ethernet/qlogic/qed/qed_ooo.h static inline void qed_ooo_release_all_isles(struct qed_hwfn *p_hwfn,
p_hwfn            161 drivers/net/ethernet/qlogic/qed/qed_ooo.h static inline void qed_ooo_put_free_buffer(struct qed_hwfn *p_hwfn,
p_hwfn            166 drivers/net/ethernet/qlogic/qed/qed_ooo.h qed_ooo_get_free_buffer(struct qed_hwfn *p_hwfn,
p_hwfn            169 drivers/net/ethernet/qlogic/qed/qed_ooo.h static inline void qed_ooo_put_ready_buffer(struct qed_hwfn *p_hwfn,
p_hwfn            175 drivers/net/ethernet/qlogic/qed/qed_ooo.h qed_ooo_get_ready_buffer(struct qed_hwfn *p_hwfn,
p_hwfn            178 drivers/net/ethernet/qlogic/qed/qed_ooo.h static inline void qed_ooo_delete_isles(struct qed_hwfn *p_hwfn,
p_hwfn            182 drivers/net/ethernet/qlogic/qed/qed_ooo.h static inline void qed_ooo_add_new_isle(struct qed_hwfn *p_hwfn,
p_hwfn            187 drivers/net/ethernet/qlogic/qed/qed_ooo.h static inline void qed_ooo_add_new_buffer(struct qed_hwfn *p_hwfn,
p_hwfn            193 drivers/net/ethernet/qlogic/qed/qed_ooo.h static inline void qed_ooo_join_isles(struct qed_hwfn *p_hwfn,
p_hwfn             50 drivers/net/ethernet/qlogic/qed/qed_ptp.c static enum qed_resc_lock qed_ptcdev_to_resc(struct qed_hwfn *p_hwfn)
p_hwfn             52 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	switch (MFW_PORT(p_hwfn)) {
p_hwfn             66 drivers/net/ethernet/qlogic/qed/qed_ptp.c static int qed_ptp_res_lock(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn             72 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	resource = qed_ptcdev_to_resc(p_hwfn);
p_hwfn             78 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	rc = qed_mcp_resc_lock(p_hwfn, p_ptt, &params);
p_hwfn             85 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		if (p_hwfn->abs_pf_id < p_hwfn->cdev->num_ports_in_engine)
p_hwfn             88 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		DP_INFO(p_hwfn, "PF doesn't have lock ownership\n");
p_hwfn             91 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		DP_INFO(p_hwfn, "Failed to acquire ptp resource lock\n");
p_hwfn             98 drivers/net/ethernet/qlogic/qed/qed_ptp.c static int qed_ptp_res_unlock(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn            104 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	resource = qed_ptcdev_to_resc(p_hwfn);
p_hwfn            110 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	rc = qed_mcp_resc_unlock(p_hwfn, p_ptt, &params);
p_hwfn            113 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		if (p_hwfn->abs_pf_id < p_hwfn->cdev->num_ports_in_engine) {
p_hwfn            116 drivers/net/ethernet/qlogic/qed/qed_ptp.c 			DP_INFO(p_hwfn, "PF doesn't have lock ownership\n");
p_hwfn            120 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		DP_INFO(p_hwfn, "Failed to release the ptp resource lock\n");
p_hwfn            129 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn            130 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	struct qed_ptt *p_ptt = p_hwfn->p_ptp_ptt;
p_hwfn            134 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	val = qed_rd(p_hwfn, p_ptt, NIG_REG_LLH_PTP_HOST_BUF_SEQID);
p_hwfn            136 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		DP_INFO(p_hwfn, "Invalid Rx timestamp, buf_seqid = %d\n", val);
p_hwfn            140 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	val = qed_rd(p_hwfn, p_ptt, NIG_REG_LLH_PTP_HOST_BUF_TS_LSB);
p_hwfn            141 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	*timestamp = qed_rd(p_hwfn, p_ptt, NIG_REG_LLH_PTP_HOST_BUF_TS_MSB);
p_hwfn            146 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_LLH_PTP_HOST_BUF_SEQID,
p_hwfn            155 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn            156 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	struct qed_ptt *p_ptt = p_hwfn->p_ptp_ptt;
p_hwfn            160 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	val = qed_rd(p_hwfn, p_ptt, NIG_REG_TX_LLH_PTP_BUF_SEQID);
p_hwfn            162 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		DP_VERBOSE(p_hwfn, QED_MSG_DEBUG,
p_hwfn            167 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	val = qed_rd(p_hwfn, p_ptt, NIG_REG_TX_LLH_PTP_BUF_TS_LSB);
p_hwfn            168 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	*timestamp = qed_rd(p_hwfn, p_ptt, NIG_REG_TX_LLH_PTP_BUF_TS_MSB);
p_hwfn            173 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_TX_LLH_PTP_BUF_SEQID, QED_TIMESTAMP_MASK);
p_hwfn            181 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn            182 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	struct qed_ptt *p_ptt = p_hwfn->p_ptp_ptt;
p_hwfn            185 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	temp = qed_rd(p_hwfn, p_ptt, NIG_REG_TSGEN_SYNC_TIME_LSB);
p_hwfn            186 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	*phc_cycles = qed_rd(p_hwfn, p_ptt, NIG_REG_TSGEN_SYNC_TIME_MSB);
p_hwfn            198 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn            199 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	struct qed_ptt *p_ptt = p_hwfn->p_ptp_ptt;
p_hwfn            244 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		DP_INFO(p_hwfn, "Invalid PTP filter type %d\n", rx_type);
p_hwfn            248 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_LLH_PTP_PARAM_MASK,
p_hwfn            250 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_LLH_PTP_RULE_MASK, rule_mask);
p_hwfn            251 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_RX_PTP_EN, enable_cfg);
p_hwfn            254 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		qed_wr(p_hwfn, p_ptt, NIG_REG_TX_PTP_EN, 0x0);
p_hwfn            255 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		qed_wr(p_hwfn, p_ptt, NIG_REG_TX_LLH_PTP_PARAM_MASK, 0x7FF);
p_hwfn            256 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		qed_wr(p_hwfn, p_ptt, NIG_REG_TX_LLH_PTP_RULE_MASK, 0x3FFF);
p_hwfn            258 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		qed_wr(p_hwfn, p_ptt, NIG_REG_TX_PTP_EN, enable_cfg);
p_hwfn            259 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		qed_wr(p_hwfn, p_ptt, NIG_REG_TX_LLH_PTP_PARAM_MASK,
p_hwfn            261 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		qed_wr(p_hwfn, p_ptt, NIG_REG_TX_LLH_PTP_RULE_MASK, rule_mask);
p_hwfn            265 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_LLH_PTP_HOST_BUF_SEQID,
p_hwfn            281 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn            282 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	struct qed_ptt *p_ptt = p_hwfn->p_ptp_ptt;
p_hwfn            347 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_TSGEN_RST_DRIFT_CNTR, 0x1);
p_hwfn            349 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	drift_state = qed_rd(p_hwfn, p_ptt, NIG_REG_TSGEN_RST_DRIFT_CNTR);
p_hwfn            351 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		qed_wr(p_hwfn, p_ptt, NIG_REG_TSGEN_DRIFT_CNTR_CONF,
p_hwfn            354 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		DP_INFO(p_hwfn, "Drift counter is not reset\n");
p_hwfn            358 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_TSGEN_RST_DRIFT_CNTR, 0x0);
p_hwfn            365 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn            369 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn            371 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		DP_NOTICE(p_hwfn, "Failed to acquire PTT for PTP\n");
p_hwfn            375 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	p_hwfn->p_ptp_ptt = p_ptt;
p_hwfn            377 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	rc = qed_ptp_res_lock(p_hwfn, p_ptt);
p_hwfn            379 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		DP_INFO(p_hwfn,
p_hwfn            381 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		qed_ptt_release(p_hwfn, p_ptt);
p_hwfn            382 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		p_hwfn->p_ptp_ptt = NULL;
p_hwfn            387 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_LLH_PTP_PARAM_MASK, 0x7FF);
p_hwfn            388 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_LLH_PTP_RULE_MASK, 0x3FFF);
p_hwfn            389 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_TX_LLH_PTP_PARAM_MASK, 0x7FF);
p_hwfn            390 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_TX_LLH_PTP_RULE_MASK, 0x3FFF);
p_hwfn            392 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_TX_PTP_EN, 7);
p_hwfn            393 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_RX_PTP_EN, 7);
p_hwfn            395 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_TS_OUTPUT_ENABLE_PDA, 0x1);
p_hwfn            398 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	if (QED_IS_BB_B0(p_hwfn->cdev))
p_hwfn            399 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		qed_wr(p_hwfn, p_ptt, NIG_REG_TIMESYNC_GEN_REG_BB, 2);
p_hwfn            400 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	if (QED_IS_AH(p_hwfn->cdev))
p_hwfn            401 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		qed_wr(p_hwfn, p_ptt, NIG_REG_TSGEN_FREECNT_UPDATE_K2, 2);
p_hwfn            403 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_TSGEN_FREE_CNT_VALUE_LSB, 0);
p_hwfn            404 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_TSGEN_FREE_CNT_VALUE_MSB, 0);
p_hwfn            406 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	if (QED_IS_BB_B0(p_hwfn->cdev))
p_hwfn            407 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		qed_wr(p_hwfn, p_ptt, NIG_REG_TIMESYNC_GEN_REG_BB, 4);
p_hwfn            408 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	if (QED_IS_AH(p_hwfn->cdev)) {
p_hwfn            409 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		qed_wr(p_hwfn, p_ptt, NIG_REG_TSGEN_FREECNT_UPDATE_K2, 4);
p_hwfn            410 drivers/net/ethernet/qlogic/qed/qed_ptp.c 		qed_wr(p_hwfn, p_ptt, NIG_REG_PTP_LATCH_OSTS_PKT_TIME, 1);
p_hwfn            414 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_TSGEN_DRIFT_CNTR_CONF, 0x0);
p_hwfn            415 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_TSGEN_RST_DRIFT_CNTR, 0x0);
p_hwfn            418 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_LLH_PTP_HOST_BUF_SEQID,
p_hwfn            420 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_TX_LLH_PTP_BUF_SEQID, QED_TIMESTAMP_MASK);
p_hwfn            427 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn            428 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	struct qed_ptt *p_ptt = p_hwfn->p_ptp_ptt;
p_hwfn            430 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_ptp_res_unlock(p_hwfn, p_ptt);
p_hwfn            433 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_LLH_PTP_PARAM_MASK, 0x7FF);
p_hwfn            434 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_LLH_PTP_RULE_MASK, 0x3FFF);
p_hwfn            436 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_TX_LLH_PTP_PARAM_MASK, 0x7FF);
p_hwfn            437 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_TX_LLH_PTP_RULE_MASK, 0x3FFF);
p_hwfn            440 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_RX_PTP_EN, 0x0);
p_hwfn            441 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_wr(p_hwfn, p_ptt, NIG_REG_TX_PTP_EN, 0x0);
p_hwfn            443 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn            444 drivers/net/ethernet/qlogic/qed/qed_ptp.c 	p_hwfn->p_ptp_ptt = NULL;
p_hwfn             62 drivers/net/ethernet/qlogic/qed/qed_rdma.c int qed_rdma_bmap_alloc(struct qed_hwfn *p_hwfn,
p_hwfn             65 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "max_count = %08x\n", max_count);
p_hwfn             76 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "0\n");
p_hwfn             80 drivers/net/ethernet/qlogic/qed/qed_rdma.c int qed_rdma_bmap_alloc_id(struct qed_hwfn *p_hwfn,
p_hwfn             89 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "%s bitmap: allocated id %d\n",
p_hwfn             95 drivers/net/ethernet/qlogic/qed/qed_rdma.c void qed_bmap_set_id(struct qed_hwfn *p_hwfn,
p_hwfn            104 drivers/net/ethernet/qlogic/qed/qed_rdma.c void qed_bmap_release_id(struct qed_hwfn *p_hwfn,
p_hwfn            114 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_NOTICE(p_hwfn, "%s bitmap: id %d already released\n",
p_hwfn            119 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "%s bitmap: released id %d\n",
p_hwfn            123 drivers/net/ethernet/qlogic/qed/qed_rdma.c int qed_bmap_test_id(struct qed_hwfn *p_hwfn,
p_hwfn            137 drivers/net/ethernet/qlogic/qed/qed_rdma.c static u32 qed_rdma_get_sb_id(void *p_hwfn, u32 rel_sb_id)
p_hwfn            140 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	return FEAT_NUM((struct qed_hwfn *)p_hwfn, QED_PF_L2_QUE) + rel_sb_id;
p_hwfn            143 drivers/net/ethernet/qlogic/qed/qed_rdma.c int qed_rdma_info_alloc(struct qed_hwfn *p_hwfn)
p_hwfn            153 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	p_hwfn->p_rdma_info = p_rdma_info;
p_hwfn            157 drivers/net/ethernet/qlogic/qed/qed_rdma.c void qed_rdma_info_free(struct qed_hwfn *p_hwfn)
p_hwfn            159 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	kfree(p_hwfn->p_rdma_info);
p_hwfn            160 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	p_hwfn->p_rdma_info = NULL;
p_hwfn            163 drivers/net/ethernet/qlogic/qed/qed_rdma.c static int qed_rdma_alloc(struct qed_hwfn *p_hwfn)
p_hwfn            165 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_rdma_info *p_rdma_info = p_hwfn->p_rdma_info;
p_hwfn            169 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Allocating RDMA\n");
p_hwfn            171 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	if (QED_IS_IWARP_PERSONALITY(p_hwfn))
p_hwfn            176 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	num_cons = qed_cxt_get_proto_cid_count(p_hwfn, p_rdma_info->proto,
p_hwfn            179 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	if (QED_IS_IWARP_PERSONALITY(p_hwfn))
p_hwfn            184 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	num_tasks = qed_cxt_get_proto_tid_count(p_hwfn, PROTOCOLID_ROCE);
p_hwfn            192 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	p_rdma_info->queue_zone_base = (u16)RESC_START(p_hwfn, QED_L2_QUEUE);
p_hwfn            193 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	p_rdma_info->max_queue_zones = (u16)RESC_NUM(p_hwfn, QED_L2_QUEUE);
p_hwfn            206 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_rdma_bmap_alloc(p_hwfn, &p_rdma_info->pd_map, RDMA_MAX_PDS,
p_hwfn            209 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn            216 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_rdma_bmap_alloc(p_hwfn, &p_rdma_info->dpi_map,
p_hwfn            217 drivers/net/ethernet/qlogic/qed/qed_rdma.c 				 p_hwfn->dpi_count, "DPI");
p_hwfn            219 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn            228 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_rdma_bmap_alloc(p_hwfn, &p_rdma_info->cq_map, num_cons, "CQ");
p_hwfn            230 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn            239 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_rdma_bmap_alloc(p_hwfn, &p_rdma_info->toggle_bits,
p_hwfn            242 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn            248 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_rdma_bmap_alloc(p_hwfn, &p_rdma_info->tid_map,
p_hwfn            251 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn            257 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_rdma_bmap_alloc(p_hwfn, &p_rdma_info->cid_map, num_cons,
p_hwfn            260 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn            266 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_rdma_bmap_alloc(p_hwfn, &p_rdma_info->real_cid_map, num_cons,
p_hwfn            269 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn            275 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	p_rdma_info->num_srqs = qed_cxt_get_srq_count(p_hwfn);
p_hwfn            276 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_rdma_bmap_alloc(p_hwfn, &p_rdma_info->srq_map,
p_hwfn            279 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn            284 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	if (QED_IS_IWARP_PERSONALITY(p_hwfn))
p_hwfn            285 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		rc = qed_iwarp_alloc(p_hwfn);
p_hwfn            290 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Allocation successful\n");
p_hwfn            317 drivers/net/ethernet/qlogic/qed/qed_rdma.c void qed_rdma_bmap_free(struct qed_hwfn *p_hwfn,
p_hwfn            331 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_NOTICE(p_hwfn,
p_hwfn            338 drivers/net/ethernet/qlogic/qed/qed_rdma.c 			DP_NOTICE(p_hwfn,
p_hwfn            357 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_NOTICE(p_hwfn, "%s\n", str_last_line);
p_hwfn            365 drivers/net/ethernet/qlogic/qed/qed_rdma.c static void qed_rdma_resc_free(struct qed_hwfn *p_hwfn)
p_hwfn            367 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_rdma_info *p_rdma_info = p_hwfn->p_rdma_info;
p_hwfn            369 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	if (QED_IS_IWARP_PERSONALITY(p_hwfn))
p_hwfn            370 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		qed_iwarp_resc_free(p_hwfn);
p_hwfn            372 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_rdma_bmap_free(p_hwfn, &p_hwfn->p_rdma_info->cid_map, 1);
p_hwfn            373 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_rdma_bmap_free(p_hwfn, &p_hwfn->p_rdma_info->pd_map, 1);
p_hwfn            374 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_rdma_bmap_free(p_hwfn, &p_hwfn->p_rdma_info->dpi_map, 1);
p_hwfn            375 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_rdma_bmap_free(p_hwfn, &p_hwfn->p_rdma_info->cq_map, 1);
p_hwfn            376 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_rdma_bmap_free(p_hwfn, &p_hwfn->p_rdma_info->toggle_bits, 0);
p_hwfn            377 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_rdma_bmap_free(p_hwfn, &p_hwfn->p_rdma_info->tid_map, 1);
p_hwfn            378 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_rdma_bmap_free(p_hwfn, &p_hwfn->p_rdma_info->srq_map, 1);
p_hwfn            379 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_rdma_bmap_free(p_hwfn, &p_hwfn->p_rdma_info->real_cid_map, 1);
p_hwfn            387 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt;
p_hwfn            389 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "itid = %08x\n", itid);
p_hwfn            391 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_lock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            392 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_bmap_release_id(p_hwfn, &p_hwfn->p_rdma_info->tid_map, itid);
p_hwfn            393 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            396 drivers/net/ethernet/qlogic/qed/qed_rdma.c static void qed_rdma_free_reserved_lkey(struct qed_hwfn *p_hwfn)
p_hwfn            398 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_rdma_free_tid(p_hwfn, p_hwfn->p_rdma_info->dev->reserved_lkey);
p_hwfn            401 drivers/net/ethernet/qlogic/qed/qed_rdma.c static void qed_rdma_free(struct qed_hwfn *p_hwfn)
p_hwfn            403 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Freeing RDMA\n");
p_hwfn            405 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_rdma_free_reserved_lkey(p_hwfn);
p_hwfn            406 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_cxt_free_proto_ilt(p_hwfn, p_hwfn->p_rdma_info->proto);
p_hwfn            407 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_rdma_resc_free(p_hwfn);
p_hwfn            410 drivers/net/ethernet/qlogic/qed/qed_rdma.c static void qed_rdma_get_guid(struct qed_hwfn *p_hwfn, u8 *guid)
p_hwfn            412 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	guid[0] = p_hwfn->hw_info.hw_mac_addr[0] ^ 2;
p_hwfn            413 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	guid[1] = p_hwfn->hw_info.hw_mac_addr[1];
p_hwfn            414 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	guid[2] = p_hwfn->hw_info.hw_mac_addr[2];
p_hwfn            417 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	guid[5] = p_hwfn->hw_info.hw_mac_addr[3];
p_hwfn            418 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	guid[6] = p_hwfn->hw_info.hw_mac_addr[4];
p_hwfn            419 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	guid[7] = p_hwfn->hw_info.hw_mac_addr[5];
p_hwfn            422 drivers/net/ethernet/qlogic/qed/qed_rdma.c static void qed_rdma_init_events(struct qed_hwfn *p_hwfn,
p_hwfn            427 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	events = &p_hwfn->p_rdma_info->events;
p_hwfn            434 drivers/net/ethernet/qlogic/qed/qed_rdma.c static void qed_rdma_init_devinfo(struct qed_hwfn *p_hwfn,
p_hwfn            437 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_rdma_device *dev = p_hwfn->p_rdma_info->dev;
p_hwfn            438 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn            449 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_rdma_get_guid(p_hwfn, (u8 *)&dev->sys_image_guid);
p_hwfn            459 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	if (p_hwfn->cdev->rdma_max_srq_sge) {
p_hwfn            461 drivers/net/ethernet/qlogic/qed/qed_rdma.c 					 p_hwfn->cdev->rdma_max_srq_sge,
p_hwfn            471 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	dev->max_cnq = (u8)FEAT_NUM(p_hwfn, QED_RDMA_CNQ);
p_hwfn            479 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	num_qps = min_t(u64, num_qps, p_hwfn->p_rdma_info->num_qps);
p_hwfn            488 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	dev->max_mr = p_hwfn->p_rdma_info->num_mrs - 1;
p_hwfn            507 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	dev->max_srq = p_hwfn->p_rdma_info->num_srqs;
p_hwfn            514 drivers/net/ethernet/qlogic/qed/qed_rdma.c 					   p_hwfn->p_rdma_info->num_qps;
p_hwfn            518 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	dev->max_ah = p_hwfn->p_rdma_info->num_qps;
p_hwfn            519 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	dev->max_stats_queues = (u8)RESC_NUM(p_hwfn, QED_RDMA_STATS_QUEUE);
p_hwfn            539 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	if (QED_IS_IWARP_PERSONALITY(p_hwfn))
p_hwfn            540 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		qed_iwarp_init_devinfo(p_hwfn);
p_hwfn            543 drivers/net/ethernet/qlogic/qed/qed_rdma.c static void qed_rdma_init_port(struct qed_hwfn *p_hwfn)
p_hwfn            545 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_rdma_port *port = p_hwfn->p_rdma_info->port;
p_hwfn            546 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_rdma_device *dev = p_hwfn->p_rdma_info->dev;
p_hwfn            548 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	port->port_state = p_hwfn->mcp_info->link_output.link_up ?
p_hwfn            553 drivers/net/ethernet/qlogic/qed/qed_rdma.c 				    p_hwfn->cdev->rdma_max_sge),
p_hwfn            559 drivers/net/ethernet/qlogic/qed/qed_rdma.c static int qed_rdma_init_hw(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn            563 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Initializing HW\n");
p_hwfn            564 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	p_hwfn->b_rdma_enabled_in_prs = false;
p_hwfn            566 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	if (QED_IS_IWARP_PERSONALITY(p_hwfn))
p_hwfn            567 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		qed_iwarp_init_hw(p_hwfn, p_ptt);
p_hwfn            569 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		rc = qed_roce_init_hw(p_hwfn, p_ptt);
p_hwfn            574 drivers/net/ethernet/qlogic/qed/qed_rdma.c static int qed_rdma_start_fw(struct qed_hwfn *p_hwfn,
p_hwfn            588 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Starting FW\n");
p_hwfn            591 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	p_hwfn->p_rdma_info->num_cnqs = params->desired_cnq;
p_hwfn            595 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            598 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_sp_init_request(p_hwfn, &p_ent, RDMA_RAMROD_FUNC_INIT,
p_hwfn            599 drivers/net/ethernet/qlogic/qed/qed_rdma.c 				 p_hwfn->p_rdma_info->proto, &init_data);
p_hwfn            603 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	if (QED_IS_IWARP_PERSONALITY(p_hwfn)) {
p_hwfn            604 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		qed_iwarp_init_fw_ramrod(p_hwfn,
p_hwfn            612 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	p_params_header->cnq_start_offset = (u8)RESC_START(p_hwfn,
p_hwfn            622 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		sb_id = qed_rdma_get_sb_id(p_hwfn, cnq_id);
p_hwfn            623 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		igu_sb_id = qed_get_igu_sb_id(p_hwfn, sb_id);
p_hwfn            628 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		p_cnq_params->sb_index = p_hwfn->pf_params.rdma_pf_params.gl_pi;
p_hwfn            636 drivers/net/ethernet/qlogic/qed/qed_rdma.c 			cpu_to_le16(p_hwfn->p_rdma_info->queue_zone_base +
p_hwfn            640 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            645 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt;
p_hwfn            648 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Allocate TID\n");
p_hwfn            650 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_lock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            651 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_rdma_bmap_alloc_id(p_hwfn,
p_hwfn            652 drivers/net/ethernet/qlogic/qed/qed_rdma.c 				    &p_hwfn->p_rdma_info->tid_map, itid);
p_hwfn            653 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            657 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_cxt_dynamic_ilt_alloc(p_hwfn, QED_ELEM_TASK, *itid);
p_hwfn            659 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Allocate TID - done, rc = %d\n", rc);
p_hwfn            663 drivers/net/ethernet/qlogic/qed/qed_rdma.c static int qed_rdma_reserve_lkey(struct qed_hwfn *p_hwfn)
p_hwfn            665 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_rdma_device *dev = p_hwfn->p_rdma_info->dev;
p_hwfn            671 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_rdma_alloc_tid(p_hwfn, &dev->reserved_lkey);
p_hwfn            673 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_NOTICE(p_hwfn,
p_hwfn            681 drivers/net/ethernet/qlogic/qed/qed_rdma.c static int qed_rdma_setup(struct qed_hwfn *p_hwfn,
p_hwfn            687 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "RDMA setup\n");
p_hwfn            689 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_rdma_init_devinfo(p_hwfn, params);
p_hwfn            690 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_rdma_init_port(p_hwfn);
p_hwfn            691 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_rdma_init_events(p_hwfn, params);
p_hwfn            693 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_rdma_reserve_lkey(p_hwfn);
p_hwfn            697 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_rdma_init_hw(p_hwfn, p_ptt);
p_hwfn            701 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	if (QED_IS_IWARP_PERSONALITY(p_hwfn)) {
p_hwfn            702 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		rc = qed_iwarp_setup(p_hwfn, params);
p_hwfn            706 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		rc = qed_roce_setup(p_hwfn);
p_hwfn            711 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	return qed_rdma_start_fw(p_hwfn, params, p_ptt);
p_hwfn            716 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt;
p_hwfn            724 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "RDMA stop\n");
p_hwfn            726 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn            728 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Failed to acquire PTT\n");
p_hwfn            733 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_wr(p_hwfn, p_ptt, p_hwfn->rdma_prs_search_reg, 0);
p_hwfn            734 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	p_hwfn->b_rdma_enabled_in_prs = false;
p_hwfn            735 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	p_hwfn->p_rdma_info->active = 0;
p_hwfn            736 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_wr(p_hwfn, p_ptt, PRS_REG_ROCE_DEST_QP_MAX_PF, 0);
p_hwfn            738 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	ll2_ethertype_en = qed_rd(p_hwfn, p_ptt, PRS_REG_LIGHT_L2_ETHERTYPE_EN);
p_hwfn            740 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_wr(p_hwfn, p_ptt, PRS_REG_LIGHT_L2_ETHERTYPE_EN,
p_hwfn            743 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	if (QED_IS_IWARP_PERSONALITY(p_hwfn)) {
p_hwfn            744 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		rc = qed_iwarp_stop(p_hwfn);
p_hwfn            746 drivers/net/ethernet/qlogic/qed/qed_rdma.c 			qed_ptt_release(p_hwfn, p_ptt);
p_hwfn            750 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		qed_roce_stop(p_hwfn);
p_hwfn            753 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn            757 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            761 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_sp_init_request(p_hwfn, &p_ent, RDMA_RAMROD_FUNC_CLOSE,
p_hwfn            762 drivers/net/ethernet/qlogic/qed/qed_rdma.c 				 p_hwfn->p_rdma_info->proto, &init_data);
p_hwfn            768 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	p_ramrod->num_cnqs = p_hwfn->p_rdma_info->num_cnqs;
p_hwfn            769 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	p_ramrod->cnq_start_offset = (u8)RESC_START(p_hwfn, QED_RDMA_CNQ_RAM);
p_hwfn            771 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            774 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_rdma_free(p_hwfn);
p_hwfn            776 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "RDMA stop done, rc = %d\n", rc);
p_hwfn            783 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt;
p_hwfn            788 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Adding User\n");
p_hwfn            791 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_lock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            792 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_rdma_bmap_alloc_id(p_hwfn, &p_hwfn->p_rdma_info->dpi_map,
p_hwfn            794 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            799 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	dpi_start_offset = p_hwfn->dpi_start_offset;
p_hwfn            801 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	out_params->dpi_addr = p_hwfn->doorbells + dpi_start_offset +
p_hwfn            802 drivers/net/ethernet/qlogic/qed/qed_rdma.c 			       out_params->dpi * p_hwfn->dpi_size;
p_hwfn            804 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	out_params->dpi_phys_addr = p_hwfn->db_phys_addr +
p_hwfn            806 drivers/net/ethernet/qlogic/qed/qed_rdma.c 				    ((out_params->dpi) * p_hwfn->dpi_size);
p_hwfn            808 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	out_params->dpi_size = p_hwfn->dpi_size;
p_hwfn            809 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	out_params->wid_count = p_hwfn->wid_count;
p_hwfn            811 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Adding user - done, rc = %d\n", rc);
p_hwfn            817 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt;
p_hwfn            818 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_rdma_port *p_port = p_hwfn->p_rdma_info->port;
p_hwfn            821 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "RDMA Query port\n");
p_hwfn            824 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	p_link_output = &QED_LEADING_HWFN(p_hwfn->cdev)->mcp_info->link_output;
p_hwfn            838 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt;
p_hwfn            840 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Query device\n");
p_hwfn            843 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	return p_hwfn->p_rdma_info->dev;
p_hwfn            848 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn;
p_hwfn            852 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	p_hwfn = (struct qed_hwfn *)rdma_cxt;
p_hwfn            854 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	if (qz_offset > p_hwfn->p_rdma_info->max_queue_zones) {
p_hwfn            855 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_NOTICE(p_hwfn,
p_hwfn            857 drivers/net/ethernet/qlogic/qed/qed_rdma.c 			  qz_offset, p_hwfn->p_rdma_info->max_queue_zones);
p_hwfn            861 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qz_num = p_hwfn->p_rdma_info->queue_zone_base + qz_offset;
p_hwfn            865 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	REG_WR16(p_hwfn, addr, prod);
p_hwfn            874 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = QED_AFFIN_HWFN(cdev);
p_hwfn            878 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	info->rdma_type = QED_IS_ROCE_PERSONALITY(p_hwfn) ?
p_hwfn            881 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	info->user_dpm_enabled = (p_hwfn->db_bar_no_edpm == 0);
p_hwfn            956 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt;
p_hwfn            960 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Alloc PD\n");
p_hwfn            963 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_lock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            964 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_rdma_bmap_alloc_id(p_hwfn,
p_hwfn            965 drivers/net/ethernet/qlogic/qed/qed_rdma.c 				    &p_hwfn->p_rdma_info->pd_map, &returned_id);
p_hwfn            966 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            970 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Alloc PD - done, rc = %d\n", rc);
p_hwfn            976 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt;
p_hwfn            978 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "pd = %08x\n", pd);
p_hwfn            981 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_lock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            982 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_bmap_release_id(p_hwfn, &p_hwfn->p_rdma_info->pd_map, pd);
p_hwfn            983 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            987 drivers/net/ethernet/qlogic/qed/qed_rdma.c qed_rdma_toggle_bit_create_resize_cq(struct qed_hwfn *p_hwfn, u16 icid)
p_hwfn            989 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_rdma_info *p_info = p_hwfn->p_rdma_info;
p_hwfn            993 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "icid = %08x\n", icid);
p_hwfn            998 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	bmap_id = icid - qed_cxt_get_proto_cid_start(p_hwfn, p_info->proto);
p_hwfn           1005 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "QED_RDMA_TOGGLE_BIT_= %d\n",
p_hwfn           1015 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt;
p_hwfn           1016 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_rdma_info *p_info = p_hwfn->p_rdma_info;
p_hwfn           1024 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "cq_handle = %08x%08x\n",
p_hwfn           1029 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_rdma_bmap_alloc_id(p_hwfn, &p_info->cq_map, &returned_id);
p_hwfn           1033 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_NOTICE(p_hwfn, "Can't create CQ, rc = %d\n", rc);
p_hwfn           1037 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	start_cid = qed_cxt_get_proto_cid_start(p_hwfn,
p_hwfn           1042 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_cxt_dynamic_ilt_alloc(p_hwfn, QED_ELEM_CXT, *icid);
p_hwfn           1049 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn           1053 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn           1068 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	p_ramrod->cnq_id = (u8)RESC_START(p_hwfn, QED_RDMA_CNQ_RAM) +
p_hwfn           1073 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	toggle_bit = qed_rdma_toggle_bit_create_resize_cq(p_hwfn, *icid);
p_hwfn           1077 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn           1080 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		qed_rdma_toggle_bit_create_resize_cq(p_hwfn, *icid);
p_hwfn           1084 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Created CQ, rc = %d\n", rc);
p_hwfn           1090 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_bmap_release_id(p_hwfn, &p_info->cq_map, returned_id);
p_hwfn           1092 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_NOTICE(p_hwfn, "Create CQ failed, rc = %d\n", rc);
p_hwfn           1102 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt;
p_hwfn           1111 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "icid = %08x\n", in_params->icid);
p_hwfn           1115 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	    dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn           1119 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_NOTICE(p_hwfn,
p_hwfn           1127 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn           1129 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	proto = p_hwfn->p_rdma_info->proto;
p_hwfn           1131 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn           1140 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn           1146 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn           1151 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_lock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn           1153 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_bmap_release_id(p_hwfn,
p_hwfn           1154 drivers/net/ethernet/qlogic/qed/qed_rdma.c 			    &p_hwfn->p_rdma_info->cq_map,
p_hwfn           1156 drivers/net/ethernet/qlogic/qed/qed_rdma.c 			     qed_cxt_get_proto_cid_start(p_hwfn, proto)));
p_hwfn           1158 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn           1160 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Destroyed CQ, rc = %d\n", rc);
p_hwfn           1163 drivers/net/ethernet/qlogic/qed/qed_rdma.c err:	dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn           1181 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt;
p_hwfn           1184 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "icid = %08x\n", qp->icid);
p_hwfn           1208 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	if (QED_IS_IWARP_PERSONALITY(p_hwfn))
p_hwfn           1211 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		rc = qed_roce_query_qp(p_hwfn, qp, out_params);
p_hwfn           1213 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Query QP, rc = %d\n", rc);
p_hwfn           1219 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt;
p_hwfn           1222 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "icid = %08x\n", qp->icid);
p_hwfn           1224 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	if (QED_IS_IWARP_PERSONALITY(p_hwfn))
p_hwfn           1225 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		rc = qed_iwarp_destroy_qp(p_hwfn, qp);
p_hwfn           1227 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		rc = qed_roce_destroy_qp(p_hwfn, qp);
p_hwfn           1232 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "QP destroyed\n");
p_hwfn           1241 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt;
p_hwfn           1247 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	    !p_hwfn->p_rdma_info->active) {
p_hwfn           1248 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_ERR(p_hwfn->cdev,
p_hwfn           1254 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           1259 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	max_stats_queues = p_hwfn->p_rdma_info->dev->max_stats_queues;
p_hwfn           1261 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_ERR(p_hwfn->cdev,
p_hwfn           1267 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	if (QED_IS_IWARP_PERSONALITY(p_hwfn)) {
p_hwfn           1270 drivers/net/ethernet/qlogic/qed/qed_rdma.c 			DP_NOTICE(p_hwfn->cdev,
p_hwfn           1277 drivers/net/ethernet/qlogic/qed/qed_rdma.c 			DP_NOTICE(p_hwfn->cdev,
p_hwfn           1310 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	if (QED_IS_IWARP_PERSONALITY(p_hwfn)) {
p_hwfn           1311 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		rc = qed_iwarp_create_qp(p_hwfn, qp, out_params);
p_hwfn           1314 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		rc = qed_roce_alloc_cid(p_hwfn, &qp->icid);
p_hwfn           1326 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Create QP, rc = %d\n", rc);
p_hwfn           1334 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt;
p_hwfn           1338 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "icid = %08x params->new_state=%d\n",
p_hwfn           1342 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "rc = %d\n", rc);
p_hwfn           1386 drivers/net/ethernet/qlogic/qed/qed_rdma.c 			       (u8 *)&p_hwfn->hw_info.hw_mac_addr, ETH_ALEN);
p_hwfn           1417 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "qp->cur_state=%d\n",
p_hwfn           1421 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	if (QED_IS_IWARP_PERSONALITY(p_hwfn)) {
p_hwfn           1425 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		rc = qed_iwarp_modify_qp(p_hwfn, qp, new_state, 0);
p_hwfn           1427 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		rc = qed_roce_modify_qp(p_hwfn, qp, prev_state, params);
p_hwfn           1430 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Modify QP, rc = %d\n", rc);
p_hwfn           1438 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt;
p_hwfn           1446 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "itid = %08x\n", params->itid);
p_hwfn           1450 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn           1453 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_sp_init_request(p_hwfn, &p_ent, RDMA_RAMROD_REGISTER_MR,
p_hwfn           1454 drivers/net/ethernet/qlogic/qed/qed_rdma.c 				 p_hwfn->p_rdma_info->proto, &init_data);
p_hwfn           1456 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "rc = %d\n", rc);
p_hwfn           1460 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	if (p_hwfn->p_rdma_info->last_tid < params->itid)
p_hwfn           1461 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		p_hwfn->p_rdma_info->last_tid = params->itid;
p_hwfn           1524 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "rc = %d\n", rc);
p_hwfn           1525 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		qed_sp_destroy_request(p_hwfn, p_ent);
p_hwfn           1555 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_spq_post(p_hwfn, p_ent, &fw_return_code);
p_hwfn           1560 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_NOTICE(p_hwfn, "fw_return_code = %d\n", fw_return_code);
p_hwfn           1564 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Register TID, rc = %d\n", rc);
p_hwfn           1570 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt;
p_hwfn           1578 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "itid = %08x\n", itid);
p_hwfn           1582 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn           1585 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_sp_init_request(p_hwfn, &p_ent, RDMA_RAMROD_DEREGISTER_MR,
p_hwfn           1586 drivers/net/ethernet/qlogic/qed/qed_rdma.c 				 p_hwfn->p_rdma_info->proto, &init_data);
p_hwfn           1588 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "rc = %d\n", rc);
p_hwfn           1595 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_spq_post(p_hwfn, p_ent, &fw_return_code);
p_hwfn           1597 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "rc = %d\n", rc);
p_hwfn           1602 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_NOTICE(p_hwfn, "fw_return_code = %d\n", fw_return_code);
p_hwfn           1608 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           1611 drivers/net/ethernet/qlogic/qed/qed_rdma.c 			DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           1616 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		rc = qed_mcp_drain(p_hwfn, p_ptt);
p_hwfn           1618 drivers/net/ethernet/qlogic/qed/qed_rdma.c 			qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           1619 drivers/net/ethernet/qlogic/qed/qed_rdma.c 			DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           1624 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           1627 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn           1629 drivers/net/ethernet/qlogic/qed/qed_rdma.c 					 p_hwfn->p_rdma_info->proto,
p_hwfn           1632 drivers/net/ethernet/qlogic/qed/qed_rdma.c 			DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           1637 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		rc = qed_spq_post(p_hwfn, p_ent, &fw_return_code);
p_hwfn           1639 drivers/net/ethernet/qlogic/qed/qed_rdma.c 			DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           1645 drivers/net/ethernet/qlogic/qed/qed_rdma.c 			DP_NOTICE(p_hwfn, "fw_return_code = %d\n",
p_hwfn           1651 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "De-registered TID, rc = %d\n", rc);
p_hwfn           1665 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = rdma_cxt;
p_hwfn           1670 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn           1673 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn           1675 drivers/net/ethernet/qlogic/qed/qed_rdma.c 				 p_hwfn->p_rdma_info->proto, &init_data);
p_hwfn           1681 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn           1685 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn           1689 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "modified SRQ id = %x",
p_hwfn           1701 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = rdma_cxt;
p_hwfn           1707 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn           1712 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn           1714 drivers/net/ethernet/qlogic/qed/qed_rdma.c 				 p_hwfn->p_rdma_info->proto, &init_data);
p_hwfn           1722 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn           1726 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	bmap = &p_hwfn->p_rdma_info->srq_map;
p_hwfn           1728 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_lock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn           1729 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_bmap_release_id(p_hwfn, bmap, in_params->srq_id);
p_hwfn           1730 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn           1732 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "SRQ destroyed Id = %x",
p_hwfn           1745 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = rdma_cxt;
p_hwfn           1753 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	bmap = &p_hwfn->p_rdma_info->srq_map;
p_hwfn           1754 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_lock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn           1755 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_rdma_bmap_alloc_id(p_hwfn, bmap, &returned_id);
p_hwfn           1756 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn           1759 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		DP_NOTICE(p_hwfn, "failed to allocate srq id\n");
p_hwfn           1764 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_cxt_dynamic_ilt_alloc(p_hwfn, elem_type, returned_id);
p_hwfn           1769 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn           1771 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn           1775 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn           1777 drivers/net/ethernet/qlogic/qed/qed_rdma.c 				 p_hwfn->p_rdma_info->proto, &init_data);
p_hwfn           1790 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn           1796 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           1802 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_lock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn           1803 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_bmap_release_id(p_hwfn, bmap, returned_id);
p_hwfn           1804 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn           1809 drivers/net/ethernet/qlogic/qed/qed_rdma.c bool qed_rdma_allocated_qps(struct qed_hwfn *p_hwfn)
p_hwfn           1814 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	if (!p_hwfn->p_rdma_info->active)
p_hwfn           1817 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_lock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn           1818 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	if (!p_hwfn->p_rdma_info->cid_map.bitmap)
p_hwfn           1821 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		result = !qed_bmap_is_empty(&p_hwfn->p_rdma_info->cid_map);
p_hwfn           1822 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn           1826 drivers/net/ethernet/qlogic/qed/qed_rdma.c void qed_rdma_dpm_conf(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           1830 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	val = (p_hwfn->dcbx_no_edpm || p_hwfn->db_bar_no_edpm) ? 0 : 1;
p_hwfn           1832 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_wr(p_hwfn, p_ptt, DORQ_REG_PF_DPM_ENABLE, val);
p_hwfn           1833 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, (QED_MSG_DCB | QED_MSG_RDMA),
p_hwfn           1835 drivers/net/ethernet/qlogic/qed/qed_rdma.c 		   val, p_hwfn->dcbx_no_edpm, p_hwfn->db_bar_no_edpm);
p_hwfn           1839 drivers/net/ethernet/qlogic/qed/qed_rdma.c void qed_rdma_dpm_bar(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           1841 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	p_hwfn->db_bar_no_edpm = true;
p_hwfn           1843 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_rdma_dpm_conf(p_hwfn, p_ptt);
p_hwfn           1849 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt;
p_hwfn           1853 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn           1856 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn           1860 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_rdma_alloc(p_hwfn);
p_hwfn           1864 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	rc = qed_rdma_setup(p_hwfn, p_ptt, params);
p_hwfn           1868 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           1869 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	p_hwfn->p_rdma_info->active = 1;
p_hwfn           1874 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_rdma_free(p_hwfn);
p_hwfn           1876 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn           1878 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "RDMA start - error, rc = %d\n", rc);
p_hwfn           1890 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt;
p_hwfn           1892 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "dpi = %08x\n", dpi);
p_hwfn           1894 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_lock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn           1895 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	qed_bmap_release_id(p_hwfn, &p_hwfn->p_rdma_info->dpi_map, dpi);
p_hwfn           1896 drivers/net/ethernet/qlogic/qed/qed_rdma.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            178 drivers/net/ethernet/qlogic/qed/qed_rdma.h void qed_rdma_dpm_bar(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn            179 drivers/net/ethernet/qlogic/qed/qed_rdma.h void qed_rdma_dpm_conf(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn            180 drivers/net/ethernet/qlogic/qed/qed_rdma.h int qed_rdma_info_alloc(struct qed_hwfn *p_hwfn);
p_hwfn            181 drivers/net/ethernet/qlogic/qed/qed_rdma.h void qed_rdma_info_free(struct qed_hwfn *p_hwfn);
p_hwfn            183 drivers/net/ethernet/qlogic/qed/qed_rdma.h static inline void qed_rdma_dpm_conf(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) {}
p_hwfn            184 drivers/net/ethernet/qlogic/qed/qed_rdma.h static inline void qed_rdma_dpm_bar(struct qed_hwfn *p_hwfn,
p_hwfn            186 drivers/net/ethernet/qlogic/qed/qed_rdma.h static inline int qed_rdma_info_alloc(struct qed_hwfn *p_hwfn) {return -EINVAL;}
p_hwfn            187 drivers/net/ethernet/qlogic/qed/qed_rdma.h static inline void qed_rdma_info_free(struct qed_hwfn *p_hwfn) {}
p_hwfn            191 drivers/net/ethernet/qlogic/qed/qed_rdma.h qed_rdma_bmap_alloc(struct qed_hwfn *p_hwfn,
p_hwfn            195 drivers/net/ethernet/qlogic/qed/qed_rdma.h qed_rdma_bmap_free(struct qed_hwfn *p_hwfn, struct qed_bmap *bmap, bool check);
p_hwfn            198 drivers/net/ethernet/qlogic/qed/qed_rdma.h qed_rdma_bmap_alloc_id(struct qed_hwfn *p_hwfn,
p_hwfn            202 drivers/net/ethernet/qlogic/qed/qed_rdma.h qed_bmap_set_id(struct qed_hwfn *p_hwfn, struct qed_bmap *bmap, u32 id_num);
p_hwfn            205 drivers/net/ethernet/qlogic/qed/qed_rdma.h qed_bmap_release_id(struct qed_hwfn *p_hwfn, struct qed_bmap *bmap, u32 id_num);
p_hwfn            208 drivers/net/ethernet/qlogic/qed/qed_rdma.h qed_bmap_test_id(struct qed_hwfn *p_hwfn, struct qed_bmap *bmap, u32 id_num);
p_hwfn            212 drivers/net/ethernet/qlogic/qed/qed_rdma.h bool qed_rdma_allocated_qps(struct qed_hwfn *p_hwfn);
p_hwfn             63 drivers/net/ethernet/qlogic/qed/qed_roce.c static void qed_roce_free_real_icid(struct qed_hwfn *p_hwfn, u16 icid);
p_hwfn             66 drivers/net/ethernet/qlogic/qed/qed_roce.c qed_roce_async_event(struct qed_hwfn *p_hwfn,
p_hwfn             70 drivers/net/ethernet/qlogic/qed/qed_roce.c 	struct qed_rdma_events events = p_hwfn->p_rdma_info->events;
p_hwfn             80 drivers/net/ethernet/qlogic/qed/qed_roce.c 		qed_roce_free_real_icid(p_hwfn, icid);
p_hwfn             99 drivers/net/ethernet/qlogic/qed/qed_roce.c void qed_roce_stop(struct qed_hwfn *p_hwfn)
p_hwfn            101 drivers/net/ethernet/qlogic/qed/qed_roce.c 	struct qed_bmap *rcid_map = &p_hwfn->p_rdma_info->real_cid_map;
p_hwfn            112 drivers/net/ethernet/qlogic/qed/qed_roce.c 			DP_NOTICE(p_hwfn, "cid bitmap wait timed out\n");
p_hwfn            116 drivers/net/ethernet/qlogic/qed/qed_roce.c 	qed_spq_unregister_async_cb(p_hwfn, PROTOCOLID_ROCE);
p_hwfn            155 drivers/net/ethernet/qlogic/qed/qed_roce.c static void qed_roce_free_cid_pair(struct qed_hwfn *p_hwfn, u16 cid)
p_hwfn            157 drivers/net/ethernet/qlogic/qed/qed_roce.c 	spin_lock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            158 drivers/net/ethernet/qlogic/qed/qed_roce.c 	qed_bmap_release_id(p_hwfn, &p_hwfn->p_rdma_info->cid_map, cid);
p_hwfn            159 drivers/net/ethernet/qlogic/qed/qed_roce.c 	qed_bmap_release_id(p_hwfn, &p_hwfn->p_rdma_info->cid_map, cid + 1);
p_hwfn            160 drivers/net/ethernet/qlogic/qed/qed_roce.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            163 drivers/net/ethernet/qlogic/qed/qed_roce.c int qed_roce_alloc_cid(struct qed_hwfn *p_hwfn, u16 *cid)
p_hwfn            165 drivers/net/ethernet/qlogic/qed/qed_roce.c 	struct qed_rdma_info *p_rdma_info = p_hwfn->p_rdma_info;
p_hwfn            170 drivers/net/ethernet/qlogic/qed/qed_roce.c 	spin_lock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            171 drivers/net/ethernet/qlogic/qed/qed_roce.c 	rc = qed_rdma_bmap_alloc_id(p_hwfn, &p_rdma_info->cid_map,
p_hwfn            178 drivers/net/ethernet/qlogic/qed/qed_roce.c 	rc = qed_rdma_bmap_alloc_id(p_hwfn, &p_rdma_info->cid_map,
p_hwfn            187 drivers/net/ethernet/qlogic/qed/qed_roce.c 		DP_NOTICE(p_hwfn, "Failed to allocate two adjacent qp's'\n");
p_hwfn            192 drivers/net/ethernet/qlogic/qed/qed_roce.c 	responder_icid += qed_cxt_get_proto_cid_start(p_hwfn,
p_hwfn            194 drivers/net/ethernet/qlogic/qed/qed_roce.c 	requester_icid += qed_cxt_get_proto_cid_start(p_hwfn,
p_hwfn            200 drivers/net/ethernet/qlogic/qed/qed_roce.c 	rc = qed_cxt_dynamic_ilt_alloc(p_hwfn, QED_ELEM_CXT, responder_icid);
p_hwfn            204 drivers/net/ethernet/qlogic/qed/qed_roce.c 	rc = qed_cxt_dynamic_ilt_alloc(p_hwfn, QED_ELEM_CXT, requester_icid);
p_hwfn            213 drivers/net/ethernet/qlogic/qed/qed_roce.c 	qed_bmap_release_id(p_hwfn, &p_rdma_info->cid_map, responder_icid);
p_hwfn            214 drivers/net/ethernet/qlogic/qed/qed_roce.c 	qed_bmap_release_id(p_hwfn, &p_rdma_info->cid_map, requester_icid);
p_hwfn            217 drivers/net/ethernet/qlogic/qed/qed_roce.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA,
p_hwfn            222 drivers/net/ethernet/qlogic/qed/qed_roce.c static void qed_roce_set_real_cid(struct qed_hwfn *p_hwfn, u32 cid)
p_hwfn            224 drivers/net/ethernet/qlogic/qed/qed_roce.c 	spin_lock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            225 drivers/net/ethernet/qlogic/qed/qed_roce.c 	qed_bmap_set_id(p_hwfn, &p_hwfn->p_rdma_info->real_cid_map, cid);
p_hwfn            226 drivers/net/ethernet/qlogic/qed/qed_roce.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn            229 drivers/net/ethernet/qlogic/qed/qed_roce.c static u8 qed_roce_get_qp_tc(struct qed_hwfn *p_hwfn, struct qed_rdma_qp *qp)
p_hwfn            235 drivers/net/ethernet/qlogic/qed/qed_roce.c 		tc = qed_dcbx_get_priority_tc(p_hwfn, pri);
p_hwfn            238 drivers/net/ethernet/qlogic/qed/qed_roce.c 	DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn            245 drivers/net/ethernet/qlogic/qed/qed_roce.c static int qed_roce_sp_create_responder(struct qed_hwfn *p_hwfn,
p_hwfn            257 drivers/net/ethernet/qlogic/qed/qed_roce.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "icid = %08x\n", qp->icid);
p_hwfn            261 drivers/net/ethernet/qlogic/qed/qed_roce.c 	qp->irq = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            266 drivers/net/ethernet/qlogic/qed/qed_roce.c 		DP_NOTICE(p_hwfn,
p_hwfn            275 drivers/net/ethernet/qlogic/qed/qed_roce.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            278 drivers/net/ethernet/qlogic/qed/qed_roce.c 	rc = qed_sp_init_request(p_hwfn, &p_ent, ROCE_RAMROD_CREATE_QP,
p_hwfn            336 drivers/net/ethernet/qlogic/qed/qed_roce.c 	p_ramrod->cq_cid = cpu_to_le32((p_hwfn->hw_info.opaque_fid << 16) |
p_hwfn            339 drivers/net/ethernet/qlogic/qed/qed_roce.c 	tc = qed_roce_get_qp_tc(p_hwfn, qp);
p_hwfn            340 drivers/net/ethernet/qlogic/qed/qed_roce.c 	regular_latency_queue = qed_get_cm_pq_idx_ofld_mtc(p_hwfn, tc);
p_hwfn            341 drivers/net/ethernet/qlogic/qed/qed_roce.c 	low_latency_queue = qed_get_cm_pq_idx_llt_mtc(p_hwfn, tc);
p_hwfn            342 drivers/net/ethernet/qlogic/qed/qed_roce.c 	DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn            359 drivers/net/ethernet/qlogic/qed/qed_roce.c 	p_ramrod->srq_id.opaque_fid = cpu_to_le16(p_hwfn->hw_info.opaque_fid);
p_hwfn            361 drivers/net/ethernet/qlogic/qed/qed_roce.c 	p_ramrod->stats_counter_id = RESC_START(p_hwfn, QED_RDMA_STATS_QUEUE) +
p_hwfn            364 drivers/net/ethernet/qlogic/qed/qed_roce.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            371 drivers/net/ethernet/qlogic/qed/qed_roce.c 	proto = p_hwfn->p_rdma_info->proto;
p_hwfn            372 drivers/net/ethernet/qlogic/qed/qed_roce.c 	qed_roce_set_real_cid(p_hwfn, qp->icid -
p_hwfn            373 drivers/net/ethernet/qlogic/qed/qed_roce.c 			      qed_cxt_get_proto_cid_start(p_hwfn, proto));
p_hwfn            378 drivers/net/ethernet/qlogic/qed/qed_roce.c 	DP_NOTICE(p_hwfn, "create responder - failed, rc = %d\n", rc);
p_hwfn            379 drivers/net/ethernet/qlogic/qed/qed_roce.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            386 drivers/net/ethernet/qlogic/qed/qed_roce.c static int qed_roce_sp_create_requester(struct qed_hwfn *p_hwfn,
p_hwfn            398 drivers/net/ethernet/qlogic/qed/qed_roce.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "icid = %08x\n", qp->icid);
p_hwfn            402 drivers/net/ethernet/qlogic/qed/qed_roce.c 	qp->orq = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            407 drivers/net/ethernet/qlogic/qed/qed_roce.c 		DP_NOTICE(p_hwfn,
p_hwfn            416 drivers/net/ethernet/qlogic/qed/qed_roce.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            419 drivers/net/ethernet/qlogic/qed/qed_roce.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            467 drivers/net/ethernet/qlogic/qed/qed_roce.c 	    cpu_to_le32((p_hwfn->hw_info.opaque_fid << 16) | qp->sq_cq_id);
p_hwfn            469 drivers/net/ethernet/qlogic/qed/qed_roce.c 	tc = qed_roce_get_qp_tc(p_hwfn, qp);
p_hwfn            470 drivers/net/ethernet/qlogic/qed/qed_roce.c 	regular_latency_queue = qed_get_cm_pq_idx_ofld_mtc(p_hwfn, tc);
p_hwfn            471 drivers/net/ethernet/qlogic/qed/qed_roce.c 	low_latency_queue = qed_get_cm_pq_idx_llt_mtc(p_hwfn, tc);
p_hwfn            472 drivers/net/ethernet/qlogic/qed/qed_roce.c 	DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn            488 drivers/net/ethernet/qlogic/qed/qed_roce.c 	p_ramrod->stats_counter_id = RESC_START(p_hwfn, QED_RDMA_STATS_QUEUE) +
p_hwfn            491 drivers/net/ethernet/qlogic/qed/qed_roce.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            496 drivers/net/ethernet/qlogic/qed/qed_roce.c 	proto = p_hwfn->p_rdma_info->proto;
p_hwfn            497 drivers/net/ethernet/qlogic/qed/qed_roce.c 	qed_roce_set_real_cid(p_hwfn,
p_hwfn            499 drivers/net/ethernet/qlogic/qed/qed_roce.c 			      qed_cxt_get_proto_cid_start(p_hwfn, proto));
p_hwfn            504 drivers/net/ethernet/qlogic/qed/qed_roce.c 	DP_NOTICE(p_hwfn, "Create requested - failed, rc = %d\n", rc);
p_hwfn            505 drivers/net/ethernet/qlogic/qed/qed_roce.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            511 drivers/net/ethernet/qlogic/qed/qed_roce.c static int qed_roce_sp_modify_responder(struct qed_hwfn *p_hwfn,
p_hwfn            520 drivers/net/ethernet/qlogic/qed/qed_roce.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "icid = %08x\n", qp->icid);
p_hwfn            528 drivers/net/ethernet/qlogic/qed/qed_roce.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            531 drivers/net/ethernet/qlogic/qed/qed_roce.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            535 drivers/net/ethernet/qlogic/qed/qed_roce.c 		DP_NOTICE(p_hwfn, "rc = %d\n", rc);
p_hwfn            598 drivers/net/ethernet/qlogic/qed/qed_roce.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            600 drivers/net/ethernet/qlogic/qed/qed_roce.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Modify responder, rc = %d\n", rc);
p_hwfn            604 drivers/net/ethernet/qlogic/qed/qed_roce.c static int qed_roce_sp_modify_requester(struct qed_hwfn *p_hwfn,
p_hwfn            614 drivers/net/ethernet/qlogic/qed/qed_roce.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "icid = %08x\n", qp->icid);
p_hwfn            622 drivers/net/ethernet/qlogic/qed/qed_roce.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            625 drivers/net/ethernet/qlogic/qed/qed_roce.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            629 drivers/net/ethernet/qlogic/qed/qed_roce.c 		DP_NOTICE(p_hwfn, "rc = %d\n", rc);
p_hwfn            691 drivers/net/ethernet/qlogic/qed/qed_roce.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            693 drivers/net/ethernet/qlogic/qed/qed_roce.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Modify requester, rc = %d\n", rc);
p_hwfn            697 drivers/net/ethernet/qlogic/qed/qed_roce.c static int qed_roce_sp_destroy_qp_responder(struct qed_hwfn *p_hwfn,
p_hwfn            708 drivers/net/ethernet/qlogic/qed/qed_roce.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "icid = %08x\n", qp->icid);
p_hwfn            718 drivers/net/ethernet/qlogic/qed/qed_roce.c 		      qed_cxt_get_proto_cid_start(p_hwfn,
p_hwfn            719 drivers/net/ethernet/qlogic/qed/qed_roce.c 						  p_hwfn->p_rdma_info->proto);
p_hwfn            720 drivers/net/ethernet/qlogic/qed/qed_roce.c 		qed_roce_free_cid_pair(p_hwfn, (u16)cid);
p_hwfn            728 drivers/net/ethernet/qlogic/qed/qed_roce.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            731 drivers/net/ethernet/qlogic/qed/qed_roce.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            740 drivers/net/ethernet/qlogic/qed/qed_roce.c 	    dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, sizeof(*p_ramrod_res),
p_hwfn            745 drivers/net/ethernet/qlogic/qed/qed_roce.c 		DP_NOTICE(p_hwfn,
p_hwfn            748 drivers/net/ethernet/qlogic/qed/qed_roce.c 		qed_sp_destroy_request(p_hwfn, p_ent);
p_hwfn            754 drivers/net/ethernet/qlogic/qed/qed_roce.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            762 drivers/net/ethernet/qlogic/qed/qed_roce.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            768 drivers/net/ethernet/qlogic/qed/qed_roce.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Destroy responder, rc = %d\n", rc);
p_hwfn            771 drivers/net/ethernet/qlogic/qed/qed_roce.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            778 drivers/net/ethernet/qlogic/qed/qed_roce.c static int qed_roce_sp_destroy_qp_requester(struct qed_hwfn *p_hwfn,
p_hwfn            788 drivers/net/ethernet/qlogic/qed/qed_roce.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "icid = %08x\n", qp->icid);
p_hwfn            794 drivers/net/ethernet/qlogic/qed/qed_roce.c 		       dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            798 drivers/net/ethernet/qlogic/qed/qed_roce.c 		DP_NOTICE(p_hwfn,
p_hwfn            806 drivers/net/ethernet/qlogic/qed/qed_roce.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            809 drivers/net/ethernet/qlogic/qed/qed_roce.c 	rc = qed_sp_init_request(p_hwfn, &p_ent, ROCE_RAMROD_DESTROY_QP,
p_hwfn            817 drivers/net/ethernet/qlogic/qed/qed_roce.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            823 drivers/net/ethernet/qlogic/qed/qed_roce.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            829 drivers/net/ethernet/qlogic/qed/qed_roce.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Destroy requester, rc = %d\n", rc);
p_hwfn            832 drivers/net/ethernet/qlogic/qed/qed_roce.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev, sizeof(*p_ramrod_res),
p_hwfn            838 drivers/net/ethernet/qlogic/qed/qed_roce.c int qed_roce_query_qp(struct qed_hwfn *p_hwfn,
p_hwfn            864 drivers/net/ethernet/qlogic/qed/qed_roce.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "No QPs as no offload\n");
p_hwfn            869 drivers/net/ethernet/qlogic/qed/qed_roce.c 		DP_NOTICE(p_hwfn,
p_hwfn            876 drivers/net/ethernet/qlogic/qed/qed_roce.c 	    dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            880 drivers/net/ethernet/qlogic/qed/qed_roce.c 		DP_NOTICE(p_hwfn,
p_hwfn            888 drivers/net/ethernet/qlogic/qed/qed_roce.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            890 drivers/net/ethernet/qlogic/qed/qed_roce.c 	rc = qed_sp_init_request(p_hwfn, &p_ent, ROCE_RAMROD_QUERY_QP,
p_hwfn            898 drivers/net/ethernet/qlogic/qed/qed_roce.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            906 drivers/net/ethernet/qlogic/qed/qed_roce.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev, sizeof(*p_resp_ramrod_res),
p_hwfn            924 drivers/net/ethernet/qlogic/qed/qed_roce.c 			   dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            930 drivers/net/ethernet/qlogic/qed/qed_roce.c 		DP_NOTICE(p_hwfn,
p_hwfn            937 drivers/net/ethernet/qlogic/qed/qed_roce.c 	rc = qed_sp_init_request(p_hwfn, &p_ent, ROCE_RAMROD_QUERY_QP,
p_hwfn            945 drivers/net/ethernet/qlogic/qed/qed_roce.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            956 drivers/net/ethernet/qlogic/qed/qed_roce.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev, sizeof(*p_req_ramrod_res),
p_hwfn            970 drivers/net/ethernet/qlogic/qed/qed_roce.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev, sizeof(*p_req_ramrod_res),
p_hwfn            974 drivers/net/ethernet/qlogic/qed/qed_roce.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev, sizeof(*p_resp_ramrod_res),
p_hwfn            979 drivers/net/ethernet/qlogic/qed/qed_roce.c int qed_roce_destroy_qp(struct qed_hwfn *p_hwfn, struct qed_rdma_qp *qp)
p_hwfn            988 drivers/net/ethernet/qlogic/qed/qed_roce.c 		DP_NOTICE(p_hwfn,
p_hwfn            994 drivers/net/ethernet/qlogic/qed/qed_roce.c 		rc = qed_roce_sp_destroy_qp_responder(p_hwfn, qp,
p_hwfn           1000 drivers/net/ethernet/qlogic/qed/qed_roce.c 		rc = qed_roce_sp_destroy_qp_requester(p_hwfn, qp);
p_hwfn           1008 drivers/net/ethernet/qlogic/qed/qed_roce.c int qed_roce_modify_qp(struct qed_hwfn *p_hwfn,
p_hwfn           1022 drivers/net/ethernet/qlogic/qed/qed_roce.c 		rc = qed_roce_sp_create_responder(p_hwfn, qp);
p_hwfn           1027 drivers/net/ethernet/qlogic/qed/qed_roce.c 		rc = qed_roce_sp_create_requester(p_hwfn, qp);
p_hwfn           1032 drivers/net/ethernet/qlogic/qed/qed_roce.c 		rc = qed_roce_sp_modify_responder(p_hwfn, qp, false,
p_hwfn           1038 drivers/net/ethernet/qlogic/qed/qed_roce.c 		rc = qed_roce_sp_modify_responder(p_hwfn, qp, false,
p_hwfn           1043 drivers/net/ethernet/qlogic/qed/qed_roce.c 		rc = qed_roce_sp_modify_requester(p_hwfn, qp, false, false,
p_hwfn           1049 drivers/net/ethernet/qlogic/qed/qed_roce.c 		rc = qed_roce_sp_modify_requester(p_hwfn, qp, true, false,
p_hwfn           1055 drivers/net/ethernet/qlogic/qed/qed_roce.c 		rc = qed_roce_sp_modify_responder(p_hwfn, qp, false,
p_hwfn           1060 drivers/net/ethernet/qlogic/qed/qed_roce.c 		rc = qed_roce_sp_modify_requester(p_hwfn, qp, false, false,
p_hwfn           1066 drivers/net/ethernet/qlogic/qed/qed_roce.c 		rc = qed_roce_sp_modify_responder(p_hwfn, qp, false,
p_hwfn           1071 drivers/net/ethernet/qlogic/qed/qed_roce.c 		rc = qed_roce_sp_modify_requester(p_hwfn, qp, false, false,
p_hwfn           1077 drivers/net/ethernet/qlogic/qed/qed_roce.c 		rc = qed_roce_sp_modify_responder(p_hwfn, qp, true,
p_hwfn           1082 drivers/net/ethernet/qlogic/qed/qed_roce.c 		rc = qed_roce_sp_modify_requester(p_hwfn, qp, false, true,
p_hwfn           1090 drivers/net/ethernet/qlogic/qed/qed_roce.c 		rc = qed_roce_sp_destroy_qp_responder(p_hwfn,
p_hwfn           1099 drivers/net/ethernet/qlogic/qed/qed_roce.c 		rc = qed_roce_sp_destroy_qp_requester(p_hwfn, qp);
p_hwfn           1101 drivers/net/ethernet/qlogic/qed/qed_roce.c 		DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "0\n");
p_hwfn           1107 drivers/net/ethernet/qlogic/qed/qed_roce.c static void qed_roce_free_real_icid(struct qed_hwfn *p_hwfn, u16 icid)
p_hwfn           1109 drivers/net/ethernet/qlogic/qed/qed_roce.c 	struct qed_rdma_info *p_rdma_info = p_hwfn->p_rdma_info;
p_hwfn           1117 drivers/net/ethernet/qlogic/qed/qed_roce.c 	start_cid = qed_cxt_get_proto_cid_start(p_hwfn, p_rdma_info->proto);
p_hwfn           1123 drivers/net/ethernet/qlogic/qed/qed_roce.c 	qed_bmap_release_id(p_hwfn, &p_rdma_info->real_cid_map, cid);
p_hwfn           1124 drivers/net/ethernet/qlogic/qed/qed_roce.c 	if (qed_bmap_test_id(p_hwfn, &p_rdma_info->real_cid_map, xcid) == 0) {
p_hwfn           1125 drivers/net/ethernet/qlogic/qed/qed_roce.c 		qed_bmap_release_id(p_hwfn, &p_rdma_info->cid_map, cid);
p_hwfn           1126 drivers/net/ethernet/qlogic/qed/qed_roce.c 		qed_bmap_release_id(p_hwfn, &p_rdma_info->cid_map, xcid);
p_hwfn           1129 drivers/net/ethernet/qlogic/qed/qed_roce.c 	spin_unlock_bh(&p_hwfn->p_rdma_info->lock);
p_hwfn           1132 drivers/net/ethernet/qlogic/qed/qed_roce.c void qed_roce_dpm_dcbx(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           1140 drivers/net/ethernet/qlogic/qed/qed_roce.c 	val = qed_rdma_allocated_qps(p_hwfn) ? true : false;
p_hwfn           1141 drivers/net/ethernet/qlogic/qed/qed_roce.c 	p_hwfn->dcbx_no_edpm = (u8)val;
p_hwfn           1143 drivers/net/ethernet/qlogic/qed/qed_roce.c 	qed_rdma_dpm_conf(p_hwfn, p_ptt);
p_hwfn           1146 drivers/net/ethernet/qlogic/qed/qed_roce.c int qed_roce_setup(struct qed_hwfn *p_hwfn)
p_hwfn           1148 drivers/net/ethernet/qlogic/qed/qed_roce.c 	return qed_spq_register_async_cb(p_hwfn, PROTOCOLID_ROCE,
p_hwfn           1152 drivers/net/ethernet/qlogic/qed/qed_roce.c int qed_roce_init_hw(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           1156 drivers/net/ethernet/qlogic/qed/qed_roce.c 	qed_wr(p_hwfn, p_ptt, PRS_REG_ROCE_DEST_QP_MAX_PF, 0);
p_hwfn           1158 drivers/net/ethernet/qlogic/qed/qed_roce.c 	p_hwfn->rdma_prs_search_reg = PRS_REG_SEARCH_ROCE;
p_hwfn           1160 drivers/net/ethernet/qlogic/qed/qed_roce.c 	ll2_ethertype_en = qed_rd(p_hwfn, p_ptt, PRS_REG_LIGHT_L2_ETHERTYPE_EN);
p_hwfn           1161 drivers/net/ethernet/qlogic/qed/qed_roce.c 	qed_wr(p_hwfn, p_ptt, PRS_REG_LIGHT_L2_ETHERTYPE_EN,
p_hwfn           1164 drivers/net/ethernet/qlogic/qed/qed_roce.c 	if (qed_cxt_get_proto_cid_start(p_hwfn, PROTOCOLID_ROCE) % 2) {
p_hwfn           1165 drivers/net/ethernet/qlogic/qed/qed_roce.c 		DP_NOTICE(p_hwfn, "The first RoCE's cid should be even\n");
p_hwfn           1169 drivers/net/ethernet/qlogic/qed/qed_roce.c 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "Initializing HW - Done\n");
p_hwfn             38 drivers/net/ethernet/qlogic/qed/qed_roce.h void qed_roce_dpm_dcbx(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn             40 drivers/net/ethernet/qlogic/qed/qed_roce.h static inline void qed_roce_dpm_dcbx(struct qed_hwfn *p_hwfn,
p_hwfn             44 drivers/net/ethernet/qlogic/qed/qed_roce.h int qed_roce_setup(struct qed_hwfn *p_hwfn);
p_hwfn             45 drivers/net/ethernet/qlogic/qed/qed_roce.h void qed_roce_stop(struct qed_hwfn *p_hwfn);
p_hwfn             46 drivers/net/ethernet/qlogic/qed/qed_roce.h int qed_roce_init_hw(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
p_hwfn             47 drivers/net/ethernet/qlogic/qed/qed_roce.h int qed_roce_alloc_cid(struct qed_hwfn *p_hwfn, u16 *cid);
p_hwfn             48 drivers/net/ethernet/qlogic/qed/qed_roce.h int qed_roce_destroy_qp(struct qed_hwfn *p_hwfn, struct qed_rdma_qp *qp);
p_hwfn             50 drivers/net/ethernet/qlogic/qed/qed_roce.h int qed_roce_query_qp(struct qed_hwfn *p_hwfn,
p_hwfn             54 drivers/net/ethernet/qlogic/qed/qed_roce.h int qed_roce_modify_qp(struct qed_hwfn *p_hwfn,
p_hwfn             68 drivers/net/ethernet/qlogic/qed/qed_selftest.c 	struct qed_hwfn *p_hwfn;
p_hwfn             74 drivers/net/ethernet/qlogic/qed/qed_selftest.c 		p_hwfn = &cdev->hwfns[i];
p_hwfn             75 drivers/net/ethernet/qlogic/qed/qed_selftest.c 		p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn             77 drivers/net/ethernet/qlogic/qed/qed_selftest.c 			DP_ERR(p_hwfn, "failed to acquire ptt\n");
p_hwfn             80 drivers/net/ethernet/qlogic/qed/qed_selftest.c 		rc = qed_mcp_bist_register_test(p_hwfn, p_ptt);
p_hwfn             81 drivers/net/ethernet/qlogic/qed/qed_selftest.c 		qed_ptt_release(p_hwfn, p_ptt);
p_hwfn             91 drivers/net/ethernet/qlogic/qed/qed_selftest.c 	struct qed_hwfn *p_hwfn;
p_hwfn             97 drivers/net/ethernet/qlogic/qed/qed_selftest.c 		p_hwfn = &cdev->hwfns[i];
p_hwfn             98 drivers/net/ethernet/qlogic/qed/qed_selftest.c 		p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn            100 drivers/net/ethernet/qlogic/qed/qed_selftest.c 			DP_ERR(p_hwfn, "failed to acquire ptt\n");
p_hwfn            103 drivers/net/ethernet/qlogic/qed/qed_selftest.c 		rc = qed_mcp_bist_clock_test(p_hwfn, p_ptt);
p_hwfn            104 drivers/net/ethernet/qlogic/qed/qed_selftest.c 		qed_ptt_release(p_hwfn, p_ptt);
p_hwfn            114 drivers/net/ethernet/qlogic/qed/qed_selftest.c 	struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
p_hwfn            115 drivers/net/ethernet/qlogic/qed/qed_selftest.c 	struct qed_ptt *p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn            123 drivers/net/ethernet/qlogic/qed/qed_selftest.c 		DP_ERR(p_hwfn, "failed to acquire ptt\n");
p_hwfn            128 drivers/net/ethernet/qlogic/qed/qed_selftest.c 	rc = qed_mcp_bist_nvm_get_num_images(p_hwfn, p_ptt, &num_images);
p_hwfn            130 drivers/net/ethernet/qlogic/qed/qed_selftest.c 		DP_ERR(p_hwfn, "Failed getting number of images\n");
p_hwfn            140 drivers/net/ethernet/qlogic/qed/qed_selftest.c 		rc = qed_mcp_bist_nvm_get_image_att(p_hwfn, p_ptt,
p_hwfn            143 drivers/net/ethernet/qlogic/qed/qed_selftest.c 			DP_ERR(p_hwfn,
p_hwfn            155 drivers/net/ethernet/qlogic/qed/qed_selftest.c 		DP_VERBOSE(p_hwfn, QED_MSG_SP, "image index %d, size %x\n",
p_hwfn            166 drivers/net/ethernet/qlogic/qed/qed_selftest.c 		rc = qed_mcp_nvm_read(p_hwfn->cdev, image_att.nvm_start_addr,
p_hwfn            169 drivers/net/ethernet/qlogic/qed/qed_selftest.c 			DP_ERR(p_hwfn,
p_hwfn            188 drivers/net/ethernet/qlogic/qed/qed_selftest.c 		DP_VERBOSE(p_hwfn, QED_MSG_SP,
p_hwfn            203 drivers/net/ethernet/qlogic/qed/qed_selftest.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn            209 drivers/net/ethernet/qlogic/qed/qed_selftest.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn             68 drivers/net/ethernet/qlogic/qed/qed_sp.h int qed_eth_cqe_completion(struct qed_hwfn *p_hwfn,
p_hwfn            186 drivers/net/ethernet/qlogic/qed/qed_sp.h (*qed_spq_async_comp_cb)(struct qed_hwfn *p_hwfn,
p_hwfn            193 drivers/net/ethernet/qlogic/qed/qed_sp.h qed_spq_register_async_cb(struct qed_hwfn *p_hwfn,
p_hwfn            198 drivers/net/ethernet/qlogic/qed/qed_sp.h qed_spq_unregister_async_cb(struct qed_hwfn *p_hwfn,
p_hwfn            244 drivers/net/ethernet/qlogic/qed/qed_sp.h int qed_spq_post(struct qed_hwfn *p_hwfn,
p_hwfn            255 drivers/net/ethernet/qlogic/qed/qed_sp.h int qed_spq_alloc(struct qed_hwfn *p_hwfn);
p_hwfn            262 drivers/net/ethernet/qlogic/qed/qed_sp.h void qed_spq_setup(struct qed_hwfn *p_hwfn);
p_hwfn            269 drivers/net/ethernet/qlogic/qed/qed_sp.h void qed_spq_free(struct qed_hwfn *p_hwfn);
p_hwfn            283 drivers/net/ethernet/qlogic/qed/qed_sp.h qed_spq_get_entry(struct qed_hwfn *p_hwfn,
p_hwfn            293 drivers/net/ethernet/qlogic/qed/qed_sp.h void qed_spq_return_entry(struct qed_hwfn *p_hwfn,
p_hwfn            303 drivers/net/ethernet/qlogic/qed/qed_sp.h int qed_eq_alloc(struct qed_hwfn *p_hwfn, u16 num_elem);
p_hwfn            310 drivers/net/ethernet/qlogic/qed/qed_sp.h void qed_eq_setup(struct qed_hwfn *p_hwfn);
p_hwfn            317 drivers/net/ethernet/qlogic/qed/qed_sp.h void qed_eq_free(struct qed_hwfn *p_hwfn);
p_hwfn            325 drivers/net/ethernet/qlogic/qed/qed_sp.h void qed_eq_prod_update(struct qed_hwfn *p_hwfn,
p_hwfn            336 drivers/net/ethernet/qlogic/qed/qed_sp.h int qed_eq_completion(struct qed_hwfn *p_hwfn,
p_hwfn            348 drivers/net/ethernet/qlogic/qed/qed_sp.h int qed_spq_completion(struct qed_hwfn *p_hwfn,
p_hwfn            360 drivers/net/ethernet/qlogic/qed/qed_sp.h u32 qed_spq_get_cid(struct qed_hwfn *p_hwfn);
p_hwfn            370 drivers/net/ethernet/qlogic/qed/qed_sp.h int qed_consq_alloc(struct qed_hwfn *p_hwfn);
p_hwfn            377 drivers/net/ethernet/qlogic/qed/qed_sp.h void qed_consq_setup(struct qed_hwfn *p_hwfn);
p_hwfn            384 drivers/net/ethernet/qlogic/qed/qed_sp.h void qed_consq_free(struct qed_hwfn *p_hwfn);
p_hwfn            385 drivers/net/ethernet/qlogic/qed/qed_sp.h int qed_spq_pend_post(struct qed_hwfn *p_hwfn);
p_hwfn            413 drivers/net/ethernet/qlogic/qed/qed_sp.h void qed_sp_destroy_request(struct qed_hwfn *p_hwfn,
p_hwfn            416 drivers/net/ethernet/qlogic/qed/qed_sp.h int qed_sp_init_request(struct qed_hwfn *p_hwfn,
p_hwfn            441 drivers/net/ethernet/qlogic/qed/qed_sp.h int qed_sp_pf_start(struct qed_hwfn *p_hwfn,
p_hwfn            457 drivers/net/ethernet/qlogic/qed/qed_sp.h int qed_sp_pf_update(struct qed_hwfn *p_hwfn);
p_hwfn            466 drivers/net/ethernet/qlogic/qed/qed_sp.h int qed_sp_pf_update_stag(struct qed_hwfn *p_hwfn);
p_hwfn            489 drivers/net/ethernet/qlogic/qed/qed_sp.h int qed_sp_pf_update_ufp(struct qed_hwfn *p_hwfn);
p_hwfn            491 drivers/net/ethernet/qlogic/qed/qed_sp.h int qed_sp_pf_stop(struct qed_hwfn *p_hwfn);
p_hwfn            493 drivers/net/ethernet/qlogic/qed/qed_sp.h int qed_sp_pf_update_tunn_cfg(struct qed_hwfn *p_hwfn,
p_hwfn            506 drivers/net/ethernet/qlogic/qed/qed_sp.h int qed_sp_heartbeat_ramrod(struct qed_hwfn *p_hwfn);
p_hwfn             50 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c void qed_sp_destroy_request(struct qed_hwfn *p_hwfn,
p_hwfn             57 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	if (p_ent->queue == &p_hwfn->p_spq->unlimited_pending)
p_hwfn             60 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 		qed_spq_return_entry(p_hwfn, p_ent);
p_hwfn             63 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c int qed_sp_init_request(struct qed_hwfn *p_hwfn,
p_hwfn             74 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	rc = qed_spq_get_entry(p_hwfn, pp_ent);
p_hwfn            109 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 		DP_NOTICE(p_hwfn, "Unknown SPQE completion mode %d\n",
p_hwfn            114 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	DP_VERBOSE(p_hwfn, QED_MSG_SPQ,
p_hwfn            127 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	qed_sp_destroy_request(p_hwfn, p_ent);
p_hwfn            227 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c qed_tunn_set_pf_update_params(struct qed_hwfn *p_hwfn,
p_hwfn            231 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	struct qed_tunnel_info *p_tun = &p_hwfn->cdev->tunnel;
p_hwfn            261 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c static void qed_set_hw_tunn_mode(struct qed_hwfn *p_hwfn,
p_hwfn            265 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	qed_set_gre_enable(p_hwfn, p_ptt, p_tun->l2_gre.b_mode_enabled,
p_hwfn            267 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	qed_set_vxlan_enable(p_hwfn, p_ptt, p_tun->vxlan.b_mode_enabled);
p_hwfn            269 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	qed_set_geneve_enable(p_hwfn, p_ptt, p_tun->l2_geneve.b_mode_enabled,
p_hwfn            273 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c static void qed_set_hw_tunn_mode_port(struct qed_hwfn *p_hwfn,
p_hwfn            278 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 		qed_set_vxlan_dest_port(p_hwfn, p_ptt,
p_hwfn            282 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 		qed_set_geneve_dest_port(p_hwfn, p_ptt,
p_hwfn            285 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	qed_set_hw_tunn_mode(p_hwfn, p_ptt, p_tunn);
p_hwfn            289 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c qed_tunn_set_pf_start_params(struct qed_hwfn *p_hwfn,
p_hwfn            293 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	struct qed_tunnel_info *p_tun = &p_hwfn->cdev->tunnel;
p_hwfn            324 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c int qed_sp_pf_start(struct qed_hwfn *p_hwfn,
p_hwfn            330 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	u16 sb = qed_int_get_sp_sb_id(p_hwfn);
p_hwfn            331 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	u8 sb_index = p_hwfn->p_eq->eq_sb_index;
p_hwfn            338 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	qed_eq_prod_update(p_hwfn,
p_hwfn            339 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 			   qed_chain_get_prod_idx(&p_hwfn->p_eq->chain));
p_hwfn            342 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	init_data.cid = qed_spq_get_cid(p_hwfn);
p_hwfn            343 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            346 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            356 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	p_ramrod->path_id		= QED_PATH_ID(p_hwfn);
p_hwfn            360 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	if (test_bit(QED_MF_OVLAN_CLSS, &p_hwfn->cdev->mf_bits))
p_hwfn            366 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 				cpu_to_le16(p_hwfn->hw_info.ovlan);
p_hwfn            367 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	if (test_bit(QED_MF_8021Q_TAGGING, &p_hwfn->cdev->mf_bits)) {
p_hwfn            369 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	} else if (test_bit(QED_MF_8021AD_TAGGING, &p_hwfn->cdev->mf_bits)) {
p_hwfn            381 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	if (test_bit(QED_MF_UFP_SPECIFIC, &p_hwfn->cdev->mf_bits)) {
p_hwfn            382 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 		if (p_hwfn->ufp_info.pri_type == QED_UFP_PRI_OS)
p_hwfn            388 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 		    cpu_to_le16(((u16)p_hwfn->ufp_info.tc << 13));
p_hwfn            393 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 		       p_hwfn->p_eq->chain.pbl_sp.p_phys_table);
p_hwfn            394 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	page_cnt = (u8)qed_chain_get_page_cnt(&p_hwfn->p_eq->chain);
p_hwfn            397 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 		       p_hwfn->p_consq->chain.pbl_sp.p_phys_table);
p_hwfn            399 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	qed_tunn_set_pf_start_params(p_hwfn, p_tunn, &p_ramrod->tunnel_config);
p_hwfn            401 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	if (test_bit(QED_MF_INTER_PF_SWITCH, &p_hwfn->cdev->mf_bits))
p_hwfn            404 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	switch (p_hwfn->hw_info.personality) {
p_hwfn            419 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 		DP_NOTICE(p_hwfn, "Unknown personality %d\n",
p_hwfn            420 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 			  p_hwfn->hw_info.personality);
p_hwfn            424 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	if (p_hwfn->cdev->p_iov_info) {
p_hwfn            425 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 		struct qed_hw_sriov_info *p_iov = p_hwfn->cdev->p_iov_info;
p_hwfn            433 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	DP_VERBOSE(p_hwfn, QED_MSG_SPQ,
p_hwfn            437 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            440 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 		qed_set_hw_tunn_mode_port(p_hwfn, p_ptt,
p_hwfn            441 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 					  &p_hwfn->cdev->tunnel);
p_hwfn            446 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c int qed_sp_pf_update(struct qed_hwfn *p_hwfn)
p_hwfn            454 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	init_data.cid = qed_spq_get_cid(p_hwfn);
p_hwfn            455 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            458 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            464 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	qed_dcbx_set_pf_update_params(&p_hwfn->p_dcbx_info->results,
p_hwfn            467 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            470 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c int qed_sp_pf_update_ufp(struct qed_hwfn *p_hwfn)
p_hwfn            476 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	if (p_hwfn->ufp_info.pri_type == QED_UFP_PRI_UNKNOWN) {
p_hwfn            477 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 		DP_INFO(p_hwfn, "Invalid priority type %d\n",
p_hwfn            478 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 			p_hwfn->ufp_info.pri_type);
p_hwfn            484 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	init_data.cid = qed_spq_get_cid(p_hwfn);
p_hwfn            485 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            488 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            495 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	if (p_hwfn->ufp_info.pri_type == QED_UFP_PRI_OS)
p_hwfn            500 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            504 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c int qed_sp_pf_update_tunn_cfg(struct qed_hwfn *p_hwfn,
p_hwfn            514 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	if (IS_VF(p_hwfn->cdev))
p_hwfn            515 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 		return qed_vf_pf_tunnel_param_update(p_hwfn, p_tunn);
p_hwfn            522 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	init_data.cid = qed_spq_get_cid(p_hwfn);
p_hwfn            523 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            527 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            533 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	qed_tunn_set_pf_update_params(p_hwfn, p_tunn,
p_hwfn            536 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	rc = qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            540 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	qed_set_hw_tunn_mode_port(p_hwfn, p_ptt, &p_hwfn->cdev->tunnel);
p_hwfn            545 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c int qed_sp_pf_stop(struct qed_hwfn *p_hwfn)
p_hwfn            553 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	init_data.cid = qed_spq_get_cid(p_hwfn);
p_hwfn            554 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            557 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            563 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            566 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c int qed_sp_heartbeat_ramrod(struct qed_hwfn *p_hwfn)
p_hwfn            574 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	init_data.cid = qed_spq_get_cid(p_hwfn);
p_hwfn            575 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            578 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            584 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            587 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c int qed_sp_pf_update_stag(struct qed_hwfn *p_hwfn)
p_hwfn            595 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	init_data.cid = qed_spq_get_cid(p_hwfn);
p_hwfn            596 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            599 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            606 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	p_ent->ramrod.pf_update.mf_vlan = cpu_to_le16(p_hwfn->hw_info.ovlan);
p_hwfn            607 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	if (test_bit(QED_MF_UFP_SPECIFIC, &p_hwfn->cdev->mf_bits))
p_hwfn            609 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 			cpu_to_le16(((u16)p_hwfn->ufp_info.tc << 13));
p_hwfn            611 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn             73 drivers/net/ethernet/qlogic/qed/qed_spq.c static void qed_spq_blocking_cb(struct qed_hwfn *p_hwfn,
p_hwfn             87 drivers/net/ethernet/qlogic/qed/qed_spq.c static int __qed_spq_block(struct qed_hwfn *p_hwfn,
p_hwfn            115 drivers/net/ethernet/qlogic/qed/qed_spq.c static int qed_spq_block(struct qed_hwfn *p_hwfn,
p_hwfn            127 drivers/net/ethernet/qlogic/qed/qed_spq.c 		rc = __qed_spq_block(p_hwfn, p_ent, p_fw_ret, false);
p_hwfn            133 drivers/net/ethernet/qlogic/qed/qed_spq.c 	rc = __qed_spq_block(p_hwfn, p_ent, p_fw_ret, true);
p_hwfn            137 drivers/net/ethernet/qlogic/qed/qed_spq.c 	p_ptt = qed_ptt_acquire(p_hwfn);
p_hwfn            139 drivers/net/ethernet/qlogic/qed/qed_spq.c 		DP_NOTICE(p_hwfn, "ptt, failed to acquire\n");
p_hwfn            143 drivers/net/ethernet/qlogic/qed/qed_spq.c 	DP_INFO(p_hwfn, "Ramrod is stuck, requesting MCP drain\n");
p_hwfn            144 drivers/net/ethernet/qlogic/qed/qed_spq.c 	rc = qed_mcp_drain(p_hwfn, p_ptt);
p_hwfn            145 drivers/net/ethernet/qlogic/qed/qed_spq.c 	qed_ptt_release(p_hwfn, p_ptt);
p_hwfn            147 drivers/net/ethernet/qlogic/qed/qed_spq.c 		DP_NOTICE(p_hwfn, "MCP drain failed\n");
p_hwfn            152 drivers/net/ethernet/qlogic/qed/qed_spq.c 	rc = __qed_spq_block(p_hwfn, p_ent, p_fw_ret, true);
p_hwfn            163 drivers/net/ethernet/qlogic/qed/qed_spq.c 	DP_NOTICE(p_hwfn,
p_hwfn            176 drivers/net/ethernet/qlogic/qed/qed_spq.c static int qed_spq_fill_entry(struct qed_hwfn *p_hwfn,
p_hwfn            189 drivers/net/ethernet/qlogic/qed/qed_spq.c 		DP_NOTICE(p_hwfn, "Unknown SPQE completion mode %d\n",
p_hwfn            194 drivers/net/ethernet/qlogic/qed/qed_spq.c 	DP_VERBOSE(p_hwfn, QED_MSG_SPQ,
p_hwfn            211 drivers/net/ethernet/qlogic/qed/qed_spq.c static void qed_spq_hw_initialize(struct qed_hwfn *p_hwfn,
p_hwfn            221 drivers/net/ethernet/qlogic/qed/qed_spq.c 	rc = qed_cxt_get_cid_info(p_hwfn, &cxt_info);
p_hwfn            224 drivers/net/ethernet/qlogic/qed/qed_spq.c 		DP_NOTICE(p_hwfn, "Cannot find context info for cid=%d\n",
p_hwfn            239 drivers/net/ethernet/qlogic/qed/qed_spq.c 	physical_q = qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_LB);
p_hwfn            248 drivers/net/ethernet/qlogic/qed/qed_spq.c 		       p_hwfn->p_consq->chain.p_phys_addr);
p_hwfn            251 drivers/net/ethernet/qlogic/qed/qed_spq.c static int qed_spq_hw_post(struct qed_hwfn *p_hwfn,
p_hwfn            254 drivers/net/ethernet/qlogic/qed/qed_spq.c 	struct qed_chain *p_chain = &p_hwfn->p_spq->chain;
p_hwfn            262 drivers/net/ethernet/qlogic/qed/qed_spq.c 		DP_NOTICE(p_hwfn, "Failed to produce from SPQ chain\n");
p_hwfn            274 drivers/net/ethernet/qlogic/qed/qed_spq.c 	DOORBELL(p_hwfn, p_spq->db_addr_offset, *(u32 *)p_db_data);
p_hwfn            279 drivers/net/ethernet/qlogic/qed/qed_spq.c 	DP_VERBOSE(p_hwfn, QED_MSG_SPQ,
p_hwfn            293 drivers/net/ethernet/qlogic/qed/qed_spq.c qed_async_event_completion(struct qed_hwfn *p_hwfn,
p_hwfn            298 drivers/net/ethernet/qlogic/qed/qed_spq.c 	if (!p_hwfn->p_spq || (p_eqe->protocol_id >= MAX_PROTOCOL_TYPE))
p_hwfn            301 drivers/net/ethernet/qlogic/qed/qed_spq.c 	cb = p_hwfn->p_spq->async_comp_cb[p_eqe->protocol_id];
p_hwfn            303 drivers/net/ethernet/qlogic/qed/qed_spq.c 		return cb(p_hwfn, p_eqe->opcode, p_eqe->echo,
p_hwfn            306 drivers/net/ethernet/qlogic/qed/qed_spq.c 		DP_NOTICE(p_hwfn,
p_hwfn            314 drivers/net/ethernet/qlogic/qed/qed_spq.c qed_spq_register_async_cb(struct qed_hwfn *p_hwfn,
p_hwfn            318 drivers/net/ethernet/qlogic/qed/qed_spq.c 	if (!p_hwfn->p_spq || (protocol_id >= MAX_PROTOCOL_TYPE))
p_hwfn            321 drivers/net/ethernet/qlogic/qed/qed_spq.c 	p_hwfn->p_spq->async_comp_cb[protocol_id] = cb;
p_hwfn            326 drivers/net/ethernet/qlogic/qed/qed_spq.c qed_spq_unregister_async_cb(struct qed_hwfn *p_hwfn,
p_hwfn            329 drivers/net/ethernet/qlogic/qed/qed_spq.c 	if (!p_hwfn->p_spq || (protocol_id >= MAX_PROTOCOL_TYPE))
p_hwfn            332 drivers/net/ethernet/qlogic/qed/qed_spq.c 	p_hwfn->p_spq->async_comp_cb[protocol_id] = NULL;
p_hwfn            338 drivers/net/ethernet/qlogic/qed/qed_spq.c void qed_eq_prod_update(struct qed_hwfn *p_hwfn, u16 prod)
p_hwfn            341 drivers/net/ethernet/qlogic/qed/qed_spq.c 		   USTORM_EQE_CONS_OFFSET(p_hwfn->rel_pf_id);
p_hwfn            343 drivers/net/ethernet/qlogic/qed/qed_spq.c 	REG_WR16(p_hwfn, addr, prod);
p_hwfn            346 drivers/net/ethernet/qlogic/qed/qed_spq.c int qed_eq_completion(struct qed_hwfn *p_hwfn, void *cookie)
p_hwfn            355 drivers/net/ethernet/qlogic/qed/qed_spq.c 	DP_VERBOSE(p_hwfn, QED_MSG_SPQ, "fw_cons_idx %x\n", fw_cons_idx);
p_hwfn            373 drivers/net/ethernet/qlogic/qed/qed_spq.c 		DP_VERBOSE(p_hwfn, QED_MSG_SPQ,
p_hwfn            383 drivers/net/ethernet/qlogic/qed/qed_spq.c 			if (qed_async_event_completion(p_hwfn, p_eqe))
p_hwfn            385 drivers/net/ethernet/qlogic/qed/qed_spq.c 		} else if (qed_spq_completion(p_hwfn,
p_hwfn            395 drivers/net/ethernet/qlogic/qed/qed_spq.c 	qed_eq_prod_update(p_hwfn, qed_chain_get_prod_idx(p_chain));
p_hwfn            398 drivers/net/ethernet/qlogic/qed/qed_spq.c 	spin_lock_bh(&p_hwfn->p_spq->lock);
p_hwfn            399 drivers/net/ethernet/qlogic/qed/qed_spq.c 	rc = qed_spq_pend_post(p_hwfn);
p_hwfn            400 drivers/net/ethernet/qlogic/qed/qed_spq.c 	spin_unlock_bh(&p_hwfn->p_spq->lock);
p_hwfn            405 drivers/net/ethernet/qlogic/qed/qed_spq.c int qed_eq_alloc(struct qed_hwfn *p_hwfn, u16 num_elem)
p_hwfn            415 drivers/net/ethernet/qlogic/qed/qed_spq.c 	if (qed_chain_alloc(p_hwfn->cdev,
p_hwfn            425 drivers/net/ethernet/qlogic/qed/qed_spq.c 	qed_int_register_cb(p_hwfn, qed_eq_completion,
p_hwfn            428 drivers/net/ethernet/qlogic/qed/qed_spq.c 	p_hwfn->p_eq = p_eq;
p_hwfn            436 drivers/net/ethernet/qlogic/qed/qed_spq.c void qed_eq_setup(struct qed_hwfn *p_hwfn)
p_hwfn            438 drivers/net/ethernet/qlogic/qed/qed_spq.c 	qed_chain_reset(&p_hwfn->p_eq->chain);
p_hwfn            441 drivers/net/ethernet/qlogic/qed/qed_spq.c void qed_eq_free(struct qed_hwfn *p_hwfn)
p_hwfn            443 drivers/net/ethernet/qlogic/qed/qed_spq.c 	if (!p_hwfn->p_eq)
p_hwfn            446 drivers/net/ethernet/qlogic/qed/qed_spq.c 	qed_chain_free(p_hwfn->cdev, &p_hwfn->p_eq->chain);
p_hwfn            448 drivers/net/ethernet/qlogic/qed/qed_spq.c 	kfree(p_hwfn->p_eq);
p_hwfn            449 drivers/net/ethernet/qlogic/qed/qed_spq.c 	p_hwfn->p_eq = NULL;
p_hwfn            455 drivers/net/ethernet/qlogic/qed/qed_spq.c static int qed_cqe_completion(struct qed_hwfn *p_hwfn,
p_hwfn            459 drivers/net/ethernet/qlogic/qed/qed_spq.c 	if (IS_VF(p_hwfn->cdev))
p_hwfn            466 drivers/net/ethernet/qlogic/qed/qed_spq.c 	return qed_spq_completion(p_hwfn, cqe->echo, 0, NULL);
p_hwfn            469 drivers/net/ethernet/qlogic/qed/qed_spq.c int qed_eth_cqe_completion(struct qed_hwfn *p_hwfn,
p_hwfn            474 drivers/net/ethernet/qlogic/qed/qed_spq.c 	rc = qed_cqe_completion(p_hwfn, cqe, PROTOCOLID_ETH);
p_hwfn            476 drivers/net/ethernet/qlogic/qed/qed_spq.c 		DP_NOTICE(p_hwfn,
p_hwfn            486 drivers/net/ethernet/qlogic/qed/qed_spq.c void qed_spq_setup(struct qed_hwfn *p_hwfn)
p_hwfn            488 drivers/net/ethernet/qlogic/qed/qed_spq.c 	struct qed_spq *p_spq = p_hwfn->p_spq;
p_hwfn            526 drivers/net/ethernet/qlogic/qed/qed_spq.c 	qed_cxt_acquire_cid(p_hwfn, PROTOCOLID_CORE, &p_spq->cid);
p_hwfn            527 drivers/net/ethernet/qlogic/qed/qed_spq.c 	qed_spq_hw_initialize(p_hwfn, p_spq);
p_hwfn            543 drivers/net/ethernet/qlogic/qed/qed_spq.c 	db_addr = (void __iomem *)((u8 __iomem *)p_hwfn->doorbells +
p_hwfn            545 drivers/net/ethernet/qlogic/qed/qed_spq.c 	rc = qed_db_recovery_add(p_hwfn->cdev, db_addr, &p_spq->db_data,
p_hwfn            548 drivers/net/ethernet/qlogic/qed/qed_spq.c 		DP_INFO(p_hwfn,
p_hwfn            552 drivers/net/ethernet/qlogic/qed/qed_spq.c int qed_spq_alloc(struct qed_hwfn *p_hwfn)
p_hwfn            565 drivers/net/ethernet/qlogic/qed/qed_spq.c 	if (qed_chain_alloc(p_hwfn->cdev,
p_hwfn            576 drivers/net/ethernet/qlogic/qed/qed_spq.c 	p_virt = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            584 drivers/net/ethernet/qlogic/qed/qed_spq.c 	p_hwfn->p_spq = p_spq;
p_hwfn            589 drivers/net/ethernet/qlogic/qed/qed_spq.c 	qed_chain_free(p_hwfn->cdev, &p_spq->chain);
p_hwfn            594 drivers/net/ethernet/qlogic/qed/qed_spq.c void qed_spq_free(struct qed_hwfn *p_hwfn)
p_hwfn            596 drivers/net/ethernet/qlogic/qed/qed_spq.c 	struct qed_spq *p_spq = p_hwfn->p_spq;
p_hwfn            604 drivers/net/ethernet/qlogic/qed/qed_spq.c 	db_addr = (void __iomem *)((u8 __iomem *)p_hwfn->doorbells +
p_hwfn            606 drivers/net/ethernet/qlogic/qed/qed_spq.c 	qed_db_recovery_del(p_hwfn->cdev, db_addr, &p_spq->db_data);
p_hwfn            610 drivers/net/ethernet/qlogic/qed/qed_spq.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            616 drivers/net/ethernet/qlogic/qed/qed_spq.c 	qed_chain_free(p_hwfn->cdev, &p_spq->chain);
p_hwfn            618 drivers/net/ethernet/qlogic/qed/qed_spq.c 	p_hwfn->p_spq = NULL;
p_hwfn            621 drivers/net/ethernet/qlogic/qed/qed_spq.c int qed_spq_get_entry(struct qed_hwfn *p_hwfn, struct qed_spq_entry **pp_ent)
p_hwfn            623 drivers/net/ethernet/qlogic/qed/qed_spq.c 	struct qed_spq *p_spq = p_hwfn->p_spq;
p_hwfn            632 drivers/net/ethernet/qlogic/qed/qed_spq.c 			DP_NOTICE(p_hwfn,
p_hwfn            653 drivers/net/ethernet/qlogic/qed/qed_spq.c static void __qed_spq_return_entry(struct qed_hwfn *p_hwfn,
p_hwfn            656 drivers/net/ethernet/qlogic/qed/qed_spq.c 	list_add_tail(&p_ent->list, &p_hwfn->p_spq->free_pool);
p_hwfn            659 drivers/net/ethernet/qlogic/qed/qed_spq.c void qed_spq_return_entry(struct qed_hwfn *p_hwfn, struct qed_spq_entry *p_ent)
p_hwfn            661 drivers/net/ethernet/qlogic/qed/qed_spq.c 	spin_lock_bh(&p_hwfn->p_spq->lock);
p_hwfn            662 drivers/net/ethernet/qlogic/qed/qed_spq.c 	__qed_spq_return_entry(p_hwfn, p_ent);
p_hwfn            663 drivers/net/ethernet/qlogic/qed/qed_spq.c 	spin_unlock_bh(&p_hwfn->p_spq->lock);
p_hwfn            680 drivers/net/ethernet/qlogic/qed/qed_spq.c static int qed_spq_add_entry(struct qed_hwfn *p_hwfn,
p_hwfn            684 drivers/net/ethernet/qlogic/qed/qed_spq.c 	struct qed_spq *p_spq = p_hwfn->p_spq;
p_hwfn            738 drivers/net/ethernet/qlogic/qed/qed_spq.c u32 qed_spq_get_cid(struct qed_hwfn *p_hwfn)
p_hwfn            740 drivers/net/ethernet/qlogic/qed/qed_spq.c 	if (!p_hwfn->p_spq)
p_hwfn            742 drivers/net/ethernet/qlogic/qed/qed_spq.c 	return p_hwfn->p_spq->cid;
p_hwfn            748 drivers/net/ethernet/qlogic/qed/qed_spq.c static int qed_spq_post_list(struct qed_hwfn *p_hwfn,
p_hwfn            751 drivers/net/ethernet/qlogic/qed/qed_spq.c 	struct qed_spq *p_spq = p_hwfn->p_spq;
p_hwfn            761 drivers/net/ethernet/qlogic/qed/qed_spq.c 		rc = qed_spq_hw_post(p_hwfn, p_spq, p_ent);
p_hwfn            764 drivers/net/ethernet/qlogic/qed/qed_spq.c 			__qed_spq_return_entry(p_hwfn, p_ent);
p_hwfn            772 drivers/net/ethernet/qlogic/qed/qed_spq.c int qed_spq_pend_post(struct qed_hwfn *p_hwfn)
p_hwfn            774 drivers/net/ethernet/qlogic/qed/qed_spq.c 	struct qed_spq *p_spq = p_hwfn->p_spq;
p_hwfn            788 drivers/net/ethernet/qlogic/qed/qed_spq.c 		qed_spq_add_entry(p_hwfn, p_ent, p_ent->priority);
p_hwfn            791 drivers/net/ethernet/qlogic/qed/qed_spq.c 	return qed_spq_post_list(p_hwfn, &p_spq->pending,
p_hwfn            810 drivers/net/ethernet/qlogic/qed/qed_spq.c static void qed_spq_comp_bmap_update(struct qed_hwfn *p_hwfn, __le16 echo)
p_hwfn            813 drivers/net/ethernet/qlogic/qed/qed_spq.c 	struct qed_spq *p_spq = p_hwfn->p_spq;
p_hwfn            825 drivers/net/ethernet/qlogic/qed/qed_spq.c int qed_spq_post(struct qed_hwfn *p_hwfn,
p_hwfn            829 drivers/net/ethernet/qlogic/qed/qed_spq.c 	struct qed_spq *p_spq = p_hwfn ? p_hwfn->p_spq : NULL;
p_hwfn            833 drivers/net/ethernet/qlogic/qed/qed_spq.c 	if (!p_hwfn)
p_hwfn            837 drivers/net/ethernet/qlogic/qed/qed_spq.c 		DP_NOTICE(p_hwfn, "Got a NULL pointer\n");
p_hwfn            841 drivers/net/ethernet/qlogic/qed/qed_spq.c 	if (p_hwfn->cdev->recov_in_prog) {
p_hwfn            842 drivers/net/ethernet/qlogic/qed/qed_spq.c 		DP_VERBOSE(p_hwfn,
p_hwfn            853 drivers/net/ethernet/qlogic/qed/qed_spq.c 	rc = qed_spq_fill_entry(p_hwfn, p_ent);
p_hwfn            867 drivers/net/ethernet/qlogic/qed/qed_spq.c 	rc = qed_spq_add_entry(p_hwfn, p_ent, p_ent->priority);
p_hwfn            871 drivers/net/ethernet/qlogic/qed/qed_spq.c 	rc = qed_spq_pend_post(p_hwfn);
p_hwfn            889 drivers/net/ethernet/qlogic/qed/qed_spq.c 		rc = qed_spq_block(p_hwfn, p_ent, fw_return_code,
p_hwfn            905 drivers/net/ethernet/qlogic/qed/qed_spq.c 		qed_spq_return_entry(p_hwfn, p_ent);
p_hwfn            912 drivers/net/ethernet/qlogic/qed/qed_spq.c 	qed_spq_comp_bmap_update(p_hwfn, p_ent->elem.hdr.echo);
p_hwfn            917 drivers/net/ethernet/qlogic/qed/qed_spq.c 		__qed_spq_return_entry(p_hwfn, p_ent);
p_hwfn            923 drivers/net/ethernet/qlogic/qed/qed_spq.c int qed_spq_completion(struct qed_hwfn *p_hwfn,
p_hwfn            933 drivers/net/ethernet/qlogic/qed/qed_spq.c 	if (!p_hwfn)
p_hwfn            936 drivers/net/ethernet/qlogic/qed/qed_spq.c 	p_spq = p_hwfn->p_spq;
p_hwfn            944 drivers/net/ethernet/qlogic/qed/qed_spq.c 			qed_spq_comp_bmap_update(p_hwfn, echo);
p_hwfn            953 drivers/net/ethernet/qlogic/qed/qed_spq.c 		DP_VERBOSE(p_hwfn, QED_MSG_SPQ,
p_hwfn            965 drivers/net/ethernet/qlogic/qed/qed_spq.c 		DP_NOTICE(p_hwfn,
p_hwfn            971 drivers/net/ethernet/qlogic/qed/qed_spq.c 	DP_VERBOSE(p_hwfn, QED_MSG_SPQ,
p_hwfn            976 drivers/net/ethernet/qlogic/qed/qed_spq.c 		found->comp_cb.function(p_hwfn, found->comp_cb.cookie, p_data,
p_hwfn            979 drivers/net/ethernet/qlogic/qed/qed_spq.c 		DP_VERBOSE(p_hwfn,
p_hwfn            987 drivers/net/ethernet/qlogic/qed/qed_spq.c 		qed_spq_return_entry(p_hwfn, found);
p_hwfn            992 drivers/net/ethernet/qlogic/qed/qed_spq.c int qed_consq_alloc(struct qed_hwfn *p_hwfn)
p_hwfn           1002 drivers/net/ethernet/qlogic/qed/qed_spq.c 	if (qed_chain_alloc(p_hwfn->cdev,
p_hwfn           1010 drivers/net/ethernet/qlogic/qed/qed_spq.c 	p_hwfn->p_consq = p_consq;
p_hwfn           1018 drivers/net/ethernet/qlogic/qed/qed_spq.c void qed_consq_setup(struct qed_hwfn *p_hwfn)
p_hwfn           1020 drivers/net/ethernet/qlogic/qed/qed_spq.c 	qed_chain_reset(&p_hwfn->p_consq->chain);
p_hwfn           1023 drivers/net/ethernet/qlogic/qed/qed_spq.c void qed_consq_free(struct qed_hwfn *p_hwfn)
p_hwfn           1025 drivers/net/ethernet/qlogic/qed/qed_spq.c 	if (!p_hwfn->p_consq)
p_hwfn           1028 drivers/net/ethernet/qlogic/qed/qed_spq.c 	qed_chain_free(p_hwfn->cdev, &p_hwfn->p_consq->chain);
p_hwfn           1030 drivers/net/ethernet/qlogic/qed/qed_spq.c 	kfree(p_hwfn->p_consq);
p_hwfn           1031 drivers/net/ethernet/qlogic/qed/qed_spq.c 	p_hwfn->p_consq = NULL;
p_hwfn             47 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_sriov_eqe_event(struct qed_hwfn *p_hwfn,
p_hwfn             51 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_iov_bulletin_set_mac(struct qed_hwfn *p_hwfn, u8 *mac, int vfid);
p_hwfn             69 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_sp_vf_start(struct qed_hwfn *p_hwfn, struct qed_vf_info *p_vf)
p_hwfn             79 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	init_data.cid = qed_spq_get_cid(p_hwfn);
p_hwfn             83 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn             94 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	switch (p_hwfn->hw_info.personality) {
p_hwfn            102 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_NOTICE(p_hwfn, "Unknown VF personality %d\n",
p_hwfn            103 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			  p_hwfn->hw_info.personality);
p_hwfn            104 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_sp_destroy_request(p_hwfn, p_ent);
p_hwfn            111 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn,
p_hwfn            123 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn            127 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            130 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_sp_vf_stop(struct qed_hwfn *p_hwfn,
p_hwfn            140 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	init_data.cid = qed_spq_get_cid(p_hwfn);
p_hwfn            144 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_sp_init_request(p_hwfn, &p_ent,
p_hwfn            154 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	return qed_spq_post(p_hwfn, p_ent, NULL);
p_hwfn            157 drivers/net/ethernet/qlogic/qed/qed_sriov.c bool qed_iov_is_valid_vfid(struct qed_hwfn *p_hwfn,
p_hwfn            161 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (!p_hwfn->pf_iov_info) {
p_hwfn            162 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_NOTICE(p_hwfn->cdev, "No iov info\n");
p_hwfn            166 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if ((rel_vf_id >= p_hwfn->cdev->p_iov_info->total_vfs) ||
p_hwfn            170 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if ((!p_hwfn->pf_iov_info->vfs_array[rel_vf_id].b_init) &&
p_hwfn            174 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if ((p_hwfn->pf_iov_info->vfs_array[rel_vf_id].b_malicious) &&
p_hwfn            181 drivers/net/ethernet/qlogic/qed/qed_sriov.c static struct qed_vf_info *qed_iov_get_vf_info(struct qed_hwfn *p_hwfn,
p_hwfn            187 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (!p_hwfn->pf_iov_info) {
p_hwfn            188 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_NOTICE(p_hwfn->cdev, "No iov info\n");
p_hwfn            192 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (qed_iov_is_valid_vfid(p_hwfn, relative_vf_id,
p_hwfn            194 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		vf = &p_hwfn->pf_iov_info->vfs_array[relative_vf_id];
p_hwfn            196 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_ERR(p_hwfn, "qed_iov_get_vf_info: VF[%d] is not enabled\n",
p_hwfn            221 drivers/net/ethernet/qlogic/qed/qed_sriov.c static bool qed_iov_validate_queue_mode(struct qed_hwfn *p_hwfn,
p_hwfn            250 drivers/net/ethernet/qlogic/qed/qed_sriov.c static bool qed_iov_validate_rxq(struct qed_hwfn *p_hwfn,
p_hwfn            256 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn,
p_hwfn            263 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	return qed_iov_validate_queue_mode(p_hwfn, p_vf, rx_qid, mode, false);
p_hwfn            266 drivers/net/ethernet/qlogic/qed/qed_sriov.c static bool qed_iov_validate_txq(struct qed_hwfn *p_hwfn,
p_hwfn            272 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn,
p_hwfn            279 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	return qed_iov_validate_queue_mode(p_hwfn, p_vf, tx_qid, mode, true);
p_hwfn            282 drivers/net/ethernet/qlogic/qed/qed_sriov.c static bool qed_iov_validate_sb(struct qed_hwfn *p_hwfn,
p_hwfn            291 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	DP_VERBOSE(p_hwfn,
p_hwfn            299 drivers/net/ethernet/qlogic/qed/qed_sriov.c static bool qed_iov_validate_active_rxq(struct qed_hwfn *p_hwfn,
p_hwfn            305 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		if (qed_iov_validate_queue_mode(p_hwfn, p_vf, i,
p_hwfn            313 drivers/net/ethernet/qlogic/qed/qed_sriov.c static bool qed_iov_validate_active_txq(struct qed_hwfn *p_hwfn,
p_hwfn            319 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		if (qed_iov_validate_queue_mode(p_hwfn, p_vf, i,
p_hwfn            327 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_iov_post_vf_bulletin(struct qed_hwfn *p_hwfn,
p_hwfn            335 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	p_vf = qed_iov_get_vf_info(p_hwfn, (u16) vfid, true);
p_hwfn            349 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn            357 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	return qed_dmae_host2host(p_hwfn, p_ptt, p_vf->bulletin.phys,
p_hwfn            427 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_setup_vfdb(struct qed_hwfn *p_hwfn)
p_hwfn            429 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	struct qed_hw_sriov_info *p_iov = p_hwfn->cdev->p_iov_info;
p_hwfn            430 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	struct qed_pf_iov *p_iov_info = p_hwfn->pf_iov_info;
p_hwfn            446 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_ERR(p_hwfn,
p_hwfn            471 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		concrete = qed_vfid_to_concrete(p_hwfn, vf->abs_vf_id);
p_hwfn            473 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		vf->opaque_fid = (p_hwfn->hw_info.opaque_fid & 0xff) |
p_hwfn            482 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_iov_allocate_vfdb(struct qed_hwfn *p_hwfn)
p_hwfn            484 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	struct qed_pf_iov *p_iov_info = p_hwfn->pf_iov_info;
p_hwfn            488 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	num_vfs = p_hwfn->cdev->p_iov_info->total_vfs;
p_hwfn            490 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn            496 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	*p_v_addr = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            506 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	*p_v_addr = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            516 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	*p_v_addr = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            523 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	DP_VERBOSE(p_hwfn,
p_hwfn            535 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_free_vfdb(struct qed_hwfn *p_hwfn)
p_hwfn            537 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	struct qed_pf_iov *p_iov_info = p_hwfn->pf_iov_info;
p_hwfn            539 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (p_hwfn->pf_iov_info->mbx_msg_virt_addr)
p_hwfn            540 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            545 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (p_hwfn->pf_iov_info->mbx_reply_virt_addr)
p_hwfn            546 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            552 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            558 drivers/net/ethernet/qlogic/qed/qed_sriov.c int qed_iov_alloc(struct qed_hwfn *p_hwfn)
p_hwfn            562 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (!IS_PF_SRIOV(p_hwfn)) {
p_hwfn            563 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn            572 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	p_hwfn->pf_iov_info = p_sriov;
p_hwfn            574 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_spq_register_async_cb(p_hwfn, PROTOCOLID_COMMON,
p_hwfn            577 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	return qed_iov_allocate_vfdb(p_hwfn);
p_hwfn            580 drivers/net/ethernet/qlogic/qed/qed_sriov.c void qed_iov_setup(struct qed_hwfn *p_hwfn)
p_hwfn            582 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (!IS_PF_SRIOV(p_hwfn) || !IS_PF_SRIOV_ALLOC(p_hwfn))
p_hwfn            585 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_setup_vfdb(p_hwfn);
p_hwfn            588 drivers/net/ethernet/qlogic/qed/qed_sriov.c void qed_iov_free(struct qed_hwfn *p_hwfn)
p_hwfn            590 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_spq_unregister_async_cb(p_hwfn, PROTOCOLID_COMMON);
p_hwfn            592 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (IS_PF_SRIOV_ALLOC(p_hwfn)) {
p_hwfn            593 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_iov_free_vfdb(p_hwfn);
p_hwfn            594 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		kfree(p_hwfn->pf_iov_info);
p_hwfn            604 drivers/net/ethernet/qlogic/qed/qed_sriov.c int qed_iov_hw_info(struct qed_hwfn *p_hwfn)
p_hwfn            606 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	struct qed_dev *cdev = p_hwfn->cdev;
p_hwfn            610 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (IS_VF(p_hwfn->cdev))
p_hwfn            614 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	pos = pci_find_ext_capability(p_hwfn->cdev->pdev,
p_hwfn            617 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV, "No PCIe IOV support\n");
p_hwfn            637 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn            654 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (p_hwfn->cdev->p_iov_info->offset < (256 - p_hwfn->abs_pf_id)) {
p_hwfn            655 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		u32 first = p_hwfn->cdev->p_iov_info->offset +
p_hwfn            656 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			    p_hwfn->abs_pf_id - 16;
p_hwfn            660 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		if (QED_PATH_ID(p_hwfn))
p_hwfn            663 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		u32 first = p_hwfn->cdev->p_iov_info->offset +
p_hwfn            664 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			    p_hwfn->abs_pf_id - 256;
p_hwfn            669 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn            676 drivers/net/ethernet/qlogic/qed/qed_sriov.c static bool _qed_iov_pf_sanity_check(struct qed_hwfn *p_hwfn,
p_hwfn            680 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (IS_VF(p_hwfn->cdev) || !IS_QED_SRIOV(p_hwfn->cdev) ||
p_hwfn            681 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	    !IS_PF_SRIOV_ALLOC(p_hwfn))
p_hwfn            685 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (!qed_iov_is_valid_vfid(p_hwfn, vfid, true, b_fail_malicious))
p_hwfn            691 drivers/net/ethernet/qlogic/qed/qed_sriov.c static bool qed_iov_pf_sanity_check(struct qed_hwfn *p_hwfn, int vfid)
p_hwfn            693 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	return _qed_iov_pf_sanity_check(p_hwfn, vfid, true);
p_hwfn            703 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn            705 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		vf = qed_iov_get_vf_info(p_hwfn, rel_vf_id, false);
p_hwfn            724 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_pglue_clear_err(struct qed_hwfn *p_hwfn,
p_hwfn            727 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_wr(p_hwfn, p_ptt,
p_hwfn            732 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_igu_reset(struct qed_hwfn *p_hwfn,
p_hwfn            738 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_fid_pretend(p_hwfn, p_ptt, (u16) vf->concrete_fid);
p_hwfn            740 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_wr(p_hwfn, p_ptt, IGU_REG_STATISTIC_NUM_VF_MSG_SENT, 0);
p_hwfn            743 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_fid_pretend(p_hwfn, p_ptt, (u16) p_hwfn->hw_info.concrete_fid);
p_hwfn            747 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_int_igu_init_pure_rt_single(p_hwfn, p_ptt,
p_hwfn            752 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_igu_set_int(struct qed_hwfn *p_hwfn,
p_hwfn            758 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_fid_pretend(p_hwfn, p_ptt, (u16) vf->concrete_fid);
p_hwfn            760 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	igu_vf_conf = qed_rd(p_hwfn, p_ptt, IGU_REG_VF_CONFIGURATION);
p_hwfn            767 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_wr(p_hwfn, p_ptt, IGU_REG_VF_CONFIGURATION, igu_vf_conf);
p_hwfn            770 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_fid_pretend(p_hwfn, p_ptt, (u16) p_hwfn->hw_info.concrete_fid);
p_hwfn            774 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_iov_enable_vf_access_msix(struct qed_hwfn *p_hwfn,
p_hwfn            783 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (!QED_IS_BB(p_hwfn->cdev)) {
p_hwfn            784 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_for_each_vf(p_hwfn, i) {
p_hwfn            787 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			p_vf = qed_iov_get_vf_info(p_hwfn, (u16)i, true);
p_hwfn            796 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		return qed_mcp_config_vf_msix(p_hwfn, p_ptt,
p_hwfn            802 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_iov_enable_vf_access(struct qed_hwfn *p_hwfn,
p_hwfn            817 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	DP_VERBOSE(p_hwfn,
p_hwfn            820 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		   vf->abs_vf_id, QED_VF_ABS_ID(p_hwfn, vf));
p_hwfn            822 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_vf_pglue_clear_err(p_hwfn, p_ptt, QED_VF_ABS_ID(p_hwfn, vf));
p_hwfn            824 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_vf_igu_reset(p_hwfn, p_ptt, vf);
p_hwfn            826 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_iov_enable_vf_access_msix(p_hwfn, p_ptt,
p_hwfn            831 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_fid_pretend(p_hwfn, p_ptt, (u16) vf->concrete_fid);
p_hwfn            833 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	SET_FIELD(igu_vf_conf, IGU_VF_CONF_PARENT, p_hwfn->rel_pf_id);
p_hwfn            834 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	STORE_RT_REG(p_hwfn, IGU_REG_VF_CONFIGURATION_RT_OFFSET, igu_vf_conf);
p_hwfn            836 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_init_run(p_hwfn, p_ptt, PHASE_VF, vf->abs_vf_id,
p_hwfn            837 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		     p_hwfn->hw_info.hw_mode);
p_hwfn            840 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_fid_pretend(p_hwfn, p_ptt, (u16) p_hwfn->hw_info.concrete_fid);
p_hwfn            859 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_config_perm_table(struct qed_hwfn *p_hwfn,
p_hwfn            868 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_fw_l2_queue(p_hwfn, vf->vf_queues[qid].fw_rx_qid,
p_hwfn            873 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_wr(p_hwfn, p_ptt, reg_addr, val);
p_hwfn            877 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_enable_vf_traffic(struct qed_hwfn *p_hwfn,
p_hwfn            882 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_vf_igu_reset(p_hwfn, p_ptt, vf);
p_hwfn            884 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_vf_igu_set_int(p_hwfn, p_ptt, vf, 1);
p_hwfn            887 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_config_perm_table(p_hwfn, p_ptt, vf, true);
p_hwfn            890 drivers/net/ethernet/qlogic/qed/qed_sriov.c static u8 qed_iov_alloc_vf_igu_sbs(struct qed_hwfn *p_hwfn,
p_hwfn            899 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (num_rx_queues > p_hwfn->hw_info.p_igu_info->usage.free_cnt_iov)
p_hwfn            900 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		num_rx_queues = p_hwfn->hw_info.p_igu_info->usage.free_cnt_iov;
p_hwfn            901 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	p_hwfn->hw_info.p_igu_info->usage.free_cnt_iov -= num_rx_queues;
p_hwfn            908 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		p_block = qed_get_igu_free_sb(p_hwfn, false);
p_hwfn            913 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_wr(p_hwfn, p_ptt,
p_hwfn            918 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_init_cau_sb_entry(p_hwfn, &sb_entry,
p_hwfn            919 drivers/net/ethernet/qlogic/qed/qed_sriov.c 				      p_hwfn->rel_pf_id, vf->abs_vf_id, 1);
p_hwfn            921 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_dmae_host2grc(p_hwfn, p_ptt,
p_hwfn            932 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_free_vf_igu_sbs(struct qed_hwfn *p_hwfn,
p_hwfn            936 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	struct qed_igu_info *p_info = p_hwfn->hw_info.p_igu_info;
p_hwfn            945 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		val = qed_rd(p_hwfn, p_ptt, addr);
p_hwfn            947 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_wr(p_hwfn, p_ptt, addr, val);
p_hwfn            950 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		p_hwfn->hw_info.p_igu_info->usage.free_cnt_iov++;
p_hwfn            956 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_set_link(struct qed_hwfn *p_hwfn,
p_hwfn            962 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	struct qed_vf_info *p_vf = qed_iov_get_vf_info(p_hwfn,
p_hwfn            995 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_iov_init_hw_for_vf(struct qed_hwfn *p_hwfn,
p_hwfn           1009 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	vf = qed_iov_get_vf_info(p_hwfn, p_params->rel_vf_id, false);
p_hwfn           1011 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_ERR(p_hwfn, "qed_iov_init_hw_for_vf : vf is NULL\n");
p_hwfn           1016 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_NOTICE(p_hwfn, "VF[%d] is already active.\n",
p_hwfn           1023 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		u16 min_vf_qzone = FEAT_NUM(p_hwfn, QED_PF_L2_QUE);
p_hwfn           1025 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		    FEAT_NUM(p_hwfn, QED_VF_L2_QUE) - 1;
p_hwfn           1029 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_NOTICE(p_hwfn,
p_hwfn           1039 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_NOTICE(p_hwfn,
p_hwfn           1047 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_VERBOSE(p_hwfn,
p_hwfn           1054 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_cxt_get_proto_cid_count(p_hwfn, PROTOCOLID_ETH, &cids);
p_hwfn           1055 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	DP_VERBOSE(p_hwfn,
p_hwfn           1061 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	num_of_vf_avaiable_chains = qed_iov_alloc_vf_igu_sbs(p_hwfn,
p_hwfn           1065 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_ERR(p_hwfn, "no available igu sbs\n");
p_hwfn           1079 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           1086 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	memcpy(&link_params, qed_mcp_get_link_params(p_hwfn),
p_hwfn           1088 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	memcpy(&link_state, qed_mcp_get_link_state(p_hwfn), sizeof(link_state));
p_hwfn           1089 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	memcpy(&link_caps, qed_mcp_get_link_capabilities(p_hwfn),
p_hwfn           1091 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_set_link(p_hwfn, p_params->rel_vf_id,
p_hwfn           1094 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_iov_enable_vf_access(p_hwfn, p_ptt, vf);
p_hwfn           1098 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		if (IS_LEAD_HWFN(p_hwfn))
p_hwfn           1099 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			p_hwfn->cdev->p_iov_info->num_vfs++;
p_hwfn           1105 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_iov_release_hw_for_vf(struct qed_hwfn *p_hwfn,
p_hwfn           1113 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	vf = qed_iov_get_vf_info(p_hwfn, rel_vf_id, true);
p_hwfn           1115 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_ERR(p_hwfn, "qed_iov_release_hw_for_vf : vf is NULL\n");
p_hwfn           1128 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	memcpy(&params, qed_mcp_get_link_params(p_hwfn), sizeof(params));
p_hwfn           1129 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	memcpy(&link, qed_mcp_get_link_state(p_hwfn), sizeof(link));
p_hwfn           1130 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	memcpy(&caps, qed_mcp_get_link_capabilities(p_hwfn), sizeof(caps));
p_hwfn           1131 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_set_link(p_hwfn, rel_vf_id, &params, &link, &caps);
p_hwfn           1140 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_vf_igu_set_int(p_hwfn, p_ptt, vf, 0);
p_hwfn           1143 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_config_perm_table(p_hwfn, p_ptt, vf, 0);
p_hwfn           1147 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_free_vf_igu_sbs(p_hwfn, p_ptt, vf);
p_hwfn           1152 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		if (IS_LEAD_HWFN(p_hwfn))
p_hwfn           1153 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			p_hwfn->cdev->p_iov_info->num_vfs--;
p_hwfn           1165 drivers/net/ethernet/qlogic/qed/qed_sriov.c void *qed_add_tlv(struct qed_hwfn *p_hwfn, u8 **offset, u16 type, u16 length)
p_hwfn           1180 drivers/net/ethernet/qlogic/qed/qed_sriov.c void qed_dp_tlv_list(struct qed_hwfn *p_hwfn, void *tlvs_list)
p_hwfn           1189 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           1198 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_NOTICE(p_hwfn, "TLV of length 0 found\n");
p_hwfn           1205 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_NOTICE(p_hwfn, "TLV ==> Buffer overflow\n");
p_hwfn           1213 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_send_response(struct qed_hwfn *p_hwfn,
p_hwfn           1224 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_dp_tlv_list(p_hwfn, mbx->reply_virt);
p_hwfn           1232 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_dmae_host2host(p_hwfn, p_ptt, mbx->reply_phys + sizeof(u64),
p_hwfn           1242 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	REG_WR(p_hwfn,
p_hwfn           1246 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_dmae_host2host(p_hwfn, p_ptt, mbx->reply_phys,
p_hwfn           1251 drivers/net/ethernet/qlogic/qed/qed_sriov.c static u16 qed_iov_vport_to_tlv(struct qed_hwfn *p_hwfn,
p_hwfn           1276 drivers/net/ethernet/qlogic/qed/qed_sriov.c static u16 qed_iov_prep_vp_update_resp_tlvs(struct qed_hwfn *p_hwfn,
p_hwfn           1290 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_add_tlv(p_hwfn, &p_mbx->offset, CHANNEL_TLV_VPORT_UPDATE, size);
p_hwfn           1297 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		resp = qed_add_tlv(p_hwfn, &p_mbx->offset,
p_hwfn           1298 drivers/net/ethernet/qlogic/qed/qed_sriov.c 				   qed_iov_vport_to_tlv(p_hwfn, i), size);
p_hwfn           1305 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn,
p_hwfn           1309 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			   qed_iov_vport_to_tlv(p_hwfn, i), resp->hdr.status);
p_hwfn           1314 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_add_tlv(p_hwfn, &p_mbx->offset, CHANNEL_TLV_LIST_END,
p_hwfn           1320 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_prepare_resp(struct qed_hwfn *p_hwfn,
p_hwfn           1329 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_add_tlv(p_hwfn, &mbx->offset, type, length);
p_hwfn           1330 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_add_tlv(p_hwfn, &mbx->offset, CHANNEL_TLV_LIST_END,
p_hwfn           1333 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_send_response(p_hwfn, p_ptt, vf_info, length, status);
p_hwfn           1337 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_public_vf_info *qed_iov_get_public_vf_info(struct qed_hwfn *p_hwfn,
p_hwfn           1343 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	vf = qed_iov_get_vf_info(p_hwfn, relative_vf_id, b_enabled_only);
p_hwfn           1350 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_clean_vf(struct qed_hwfn *p_hwfn, u8 vfid)
p_hwfn           1354 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	vf_info = qed_iov_get_public_vf_info(p_hwfn, vfid, false);
p_hwfn           1366 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_cleanup(struct qed_hwfn *p_hwfn,
p_hwfn           1388 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			qed_eth_queue_cid_release(p_hwfn,
p_hwfn           1396 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_clean_vf(p_hwfn, p_vf->relative_vf_id);
p_hwfn           1400 drivers/net/ethernet/qlogic/qed/qed_sriov.c static u32 qed_iov_vf_db_bar_size(struct qed_hwfn *p_hwfn,
p_hwfn           1403 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	u32 val = qed_rd(p_hwfn, p_ptt, PGLUE_B_REG_VF_BAR1_SIZE);
p_hwfn           1411 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_iov_vf_mbx_acquire_resc_cids(struct qed_hwfn *p_hwfn,
p_hwfn           1417 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	u8 num_vf_cons = p_hwfn->pf_params.eth_pf_params.num_vf_cons;
p_hwfn           1438 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		bar_size = qed_iov_vf_db_bar_size(p_hwfn, p_ptt);
p_hwfn           1442 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		if (p_hwfn->cdev->num_hwfns > 1)
p_hwfn           1453 drivers/net/ethernet/qlogic/qed/qed_sriov.c static u8 qed_iov_vf_mbx_acquire_resc(struct qed_hwfn *p_hwfn,
p_hwfn           1475 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_fw_l2_queue(p_hwfn, p_vf->vf_queues[i].fw_rx_qid,
p_hwfn           1486 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_vf_mbx_acquire_resc_cids(p_hwfn, p_ptt, p_vf, p_req, p_resp);
p_hwfn           1501 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn,
p_hwfn           1534 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_mbx_acquire_stats(struct qed_hwfn *p_hwfn,
p_hwfn           1553 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_mbx_acquire(struct qed_hwfn *p_hwfn,
p_hwfn           1575 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn,
p_hwfn           1588 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           1594 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_INFO(p_hwfn,
p_hwfn           1606 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if ((p_hwfn->cdev->num_hwfns > 1) &&
p_hwfn           1608 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_INFO(p_hwfn,
p_hwfn           1624 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	pfdev_info->chip_num = p_hwfn->cdev->chip_num;
p_hwfn           1630 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (p_hwfn->cdev->num_hwfns > 1)
p_hwfn           1640 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	resp->pfdev_info.bar_size = qed_iov_vf_db_bar_size(p_hwfn, p_ptt);
p_hwfn           1642 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_vf_mbx_acquire_stats(p_hwfn, &pfdev_info->stats_info);
p_hwfn           1644 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	memcpy(pfdev_info->port_mac, p_hwfn->hw_info.hw_mac_addr, ETH_ALEN);
p_hwfn           1657 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_mcp_get_mfw_ver(p_hwfn, p_ptt, &pfdev_info->mfw_ver, NULL);
p_hwfn           1659 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	pfdev_info->dev_type = p_hwfn->cdev->type;
p_hwfn           1660 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	pfdev_info->chip_rev = p_hwfn->cdev->chip_rev;
p_hwfn           1665 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	vfpf_status = qed_iov_vf_mbx_acquire_resc(p_hwfn, p_ptt, vf,
p_hwfn           1671 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_sp_vf_start(p_hwfn, vf);
p_hwfn           1673 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_NOTICE(p_hwfn, "Failed to start VF[%02x]\n", vf->abs_vf_id);
p_hwfn           1680 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_post_vf_bulletin(p_hwfn, vf->relative_vf_id, p_ptt);
p_hwfn           1682 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	DP_VERBOSE(p_hwfn,
p_hwfn           1700 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_ACQUIRE,
p_hwfn           1704 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int __qed_iov_spoofchk_set(struct qed_hwfn *p_hwfn,
p_hwfn           1711 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           1722 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_sp_vport_update(p_hwfn, &params, QED_SPQ_MODE_EBLOCK, NULL);
p_hwfn           1726 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           1729 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           1737 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_iov_reconfigure_unicast_vlan(struct qed_hwfn *p_hwfn,
p_hwfn           1757 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           1760 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		rc = qed_sp_eth_filter_ucast(p_hwfn, p_vf->opaque_fid,
p_hwfn           1763 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_NOTICE(p_hwfn,
p_hwfn           1774 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_iov_reconfigure_unicast_shadow(struct qed_hwfn *p_hwfn,
p_hwfn           1781 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		rc = qed_iov_reconfigure_unicast_vlan(p_hwfn, p_vf);
p_hwfn           1786 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_iov_configure_vport_forced(struct qed_hwfn *p_hwfn,
p_hwfn           1808 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		rc = qed_sp_eth_filter_ucast(p_hwfn, p_vf->opaque_fid,
p_hwfn           1811 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_NOTICE(p_hwfn,
p_hwfn           1838 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		rc = qed_sp_eth_filter_ucast(p_hwfn, p_vf->opaque_fid,
p_hwfn           1841 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_NOTICE(p_hwfn,
p_hwfn           1860 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		rc = qed_sp_vport_update(p_hwfn,
p_hwfn           1864 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_NOTICE(p_hwfn,
p_hwfn           1879 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			rc = qed_sp_eth_rx_queues_update(p_hwfn,
p_hwfn           1885 drivers/net/ethernet/qlogic/qed/qed_sriov.c 				DP_NOTICE(p_hwfn,
p_hwfn           1902 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_iov_reconfigure_unicast_shadow(p_hwfn, p_vf, events);
p_hwfn           1907 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_mbx_start_vport(struct qed_hwfn *p_hwfn,
p_hwfn           1920 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	vf_info = qed_iov_get_vf_info(p_hwfn, (u16) vf->relative_vf_id, true);
p_hwfn           1922 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_NOTICE(p_hwfn->cdev,
p_hwfn           1931 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_enable_vf_traffic(p_hwfn, p_ptt, vf);
p_hwfn           1936 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           1942 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_int_cau_conf_sb(p_hwfn, p_ptt,
p_hwfn           1977 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_sp_eth_vport_start(p_hwfn, &params);
p_hwfn           1979 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_ERR(p_hwfn,
p_hwfn           1986 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_iov_configure_vport_forced(p_hwfn, vf, *p_bitmap);
p_hwfn           1988 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		__qed_iov_spoofchk_set(p_hwfn, vf, vf->req_spoofchk_val);
p_hwfn           1990 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_VPORT_START,
p_hwfn           1994 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_mbx_stop_vport(struct qed_hwfn *p_hwfn,
p_hwfn           2004 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if ((qed_iov_validate_active_rxq(p_hwfn, vf)) ||
p_hwfn           2005 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	    (qed_iov_validate_active_txq(p_hwfn, vf))) {
p_hwfn           2007 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_NOTICE(p_hwfn,
p_hwfn           2014 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_sp_vport_stop(p_hwfn, vf->opaque_fid, vf->vport_id);
p_hwfn           2016 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_ERR(p_hwfn, "qed_iov_vf_mbx_stop_vport returned error %d\n",
p_hwfn           2026 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_VPORT_TEARDOWN,
p_hwfn           2030 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_mbx_start_rxq_resp(struct qed_hwfn *p_hwfn,
p_hwfn           2051 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	p_tlv = qed_add_tlv(p_hwfn, &mbx->offset, CHANNEL_TLV_START_RXQ,
p_hwfn           2053 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_add_tlv(p_hwfn, &mbx->offset, CHANNEL_TLV_LIST_END,
p_hwfn           2065 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_send_response(p_hwfn, p_ptt, vf, length, status);
p_hwfn           2068 drivers/net/ethernet/qlogic/qed/qed_sriov.c static u8 qed_iov_vf_mbx_qid(struct qed_hwfn *p_hwfn,
p_hwfn           2084 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		    qed_iov_search_list_tlvs(p_hwfn, p_mbx->req_virt,
p_hwfn           2087 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           2095 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           2104 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_mbx_start_rxq(struct qed_hwfn *p_hwfn,
p_hwfn           2121 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (!qed_iov_validate_rxq(p_hwfn, vf, req->rx_qid,
p_hwfn           2123 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	    !qed_iov_validate_sb(p_hwfn, vf, req->hw_sb))
p_hwfn           2126 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qid_usage_idx = qed_iov_vf_mbx_qid(p_hwfn, vf, false);
p_hwfn           2152 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	p_cid = qed_eth_queue_to_cid(p_hwfn, vf->opaque_fid,
p_hwfn           2161 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		REG_WR(p_hwfn,
p_hwfn           2166 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_eth_rxq_start_ramrod(p_hwfn, p_cid,
p_hwfn           2172 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_eth_queue_cid_release(p_hwfn, p_cid);
p_hwfn           2181 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_vf_mbx_start_rxq_resp(p_hwfn, p_ptt, vf, status,
p_hwfn           2257 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_pf_validate_modify_tunn_config(struct qed_hwfn *p_hwfn,
p_hwfn           2261 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	struct qed_eth_cb_ops *ops = p_hwfn->cdev->protocol_ops.eth;
p_hwfn           2262 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	struct qed_tunnel_info *tun = &p_hwfn->cdev->tunnel;
p_hwfn           2264 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	void *cookie = p_hwfn->cdev->ops_cookie;
p_hwfn           2267 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	*tun_features = p_hwfn->cdev->tunn_feature_mask;
p_hwfn           2305 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_for_each_vf(p_hwfn, i) {
p_hwfn           2306 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_iov_bulletin_set_udp_ports(p_hwfn, i, bultn_vxlan_port,
p_hwfn           2310 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_schedule_iov(p_hwfn, QED_IOV_WQ_BULLETIN_UPDATE_FLAG);
p_hwfn           2316 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_mbx_update_tunn_param(struct qed_hwfn *p_hwfn,
p_hwfn           2320 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	struct qed_tunnel_info *p_tun = &p_hwfn->cdev->tunnel;
p_hwfn           2336 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           2366 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_pf_validate_modify_tunn_config(p_hwfn, &tunn_feature_mask,
p_hwfn           2376 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		rc = qed_sp_pf_update_tunn_cfg(p_hwfn, p_ptt, &tunn,
p_hwfn           2382 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_for_each_vf(p_hwfn, i) {
p_hwfn           2383 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			qed_iov_bulletin_set_udp_ports(p_hwfn, i,
p_hwfn           2390 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	p_resp = qed_add_tlv(p_hwfn, &mbx->offset,
p_hwfn           2394 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_add_tlv(p_hwfn, &mbx->offset, CHANNEL_TLV_LIST_END,
p_hwfn           2397 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_send_response(p_hwfn, p_ptt, p_vf, sizeof(*p_resp), status);
p_hwfn           2400 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_mbx_start_txq_resp(struct qed_hwfn *p_hwfn,
p_hwfn           2425 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	p_tlv = qed_add_tlv(p_hwfn, &mbx->offset, CHANNEL_TLV_START_TXQ,
p_hwfn           2427 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_add_tlv(p_hwfn, &mbx->offset, CHANNEL_TLV_LIST_END,
p_hwfn           2434 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_send_response(p_hwfn, p_ptt, p_vf, length, status);
p_hwfn           2437 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_mbx_start_txq(struct qed_hwfn *p_hwfn,
p_hwfn           2457 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (!qed_iov_validate_txq(p_hwfn, vf, req->tx_qid,
p_hwfn           2459 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	    !qed_iov_validate_sb(p_hwfn, vf, req->hw_sb))
p_hwfn           2462 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qid_usage_idx = qed_iov_vf_mbx_qid(p_hwfn, vf, true);
p_hwfn           2489 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	p_cid = qed_eth_queue_to_cid(p_hwfn, vf->opaque_fid,
p_hwfn           2494 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	pq = qed_get_cm_pq_idx_vf(p_hwfn, vf->relative_vf_id);
p_hwfn           2495 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_eth_txq_start_ramrod(p_hwfn, p_cid,
p_hwfn           2499 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_eth_queue_cid_release(p_hwfn, p_cid);
p_hwfn           2508 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_vf_mbx_start_txq_resp(p_hwfn, p_ptt, vf, cid, status);
p_hwfn           2511 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_iov_vf_stop_rxqs(struct qed_hwfn *p_hwfn,
p_hwfn           2519 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (!qed_iov_validate_rxq(p_hwfn, vf, rxq_id, QED_IOV_VALIDATE_Q_NA)) {
p_hwfn           2520 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn,
p_hwfn           2537 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn,
p_hwfn           2546 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_eth_rx_queue_stop(p_hwfn,
p_hwfn           2558 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_iov_vf_stop_txqs(struct qed_hwfn *p_hwfn,
p_hwfn           2565 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (!qed_iov_validate_txq(p_hwfn, vf, txq_id, QED_IOV_VALIDATE_Q_NA))
p_hwfn           2573 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_eth_tx_queue_stop(p_hwfn, p_queue->cids[qid_usage_idx].p_cid);
p_hwfn           2581 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_mbx_stop_rxqs(struct qed_hwfn *p_hwfn,
p_hwfn           2598 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           2606 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qid_usage_idx = qed_iov_vf_mbx_qid(p_hwfn, vf, false);
p_hwfn           2610 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_iov_vf_stop_rxqs(p_hwfn, vf, req->rx_qid,
p_hwfn           2615 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_STOP_RXQS,
p_hwfn           2619 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_mbx_stop_txqs(struct qed_hwfn *p_hwfn,
p_hwfn           2636 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           2644 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qid_usage_idx = qed_iov_vf_mbx_qid(p_hwfn, vf, true);
p_hwfn           2648 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_iov_vf_stop_txqs(p_hwfn, vf, req->tx_qid, qid_usage_idx);
p_hwfn           2653 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_STOP_TXQS,
p_hwfn           2657 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_mbx_update_rxqs(struct qed_hwfn *p_hwfn,
p_hwfn           2676 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qid_usage_idx = qed_iov_vf_mbx_qid(p_hwfn, vf, false);
p_hwfn           2685 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           2695 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		if (!qed_iov_validate_rxq(p_hwfn, vf, i,
p_hwfn           2699 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           2714 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_sp_eth_rx_queues_update(p_hwfn, (void **)&handlers,
p_hwfn           2724 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_UPDATE_RXQ,
p_hwfn           2728 drivers/net/ethernet/qlogic/qed/qed_sriov.c void *qed_iov_search_list_tlvs(struct qed_hwfn *p_hwfn,
p_hwfn           2736 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_NOTICE(p_hwfn, "Zero length TLV found\n");
p_hwfn           2741 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           2751 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_NOTICE(p_hwfn, "TLVs has overrun the buffer size\n");
p_hwfn           2760 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_iov_vp_update_act_param(struct qed_hwfn *p_hwfn,
p_hwfn           2768 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		    qed_iov_search_list_tlvs(p_hwfn, p_mbx->req_virt, tlv);
p_hwfn           2780 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_iov_vp_update_vlan_param(struct qed_hwfn *p_hwfn,
p_hwfn           2789 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		     qed_iov_search_list_tlvs(p_hwfn, p_mbx->req_virt, tlv);
p_hwfn           2805 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_iov_vp_update_tx_switch(struct qed_hwfn *p_hwfn,
p_hwfn           2813 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			  qed_iov_search_list_tlvs(p_hwfn, p_mbx->req_virt,
p_hwfn           2824 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_iov_vp_update_mcast_bin_param(struct qed_hwfn *p_hwfn,
p_hwfn           2832 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	    qed_iov_search_list_tlvs(p_hwfn, p_mbx->req_virt, tlv);
p_hwfn           2843 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_iov_vp_update_accept_flag(struct qed_hwfn *p_hwfn,
p_hwfn           2852 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	    qed_iov_search_list_tlvs(p_hwfn, p_mbx->req_virt, tlv);
p_hwfn           2864 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_iov_vp_update_accept_any_vlan(struct qed_hwfn *p_hwfn,
p_hwfn           2872 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			    qed_iov_search_list_tlvs(p_hwfn, p_mbx->req_virt,
p_hwfn           2884 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_iov_vp_update_rss_param(struct qed_hwfn *p_hwfn,
p_hwfn           2898 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		    qed_iov_search_list_tlvs(p_hwfn, p_mbx->req_virt, tlv);
p_hwfn           2928 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		if (!qed_iov_validate_rxq(p_hwfn, vf, q_idx,
p_hwfn           2930 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_VERBOSE(p_hwfn,
p_hwfn           2950 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_iov_vp_update_sge_tpa_param(struct qed_hwfn *p_hwfn,
p_hwfn           2960 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	    qed_iov_search_list_tlvs(p_hwfn, p_mbx->req_virt, tlv);
p_hwfn           3030 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_mbx_vport_update(struct qed_hwfn *p_hwfn,
p_hwfn           3045 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn,
p_hwfn           3066 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_vp_update_act_param(p_hwfn, &params, mbx, &tlvs_mask);
p_hwfn           3067 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_vp_update_vlan_param(p_hwfn, &params, vf, mbx, &tlvs_mask);
p_hwfn           3068 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_vp_update_tx_switch(p_hwfn, &params, mbx, &tlvs_mask);
p_hwfn           3069 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_vp_update_mcast_bin_param(p_hwfn, &params, mbx, &tlvs_mask);
p_hwfn           3070 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_vp_update_accept_flag(p_hwfn, &params, mbx, &tlvs_mask);
p_hwfn           3071 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_vp_update_accept_any_vlan(p_hwfn, &params, mbx, &tlvs_mask);
p_hwfn           3072 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_vp_update_sge_tpa_param(p_hwfn, vf, &params,
p_hwfn           3081 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_vp_update_rss_param(p_hwfn, vf, &params, p_rss_params,
p_hwfn           3084 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (qed_iov_pre_update_vport(p_hwfn, vf->relative_vf_id,
p_hwfn           3093 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           3096 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           3102 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_sp_vport_update(p_hwfn, &params, QED_SPQ_MODE_EBLOCK, NULL);
p_hwfn           3109 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	length = qed_iov_prep_vp_update_resp_tlvs(p_hwfn, vf, mbx, status,
p_hwfn           3111 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_send_response(p_hwfn, p_ptt, vf, length, status);
p_hwfn           3114 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_iov_vf_update_vlan_shadow(struct qed_hwfn *p_hwfn,
p_hwfn           3130 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_VERBOSE(p_hwfn,
p_hwfn           3160 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_VERBOSE(p_hwfn,
p_hwfn           3172 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_iov_vf_update_mac_shadow(struct qed_hwfn *p_hwfn,
p_hwfn           3197 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           3216 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           3223 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV, "No available place for MAC\n");
p_hwfn           3231 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_iov_vf_update_unicast_shadow(struct qed_hwfn *p_hwfn,
p_hwfn           3238 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		rc = qed_iov_vf_update_mac_shadow(p_hwfn, p_vf, p_params);
p_hwfn           3244 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		rc = qed_iov_vf_update_vlan_shadow(p_hwfn, p_vf, p_params);
p_hwfn           3274 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_mbx_ucast_filter(struct qed_hwfn *p_hwfn,
p_hwfn           3298 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	DP_VERBOSE(p_hwfn,
p_hwfn           3310 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn,
p_hwfn           3319 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (qed_iov_vf_update_unicast_shadow(p_hwfn, vf, &params)) {
p_hwfn           3347 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_iov_chk_ucast(p_hwfn, vf->relative_vf_id, &params);
p_hwfn           3353 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_sp_eth_filter_ucast(p_hwfn, vf->opaque_fid, &params,
p_hwfn           3359 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_UCAST_FILTER,
p_hwfn           3363 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_mbx_int_cleanup(struct qed_hwfn *p_hwfn,
p_hwfn           3371 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_int_igu_init_pure_rt_single(p_hwfn, p_ptt,
p_hwfn           3375 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_INT_CLEANUP,
p_hwfn           3380 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_mbx_close(struct qed_hwfn *p_hwfn,
p_hwfn           3387 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_vf_igu_set_int(p_hwfn, p_ptt, vf, 0);
p_hwfn           3390 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_config_perm_table(p_hwfn, p_ptt, vf, 0);
p_hwfn           3392 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_CLOSE,
p_hwfn           3396 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_mbx_release(struct qed_hwfn *p_hwfn,
p_hwfn           3404 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_vf_cleanup(p_hwfn, p_vf);
p_hwfn           3408 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		rc = qed_sp_vf_stop(p_hwfn, p_vf->concrete_fid,
p_hwfn           3412 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_ERR(p_hwfn, "qed_sp_vf_stop returned error %d\n",
p_hwfn           3420 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_prepare_resp(p_hwfn, p_ptt, p_vf, CHANNEL_TLV_RELEASE,
p_hwfn           3424 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_pf_get_coalesce(struct qed_hwfn *p_hwfn,
p_hwfn           3445 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		if (!qed_iov_validate_rxq(p_hwfn, p_vf, qid,
p_hwfn           3447 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           3454 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		rc = qed_get_rxq_coalesce(p_hwfn, p_ptt, p_cid, &coal);
p_hwfn           3458 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		if (!qed_iov_validate_txq(p_hwfn, p_vf, qid,
p_hwfn           3460 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           3473 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			rc = qed_get_txq_coalesce(p_hwfn, p_ptt, p_cid, &coal);
p_hwfn           3483 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	p_resp = qed_add_tlv(p_hwfn, &mbx->offset, CHANNEL_TLV_COALESCE_READ,
p_hwfn           3487 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_add_tlv(p_hwfn, &mbx->offset, CHANNEL_TLV_LIST_END,
p_hwfn           3490 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_send_response(p_hwfn, p_ptt, p_vf, sizeof(*p_resp), status);
p_hwfn           3493 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_vf_pf_set_coalesce(struct qed_hwfn *p_hwfn,
p_hwfn           3511 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (!qed_iov_validate_rxq(p_hwfn, vf, qid,
p_hwfn           3513 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           3519 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (!qed_iov_validate_txq(p_hwfn, vf, qid,
p_hwfn           3521 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           3527 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	DP_VERBOSE(p_hwfn,
p_hwfn           3535 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		rc = qed_set_rxq_coalesce(p_hwfn, p_ptt, rx_coal, p_cid);
p_hwfn           3537 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_VERBOSE(p_hwfn,
p_hwfn           3556 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			rc = qed_set_txq_coalesce(p_hwfn, p_ptt, tx_coal,
p_hwfn           3560 drivers/net/ethernet/qlogic/qed/qed_sriov.c 				DP_VERBOSE(p_hwfn,
p_hwfn           3572 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_COALESCE_UPDATE,
p_hwfn           3576 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_iov_vf_flr_poll_dorq(struct qed_hwfn *p_hwfn,
p_hwfn           3582 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_fid_pretend(p_hwfn, p_ptt, (u16) p_vf->concrete_fid);
p_hwfn           3585 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		val = qed_rd(p_hwfn, p_ptt, DORQ_REG_VF_USAGE_CNT);
p_hwfn           3590 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_fid_pretend(p_hwfn, p_ptt, (u16) p_hwfn->hw_info.concrete_fid);
p_hwfn           3593 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_ERR(p_hwfn,
p_hwfn           3603 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_iov_vf_flr_poll_pbf(struct qed_hwfn *p_hwfn,
p_hwfn           3613 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		cons[i] = qed_rd(p_hwfn, p_ptt,
p_hwfn           3616 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		prod = qed_rd(p_hwfn, p_ptt,
p_hwfn           3628 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			tmp = qed_rd(p_hwfn, p_ptt,
p_hwfn           3642 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_ERR(p_hwfn, "VF[%d] - pbf polling failed on VOQ %d\n",
p_hwfn           3650 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_iov_vf_flr_poll(struct qed_hwfn *p_hwfn,
p_hwfn           3655 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_iov_vf_flr_poll_dorq(p_hwfn, p_vf, p_ptt);
p_hwfn           3659 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_iov_vf_flr_poll_pbf(p_hwfn, p_vf, p_ptt);
p_hwfn           3667 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_iov_execute_vf_flr_cleanup(struct qed_hwfn *p_hwfn,
p_hwfn           3674 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	p_vf = qed_iov_get_vf_info(p_hwfn, rel_vf_id, false);
p_hwfn           3678 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (p_hwfn->pf_iov_info->pending_flr[rel_vf_id / 64] &
p_hwfn           3682 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           3685 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_iov_vf_cleanup(p_hwfn, p_vf);
p_hwfn           3691 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		rc = qed_iov_vf_flr_poll(p_hwfn, p_vf, p_ptt);
p_hwfn           3695 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		rc = qed_final_cleanup(p_hwfn, p_ptt, vfid, true);
p_hwfn           3697 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_ERR(p_hwfn, "Failed handle FLR of VF[%d]\n", vfid);
p_hwfn           3704 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		REG_WR(p_hwfn,
p_hwfn           3713 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		rc = qed_iov_enable_vf_access(p_hwfn, p_ptt, p_vf);
p_hwfn           3715 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_ERR(p_hwfn, "Failed to re-enable VF[%d] acces\n",
p_hwfn           3724 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		p_hwfn->pf_iov_info->pending_flr[rel_vf_id / 64] &=
p_hwfn           3733 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_iov_vf_flr_cleanup(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
p_hwfn           3747 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	for (i = 0; i < p_hwfn->cdev->p_iov_info->total_vfs; i++)
p_hwfn           3748 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_iov_execute_vf_flr_cleanup(p_hwfn, p_ptt, i, ack_vfs);
p_hwfn           3750 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_mcp_ack_vf_flr(p_hwfn, p_ptt, ack_vfs);
p_hwfn           3754 drivers/net/ethernet/qlogic/qed/qed_sriov.c bool qed_iov_mark_vf_flr(struct qed_hwfn *p_hwfn, u32 *p_disabled_vfs)
p_hwfn           3759 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	DP_VERBOSE(p_hwfn, QED_MSG_IOV, "Marking FLR-ed VFs\n");
p_hwfn           3761 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           3765 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (!p_hwfn->cdev->p_iov_info) {
p_hwfn           3766 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_NOTICE(p_hwfn, "VF flr but no IOV\n");
p_hwfn           3771 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	for (i = 0; i < p_hwfn->cdev->p_iov_info->total_vfs; i++) {
p_hwfn           3775 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		p_vf = qed_iov_get_vf_info(p_hwfn, i, false);
p_hwfn           3781 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			u64 *p_flr = p_hwfn->pf_iov_info->pending_flr;
p_hwfn           3784 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           3803 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_get_link(struct qed_hwfn *p_hwfn,
p_hwfn           3809 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	struct qed_vf_info *p_vf = qed_iov_get_vf_info(p_hwfn,
p_hwfn           3820 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		__qed_vf_get_link_params(p_hwfn, p_params, p_bulletin);
p_hwfn           3822 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		__qed_vf_get_link_state(p_hwfn, p_link, p_bulletin);
p_hwfn           3824 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		__qed_vf_get_link_caps(p_hwfn, p_caps, p_bulletin);
p_hwfn           3828 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_iov_vf_pf_bulletin_update_mac(struct qed_hwfn *p_hwfn,
p_hwfn           3839 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn,
p_hwfn           3850 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           3855 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_prepare_resp(p_hwfn, p_ptt, p_vf,
p_hwfn           3861 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_process_mbx_req(struct qed_hwfn *p_hwfn,
p_hwfn           3867 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	p_vf = qed_iov_get_vf_info(p_hwfn, (u16) vfid, true);
p_hwfn           3875 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_NOTICE(p_hwfn,
p_hwfn           3884 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           3893 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			qed_iov_vf_mbx_acquire(p_hwfn, p_ptt, p_vf);
p_hwfn           3896 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			qed_iov_vf_mbx_start_vport(p_hwfn, p_ptt, p_vf);
p_hwfn           3899 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			qed_iov_vf_mbx_stop_vport(p_hwfn, p_ptt, p_vf);
p_hwfn           3902 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			qed_iov_vf_mbx_start_rxq(p_hwfn, p_ptt, p_vf);
p_hwfn           3905 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			qed_iov_vf_mbx_start_txq(p_hwfn, p_ptt, p_vf);
p_hwfn           3908 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			qed_iov_vf_mbx_stop_rxqs(p_hwfn, p_ptt, p_vf);
p_hwfn           3911 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			qed_iov_vf_mbx_stop_txqs(p_hwfn, p_ptt, p_vf);
p_hwfn           3914 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			qed_iov_vf_mbx_update_rxqs(p_hwfn, p_ptt, p_vf);
p_hwfn           3917 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			qed_iov_vf_mbx_vport_update(p_hwfn, p_ptt, p_vf);
p_hwfn           3920 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			qed_iov_vf_mbx_ucast_filter(p_hwfn, p_ptt, p_vf);
p_hwfn           3923 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			qed_iov_vf_mbx_close(p_hwfn, p_ptt, p_vf);
p_hwfn           3926 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			qed_iov_vf_mbx_int_cleanup(p_hwfn, p_ptt, p_vf);
p_hwfn           3929 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			qed_iov_vf_mbx_release(p_hwfn, p_ptt, p_vf);
p_hwfn           3932 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			qed_iov_vf_mbx_update_tunn_param(p_hwfn, p_ptt, p_vf);
p_hwfn           3935 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			qed_iov_vf_pf_set_coalesce(p_hwfn, p_ptt, p_vf);
p_hwfn           3938 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			qed_iov_vf_pf_get_coalesce(p_hwfn, p_ptt, p_vf);
p_hwfn           3941 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			qed_iov_vf_pf_bulletin_update_mac(p_hwfn, p_ptt, p_vf);
p_hwfn           3945 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           3949 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_iov_prepare_resp(p_hwfn, p_ptt, p_vf,
p_hwfn           3960 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_NOTICE(p_hwfn,
p_hwfn           3973 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			qed_iov_prepare_resp(p_hwfn, p_ptt, p_vf,
p_hwfn           3978 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_VERBOSE(p_hwfn,
p_hwfn           3986 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_pf_get_pending_events(struct qed_hwfn *p_hwfn, u64 *events)
p_hwfn           3992 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_for_each_vf(p_hwfn, i) {
p_hwfn           3995 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		p_vf = &p_hwfn->pf_iov_info->vfs_array[i];
p_hwfn           4001 drivers/net/ethernet/qlogic/qed/qed_sriov.c static struct qed_vf_info *qed_sriov_get_vf_from_absid(struct qed_hwfn *p_hwfn,
p_hwfn           4004 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	u8 min = (u8) p_hwfn->cdev->p_iov_info->first_vf_in_pf;
p_hwfn           4006 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (!_qed_iov_pf_sanity_check(p_hwfn, (int)abs_vfid - min, false)) {
p_hwfn           4007 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn,
p_hwfn           4014 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	return &p_hwfn->pf_iov_info->vfs_array[(u8) abs_vfid - min];
p_hwfn           4017 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_sriov_vfpf_msg(struct qed_hwfn *p_hwfn,
p_hwfn           4020 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	struct qed_vf_info *p_vf = qed_sriov_get_vf_from_absid(p_hwfn,
p_hwfn           4033 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_schedule_iov(p_hwfn, QED_IOV_WQ_MSG_FLAG);
p_hwfn           4038 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_sriov_vfpf_malicious(struct qed_hwfn *p_hwfn,
p_hwfn           4043 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	p_vf = qed_sriov_get_vf_from_absid(p_hwfn, p_data->vf_id);
p_hwfn           4049 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_NOTICE(p_hwfn,
p_hwfn           4055 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_INFO(p_hwfn,
p_hwfn           4061 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_sriov_eqe_event(struct qed_hwfn *p_hwfn,
p_hwfn           4068 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		return qed_sriov_vfpf_msg(p_hwfn, le16_to_cpu(echo),
p_hwfn           4071 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_sriov_vfpf_malicious(p_hwfn, &data->malicious_vf);
p_hwfn           4074 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_INFO(p_hwfn->cdev, "Unknown sriov eqe event 0x%02x\n",
p_hwfn           4080 drivers/net/ethernet/qlogic/qed/qed_sriov.c u16 qed_iov_get_next_active_vf(struct qed_hwfn *p_hwfn, u16 rel_vf_id)
p_hwfn           4082 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	struct qed_hw_sriov_info *p_iov = p_hwfn->cdev->p_iov_info;
p_hwfn           4089 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		if (qed_iov_is_valid_vfid(p_hwfn, rel_vf_id, true, false))
p_hwfn           4096 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_iov_copy_vf_msg(struct qed_hwfn *p_hwfn, struct qed_ptt *ptt,
p_hwfn           4102 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	vf_info = qed_iov_get_vf_info(p_hwfn, (u16) vfid, true);
p_hwfn           4110 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (qed_dmae_host2host(p_hwfn, ptt,
p_hwfn           4114 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           4123 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_bulletin_set_forced_mac(struct qed_hwfn *p_hwfn,
p_hwfn           4129 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	vf_info = qed_iov_get_vf_info(p_hwfn, (u16)vfid, true);
p_hwfn           4131 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_NOTICE(p_hwfn->cdev,
p_hwfn           4137 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_NOTICE(p_hwfn->cdev,
p_hwfn           4158 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_configure_vport_forced(p_hwfn, vf_info, feature);
p_hwfn           4161 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_iov_bulletin_set_mac(struct qed_hwfn *p_hwfn, u8 *mac, int vfid)
p_hwfn           4166 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	vf_info = qed_iov_get_vf_info(p_hwfn, (u16)vfid, true);
p_hwfn           4168 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_NOTICE(p_hwfn->cdev, "Can not set MAC, invalid vfid [%d]\n",
p_hwfn           4174 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_NOTICE(p_hwfn->cdev, "Can't set MAC to malicious VF [%d]\n",
p_hwfn           4180 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           4191 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_iov_configure_vport_forced(p_hwfn, vf_info, feature);
p_hwfn           4196 drivers/net/ethernet/qlogic/qed/qed_sriov.c static void qed_iov_bulletin_set_forced_vlan(struct qed_hwfn *p_hwfn,
p_hwfn           4202 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	vf_info = qed_iov_get_vf_info(p_hwfn, (u16) vfid, true);
p_hwfn           4204 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_NOTICE(p_hwfn->cdev,
p_hwfn           4210 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_NOTICE(p_hwfn->cdev,
p_hwfn           4222 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	qed_iov_configure_vport_forced(p_hwfn, vf_info, feature);
p_hwfn           4225 drivers/net/ethernet/qlogic/qed/qed_sriov.c void qed_iov_bulletin_set_udp_ports(struct qed_hwfn *p_hwfn,
p_hwfn           4230 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	vf_info = qed_iov_get_vf_info(p_hwfn, (u16)vfid, true);
p_hwfn           4232 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_NOTICE(p_hwfn->cdev,
p_hwfn           4238 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           4248 drivers/net/ethernet/qlogic/qed/qed_sriov.c static bool qed_iov_vf_has_vport_instance(struct qed_hwfn *p_hwfn, int vfid)
p_hwfn           4252 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	p_vf_info = qed_iov_get_vf_info(p_hwfn, (u16) vfid, true);
p_hwfn           4259 drivers/net/ethernet/qlogic/qed/qed_sriov.c static bool qed_iov_is_vf_stopped(struct qed_hwfn *p_hwfn, int vfid)
p_hwfn           4263 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	p_vf_info = qed_iov_get_vf_info(p_hwfn, (u16) vfid, true);
p_hwfn           4270 drivers/net/ethernet/qlogic/qed/qed_sriov.c static bool qed_iov_spoofchk_get(struct qed_hwfn *p_hwfn, int vfid)
p_hwfn           4274 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	vf_info = qed_iov_get_vf_info(p_hwfn, (u16) vfid, true);
p_hwfn           4281 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_iov_spoofchk_set(struct qed_hwfn *p_hwfn, int vfid, bool val)
p_hwfn           4286 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (!qed_iov_pf_sanity_check(p_hwfn, vfid)) {
p_hwfn           4287 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		DP_NOTICE(p_hwfn,
p_hwfn           4292 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	vf = qed_iov_get_vf_info(p_hwfn, (u16) vfid, true);
p_hwfn           4296 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	if (!qed_iov_vf_has_vport_instance(p_hwfn, vfid)) {
p_hwfn           4303 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = __qed_iov_spoofchk_set(p_hwfn, vf, val);
p_hwfn           4309 drivers/net/ethernet/qlogic/qed/qed_sriov.c static u8 *qed_iov_bulletin_get_mac(struct qed_hwfn *p_hwfn, u16 rel_vf_id)
p_hwfn           4313 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	p_vf = qed_iov_get_vf_info(p_hwfn, rel_vf_id, true);
p_hwfn           4324 drivers/net/ethernet/qlogic/qed/qed_sriov.c static u8 *qed_iov_bulletin_get_forced_mac(struct qed_hwfn *p_hwfn,
p_hwfn           4329 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	p_vf = qed_iov_get_vf_info(p_hwfn, rel_vf_id, true);
p_hwfn           4340 drivers/net/ethernet/qlogic/qed/qed_sriov.c qed_iov_bulletin_get_forced_vlan(struct qed_hwfn *p_hwfn, u16 rel_vf_id)
p_hwfn           4344 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	p_vf = qed_iov_get_vf_info(p_hwfn, rel_vf_id, true);
p_hwfn           4354 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_iov_configure_tx_rate(struct qed_hwfn *p_hwfn,
p_hwfn           4362 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	vf = qed_iov_get_vf_info(p_hwfn, (u16)vfid, true);
p_hwfn           4366 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	rc = qed_fw_vport(p_hwfn, vf->vport_id, &abs_vp_id);
p_hwfn           4370 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	p_link = &QED_LEADING_HWFN(p_hwfn->cdev)->mcp_info->link_output;
p_hwfn           4372 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	return qed_init_vport_rl(p_hwfn, p_ptt, abs_vp_id, (u32)val,
p_hwfn           4384 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           4386 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		if (!qed_iov_pf_sanity_check(p_hwfn, vfid)) {
p_hwfn           4387 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_NOTICE(p_hwfn,
p_hwfn           4399 drivers/net/ethernet/qlogic/qed/qed_sriov.c static int qed_iov_get_vf_min_rate(struct qed_hwfn *p_hwfn, int vfid)
p_hwfn           4404 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	vf_info = qed_iov_get_vf_info(p_hwfn, (u16) vfid, true);
p_hwfn           4408 drivers/net/ethernet/qlogic/qed/qed_sriov.c 	vf_vp_wfq = &p_hwfn->qm_info.wfq_data[vf_info->vport_id];
p_hwfn           4832 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           4834 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		rc = qed_iov_spoofchk_set(p_hwfn, vfid, val);
p_hwfn           4847 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           4850 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		if (!qed_iov_pf_sanity_check(p_hwfn, vfid)) {
p_hwfn           4851 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_NOTICE(p_hwfn,
p_hwfn           4856 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		vf = qed_iov_get_public_vf_info(p_hwfn, vfid, true);
p_hwfn           4860 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		qed_inform_vf_link_state(p_hwfn);
p_hwfn           5235 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		struct qed_hwfn *p_hwfn = &cdev->hwfns[i];
p_hwfn           5240 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		if (IS_PF(p_hwfn->cdev) && !IS_PF_SRIOV(p_hwfn))
p_hwfn           5245 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			 PCI_SLOT(cdev->pdev->devfn), p_hwfn->abs_pf_id);
p_hwfn           5247 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		p_hwfn->iov_wq = create_singlethread_workqueue(name);
p_hwfn           5248 drivers/net/ethernet/qlogic/qed/qed_sriov.c 		if (!p_hwfn->iov_wq) {
p_hwfn           5249 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			DP_NOTICE(p_hwfn, "Cannot create iov workqueue\n");
p_hwfn           5254 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			INIT_DELAYED_WORK(&p_hwfn->iov_task, qed_iov_pf_task);
p_hwfn           5256 drivers/net/ethernet/qlogic/qed/qed_sriov.c 			INIT_DELAYED_WORK(&p_hwfn->iov_task, qed_iov_vf_task);
p_hwfn             45 drivers/net/ethernet/qlogic/qed/qed_sriov.h #define IS_PF_SRIOV(p_hwfn)     (!!((p_hwfn)->cdev->p_iov_info))
p_hwfn             49 drivers/net/ethernet/qlogic/qed/qed_sriov.h #define IS_PF_SRIOV(p_hwfn)     (0)
p_hwfn             51 drivers/net/ethernet/qlogic/qed/qed_sriov.h #define IS_PF_SRIOV_ALLOC(p_hwfn)       (!!((p_hwfn)->pf_iov_info))
p_hwfn            212 drivers/net/ethernet/qlogic/qed/qed_sriov.h #define QED_VF_ABS_ID(p_hwfn, p_vf)	(QED_PATH_ID(p_hwfn) ?		      \
p_hwfn            289 drivers/net/ethernet/qlogic/qed/qed_sriov.h bool qed_iov_is_valid_vfid(struct qed_hwfn *p_hwfn,
p_hwfn            301 drivers/net/ethernet/qlogic/qed/qed_sriov.h u16 qed_iov_get_next_active_vf(struct qed_hwfn *p_hwfn, u16 rel_vf_id);
p_hwfn            303 drivers/net/ethernet/qlogic/qed/qed_sriov.h void qed_iov_bulletin_set_udp_ports(struct qed_hwfn *p_hwfn,
p_hwfn            314 drivers/net/ethernet/qlogic/qed/qed_sriov.h int qed_iov_hw_info(struct qed_hwfn *p_hwfn);
p_hwfn            326 drivers/net/ethernet/qlogic/qed/qed_sriov.h void *qed_add_tlv(struct qed_hwfn *p_hwfn, u8 **offset, u16 type, u16 length);
p_hwfn            334 drivers/net/ethernet/qlogic/qed/qed_sriov.h void qed_dp_tlv_list(struct qed_hwfn *p_hwfn, void *tlvs_list);
p_hwfn            343 drivers/net/ethernet/qlogic/qed/qed_sriov.h int qed_iov_alloc(struct qed_hwfn *p_hwfn);
p_hwfn            350 drivers/net/ethernet/qlogic/qed/qed_sriov.h void qed_iov_setup(struct qed_hwfn *p_hwfn);
p_hwfn            357 drivers/net/ethernet/qlogic/qed/qed_sriov.h void qed_iov_free(struct qed_hwfn *p_hwfn);
p_hwfn            374 drivers/net/ethernet/qlogic/qed/qed_sriov.h bool qed_iov_mark_vf_flr(struct qed_hwfn *p_hwfn, u32 *disabled_vfs);
p_hwfn            385 drivers/net/ethernet/qlogic/qed/qed_sriov.h void *qed_iov_search_list_tlvs(struct qed_hwfn *p_hwfn,
p_hwfn            397 drivers/net/ethernet/qlogic/qed/qed_sriov.h qed_iov_is_valid_vfid(struct qed_hwfn *p_hwfn,
p_hwfn            403 drivers/net/ethernet/qlogic/qed/qed_sriov.h static inline u16 qed_iov_get_next_active_vf(struct qed_hwfn *p_hwfn,
p_hwfn            410 drivers/net/ethernet/qlogic/qed/qed_sriov.h qed_iov_bulletin_set_udp_ports(struct qed_hwfn *p_hwfn, int vfid,
p_hwfn            415 drivers/net/ethernet/qlogic/qed/qed_sriov.h static inline int qed_iov_hw_info(struct qed_hwfn *p_hwfn)
p_hwfn            420 drivers/net/ethernet/qlogic/qed/qed_sriov.h static inline int qed_iov_alloc(struct qed_hwfn *p_hwfn)
p_hwfn            425 drivers/net/ethernet/qlogic/qed/qed_sriov.h static inline void qed_iov_setup(struct qed_hwfn *p_hwfn)
p_hwfn            429 drivers/net/ethernet/qlogic/qed/qed_sriov.h static inline void qed_iov_free(struct qed_hwfn *p_hwfn)
p_hwfn            437 drivers/net/ethernet/qlogic/qed/qed_sriov.h static inline bool qed_iov_mark_vf_flr(struct qed_hwfn *p_hwfn,
p_hwfn             39 drivers/net/ethernet/qlogic/qed/qed_vf.c static void *qed_vf_pf_prep(struct qed_hwfn *p_hwfn, u16 type, u16 length)
p_hwfn             41 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn             51 drivers/net/ethernet/qlogic/qed/qed_vf.c 	DP_VERBOSE(p_hwfn,
p_hwfn             64 drivers/net/ethernet/qlogic/qed/qed_vf.c 	p_tlv = qed_add_tlv(p_hwfn, &p_iov->offset, type, length);
p_hwfn             73 drivers/net/ethernet/qlogic/qed/qed_vf.c static void qed_vf_pf_req_end(struct qed_hwfn *p_hwfn, int req_status)
p_hwfn             75 drivers/net/ethernet/qlogic/qed/qed_vf.c 	union pfvf_tlvs *resp = p_hwfn->vf_iov_info->pf2vf_reply;
p_hwfn             77 drivers/net/ethernet/qlogic/qed/qed_vf.c 	DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn             81 drivers/net/ethernet/qlogic/qed/qed_vf.c 	mutex_unlock(&(p_hwfn->vf_iov_info->mutex));
p_hwfn             84 drivers/net/ethernet/qlogic/qed/qed_vf.c static int qed_send_msg2pf(struct qed_hwfn *p_hwfn, u8 *done, u32 resp_size)
p_hwfn             86 drivers/net/ethernet/qlogic/qed/qed_vf.c 	union vfpf_tlvs *p_req = p_hwfn->vf_iov_info->vf2pf_request;
p_hwfn             94 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_dp_tlv_list(p_hwfn, p_req);
p_hwfn            103 drivers/net/ethernet/qlogic/qed/qed_vf.c 	DP_VERBOSE(p_hwfn,
p_hwfn            106 drivers/net/ethernet/qlogic/qed/qed_vf.c 		   GET_FIELD(p_hwfn->hw_info.concrete_fid,
p_hwfn            108 drivers/net/ethernet/qlogic/qed/qed_vf.c 		   upper_32_bits(p_hwfn->vf_iov_info->vf2pf_request_phys),
p_hwfn            109 drivers/net/ethernet/qlogic/qed/qed_vf.c 		   lower_32_bits(p_hwfn->vf_iov_info->vf2pf_request_phys),
p_hwfn            113 drivers/net/ethernet/qlogic/qed/qed_vf.c 	REG_WR(p_hwfn,
p_hwfn            115 drivers/net/ethernet/qlogic/qed/qed_vf.c 	       lower_32_bits(p_hwfn->vf_iov_info->vf2pf_request_phys));
p_hwfn            117 drivers/net/ethernet/qlogic/qed/qed_vf.c 	REG_WR(p_hwfn,
p_hwfn            119 drivers/net/ethernet/qlogic/qed/qed_vf.c 	       upper_32_bits(p_hwfn->vf_iov_info->vf2pf_request_phys));
p_hwfn            126 drivers/net/ethernet/qlogic/qed/qed_vf.c 	REG_WR(p_hwfn, (uintptr_t)&zone_data->trigger, *((u32 *)&trigger));
p_hwfn            137 drivers/net/ethernet/qlogic/qed/qed_vf.c 		DP_NOTICE(p_hwfn,
p_hwfn            144 drivers/net/ethernet/qlogic/qed/qed_vf.c 			DP_NOTICE(p_hwfn,
p_hwfn            148 drivers/net/ethernet/qlogic/qed/qed_vf.c 			DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn            156 drivers/net/ethernet/qlogic/qed/qed_vf.c static void qed_vf_pf_add_qid(struct qed_hwfn *p_hwfn,
p_hwfn            159 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn            167 drivers/net/ethernet/qlogic/qed/qed_vf.c 	p_qid_tlv = qed_add_tlv(p_hwfn, &p_iov->offset,
p_hwfn            172 drivers/net/ethernet/qlogic/qed/qed_vf.c static int _qed_vf_pf_release(struct qed_hwfn *p_hwfn, bool b_final)
p_hwfn            174 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn            181 drivers/net/ethernet/qlogic/qed/qed_vf.c 	req = qed_vf_pf_prep(p_hwfn, CHANNEL_TLV_RELEASE, sizeof(*req));
p_hwfn            184 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_add_tlv(p_hwfn, &p_iov->offset,
p_hwfn            188 drivers/net/ethernet/qlogic/qed/qed_vf.c 	rc = qed_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
p_hwfn            193 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_req_end(p_hwfn, rc);
p_hwfn            197 drivers/net/ethernet/qlogic/qed/qed_vf.c 	p_hwfn->b_int_enabled = 0;
p_hwfn            200 drivers/net/ethernet/qlogic/qed/qed_vf.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            205 drivers/net/ethernet/qlogic/qed/qed_vf.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            211 drivers/net/ethernet/qlogic/qed/qed_vf.c 		dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            216 drivers/net/ethernet/qlogic/qed/qed_vf.c 	kfree(p_hwfn->vf_iov_info);
p_hwfn            217 drivers/net/ethernet/qlogic/qed/qed_vf.c 	p_hwfn->vf_iov_info = NULL;
p_hwfn            222 drivers/net/ethernet/qlogic/qed/qed_vf.c int qed_vf_pf_release(struct qed_hwfn *p_hwfn)
p_hwfn            224 drivers/net/ethernet/qlogic/qed/qed_vf.c 	return _qed_vf_pf_release(p_hwfn, true);
p_hwfn            228 drivers/net/ethernet/qlogic/qed/qed_vf.c static void qed_vf_pf_acquire_reduce_resc(struct qed_hwfn *p_hwfn,
p_hwfn            232 drivers/net/ethernet/qlogic/qed/qed_vf.c 	DP_VERBOSE(p_hwfn,
p_hwfn            258 drivers/net/ethernet/qlogic/qed/qed_vf.c static int qed_vf_pf_acquire(struct qed_hwfn *p_hwfn)
p_hwfn            260 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn            270 drivers/net/ethernet/qlogic/qed/qed_vf.c 	req = qed_vf_pf_prep(p_hwfn, CHANNEL_TLV_ACQUIRE, sizeof(*req));
p_hwfn            274 drivers/net/ethernet/qlogic/qed/qed_vf.c 	req->vfdev_info.opaque_fid = p_hwfn->hw_info.opaque_fid;
p_hwfn            306 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_add_tlv(p_hwfn, &p_iov->offset,
p_hwfn            310 drivers/net/ethernet/qlogic/qed/qed_vf.c 		DP_VERBOSE(p_hwfn,
p_hwfn            317 drivers/net/ethernet/qlogic/qed/qed_vf.c 		rc = qed_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
p_hwfn            321 drivers/net/ethernet/qlogic/qed/qed_vf.c 			DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn            346 drivers/net/ethernet/qlogic/qed/qed_vf.c 			DP_VERBOSE(p_hwfn, QED_MSG_IOV, "resources acquired\n");
p_hwfn            350 drivers/net/ethernet/qlogic/qed/qed_vf.c 			qed_vf_pf_acquire_reduce_resc(p_hwfn, p_resc,
p_hwfn            355 drivers/net/ethernet/qlogic/qed/qed_vf.c 				DP_NOTICE(p_hwfn,
p_hwfn            369 drivers/net/ethernet/qlogic/qed/qed_vf.c 					DP_NOTICE(p_hwfn,
p_hwfn            374 drivers/net/ethernet/qlogic/qed/qed_vf.c 					DP_INFO(p_hwfn,
p_hwfn            385 drivers/net/ethernet/qlogic/qed/qed_vf.c 			DP_NOTICE(p_hwfn, "PF rejected acquisition by VF\n");
p_hwfn            389 drivers/net/ethernet/qlogic/qed/qed_vf.c 			DP_ERR(p_hwfn,
p_hwfn            412 drivers/net/ethernet/qlogic/qed/qed_vf.c 	p_hwfn->cdev->type = resp->pfdev_info.dev_type;
p_hwfn            413 drivers/net/ethernet/qlogic/qed/qed_vf.c 	p_hwfn->cdev->chip_rev = resp->pfdev_info.chip_rev;
p_hwfn            415 drivers/net/ethernet/qlogic/qed/qed_vf.c 	p_hwfn->cdev->chip_num = pfdev_info->chip_num & 0xffff;
p_hwfn            418 drivers/net/ethernet/qlogic/qed/qed_vf.c 	if (IS_LEAD_HWFN(p_hwfn)) {
p_hwfn            420 drivers/net/ethernet/qlogic/qed/qed_vf.c 			DP_NOTICE(p_hwfn, "100g VF\n");
p_hwfn            421 drivers/net/ethernet/qlogic/qed/qed_vf.c 			p_hwfn->cdev->num_hwfns = 2;
p_hwfn            427 drivers/net/ethernet/qlogic/qed/qed_vf.c 		DP_INFO(p_hwfn,
p_hwfn            433 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_req_end(p_hwfn, rc);
p_hwfn            438 drivers/net/ethernet/qlogic/qed/qed_vf.c u32 qed_vf_hw_bar_size(struct qed_hwfn *p_hwfn, enum BAR_ID bar_id)
p_hwfn            447 drivers/net/ethernet/qlogic/qed/qed_vf.c 	bar_size = p_hwfn->vf_iov_info->acquire_resp.pfdev_info.bar_size;
p_hwfn            453 drivers/net/ethernet/qlogic/qed/qed_vf.c int qed_vf_hw_prepare(struct qed_hwfn *p_hwfn)
p_hwfn            455 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_hwfn *p_lead = QED_LEADING_HWFN(p_hwfn->cdev);
p_hwfn            463 drivers/net/ethernet/qlogic/qed/qed_vf.c 	if (IS_LEAD_HWFN(p_hwfn))
p_hwfn            464 drivers/net/ethernet/qlogic/qed/qed_vf.c 		p_hwfn->cdev->num_hwfns = 1;
p_hwfn            467 drivers/net/ethernet/qlogic/qed/qed_vf.c 	p_hwfn->hw_info.opaque_fid = (u16)REG_RD(p_hwfn, reg);
p_hwfn            470 drivers/net/ethernet/qlogic/qed/qed_vf.c 	p_hwfn->hw_info.concrete_fid = REG_RD(p_hwfn, reg);
p_hwfn            481 drivers/net/ethernet/qlogic/qed/qed_vf.c 	if (!p_hwfn->doorbells) {
p_hwfn            482 drivers/net/ethernet/qlogic/qed/qed_vf.c 		p_hwfn->doorbells = (u8 __iomem *)p_hwfn->regview +
p_hwfn            484 drivers/net/ethernet/qlogic/qed/qed_vf.c 	} else if (p_hwfn == p_lead) {
p_hwfn            497 drivers/net/ethernet/qlogic/qed/qed_vf.c 			p_hwfn->doorbells = (u8 __iomem *)
p_hwfn            498 drivers/net/ethernet/qlogic/qed/qed_vf.c 			    p_hwfn->regview + PXP_VF_BAR0_START_DQ;
p_hwfn            502 drivers/net/ethernet/qlogic/qed/qed_vf.c 	p_iov->vf2pf_request = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            509 drivers/net/ethernet/qlogic/qed/qed_vf.c 	p_iov->pf2vf_reply = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            516 drivers/net/ethernet/qlogic/qed/qed_vf.c 	DP_VERBOSE(p_hwfn,
p_hwfn            525 drivers/net/ethernet/qlogic/qed/qed_vf.c 	p_iov->bulletin.p_virt = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            529 drivers/net/ethernet/qlogic/qed/qed_vf.c 	DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn            536 drivers/net/ethernet/qlogic/qed/qed_vf.c 	p_hwfn->vf_iov_info = p_iov;
p_hwfn            538 drivers/net/ethernet/qlogic/qed/qed_vf.c 	p_hwfn->hw_info.personality = QED_PCI_ETH;
p_hwfn            540 drivers/net/ethernet/qlogic/qed/qed_vf.c 	rc = qed_vf_pf_acquire(p_hwfn);
p_hwfn            550 drivers/net/ethernet/qlogic/qed/qed_vf.c 	    !qed_vf_hw_bar_size(p_hwfn, BAR_ID_1) &&
p_hwfn            551 drivers/net/ethernet/qlogic/qed/qed_vf.c 	    (p_hwfn->cdev->num_hwfns > 1)) {
p_hwfn            552 drivers/net/ethernet/qlogic/qed/qed_vf.c 		rc = _qed_vf_pf_release(p_hwfn, false);
p_hwfn            557 drivers/net/ethernet/qlogic/qed/qed_vf.c 		p_hwfn->doorbells = (u8 __iomem *)p_hwfn->regview +
p_hwfn            559 drivers/net/ethernet/qlogic/qed/qed_vf.c 		rc = qed_vf_pf_acquire(p_hwfn);
p_hwfn            562 drivers/net/ethernet/qlogic/qed/qed_vf.c 	DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn            564 drivers/net/ethernet/qlogic/qed/qed_vf.c 		   p_hwfn->regview, p_hwfn->doorbells, p_hwfn->cdev->doorbells);
p_hwfn            569 drivers/net/ethernet/qlogic/qed/qed_vf.c 	dma_free_coherent(&p_hwfn->cdev->pdev->dev,
p_hwfn            641 drivers/net/ethernet/qlogic/qed/qed_vf.c static void qed_vf_update_tunn_param(struct qed_hwfn *p_hwfn,
p_hwfn            668 drivers/net/ethernet/qlogic/qed/qed_vf.c 	DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn            675 drivers/net/ethernet/qlogic/qed/qed_vf.c int qed_vf_pf_tunnel_param_update(struct qed_hwfn *p_hwfn,
p_hwfn            678 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_tunnel_info *p_tun = &p_hwfn->cdev->tunnel;
p_hwfn            679 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn            684 drivers/net/ethernet/qlogic/qed/qed_vf.c 	p_req = qed_vf_pf_prep(p_hwfn, CHANNEL_TLV_UPDATE_TUNN_PARAM,
p_hwfn            708 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_add_tlv(p_hwfn, &p_iov->offset,
p_hwfn            713 drivers/net/ethernet/qlogic/qed/qed_vf.c 	rc = qed_send_msg2pf(p_hwfn, &p_resp->hdr.status, sizeof(*p_resp));
p_hwfn            719 drivers/net/ethernet/qlogic/qed/qed_vf.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn            724 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_update_tunn_param(p_hwfn, p_tun, p_resp);
p_hwfn            726 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_req_end(p_hwfn, rc);
p_hwfn            731 drivers/net/ethernet/qlogic/qed/qed_vf.c qed_vf_pf_rxq_start(struct qed_hwfn *p_hwfn,
p_hwfn            738 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn            745 drivers/net/ethernet/qlogic/qed/qed_vf.c 	req = qed_vf_pf_prep(p_hwfn, CHANNEL_TLV_START_RXQ, sizeof(*req));
p_hwfn            764 drivers/net/ethernet/qlogic/qed/qed_vf.c 		    p_hwfn->regview +
p_hwfn            765 drivers/net/ethernet/qlogic/qed/qed_vf.c 		    MSTORM_QZONE_START(p_hwfn->cdev) +
p_hwfn            769 drivers/net/ethernet/qlogic/qed/qed_vf.c 		__internal_ram_wr(p_hwfn, *pp_prod, sizeof(u32),
p_hwfn            773 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_add_qid(p_hwfn, p_cid);
p_hwfn            776 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_add_tlv(p_hwfn, &p_iov->offset,
p_hwfn            780 drivers/net/ethernet/qlogic/qed/qed_vf.c 	rc = qed_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
p_hwfn            793 drivers/net/ethernet/qlogic/qed/qed_vf.c 		*pp_prod = (u8 __iomem *)p_hwfn->regview + resp->offset;
p_hwfn            794 drivers/net/ethernet/qlogic/qed/qed_vf.c 		DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn            799 drivers/net/ethernet/qlogic/qed/qed_vf.c 		__internal_ram_wr(p_hwfn, *pp_prod, sizeof(u32),
p_hwfn            803 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_req_end(p_hwfn, rc);
p_hwfn            808 drivers/net/ethernet/qlogic/qed/qed_vf.c int qed_vf_pf_rxq_stop(struct qed_hwfn *p_hwfn,
p_hwfn            811 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn            817 drivers/net/ethernet/qlogic/qed/qed_vf.c 	req = qed_vf_pf_prep(p_hwfn, CHANNEL_TLV_STOP_RXQS, sizeof(*req));
p_hwfn            823 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_add_qid(p_hwfn, p_cid);
p_hwfn            826 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_add_tlv(p_hwfn, &p_iov->offset,
p_hwfn            830 drivers/net/ethernet/qlogic/qed/qed_vf.c 	rc = qed_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
p_hwfn            840 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_req_end(p_hwfn, rc);
p_hwfn            846 drivers/net/ethernet/qlogic/qed/qed_vf.c qed_vf_pf_txq_start(struct qed_hwfn *p_hwfn,
p_hwfn            851 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn            858 drivers/net/ethernet/qlogic/qed/qed_vf.c 	req = qed_vf_pf_prep(p_hwfn, CHANNEL_TLV_START_TXQ, sizeof(*req));
p_hwfn            868 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_add_qid(p_hwfn, p_cid);
p_hwfn            871 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_add_tlv(p_hwfn, &p_iov->offset,
p_hwfn            875 drivers/net/ethernet/qlogic/qed/qed_vf.c 	rc = qed_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
p_hwfn            888 drivers/net/ethernet/qlogic/qed/qed_vf.c 		*pp_doorbell = (u8 __iomem *)p_hwfn->doorbells + resp->offset;
p_hwfn            892 drivers/net/ethernet/qlogic/qed/qed_vf.c 		*pp_doorbell = (u8 __iomem *)p_hwfn->doorbells +
p_hwfn            897 drivers/net/ethernet/qlogic/qed/qed_vf.c 	DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn            901 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_req_end(p_hwfn, rc);
p_hwfn            906 drivers/net/ethernet/qlogic/qed/qed_vf.c int qed_vf_pf_txq_stop(struct qed_hwfn *p_hwfn, struct qed_queue_cid *p_cid)
p_hwfn            908 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn            914 drivers/net/ethernet/qlogic/qed/qed_vf.c 	req = qed_vf_pf_prep(p_hwfn, CHANNEL_TLV_STOP_TXQS, sizeof(*req));
p_hwfn            919 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_add_qid(p_hwfn, p_cid);
p_hwfn            922 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_add_tlv(p_hwfn, &p_iov->offset,
p_hwfn            926 drivers/net/ethernet/qlogic/qed/qed_vf.c 	rc = qed_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
p_hwfn            936 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_req_end(p_hwfn, rc);
p_hwfn            941 drivers/net/ethernet/qlogic/qed/qed_vf.c int qed_vf_pf_vport_start(struct qed_hwfn *p_hwfn,
p_hwfn            948 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn            954 drivers/net/ethernet/qlogic/qed/qed_vf.c 	req = qed_vf_pf_prep(p_hwfn, CHANNEL_TLV_VPORT_START, sizeof(*req));
p_hwfn            964 drivers/net/ethernet/qlogic/qed/qed_vf.c 	for (i = 0; i < p_hwfn->vf_iov_info->acquire_resp.resc.num_sbs; i++) {
p_hwfn            965 drivers/net/ethernet/qlogic/qed/qed_vf.c 		struct qed_sb_info *p_sb = p_hwfn->vf_iov_info->sbs_info[i];
p_hwfn            972 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_add_tlv(p_hwfn, &p_iov->offset,
p_hwfn            976 drivers/net/ethernet/qlogic/qed/qed_vf.c 	rc = qed_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
p_hwfn            986 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_req_end(p_hwfn, rc);
p_hwfn            991 drivers/net/ethernet/qlogic/qed/qed_vf.c int qed_vf_pf_vport_stop(struct qed_hwfn *p_hwfn)
p_hwfn            993 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn            998 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_prep(p_hwfn, CHANNEL_TLV_VPORT_TEARDOWN,
p_hwfn           1002 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_add_tlv(p_hwfn, &p_iov->offset,
p_hwfn           1005 drivers/net/ethernet/qlogic/qed/qed_vf.c 	rc = qed_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
p_hwfn           1015 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_req_end(p_hwfn, rc);
p_hwfn           1021 drivers/net/ethernet/qlogic/qed/qed_vf.c qed_vf_handle_vp_update_is_needed(struct qed_hwfn *p_hwfn,
p_hwfn           1045 drivers/net/ethernet/qlogic/qed/qed_vf.c 		DP_INFO(p_hwfn, "Unexpected vport-update TLV[%d]\n",
p_hwfn           1052 drivers/net/ethernet/qlogic/qed/qed_vf.c qed_vf_handle_vp_update_tlvs_resp(struct qed_hwfn *p_hwfn,
p_hwfn           1055 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn           1061 drivers/net/ethernet/qlogic/qed/qed_vf.c 		if (!qed_vf_handle_vp_update_is_needed(p_hwfn, p_data, tlv))
p_hwfn           1065 drivers/net/ethernet/qlogic/qed/qed_vf.c 			 qed_iov_search_list_tlvs(p_hwfn, p_iov->pf2vf_reply,
p_hwfn           1068 drivers/net/ethernet/qlogic/qed/qed_vf.c 			DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           1076 drivers/net/ethernet/qlogic/qed/qed_vf.c int qed_vf_pf_vport_update(struct qed_hwfn *p_hwfn,
p_hwfn           1079 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn           1094 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_prep(p_hwfn, CHANNEL_TLV_VPORT_UPDATE, sizeof(*req));
p_hwfn           1101 drivers/net/ethernet/qlogic/qed/qed_vf.c 		p_act_tlv = qed_add_tlv(p_hwfn, &p_iov->offset,
p_hwfn           1122 drivers/net/ethernet/qlogic/qed/qed_vf.c 		p_tx_switch_tlv = qed_add_tlv(p_hwfn, &p_iov->offset,
p_hwfn           1133 drivers/net/ethernet/qlogic/qed/qed_vf.c 		p_mcast_tlv = qed_add_tlv(p_hwfn, &p_iov->offset,
p_hwfn           1149 drivers/net/ethernet/qlogic/qed/qed_vf.c 		p_accept_tlv = qed_add_tlv(p_hwfn, &p_iov->offset, tlv, size);
p_hwfn           1171 drivers/net/ethernet/qlogic/qed/qed_vf.c 		p_rss_tlv = qed_add_tlv(p_hwfn,
p_hwfn           1209 drivers/net/ethernet/qlogic/qed/qed_vf.c 		p_any_vlan_tlv = qed_add_tlv(p_hwfn, &p_iov->offset, tlv, size);
p_hwfn           1218 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_add_tlv(p_hwfn, &p_iov->offset,
p_hwfn           1221 drivers/net/ethernet/qlogic/qed/qed_vf.c 	rc = qed_send_msg2pf(p_hwfn, &resp->hdr.status, resp_size);
p_hwfn           1230 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_handle_vp_update_tlvs_resp(p_hwfn, p_params);
p_hwfn           1233 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_req_end(p_hwfn, rc);
p_hwfn           1238 drivers/net/ethernet/qlogic/qed/qed_vf.c int qed_vf_pf_reset(struct qed_hwfn *p_hwfn)
p_hwfn           1240 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn           1246 drivers/net/ethernet/qlogic/qed/qed_vf.c 	req = qed_vf_pf_prep(p_hwfn, CHANNEL_TLV_CLOSE, sizeof(*req));
p_hwfn           1249 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_add_tlv(p_hwfn, &p_iov->offset,
p_hwfn           1253 drivers/net/ethernet/qlogic/qed/qed_vf.c 	rc = qed_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
p_hwfn           1262 drivers/net/ethernet/qlogic/qed/qed_vf.c 	p_hwfn->b_int_enabled = 0;
p_hwfn           1265 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_req_end(p_hwfn, rc);
p_hwfn           1270 drivers/net/ethernet/qlogic/qed/qed_vf.c void qed_vf_pf_filter_mcast(struct qed_hwfn *p_hwfn,
p_hwfn           1288 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_vport_update(p_hwfn, &sp_params);
p_hwfn           1291 drivers/net/ethernet/qlogic/qed/qed_vf.c int qed_vf_pf_filter_ucast(struct qed_hwfn *p_hwfn,
p_hwfn           1294 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn           1300 drivers/net/ethernet/qlogic/qed/qed_vf.c 	req = qed_vf_pf_prep(p_hwfn, CHANNEL_TLV_UCAST_FILTER, sizeof(*req));
p_hwfn           1307 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_add_tlv(p_hwfn, &p_iov->offset,
p_hwfn           1311 drivers/net/ethernet/qlogic/qed/qed_vf.c 	rc = qed_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
p_hwfn           1321 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_req_end(p_hwfn, rc);
p_hwfn           1326 drivers/net/ethernet/qlogic/qed/qed_vf.c int qed_vf_pf_int_cleanup(struct qed_hwfn *p_hwfn)
p_hwfn           1328 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn           1333 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_prep(p_hwfn, CHANNEL_TLV_INT_CLEANUP,
p_hwfn           1337 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_add_tlv(p_hwfn, &p_iov->offset,
p_hwfn           1340 drivers/net/ethernet/qlogic/qed/qed_vf.c 	rc = qed_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
p_hwfn           1350 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_req_end(p_hwfn, rc);
p_hwfn           1355 drivers/net/ethernet/qlogic/qed/qed_vf.c int qed_vf_pf_get_coalesce(struct qed_hwfn *p_hwfn,
p_hwfn           1358 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn           1364 drivers/net/ethernet/qlogic/qed/qed_vf.c 	req = qed_vf_pf_prep(p_hwfn, CHANNEL_TLV_COALESCE_READ, sizeof(*req));
p_hwfn           1368 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_add_tlv(p_hwfn, &p_iov->offset, CHANNEL_TLV_LIST_END,
p_hwfn           1372 drivers/net/ethernet/qlogic/qed/qed_vf.c 	rc = qed_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
p_hwfn           1381 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_req_end(p_hwfn, rc);
p_hwfn           1387 drivers/net/ethernet/qlogic/qed/qed_vf.c qed_vf_pf_bulletin_update_mac(struct qed_hwfn *p_hwfn,
p_hwfn           1390 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn           1399 drivers/net/ethernet/qlogic/qed/qed_vf.c 	p_req = qed_vf_pf_prep(p_hwfn, CHANNEL_TLV_BULLETIN_UPDATE_MAC,
p_hwfn           1402 drivers/net/ethernet/qlogic/qed/qed_vf.c 	DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           1406 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_add_tlv(p_hwfn, &p_iov->offset, CHANNEL_TLV_LIST_END,
p_hwfn           1410 drivers/net/ethernet/qlogic/qed/qed_vf.c 	rc = qed_send_msg2pf(p_hwfn, &p_resp->hdr.status, sizeof(*p_resp));
p_hwfn           1411 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_req_end(p_hwfn, rc);
p_hwfn           1416 drivers/net/ethernet/qlogic/qed/qed_vf.c qed_vf_pf_set_coalesce(struct qed_hwfn *p_hwfn,
p_hwfn           1419 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn           1425 drivers/net/ethernet/qlogic/qed/qed_vf.c 	req = qed_vf_pf_prep(p_hwfn, CHANNEL_TLV_COALESCE_UPDATE, sizeof(*req));
p_hwfn           1431 drivers/net/ethernet/qlogic/qed/qed_vf.c 	DP_VERBOSE(p_hwfn,
p_hwfn           1437 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_add_tlv(p_hwfn, &p_iov->offset, CHANNEL_TLV_LIST_END,
p_hwfn           1441 drivers/net/ethernet/qlogic/qed/qed_vf.c 	rc = qed_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
p_hwfn           1449 drivers/net/ethernet/qlogic/qed/qed_vf.c 		p_hwfn->cdev->rx_coalesce_usecs = rx_coal;
p_hwfn           1452 drivers/net/ethernet/qlogic/qed/qed_vf.c 		p_hwfn->cdev->tx_coalesce_usecs = tx_coal;
p_hwfn           1455 drivers/net/ethernet/qlogic/qed/qed_vf.c 	qed_vf_pf_req_end(p_hwfn, rc);
p_hwfn           1459 drivers/net/ethernet/qlogic/qed/qed_vf.c u16 qed_vf_get_igu_sb_id(struct qed_hwfn *p_hwfn, u16 sb_id)
p_hwfn           1461 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn           1464 drivers/net/ethernet/qlogic/qed/qed_vf.c 		DP_NOTICE(p_hwfn, "vf_sriov_info isn't initialized\n");
p_hwfn           1471 drivers/net/ethernet/qlogic/qed/qed_vf.c void qed_vf_set_sb_info(struct qed_hwfn *p_hwfn,
p_hwfn           1474 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn           1477 drivers/net/ethernet/qlogic/qed/qed_vf.c 		DP_NOTICE(p_hwfn, "vf_sriov_info isn't initialized\n");
p_hwfn           1482 drivers/net/ethernet/qlogic/qed/qed_vf.c 		DP_NOTICE(p_hwfn, "Can't configure SB %04x\n", sb_id);
p_hwfn           1489 drivers/net/ethernet/qlogic/qed/qed_vf.c int qed_vf_read_bulletin(struct qed_hwfn *p_hwfn, u8 *p_change)
p_hwfn           1491 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
p_hwfn           1514 drivers/net/ethernet/qlogic/qed/qed_vf.c 	DP_VERBOSE(p_hwfn, QED_MSG_IOV,
p_hwfn           1522 drivers/net/ethernet/qlogic/qed/qed_vf.c void __qed_vf_get_link_params(struct qed_hwfn *p_hwfn,
p_hwfn           1537 drivers/net/ethernet/qlogic/qed/qed_vf.c void qed_vf_get_link_params(struct qed_hwfn *p_hwfn,
p_hwfn           1540 drivers/net/ethernet/qlogic/qed/qed_vf.c 	__qed_vf_get_link_params(p_hwfn, params,
p_hwfn           1541 drivers/net/ethernet/qlogic/qed/qed_vf.c 				 &(p_hwfn->vf_iov_info->bulletin_shadow));
p_hwfn           1544 drivers/net/ethernet/qlogic/qed/qed_vf.c void __qed_vf_get_link_state(struct qed_hwfn *p_hwfn,
p_hwfn           1564 drivers/net/ethernet/qlogic/qed/qed_vf.c void qed_vf_get_link_state(struct qed_hwfn *p_hwfn,
p_hwfn           1567 drivers/net/ethernet/qlogic/qed/qed_vf.c 	__qed_vf_get_link_state(p_hwfn, link,
p_hwfn           1568 drivers/net/ethernet/qlogic/qed/qed_vf.c 				&(p_hwfn->vf_iov_info->bulletin_shadow));
p_hwfn           1571 drivers/net/ethernet/qlogic/qed/qed_vf.c void __qed_vf_get_link_caps(struct qed_hwfn *p_hwfn,
p_hwfn           1579 drivers/net/ethernet/qlogic/qed/qed_vf.c void qed_vf_get_link_caps(struct qed_hwfn *p_hwfn,
p_hwfn           1582 drivers/net/ethernet/qlogic/qed/qed_vf.c 	__qed_vf_get_link_caps(p_hwfn, p_link_caps,
p_hwfn           1583 drivers/net/ethernet/qlogic/qed/qed_vf.c 			       &(p_hwfn->vf_iov_info->bulletin_shadow));
p_hwfn           1586 drivers/net/ethernet/qlogic/qed/qed_vf.c void qed_vf_get_num_rxqs(struct qed_hwfn *p_hwfn, u8 *num_rxqs)
p_hwfn           1588 drivers/net/ethernet/qlogic/qed/qed_vf.c 	*num_rxqs = p_hwfn->vf_iov_info->acquire_resp.resc.num_rxqs;
p_hwfn           1591 drivers/net/ethernet/qlogic/qed/qed_vf.c void qed_vf_get_num_txqs(struct qed_hwfn *p_hwfn, u8 *num_txqs)
p_hwfn           1593 drivers/net/ethernet/qlogic/qed/qed_vf.c 	*num_txqs = p_hwfn->vf_iov_info->acquire_resp.resc.num_txqs;
p_hwfn           1596 drivers/net/ethernet/qlogic/qed/qed_vf.c void qed_vf_get_num_cids(struct qed_hwfn *p_hwfn, u8 *num_cids)
p_hwfn           1598 drivers/net/ethernet/qlogic/qed/qed_vf.c 	*num_cids = p_hwfn->vf_iov_info->acquire_resp.resc.num_cids;
p_hwfn           1601 drivers/net/ethernet/qlogic/qed/qed_vf.c void qed_vf_get_port_mac(struct qed_hwfn *p_hwfn, u8 *port_mac)
p_hwfn           1604 drivers/net/ethernet/qlogic/qed/qed_vf.c 	       p_hwfn->vf_iov_info->acquire_resp.pfdev_info.port_mac, ETH_ALEN);
p_hwfn           1607 drivers/net/ethernet/qlogic/qed/qed_vf.c void qed_vf_get_num_vlan_filters(struct qed_hwfn *p_hwfn, u8 *num_vlan_filters)
p_hwfn           1611 drivers/net/ethernet/qlogic/qed/qed_vf.c 	p_vf = p_hwfn->vf_iov_info;
p_hwfn           1615 drivers/net/ethernet/qlogic/qed/qed_vf.c void qed_vf_get_num_mac_filters(struct qed_hwfn *p_hwfn, u8 *num_mac_filters)
p_hwfn           1617 drivers/net/ethernet/qlogic/qed/qed_vf.c 	struct qed_vf_iov *p_vf = p_hwfn->vf_iov_info;
p_hwfn           1622 drivers/net/ethernet/qlogic/qed/qed_vf.c bool qed_vf_check_mac(struct qed_hwfn *p_hwfn, u8 *mac)
p_hwfn           1626 drivers/net/ethernet/qlogic/qed/qed_vf.c 	bulletin = &p_hwfn->vf_iov_info->bulletin_shadow;
p_hwfn           1660 drivers/net/ethernet/qlogic/qed/qed_vf.c qed_vf_bulletin_get_udp_ports(struct qed_hwfn *p_hwfn,
p_hwfn           1665 drivers/net/ethernet/qlogic/qed/qed_vf.c 	p_bulletin = &p_hwfn->vf_iov_info->bulletin_shadow;
p_hwfn           1671 drivers/net/ethernet/qlogic/qed/qed_vf.c void qed_vf_get_fw_version(struct qed_hwfn *p_hwfn,
p_hwfn           1677 drivers/net/ethernet/qlogic/qed/qed_vf.c 	info = &p_hwfn->vf_iov_info->acquire_resp.pfdev_info;
p_hwfn            727 drivers/net/ethernet/qlogic/qed/qed_vf.h int qed_vf_pf_set_coalesce(struct qed_hwfn *p_hwfn,
p_hwfn            739 drivers/net/ethernet/qlogic/qed/qed_vf.h int qed_vf_pf_get_coalesce(struct qed_hwfn *p_hwfn,
p_hwfn            751 drivers/net/ethernet/qlogic/qed/qed_vf.h int qed_vf_read_bulletin(struct qed_hwfn *p_hwfn, u8 *p_change);
p_hwfn            759 drivers/net/ethernet/qlogic/qed/qed_vf.h void qed_vf_get_link_params(struct qed_hwfn *p_hwfn,
p_hwfn            768 drivers/net/ethernet/qlogic/qed/qed_vf.h void qed_vf_get_link_state(struct qed_hwfn *p_hwfn,
p_hwfn            777 drivers/net/ethernet/qlogic/qed/qed_vf.h void qed_vf_get_link_caps(struct qed_hwfn *p_hwfn,
p_hwfn            786 drivers/net/ethernet/qlogic/qed/qed_vf.h void qed_vf_get_num_rxqs(struct qed_hwfn *p_hwfn, u8 *num_rxqs);
p_hwfn            794 drivers/net/ethernet/qlogic/qed/qed_vf.h void qed_vf_get_num_txqs(struct qed_hwfn *p_hwfn, u8 *num_txqs);
p_hwfn            802 drivers/net/ethernet/qlogic/qed/qed_vf.h void qed_vf_get_num_cids(struct qed_hwfn *p_hwfn, u8 *num_cids);
p_hwfn            810 drivers/net/ethernet/qlogic/qed/qed_vf.h void qed_vf_get_port_mac(struct qed_hwfn *p_hwfn, u8 *port_mac);
p_hwfn            818 drivers/net/ethernet/qlogic/qed/qed_vf.h void qed_vf_get_num_vlan_filters(struct qed_hwfn *p_hwfn,
p_hwfn            827 drivers/net/ethernet/qlogic/qed/qed_vf.h void qed_vf_get_num_mac_filters(struct qed_hwfn *p_hwfn, u8 *num_mac_filters);
p_hwfn            837 drivers/net/ethernet/qlogic/qed/qed_vf.h bool qed_vf_check_mac(struct qed_hwfn *p_hwfn, u8 *mac);
p_hwfn            848 drivers/net/ethernet/qlogic/qed/qed_vf.h void qed_vf_get_fw_version(struct qed_hwfn *p_hwfn,
p_hwfn            860 drivers/net/ethernet/qlogic/qed/qed_vf.h int qed_vf_hw_prepare(struct qed_hwfn *p_hwfn);
p_hwfn            875 drivers/net/ethernet/qlogic/qed/qed_vf.h int qed_vf_pf_rxq_start(struct qed_hwfn *p_hwfn,
p_hwfn            897 drivers/net/ethernet/qlogic/qed/qed_vf.h qed_vf_pf_txq_start(struct qed_hwfn *p_hwfn,
p_hwfn            911 drivers/net/ethernet/qlogic/qed/qed_vf.h int qed_vf_pf_rxq_stop(struct qed_hwfn *p_hwfn,
p_hwfn            922 drivers/net/ethernet/qlogic/qed/qed_vf.h int qed_vf_pf_txq_stop(struct qed_hwfn *p_hwfn, struct qed_queue_cid *p_cid);
p_hwfn            932 drivers/net/ethernet/qlogic/qed/qed_vf.h int qed_vf_pf_vport_update(struct qed_hwfn *p_hwfn,
p_hwfn            943 drivers/net/ethernet/qlogic/qed/qed_vf.h int qed_vf_pf_reset(struct qed_hwfn *p_hwfn);
p_hwfn            952 drivers/net/ethernet/qlogic/qed/qed_vf.h int qed_vf_pf_release(struct qed_hwfn *p_hwfn);
p_hwfn            963 drivers/net/ethernet/qlogic/qed/qed_vf.h u16 qed_vf_get_igu_sb_id(struct qed_hwfn *p_hwfn, u16 sb_id);
p_hwfn            972 drivers/net/ethernet/qlogic/qed/qed_vf.h void qed_vf_set_sb_info(struct qed_hwfn *p_hwfn,
p_hwfn            988 drivers/net/ethernet/qlogic/qed/qed_vf.h int qed_vf_pf_vport_start(struct qed_hwfn *p_hwfn,
p_hwfn           1002 drivers/net/ethernet/qlogic/qed/qed_vf.h int qed_vf_pf_vport_stop(struct qed_hwfn *p_hwfn);
p_hwfn           1004 drivers/net/ethernet/qlogic/qed/qed_vf.h int qed_vf_pf_filter_ucast(struct qed_hwfn *p_hwfn,
p_hwfn           1007 drivers/net/ethernet/qlogic/qed/qed_vf.h void qed_vf_pf_filter_mcast(struct qed_hwfn *p_hwfn,
p_hwfn           1017 drivers/net/ethernet/qlogic/qed/qed_vf.h int qed_vf_pf_int_cleanup(struct qed_hwfn *p_hwfn);
p_hwfn           1026 drivers/net/ethernet/qlogic/qed/qed_vf.h void __qed_vf_get_link_params(struct qed_hwfn *p_hwfn,
p_hwfn           1037 drivers/net/ethernet/qlogic/qed/qed_vf.h void __qed_vf_get_link_state(struct qed_hwfn *p_hwfn,
p_hwfn           1048 drivers/net/ethernet/qlogic/qed/qed_vf.h void __qed_vf_get_link_caps(struct qed_hwfn *p_hwfn,
p_hwfn           1054 drivers/net/ethernet/qlogic/qed/qed_vf.h int qed_vf_pf_tunnel_param_update(struct qed_hwfn *p_hwfn,
p_hwfn           1057 drivers/net/ethernet/qlogic/qed/qed_vf.h u32 qed_vf_hw_bar_size(struct qed_hwfn *p_hwfn, enum BAR_ID bar_id);
p_hwfn           1063 drivers/net/ethernet/qlogic/qed/qed_vf.h int qed_vf_pf_bulletin_update_mac(struct qed_hwfn *p_hwfn, u8 *p_mac);
p_hwfn           1066 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline void qed_vf_get_link_params(struct qed_hwfn *p_hwfn,
p_hwfn           1071 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline void qed_vf_get_link_state(struct qed_hwfn *p_hwfn,
p_hwfn           1077 drivers/net/ethernet/qlogic/qed/qed_vf.h qed_vf_get_link_caps(struct qed_hwfn *p_hwfn,
p_hwfn           1082 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline void qed_vf_get_num_rxqs(struct qed_hwfn *p_hwfn, u8 *num_rxqs)
p_hwfn           1086 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline void qed_vf_get_num_txqs(struct qed_hwfn *p_hwfn, u8 *num_txqs)
p_hwfn           1090 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline void qed_vf_get_num_cids(struct qed_hwfn *p_hwfn, u8 *num_cids)
p_hwfn           1094 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline void qed_vf_get_port_mac(struct qed_hwfn *p_hwfn, u8 *port_mac)
p_hwfn           1098 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline void qed_vf_get_num_vlan_filters(struct qed_hwfn *p_hwfn,
p_hwfn           1103 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline void qed_vf_get_num_mac_filters(struct qed_hwfn *p_hwfn,
p_hwfn           1108 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline bool qed_vf_check_mac(struct qed_hwfn *p_hwfn, u8 *mac)
p_hwfn           1113 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline void qed_vf_get_fw_version(struct qed_hwfn *p_hwfn,
p_hwfn           1119 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline int qed_vf_hw_prepare(struct qed_hwfn *p_hwfn)
p_hwfn           1124 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline int qed_vf_pf_rxq_start(struct qed_hwfn *p_hwfn,
p_hwfn           1134 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline int qed_vf_pf_txq_start(struct qed_hwfn *p_hwfn,
p_hwfn           1142 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline int qed_vf_pf_rxq_stop(struct qed_hwfn *p_hwfn,
p_hwfn           1149 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline int qed_vf_pf_txq_stop(struct qed_hwfn *p_hwfn,
p_hwfn           1156 drivers/net/ethernet/qlogic/qed/qed_vf.h qed_vf_pf_vport_update(struct qed_hwfn *p_hwfn,
p_hwfn           1162 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline int qed_vf_pf_reset(struct qed_hwfn *p_hwfn)
p_hwfn           1167 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline int qed_vf_pf_release(struct qed_hwfn *p_hwfn)
p_hwfn           1172 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline u16 qed_vf_get_igu_sb_id(struct qed_hwfn *p_hwfn, u16 sb_id)
p_hwfn           1177 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline void qed_vf_set_sb_info(struct qed_hwfn *p_hwfn, u16 sb_id,
p_hwfn           1182 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline int qed_vf_pf_vport_start(struct qed_hwfn *p_hwfn,
p_hwfn           1193 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline int qed_vf_pf_vport_stop(struct qed_hwfn *p_hwfn)
p_hwfn           1198 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline int qed_vf_pf_filter_ucast(struct qed_hwfn *p_hwfn,
p_hwfn           1204 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline void qed_vf_pf_filter_mcast(struct qed_hwfn *p_hwfn,
p_hwfn           1209 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline int qed_vf_pf_int_cleanup(struct qed_hwfn *p_hwfn)
p_hwfn           1214 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline void __qed_vf_get_link_params(struct qed_hwfn *p_hwfn,
p_hwfn           1222 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline void __qed_vf_get_link_state(struct qed_hwfn *p_hwfn,
p_hwfn           1230 drivers/net/ethernet/qlogic/qed/qed_vf.h __qed_vf_get_link_caps(struct qed_hwfn *p_hwfn,
p_hwfn           1245 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline int qed_vf_pf_tunnel_param_update(struct qed_hwfn *p_hwfn,
p_hwfn           1251 drivers/net/ethernet/qlogic/qed/qed_vf.h static inline int qed_vf_pf_bulletin_update_mac(struct qed_hwfn *p_hwfn,
p_hwfn           1258 drivers/net/ethernet/qlogic/qed/qed_vf.h qed_vf_hw_bar_size(struct qed_hwfn  *p_hwfn,
p_hwfn           1416 include/linux/qed/qed_if.h static inline void __internal_ram_wr(void *p_hwfn,