Lines Matching refs:p_hwfn

52 int qed_l2_alloc(struct qed_hwfn *p_hwfn)  in qed_l2_alloc()  argument
58 if (!QED_IS_L2_PERSONALITY(p_hwfn)) in qed_l2_alloc()
64 p_hwfn->p_l2_info = p_l2_info; in qed_l2_alloc()
66 if (IS_PF(p_hwfn->cdev)) { in qed_l2_alloc()
67 p_l2_info->queues = RESC_NUM(p_hwfn, QED_L2_QUEUE); in qed_l2_alloc()
71 qed_vf_get_num_rxqs(p_hwfn, &rx); in qed_l2_alloc()
72 qed_vf_get_num_txqs(p_hwfn, &tx); in qed_l2_alloc()
92 void qed_l2_setup(struct qed_hwfn *p_hwfn) in qed_l2_setup() argument
94 if (!QED_IS_L2_PERSONALITY(p_hwfn)) in qed_l2_setup()
97 mutex_init(&p_hwfn->p_l2_info->lock); in qed_l2_setup()
100 void qed_l2_free(struct qed_hwfn *p_hwfn) in qed_l2_free() argument
104 if (!QED_IS_L2_PERSONALITY(p_hwfn)) in qed_l2_free()
107 if (!p_hwfn->p_l2_info) in qed_l2_free()
110 if (!p_hwfn->p_l2_info->pp_qid_usage) in qed_l2_free()
114 for (i = 0; i < p_hwfn->p_l2_info->queues; i++) { in qed_l2_free()
115 if (!p_hwfn->p_l2_info->pp_qid_usage[i]) in qed_l2_free()
117 kfree(p_hwfn->p_l2_info->pp_qid_usage[i]); in qed_l2_free()
120 kfree(p_hwfn->p_l2_info->pp_qid_usage); in qed_l2_free()
123 kfree(p_hwfn->p_l2_info); in qed_l2_free()
124 p_hwfn->p_l2_info = NULL; in qed_l2_free()
127 static bool qed_eth_queue_qid_usage_add(struct qed_hwfn *p_hwfn, in qed_eth_queue_qid_usage_add() argument
130 struct qed_l2_info *p_l2_info = p_hwfn->p_l2_info; in qed_eth_queue_qid_usage_add()
138 DP_NOTICE(p_hwfn, in qed_eth_queue_qid_usage_add()
160 static void qed_eth_queue_qid_usage_del(struct qed_hwfn *p_hwfn, in qed_eth_queue_qid_usage_del() argument
163 mutex_lock(&p_hwfn->p_l2_info->lock); in qed_eth_queue_qid_usage_del()
166 p_hwfn->p_l2_info->pp_qid_usage[p_cid->rel.queue_id]); in qed_eth_queue_qid_usage_del()
168 mutex_unlock(&p_hwfn->p_l2_info->lock); in qed_eth_queue_qid_usage_del()
171 void qed_eth_queue_cid_release(struct qed_hwfn *p_hwfn, in qed_eth_queue_cid_release() argument
176 if (IS_PF(p_hwfn->cdev) && !b_legacy_vf) in qed_eth_queue_cid_release()
177 _qed_cxt_release_cid(p_hwfn, p_cid->cid, p_cid->vfid); in qed_eth_queue_cid_release()
181 qed_eth_queue_qid_usage_del(p_hwfn, p_cid); in qed_eth_queue_cid_release()
190 _qed_eth_queue_to_cid(struct qed_hwfn *p_hwfn, in _qed_eth_queue_to_cid() argument
206 p_cid->p_owner = p_hwfn; in _qed_eth_queue_to_cid()
226 if (IS_VF(p_hwfn->cdev)) { in _qed_eth_queue_to_cid()
235 rc = qed_fw_vport(p_hwfn, p_cid->rel.vport_id, &p_cid->abs.vport_id); in _qed_eth_queue_to_cid()
239 rc = qed_fw_l2_queue(p_hwfn, p_cid->rel.queue_id, &p_cid->abs.queue_id); in _qed_eth_queue_to_cid()
247 rc = qed_fw_vport(p_hwfn, p_cid->rel.stats_id, in _qed_eth_queue_to_cid()
260 if (!qed_eth_queue_qid_usage_add(p_hwfn, p_cid)) in _qed_eth_queue_to_cid()
266 DP_VERBOSE(p_hwfn, in _qed_eth_queue_to_cid()
287 qed_eth_queue_to_cid(struct qed_hwfn *p_hwfn, in qed_eth_queue_to_cid() argument
315 if (IS_PF(p_hwfn->cdev) && !b_legacy_vf) { in qed_eth_queue_to_cid()
316 if (_qed_cxt_acquire_cid(p_hwfn, PROTOCOLID_ETH, in qed_eth_queue_to_cid()
318 DP_NOTICE(p_hwfn, "Failed to acquire cid\n"); in qed_eth_queue_to_cid()
323 p_cid = _qed_eth_queue_to_cid(p_hwfn, opaque_fid, cid, in qed_eth_queue_to_cid()
325 if (!p_cid && IS_PF(p_hwfn->cdev) && !b_legacy_vf) in qed_eth_queue_to_cid()
326 _qed_cxt_release_cid(p_hwfn, cid, vfid); in qed_eth_queue_to_cid()
332 qed_eth_queue_to_cid_pf(struct qed_hwfn *p_hwfn, in qed_eth_queue_to_cid_pf() argument
337 return qed_eth_queue_to_cid(p_hwfn, opaque_fid, p_params, b_is_rx, in qed_eth_queue_to_cid_pf()
341 int qed_sp_eth_vport_start(struct qed_hwfn *p_hwfn, in qed_sp_eth_vport_start() argument
352 rc = qed_fw_vport(p_hwfn, p_params->vport_id, &abs_vport_id); in qed_sp_eth_vport_start()
357 init_data.cid = qed_spq_get_cid(p_hwfn); in qed_sp_eth_vport_start()
361 rc = qed_sp_init_request(p_hwfn, &p_ent, in qed_sp_eth_vport_start()
410 p_ramrod->sw_fid = qed_concrete_to_sw_fid(p_hwfn->cdev, in qed_sp_eth_vport_start()
413 return qed_spq_post(p_hwfn, p_ent, NULL); in qed_sp_eth_vport_start()
416 static int qed_sp_vport_start(struct qed_hwfn *p_hwfn, in qed_sp_vport_start() argument
419 if (IS_VF(p_hwfn->cdev)) { in qed_sp_vport_start()
420 return qed_vf_pf_vport_start(p_hwfn, p_params->vport_id, in qed_sp_vport_start()
428 return qed_sp_eth_vport_start(p_hwfn, p_params); in qed_sp_vport_start()
432 qed_sp_vport_update_rss(struct qed_hwfn *p_hwfn, in qed_sp_vport_update_rss() argument
449 rc = qed_fw_rss_eng(p_hwfn, p_rss->rss_eng_id, &p_config->rss_id); in qed_sp_vport_update_rss()
484 DP_VERBOSE(p_hwfn, NETIF_MSG_IFUP, in qed_sp_vport_update_rss()
504 DP_VERBOSE(p_hwfn, NETIF_MSG_IFUP, in qed_sp_vport_update_rss()
508 DP_VERBOSE(p_hwfn, in qed_sp_vport_update_rss()
536 qed_sp_update_accept_mode(struct qed_hwfn *p_hwfn, in qed_sp_update_accept_mode() argument
573 DP_VERBOSE(p_hwfn, QED_MSG_SP, in qed_sp_update_accept_mode()
600 DP_VERBOSE(p_hwfn, QED_MSG_SP, in qed_sp_update_accept_mode()
606 qed_sp_vport_update_sge_tpa(struct qed_hwfn *p_hwfn, in qed_sp_vport_update_sge_tpa() argument
638 qed_sp_update_mcast_bin(struct qed_hwfn *p_hwfn, in qed_sp_update_mcast_bin() argument
658 int qed_sp_vport_update(struct qed_hwfn *p_hwfn, in qed_sp_vport_update() argument
671 if (IS_VF(p_hwfn->cdev)) { in qed_sp_vport_update()
672 rc = qed_vf_pf_vport_update(p_hwfn, p_params); in qed_sp_vport_update()
676 rc = qed_fw_vport(p_hwfn, p_params->vport_id, &abs_vport_id); in qed_sp_vport_update()
681 init_data.cid = qed_spq_get_cid(p_hwfn); in qed_sp_vport_update()
686 rc = qed_sp_init_request(p_hwfn, &p_ent, in qed_sp_vport_update()
725 rc = qed_sp_vport_update_rss(p_hwfn, p_ramrod, p_rss_params); in qed_sp_vport_update()
727 qed_sp_destroy_request(p_hwfn, p_ent); in qed_sp_vport_update()
737 qed_sp_update_mcast_bin(p_hwfn, p_ramrod, p_params); in qed_sp_vport_update()
739 qed_sp_update_accept_mode(p_hwfn, p_ramrod, p_params->accept_flags); in qed_sp_vport_update()
740 qed_sp_vport_update_sge_tpa(p_hwfn, p_ramrod, p_params->sge_tpa_params); in qed_sp_vport_update()
741 return qed_spq_post(p_hwfn, p_ent, NULL); in qed_sp_vport_update()
744 int qed_sp_vport_stop(struct qed_hwfn *p_hwfn, u16 opaque_fid, u8 vport_id) in qed_sp_vport_stop() argument
752 if (IS_VF(p_hwfn->cdev)) in qed_sp_vport_stop()
753 return qed_vf_pf_vport_stop(p_hwfn); in qed_sp_vport_stop()
755 rc = qed_fw_vport(p_hwfn, vport_id, &abs_vport_id); in qed_sp_vport_stop()
760 init_data.cid = qed_spq_get_cid(p_hwfn); in qed_sp_vport_stop()
764 rc = qed_sp_init_request(p_hwfn, &p_ent, in qed_sp_vport_stop()
773 return qed_spq_post(p_hwfn, p_ent, NULL); in qed_sp_vport_stop()
777 qed_vf_pf_accept_flags(struct qed_hwfn *p_hwfn, in qed_vf_pf_accept_flags() argument
786 return qed_vf_pf_vport_update(p_hwfn, &s_params); in qed_vf_pf_accept_flags()
808 struct qed_hwfn *p_hwfn = &cdev->hwfns[i]; in qed_filter_accept_cmd() local
810 vport_update_params.opaque_fid = p_hwfn->hw_info.opaque_fid; in qed_filter_accept_cmd()
813 rc = qed_vf_pf_accept_flags(p_hwfn, &accept_flags); in qed_filter_accept_cmd()
819 rc = qed_sp_vport_update(p_hwfn, &vport_update_params, in qed_filter_accept_cmd()
826 DP_VERBOSE(p_hwfn, QED_MSG_SP, in qed_filter_accept_cmd()
831 DP_VERBOSE(p_hwfn, QED_MSG_SP, in qed_filter_accept_cmd()
839 int qed_eth_rxq_start_ramrod(struct qed_hwfn *p_hwfn, in qed_eth_rxq_start_ramrod() argument
850 DP_VERBOSE(p_hwfn, QED_MSG_SP, in qed_eth_rxq_start_ramrod()
861 rc = qed_sp_init_request(p_hwfn, &p_ent, in qed_eth_rxq_start_ramrod()
888 DP_VERBOSE(p_hwfn, QED_MSG_SP, in qed_eth_rxq_start_ramrod()
894 return qed_spq_post(p_hwfn, p_ent, NULL); in qed_eth_rxq_start_ramrod()
898 qed_eth_pf_rx_queue_start(struct qed_hwfn *p_hwfn, in qed_eth_pf_rx_queue_start() argument
908 p_hwfn->regview + in qed_eth_pf_rx_queue_start()
913 __internal_ram_wr(p_hwfn, *pp_prod, sizeof(u32), in qed_eth_pf_rx_queue_start()
916 return qed_eth_rxq_start_ramrod(p_hwfn, p_cid, in qed_eth_pf_rx_queue_start()
923 qed_eth_rx_queue_start(struct qed_hwfn *p_hwfn, in qed_eth_rx_queue_start() argument
936 p_cid = qed_eth_queue_to_cid_pf(p_hwfn, opaque_fid, true, p_params); in qed_eth_rx_queue_start()
940 if (IS_PF(p_hwfn->cdev)) { in qed_eth_rx_queue_start()
941 rc = qed_eth_pf_rx_queue_start(p_hwfn, p_cid, in qed_eth_rx_queue_start()
947 rc = qed_vf_pf_rxq_start(p_hwfn, p_cid, in qed_eth_rx_queue_start()
956 qed_eth_queue_cid_release(p_hwfn, p_cid); in qed_eth_rx_queue_start()
963 int qed_sp_eth_rx_queues_update(struct qed_hwfn *p_hwfn, in qed_sp_eth_rx_queues_update() argument
989 rc = qed_sp_init_request(p_hwfn, &p_ent, in qed_sp_eth_rx_queues_update()
1002 rc = qed_spq_post(p_hwfn, p_ent, NULL); in qed_sp_eth_rx_queues_update()
1011 qed_eth_pf_rx_queue_stop(struct qed_hwfn *p_hwfn, in qed_eth_pf_rx_queue_stop() argument
1025 rc = qed_sp_init_request(p_hwfn, &p_ent, in qed_eth_pf_rx_queue_stop()
1044 return qed_spq_post(p_hwfn, p_ent, NULL); in qed_eth_pf_rx_queue_stop()
1047 int qed_eth_rx_queue_stop(struct qed_hwfn *p_hwfn, in qed_eth_rx_queue_stop() argument
1054 if (IS_PF(p_hwfn->cdev)) in qed_eth_rx_queue_stop()
1055 rc = qed_eth_pf_rx_queue_stop(p_hwfn, p_cid, in qed_eth_rx_queue_stop()
1059 rc = qed_vf_pf_rxq_stop(p_hwfn, p_cid, cqe_completion); in qed_eth_rx_queue_stop()
1062 qed_eth_queue_cid_release(p_hwfn, p_cid); in qed_eth_rx_queue_stop()
1067 qed_eth_txq_start_ramrod(struct qed_hwfn *p_hwfn, in qed_eth_txq_start_ramrod() argument
1082 rc = qed_sp_init_request(p_hwfn, &p_ent, in qed_eth_txq_start_ramrod()
1103 return qed_spq_post(p_hwfn, p_ent, NULL); in qed_eth_txq_start_ramrod()
1107 qed_eth_pf_tx_queue_start(struct qed_hwfn *p_hwfn, in qed_eth_pf_tx_queue_start() argument
1115 rc = qed_eth_txq_start_ramrod(p_hwfn, p_cid, in qed_eth_pf_tx_queue_start()
1117 qed_get_cm_pq_idx_mcos(p_hwfn, tc)); in qed_eth_pf_tx_queue_start()
1122 *pp_doorbell = p_hwfn->doorbells + in qed_eth_pf_tx_queue_start()
1129 qed_eth_tx_queue_start(struct qed_hwfn *p_hwfn, in qed_eth_tx_queue_start() argument
1140 p_cid = qed_eth_queue_to_cid_pf(p_hwfn, opaque_fid, false, p_params); in qed_eth_tx_queue_start()
1144 if (IS_PF(p_hwfn->cdev)) in qed_eth_tx_queue_start()
1145 rc = qed_eth_pf_tx_queue_start(p_hwfn, p_cid, tc, in qed_eth_tx_queue_start()
1149 rc = qed_vf_pf_txq_start(p_hwfn, p_cid, in qed_eth_tx_queue_start()
1154 qed_eth_queue_cid_release(p_hwfn, p_cid); in qed_eth_tx_queue_start()
1162 qed_eth_pf_tx_queue_stop(struct qed_hwfn *p_hwfn, struct qed_queue_cid *p_cid) in qed_eth_pf_tx_queue_stop() argument
1173 rc = qed_sp_init_request(p_hwfn, &p_ent, in qed_eth_pf_tx_queue_stop()
1179 return qed_spq_post(p_hwfn, p_ent, NULL); in qed_eth_pf_tx_queue_stop()
1182 int qed_eth_tx_queue_stop(struct qed_hwfn *p_hwfn, void *p_handle) in qed_eth_tx_queue_stop() argument
1187 if (IS_PF(p_hwfn->cdev)) in qed_eth_tx_queue_stop()
1188 rc = qed_eth_pf_tx_queue_stop(p_hwfn, p_cid); in qed_eth_tx_queue_stop()
1190 rc = qed_vf_pf_txq_stop(p_hwfn, p_cid); in qed_eth_tx_queue_stop()
1193 qed_eth_queue_cid_release(p_hwfn, p_cid); in qed_eth_tx_queue_stop()
1219 qed_filter_ucast_common(struct qed_hwfn *p_hwfn, in qed_filter_ucast_common() argument
1235 rc = qed_fw_vport(p_hwfn, p_filter_cmd->vport_to_remove_from, in qed_filter_ucast_common()
1240 rc = qed_fw_vport(p_hwfn, p_filter_cmd->vport_to_add_to, in qed_filter_ucast_common()
1247 init_data.cid = qed_spq_get_cid(p_hwfn); in qed_filter_ucast_common()
1252 rc = qed_sp_init_request(p_hwfn, pp_ent, in qed_filter_ucast_common()
1343 DP_NOTICE(p_hwfn, in qed_filter_ucast_common()
1346 qed_sp_destroy_request(p_hwfn, *pp_ent); in qed_filter_ucast_common()
1360 int qed_sp_eth_filter_ucast(struct qed_hwfn *p_hwfn, in qed_sp_eth_filter_ucast() argument
1371 rc = qed_filter_ucast_common(p_hwfn, opaque_fid, p_filter_cmd, in qed_sp_eth_filter_ucast()
1375 DP_ERR(p_hwfn, "Uni. filter command failed %d\n", rc); in qed_sp_eth_filter_ucast()
1381 rc = qed_spq_post(p_hwfn, p_ent, NULL); in qed_sp_eth_filter_ucast()
1383 DP_ERR(p_hwfn, "Unicast filter ADD command failed %d\n", rc); in qed_sp_eth_filter_ucast()
1387 DP_VERBOSE(p_hwfn, QED_MSG_SP, in qed_sp_eth_filter_ucast()
1400 DP_VERBOSE(p_hwfn, QED_MSG_SP, in qed_sp_eth_filter_ucast()
1462 qed_sp_eth_filter_mcast(struct qed_hwfn *p_hwfn, in qed_sp_eth_filter_mcast() argument
1476 rc = qed_fw_vport(p_hwfn, p_filter_cmd->vport_to_add_to, in qed_sp_eth_filter_mcast()
1479 rc = qed_fw_vport(p_hwfn, p_filter_cmd->vport_to_remove_from, in qed_sp_eth_filter_mcast()
1486 init_data.cid = qed_spq_get_cid(p_hwfn); in qed_sp_eth_filter_mcast()
1487 init_data.opaque_fid = p_hwfn->hw_info.opaque_fid; in qed_sp_eth_filter_mcast()
1491 rc = qed_sp_init_request(p_hwfn, &p_ent, in qed_sp_eth_filter_mcast()
1495 DP_ERR(p_hwfn, "Multi-cast command failed %d\n", rc); in qed_sp_eth_filter_mcast()
1529 return qed_spq_post(p_hwfn, p_ent, NULL); in qed_sp_eth_filter_mcast()
1547 struct qed_hwfn *p_hwfn = &cdev->hwfns[i]; in qed_filter_mcast_cmd() local
1552 qed_vf_pf_filter_mcast(p_hwfn, p_filter_cmd); in qed_filter_mcast_cmd()
1556 opaque_fid = p_hwfn->hw_info.opaque_fid; in qed_filter_mcast_cmd()
1558 rc = qed_sp_eth_filter_mcast(p_hwfn, in qed_filter_mcast_cmd()
1575 struct qed_hwfn *p_hwfn = &cdev->hwfns[i]; in qed_filter_ucast_cmd() local
1579 rc = qed_vf_pf_filter_ucast(p_hwfn, p_filter_cmd); in qed_filter_ucast_cmd()
1583 opaque_fid = p_hwfn->hw_info.opaque_fid; in qed_filter_ucast_cmd()
1585 rc = qed_sp_eth_filter_ucast(p_hwfn, in qed_filter_ucast_cmd()
1597 static void __qed_get_vport_pstats_addrlen(struct qed_hwfn *p_hwfn, in __qed_get_vport_pstats_addrlen() argument
1601 if (IS_PF(p_hwfn->cdev)) { in __qed_get_vport_pstats_addrlen()
1606 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in __qed_get_vport_pstats_addrlen()
1615 __qed_get_vport_pstats(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, in __qed_get_vport_pstats() argument
1621 __qed_get_vport_pstats_addrlen(p_hwfn, &pstats_addr, &pstats_len, in __qed_get_vport_pstats()
1625 qed_memcpy_from(p_hwfn, p_ptt, &pstats, pstats_addr, pstats_len); in __qed_get_vport_pstats()
1644 __qed_get_vport_tstats(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, in __qed_get_vport_tstats() argument
1650 if (IS_PF(p_hwfn->cdev)) { in __qed_get_vport_tstats()
1652 TSTORM_PORT_STAT_OFFSET(MFW_PORT(p_hwfn)); in __qed_get_vport_tstats()
1655 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in __qed_get_vport_tstats()
1663 qed_memcpy_from(p_hwfn, p_ptt, &tstats, tstats_addr, tstats_len); in __qed_get_vport_tstats()
1673 static void __qed_get_vport_ustats_addrlen(struct qed_hwfn *p_hwfn, in __qed_get_vport_ustats_addrlen() argument
1677 if (IS_PF(p_hwfn->cdev)) { in __qed_get_vport_ustats_addrlen()
1682 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in __qed_get_vport_ustats_addrlen()
1691 void __qed_get_vport_ustats(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, in __qed_get_vport_ustats() argument
1697 __qed_get_vport_ustats_addrlen(p_hwfn, &ustats_addr, &ustats_len, in __qed_get_vport_ustats()
1701 qed_memcpy_from(p_hwfn, p_ptt, &ustats, ustats_addr, ustats_len); in __qed_get_vport_ustats()
1714 static void __qed_get_vport_mstats_addrlen(struct qed_hwfn *p_hwfn, in __qed_get_vport_mstats_addrlen() argument
1718 if (IS_PF(p_hwfn->cdev)) { in __qed_get_vport_mstats_addrlen()
1723 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in __qed_get_vport_mstats_addrlen()
1732 __qed_get_vport_mstats(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, in __qed_get_vport_mstats() argument
1738 __qed_get_vport_mstats_addrlen(p_hwfn, &mstats_addr, &mstats_len, in __qed_get_vport_mstats()
1742 qed_memcpy_from(p_hwfn, p_ptt, &mstats, mstats_addr, mstats_len); in __qed_get_vport_mstats()
1760 __qed_get_vport_port_stats(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, in __qed_get_vport_port_stats() argument
1769 qed_memcpy_from(p_hwfn, p_ptt, &port_stats, in __qed_get_vport_port_stats()
1770 p_hwfn->mcp_info->port_addr + in __qed_get_vport_port_stats()
1813 if (QED_IS_BB(p_hwfn->cdev)) { in __qed_get_vport_port_stats()
1845 p_common->link_change_count = qed_rd(p_hwfn, p_ptt, in __qed_get_vport_port_stats()
1846 p_hwfn->mcp_info->port_addr + in __qed_get_vport_port_stats()
1851 static void __qed_get_vport_stats(struct qed_hwfn *p_hwfn, in __qed_get_vport_stats() argument
1856 __qed_get_vport_mstats(p_hwfn, p_ptt, stats, statistics_bin); in __qed_get_vport_stats()
1857 __qed_get_vport_ustats(p_hwfn, p_ptt, stats, statistics_bin); in __qed_get_vport_stats()
1858 __qed_get_vport_tstats(p_hwfn, p_ptt, stats, statistics_bin); in __qed_get_vport_stats()
1859 __qed_get_vport_pstats(p_hwfn, p_ptt, stats, statistics_bin); in __qed_get_vport_stats()
1861 if (b_get_port_stats && p_hwfn->mcp_info) in __qed_get_vport_stats()
1862 __qed_get_vport_port_stats(p_hwfn, p_ptt, stats); in __qed_get_vport_stats()
1874 struct qed_hwfn *p_hwfn = &cdev->hwfns[i]; in _qed_get_vport_stats() local
1875 struct qed_ptt *p_ptt = IS_PF(cdev) ? qed_ptt_acquire(p_hwfn) in _qed_get_vport_stats()
1881 if (qed_fw_vport(p_hwfn, 0, &fw_vport)) { in _qed_get_vport_stats()
1882 DP_ERR(p_hwfn, "No vport available!\n"); in _qed_get_vport_stats()
1888 DP_ERR(p_hwfn, "Failed to acquire ptt\n"); in _qed_get_vport_stats()
1892 b_get_port_stats = IS_PF(cdev) && IS_LEAD_HWFN(p_hwfn); in _qed_get_vport_stats()
1893 __qed_get_vport_stats(p_hwfn, p_ptt, stats, fw_vport, in _qed_get_vport_stats()
1898 qed_ptt_release(p_hwfn, p_ptt); in _qed_get_vport_stats()
1927 struct qed_hwfn *p_hwfn = &cdev->hwfns[i]; in qed_reset_vport_stats() local
1931 struct qed_ptt *p_ptt = IS_PF(cdev) ? qed_ptt_acquire(p_hwfn) in qed_reset_vport_stats()
1936 DP_ERR(p_hwfn, "Failed to acquire ptt\n"); in qed_reset_vport_stats()
1941 __qed_get_vport_mstats_addrlen(p_hwfn, &addr, &len, 0); in qed_reset_vport_stats()
1942 qed_memcpy_to(p_hwfn, p_ptt, addr, &mstats, len); in qed_reset_vport_stats()
1945 __qed_get_vport_ustats_addrlen(p_hwfn, &addr, &len, 0); in qed_reset_vport_stats()
1946 qed_memcpy_to(p_hwfn, p_ptt, addr, &ustats, len); in qed_reset_vport_stats()
1949 __qed_get_vport_pstats_addrlen(p_hwfn, &addr, &len, 0); in qed_reset_vport_stats()
1950 qed_memcpy_to(p_hwfn, p_ptt, addr, &pstats, len); in qed_reset_vport_stats()
1953 qed_ptt_release(p_hwfn, p_ptt); in qed_reset_vport_stats()
1980 void qed_arfs_mode_configure(struct qed_hwfn *p_hwfn, in qed_arfs_mode_configure() argument
1984 if (test_bit(QED_MF_DISABLE_ARFS, &p_hwfn->cdev->mf_bits)) in qed_arfs_mode_configure()
1988 qed_gft_config(p_hwfn, p_ptt, p_hwfn->rel_pf_id, in qed_arfs_mode_configure()
1994 DP_VERBOSE(p_hwfn, in qed_arfs_mode_configure()
2003 DP_VERBOSE(p_hwfn, QED_MSG_SP, "Disabled Filtering\n"); in qed_arfs_mode_configure()
2004 qed_gft_disable(p_hwfn, p_ptt, p_hwfn->rel_pf_id); in qed_arfs_mode_configure()
2009 qed_configure_rfs_ntuple_filter(struct qed_hwfn *p_hwfn, in qed_configure_rfs_ntuple_filter() argument
2022 init_data.cid = qed_spq_get_cid(p_hwfn); in qed_configure_rfs_ntuple_filter()
2024 init_data.opaque_fid = p_hwfn->hw_info.opaque_fid; in qed_configure_rfs_ntuple_filter()
2033 rc = qed_sp_init_request(p_hwfn, &p_ent, in qed_configure_rfs_ntuple_filter()
2047 rc = qed_fw_vport(p_hwfn, p_params->vport_id, &abs_vport_id); in qed_configure_rfs_ntuple_filter()
2052 rc = qed_fw_l2_queue(p_hwfn, p_params->qid, in qed_configure_rfs_ntuple_filter()
2069 DP_VERBOSE(p_hwfn, QED_MSG_SP, in qed_configure_rfs_ntuple_filter()
2075 return qed_spq_post(p_hwfn, p_ent, NULL); in qed_configure_rfs_ntuple_filter()
2078 qed_sp_destroy_request(p_hwfn, p_ent); in qed_configure_rfs_ntuple_filter()
2082 int qed_get_rxq_coalesce(struct qed_hwfn *p_hwfn, in qed_get_rxq_coalesce() argument
2091 rc = qed_dmae_grc2host(p_hwfn, p_ptt, CAU_REG_SB_VAR_MEMORY + in qed_get_rxq_coalesce()
2095 DP_ERR(p_hwfn, "dmae_grc2host failed %d\n", rc); in qed_get_rxq_coalesce()
2104 coalesce = qed_rd(p_hwfn, p_ptt, address); in qed_get_rxq_coalesce()
2116 int qed_get_txq_coalesce(struct qed_hwfn *p_hwfn, in qed_get_txq_coalesce() argument
2125 rc = qed_dmae_grc2host(p_hwfn, p_ptt, CAU_REG_SB_VAR_MEMORY + in qed_get_txq_coalesce()
2129 DP_ERR(p_hwfn, "dmae_grc2host failed %d\n", rc); in qed_get_txq_coalesce()
2138 coalesce = qed_rd(p_hwfn, p_ptt, address); in qed_get_txq_coalesce()
2150 int qed_get_queue_coalesce(struct qed_hwfn *p_hwfn, u16 *p_coal, void *handle) in qed_get_queue_coalesce() argument
2156 if (IS_VF(p_hwfn->cdev)) { in qed_get_queue_coalesce()
2157 rc = qed_vf_pf_get_coalesce(p_hwfn, p_coal, p_cid); in qed_get_queue_coalesce()
2159 DP_NOTICE(p_hwfn, "Unable to read queue coalescing\n"); in qed_get_queue_coalesce()
2164 p_ptt = qed_ptt_acquire(p_hwfn); in qed_get_queue_coalesce()
2169 rc = qed_get_rxq_coalesce(p_hwfn, p_ptt, p_cid, p_coal); in qed_get_queue_coalesce()
2173 rc = qed_get_txq_coalesce(p_hwfn, p_ptt, p_cid, p_coal); in qed_get_queue_coalesce()
2179 qed_ptt_release(p_hwfn, p_ptt); in qed_get_queue_coalesce()
2187 struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev); in qed_fill_eth_dev_info() local
2196 info->num_tc = p_hwfn->hw_info.num_hw_tc; in qed_fill_eth_dev_info()
2253 struct qed_hwfn *p_hwfn = &cdev->hwfns[i]; in qed_fill_eth_dev_info() local
2256 qed_vf_get_num_cids(p_hwfn, &cids); in qed_fill_eth_dev_info()
2257 qed_vf_get_num_rxqs(p_hwfn, &queues); in qed_fill_eth_dev_info()
2309 struct qed_hwfn *p_hwfn = &cdev->hwfns[i]; in qed_start_vport() local
2316 start.opaque_fid = p_hwfn->hw_info.opaque_fid; in qed_start_vport()
2317 start.concrete_fid = p_hwfn->hw_info.concrete_fid; in qed_start_vport()
2323 rc = qed_sp_vport_start(p_hwfn, &start); in qed_start_vport()
2329 rc = qed_hw_start_fastpath(p_hwfn); in qed_start_vport()
2351 struct qed_hwfn *p_hwfn = &cdev->hwfns[i]; in qed_stop_vport() local
2353 rc = qed_sp_vport_stop(p_hwfn, in qed_stop_vport()
2354 p_hwfn->hw_info.opaque_fid, vport_id); in qed_stop_vport()
2461 struct qed_hwfn *p_hwfn = &cdev->hwfns[i]; in qed_update_vport() local
2466 sp_params.opaque_fid = p_hwfn->hw_info.opaque_fid; in qed_update_vport()
2467 rc = qed_sp_vport_update(p_hwfn, &sp_params, in qed_update_vport()
2495 struct qed_hwfn *p_hwfn; in qed_start_rxq() local
2499 p_hwfn = &cdev->hwfns[hwfn_index]; in qed_start_rxq()
2504 rc = qed_eth_rx_queue_start(p_hwfn, in qed_start_rxq()
2505 p_hwfn->hw_info.opaque_fid, in qed_start_rxq()
2526 struct qed_hwfn *p_hwfn; in qed_stop_rxq() local
2529 p_hwfn = &cdev->hwfns[hwfn_index]; in qed_stop_rxq()
2531 rc = qed_eth_rx_queue_stop(p_hwfn, handle, false, false); in qed_stop_rxq()
2547 struct qed_hwfn *p_hwfn; in qed_start_txq() local
2551 p_hwfn = &cdev->hwfns[hwfn_index]; in qed_start_txq()
2555 rc = qed_eth_tx_queue_start(p_hwfn, in qed_start_txq()
2556 p_hwfn->hw_info.opaque_fid, in qed_start_txq()
2589 struct qed_hwfn *p_hwfn; in qed_stop_txq() local
2593 p_hwfn = &cdev->hwfns[hwfn_index]; in qed_stop_txq()
2595 rc = qed_eth_tx_queue_stop(p_hwfn, handle); in qed_stop_txq()
2769 struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev); in qed_configure_arfs_searcher() local
2778 qed_arfs_mode_configure(p_hwfn, p_hwfn->p_arfs_ptt, in qed_configure_arfs_searcher()
2784 qed_arfs_sp_response_handler(struct qed_hwfn *p_hwfn, in qed_arfs_sp_response_handler() argument
2788 struct qed_common_cb_ops *op = p_hwfn->cdev->protocol_ops.common; in qed_arfs_sp_response_handler()
2789 void *dev = p_hwfn->cdev->ops_cookie; in qed_arfs_sp_response_handler()
2799 struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev); in qed_ntuple_arfs_filter_config() local
2807 if (!qed_iov_is_valid_vfid(p_hwfn, params->vf_id, false, in qed_ntuple_arfs_filter_config()
2809 DP_INFO(p_hwfn, "vfid 0x%02x is out of bounds\n", in qed_ntuple_arfs_filter_config()
2818 rc = qed_configure_rfs_ntuple_filter(p_hwfn, &cb, params); in qed_ntuple_arfs_filter_config()
2820 DP_NOTICE(p_hwfn, in qed_ntuple_arfs_filter_config()
2823 DP_VERBOSE(p_hwfn, NETIF_MSG_DRV, in qed_ntuple_arfs_filter_config()
2832 struct qed_hwfn *p_hwfn; in qed_get_coalesce() local
2835 p_hwfn = p_cid->p_owner; in qed_get_coalesce()
2836 rc = qed_get_queue_coalesce(p_hwfn, coal, handle); in qed_get_coalesce()
2859 struct qed_hwfn *p_hwfn = &cdev->hwfns[i]; in qed_req_bulletin_update_mac() local
2861 ret = qed_vf_pf_bulletin_update_mac(p_hwfn, mac); in qed_req_bulletin_update_mac()