Lines Matching refs:p_iov
15 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_prep() local
23 mutex_lock(&(p_iov->mutex)); in qed_vf_pf_prep()
31 p_iov->offset = (u8 *)p_iov->vf2pf_request; in qed_vf_pf_prep()
34 memset(p_iov->vf2pf_request, 0, sizeof(union vfpf_tlvs)); in qed_vf_pf_prep()
35 memset(p_iov->pf2vf_reply, 0, sizeof(union pfvf_tlvs)); in qed_vf_pf_prep()
38 p_tlv = qed_add_tlv(p_hwfn, &p_iov->offset, type, length); in qed_vf_pf_prep()
42 (u64)p_iov->pf2vf_reply_phys; in qed_vf_pf_prep()
146 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_add_qid() local
150 if (!(p_iov->acquire_resp.pfdev_info.capabilities & in qed_vf_pf_add_qid()
154 p_qid_tlv = qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_add_qid()
161 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in _qed_vf_pf_release() local
171 qed_add_tlv(p_hwfn, &p_iov->offset, in _qed_vf_pf_release()
174 resp = &p_iov->pf2vf_reply->default_resp; in _qed_vf_pf_release()
186 if (p_iov->vf2pf_request) in _qed_vf_pf_release()
189 p_iov->vf2pf_request, in _qed_vf_pf_release()
190 p_iov->vf2pf_request_phys); in _qed_vf_pf_release()
191 if (p_iov->pf2vf_reply) in _qed_vf_pf_release()
194 p_iov->pf2vf_reply, p_iov->pf2vf_reply_phys); in _qed_vf_pf_release()
196 if (p_iov->bulletin.p_virt) { in _qed_vf_pf_release()
200 p_iov->bulletin.p_virt, p_iov->bulletin.phys); in _qed_vf_pf_release()
247 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_acquire() local
248 struct pfvf_acquire_resp_tlv *resp = &p_iov->pf2vf_reply->acquire_resp; in qed_vf_pf_acquire()
282 if (p_iov->b_doorbell_bar) { in qed_vf_pf_acquire()
289 req->bulletin_addr = p_iov->bulletin.phys; in qed_vf_pf_acquire()
290 req->bulletin_size = p_iov->bulletin.size; in qed_vf_pf_acquire()
293 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_acquire()
301 memset(p_iov->pf2vf_reply, 0, sizeof(union pfvf_tlvs)); in qed_vf_pf_acquire()
318 memcpy(&p_iov->acquire_resp, resp, sizeof(p_iov->acquire_resp)); in qed_vf_pf_acquire()
386 p_iov->b_pre_fp_hsi = true; in qed_vf_pf_acquire()
396 p_iov->bulletin.size = resp->bulletin_size; in qed_vf_pf_acquire()
412 if (!p_iov->b_pre_fp_hsi && in qed_vf_pf_acquire()
443 struct qed_vf_iov *p_iov; in qed_vf_hw_prepare() local
460 p_iov = kzalloc(sizeof(*p_iov), GFP_KERNEL); in qed_vf_hw_prepare()
461 if (!p_iov) in qed_vf_hw_prepare()
476 p_iov->b_doorbell_bar = true; in qed_vf_hw_prepare()
482 p_iov->b_doorbell_bar = true; in qed_vf_hw_prepare()
489 p_iov->vf2pf_request = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, in qed_vf_hw_prepare()
491 &p_iov->vf2pf_request_phys, in qed_vf_hw_prepare()
493 if (!p_iov->vf2pf_request) in qed_vf_hw_prepare()
496 p_iov->pf2vf_reply = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, in qed_vf_hw_prepare()
498 &p_iov->pf2vf_reply_phys, in qed_vf_hw_prepare()
500 if (!p_iov->pf2vf_reply) in qed_vf_hw_prepare()
506 p_iov->vf2pf_request, in qed_vf_hw_prepare()
507 (u64)p_iov->vf2pf_request_phys, in qed_vf_hw_prepare()
508 p_iov->pf2vf_reply, (u64)p_iov->pf2vf_reply_phys); in qed_vf_hw_prepare()
511 p_iov->bulletin.size = sizeof(struct qed_bulletin_content); in qed_vf_hw_prepare()
512 p_iov->bulletin.p_virt = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, in qed_vf_hw_prepare()
513 p_iov->bulletin.size, in qed_vf_hw_prepare()
514 &p_iov->bulletin.phys, in qed_vf_hw_prepare()
516 if (!p_iov->bulletin.p_virt) in qed_vf_hw_prepare()
521 p_iov->bulletin.p_virt, in qed_vf_hw_prepare()
522 (u64)p_iov->bulletin.phys, p_iov->bulletin.size); in qed_vf_hw_prepare()
524 mutex_init(&p_iov->mutex); in qed_vf_hw_prepare()
526 p_hwfn->vf_iov_info = p_iov; in qed_vf_hw_prepare()
539 if (!rc && p_iov->b_doorbell_bar && in qed_vf_hw_prepare()
546 p_iov->b_doorbell_bar = false; in qed_vf_hw_prepare()
561 p_iov->pf2vf_reply, p_iov->pf2vf_reply_phys); in qed_vf_hw_prepare()
565 p_iov->vf2pf_request, p_iov->vf2pf_request_phys); in qed_vf_hw_prepare()
567 kfree(p_iov); in qed_vf_hw_prepare()
674 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_tunnel_param_update() local
703 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_tunnel_param_update()
707 p_resp = &p_iov->pf2vf_reply->tunn_param_resp; in qed_vf_pf_tunnel_param_update()
733 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_rxq_start() local
754 if (p_iov->b_pre_fp_hsi) { in qed_vf_pf_rxq_start()
755 u8 hw_qid = p_iov->acquire_resp.resc.hw_qid[rx_qid]; in qed_vf_pf_rxq_start()
771 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_rxq_start()
774 resp = &p_iov->pf2vf_reply->queue_start; in qed_vf_pf_rxq_start()
785 if (!p_iov->b_pre_fp_hsi) { in qed_vf_pf_rxq_start()
806 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_rxq_stop() local
821 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_rxq_stop()
824 resp = &p_iov->pf2vf_reply->default_resp; in qed_vf_pf_rxq_stop()
846 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_txq_start() local
866 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_txq_start()
869 resp = &p_iov->pf2vf_reply->queue_start; in qed_vf_pf_txq_start()
882 if (!p_iov->b_pre_fp_hsi) { in qed_vf_pf_txq_start()
885 u8 cid = p_iov->acquire_resp.resc.cid[qid]; in qed_vf_pf_txq_start()
903 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_txq_stop() local
917 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_txq_stop()
920 resp = &p_iov->pf2vf_reply->default_resp; in qed_vf_pf_txq_stop()
943 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_vport_start() local
967 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_vport_start()
970 resp = &p_iov->pf2vf_reply->default_resp; in qed_vf_pf_vport_start()
988 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_vport_stop() local
989 struct pfvf_def_resp_tlv *resp = &p_iov->pf2vf_reply->default_resp; in qed_vf_pf_vport_stop()
997 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_vport_stop()
1050 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_handle_vp_update_tlvs_resp() local
1060 qed_iov_search_list_tlvs(p_hwfn, p_iov->pf2vf_reply, in qed_vf_handle_vp_update_tlvs_resp()
1074 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_vport_update() local
1082 resp = &p_iov->pf2vf_reply->default_resp; in qed_vf_pf_vport_update()
1096 p_act_tlv = qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_vport_update()
1117 p_tx_switch_tlv = qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_vport_update()
1128 p_mcast_tlv = qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_vport_update()
1144 p_accept_tlv = qed_add_tlv(p_hwfn, &p_iov->offset, tlv, size); in qed_vf_pf_vport_update()
1167 &p_iov->offset, in qed_vf_pf_vport_update()
1204 p_any_vlan_tlv = qed_add_tlv(p_hwfn, &p_iov->offset, tlv, size); in qed_vf_pf_vport_update()
1213 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_vport_update()
1235 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_reset() local
1244 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_reset()
1247 resp = &p_iov->pf2vf_reply->default_resp; in qed_vf_pf_reset()
1289 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_filter_ucast() local
1302 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_filter_ucast()
1305 resp = &p_iov->pf2vf_reply->default_resp; in qed_vf_pf_filter_ucast()
1323 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_int_cleanup() local
1324 struct pfvf_def_resp_tlv *resp = &p_iov->pf2vf_reply->default_resp; in qed_vf_pf_int_cleanup()
1332 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_int_cleanup()
1353 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_get_coalesce() local
1363 qed_add_tlv(p_hwfn, &p_iov->offset, CHANNEL_TLV_LIST_END, in qed_vf_pf_get_coalesce()
1365 resp = &p_iov->pf2vf_reply->read_coal_resp; in qed_vf_pf_get_coalesce()
1385 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_bulletin_update_mac() local
1401 qed_add_tlv(p_hwfn, &p_iov->offset, CHANNEL_TLV_LIST_END, in qed_vf_pf_bulletin_update_mac()
1404 p_resp = &p_iov->pf2vf_reply->default_resp; in qed_vf_pf_bulletin_update_mac()
1414 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_set_coalesce() local
1432 qed_add_tlv(p_hwfn, &p_iov->offset, CHANNEL_TLV_LIST_END, in qed_vf_pf_set_coalesce()
1435 resp = &p_iov->pf2vf_reply->default_resp; in qed_vf_pf_set_coalesce()
1456 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_get_igu_sb_id() local
1458 if (!p_iov) { in qed_vf_get_igu_sb_id()
1463 return p_iov->acquire_resp.resc.hw_sbs[sb_id].hw_sb_id; in qed_vf_get_igu_sb_id()
1469 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_set_sb_info() local
1471 if (!p_iov) { in qed_vf_set_sb_info()
1481 p_iov->sbs_info[sb_id] = p_sb; in qed_vf_set_sb_info()
1486 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_read_bulletin() local
1490 crc_size = sizeof(p_iov->bulletin.p_virt->crc); in qed_vf_read_bulletin()
1494 memcpy(&shadow, p_iov->bulletin.p_virt, p_iov->bulletin.size); in qed_vf_read_bulletin()
1497 if (shadow.version == p_iov->bulletin_shadow.version) in qed_vf_read_bulletin()
1502 p_iov->bulletin.size - crc_size); in qed_vf_read_bulletin()
1507 memcpy(&p_iov->bulletin_shadow, &shadow, p_iov->bulletin.size); in qed_vf_read_bulletin()