Lines Matching refs:p_iov

41 	struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;  in qed_vf_pf_prep()  local
49 mutex_lock(&(p_iov->mutex)); in qed_vf_pf_prep()
57 p_iov->offset = (u8 *)p_iov->vf2pf_request; in qed_vf_pf_prep()
60 memset(p_iov->vf2pf_request, 0, sizeof(union vfpf_tlvs)); in qed_vf_pf_prep()
61 memset(p_iov->pf2vf_reply, 0, sizeof(union pfvf_tlvs)); in qed_vf_pf_prep()
64 p_tlv = qed_add_tlv(p_hwfn, &p_iov->offset, type, length); in qed_vf_pf_prep()
68 (u64)p_iov->pf2vf_reply_phys; in qed_vf_pf_prep()
159 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_add_qid() local
163 if (!(p_iov->acquire_resp.pfdev_info.capabilities & in qed_vf_pf_add_qid()
167 p_qid_tlv = qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_add_qid()
174 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in _qed_vf_pf_release() local
184 qed_add_tlv(p_hwfn, &p_iov->offset, in _qed_vf_pf_release()
187 resp = &p_iov->pf2vf_reply->default_resp; in _qed_vf_pf_release()
199 if (p_iov->vf2pf_request) in _qed_vf_pf_release()
202 p_iov->vf2pf_request, in _qed_vf_pf_release()
203 p_iov->vf2pf_request_phys); in _qed_vf_pf_release()
204 if (p_iov->pf2vf_reply) in _qed_vf_pf_release()
207 p_iov->pf2vf_reply, p_iov->pf2vf_reply_phys); in _qed_vf_pf_release()
209 if (p_iov->bulletin.p_virt) { in _qed_vf_pf_release()
213 p_iov->bulletin.p_virt, p_iov->bulletin.phys); in _qed_vf_pf_release()
260 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_acquire() local
261 struct pfvf_acquire_resp_tlv *resp = &p_iov->pf2vf_reply->acquire_resp; in qed_vf_pf_acquire()
295 if (p_iov->b_doorbell_bar) { in qed_vf_pf_acquire()
302 req->bulletin_addr = p_iov->bulletin.phys; in qed_vf_pf_acquire()
303 req->bulletin_size = p_iov->bulletin.size; in qed_vf_pf_acquire()
306 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_acquire()
314 memset(p_iov->pf2vf_reply, 0, sizeof(union pfvf_tlvs)); in qed_vf_pf_acquire()
331 memcpy(&p_iov->acquire_resp, resp, sizeof(p_iov->acquire_resp)); in qed_vf_pf_acquire()
399 p_iov->b_pre_fp_hsi = true; in qed_vf_pf_acquire()
409 p_iov->bulletin.size = resp->bulletin_size; in qed_vf_pf_acquire()
425 if (!p_iov->b_pre_fp_hsi && in qed_vf_pf_acquire()
456 struct qed_vf_iov *p_iov; in qed_vf_hw_prepare() local
473 p_iov = kzalloc(sizeof(*p_iov), GFP_KERNEL); in qed_vf_hw_prepare()
474 if (!p_iov) in qed_vf_hw_prepare()
489 p_iov->b_doorbell_bar = true; in qed_vf_hw_prepare()
495 p_iov->b_doorbell_bar = true; in qed_vf_hw_prepare()
502 p_iov->vf2pf_request = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, in qed_vf_hw_prepare()
504 &p_iov->vf2pf_request_phys, in qed_vf_hw_prepare()
506 if (!p_iov->vf2pf_request) in qed_vf_hw_prepare()
509 p_iov->pf2vf_reply = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, in qed_vf_hw_prepare()
511 &p_iov->pf2vf_reply_phys, in qed_vf_hw_prepare()
513 if (!p_iov->pf2vf_reply) in qed_vf_hw_prepare()
519 p_iov->vf2pf_request, in qed_vf_hw_prepare()
520 (u64) p_iov->vf2pf_request_phys, in qed_vf_hw_prepare()
521 p_iov->pf2vf_reply, (u64)p_iov->pf2vf_reply_phys); in qed_vf_hw_prepare()
524 p_iov->bulletin.size = sizeof(struct qed_bulletin_content); in qed_vf_hw_prepare()
525 p_iov->bulletin.p_virt = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, in qed_vf_hw_prepare()
526 p_iov->bulletin.size, in qed_vf_hw_prepare()
527 &p_iov->bulletin.phys, in qed_vf_hw_prepare()
531 p_iov->bulletin.p_virt, in qed_vf_hw_prepare()
532 (u64)p_iov->bulletin.phys, p_iov->bulletin.size); in qed_vf_hw_prepare()
534 mutex_init(&p_iov->mutex); in qed_vf_hw_prepare()
536 p_hwfn->vf_iov_info = p_iov; in qed_vf_hw_prepare()
549 if (!rc && p_iov->b_doorbell_bar && in qed_vf_hw_prepare()
556 p_iov->b_doorbell_bar = false; in qed_vf_hw_prepare()
571 p_iov->vf2pf_request, p_iov->vf2pf_request_phys); in qed_vf_hw_prepare()
573 kfree(p_iov); in qed_vf_hw_prepare()
679 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_tunnel_param_update() local
708 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_tunnel_param_update()
712 p_resp = &p_iov->pf2vf_reply->tunn_param_resp; in qed_vf_pf_tunnel_param_update()
738 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_rxq_start() local
759 if (p_iov->b_pre_fp_hsi) { in qed_vf_pf_rxq_start()
760 u8 hw_qid = p_iov->acquire_resp.resc.hw_qid[rx_qid]; in qed_vf_pf_rxq_start()
776 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_rxq_start()
779 resp = &p_iov->pf2vf_reply->queue_start; in qed_vf_pf_rxq_start()
790 if (!p_iov->b_pre_fp_hsi) { in qed_vf_pf_rxq_start()
811 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_rxq_stop() local
826 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_rxq_stop()
829 resp = &p_iov->pf2vf_reply->default_resp; in qed_vf_pf_rxq_stop()
851 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_txq_start() local
871 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_txq_start()
874 resp = &p_iov->pf2vf_reply->queue_start; in qed_vf_pf_txq_start()
887 if (!p_iov->b_pre_fp_hsi) { in qed_vf_pf_txq_start()
890 u8 cid = p_iov->acquire_resp.resc.cid[qid]; in qed_vf_pf_txq_start()
908 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_txq_stop() local
922 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_txq_stop()
925 resp = &p_iov->pf2vf_reply->default_resp; in qed_vf_pf_txq_stop()
948 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_vport_start() local
972 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_vport_start()
975 resp = &p_iov->pf2vf_reply->default_resp; in qed_vf_pf_vport_start()
993 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_vport_stop() local
994 struct pfvf_def_resp_tlv *resp = &p_iov->pf2vf_reply->default_resp; in qed_vf_pf_vport_stop()
1002 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_vport_stop()
1055 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_handle_vp_update_tlvs_resp() local
1065 qed_iov_search_list_tlvs(p_hwfn, p_iov->pf2vf_reply, in qed_vf_handle_vp_update_tlvs_resp()
1079 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_vport_update() local
1087 resp = &p_iov->pf2vf_reply->default_resp; in qed_vf_pf_vport_update()
1101 p_act_tlv = qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_vport_update()
1122 p_tx_switch_tlv = qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_vport_update()
1133 p_mcast_tlv = qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_vport_update()
1149 p_accept_tlv = qed_add_tlv(p_hwfn, &p_iov->offset, tlv, size); in qed_vf_pf_vport_update()
1172 &p_iov->offset, in qed_vf_pf_vport_update()
1209 p_any_vlan_tlv = qed_add_tlv(p_hwfn, &p_iov->offset, tlv, size); in qed_vf_pf_vport_update()
1218 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_vport_update()
1240 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_reset() local
1249 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_reset()
1252 resp = &p_iov->pf2vf_reply->default_resp; in qed_vf_pf_reset()
1294 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_filter_ucast() local
1307 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_filter_ucast()
1310 resp = &p_iov->pf2vf_reply->default_resp; in qed_vf_pf_filter_ucast()
1328 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_int_cleanup() local
1329 struct pfvf_def_resp_tlv *resp = &p_iov->pf2vf_reply->default_resp; in qed_vf_pf_int_cleanup()
1337 qed_add_tlv(p_hwfn, &p_iov->offset, in qed_vf_pf_int_cleanup()
1358 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_get_coalesce() local
1368 qed_add_tlv(p_hwfn, &p_iov->offset, CHANNEL_TLV_LIST_END, in qed_vf_pf_get_coalesce()
1370 resp = &p_iov->pf2vf_reply->read_coal_resp; in qed_vf_pf_get_coalesce()
1390 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_bulletin_update_mac() local
1406 qed_add_tlv(p_hwfn, &p_iov->offset, CHANNEL_TLV_LIST_END, in qed_vf_pf_bulletin_update_mac()
1409 p_resp = &p_iov->pf2vf_reply->default_resp; in qed_vf_pf_bulletin_update_mac()
1419 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_pf_set_coalesce() local
1437 qed_add_tlv(p_hwfn, &p_iov->offset, CHANNEL_TLV_LIST_END, in qed_vf_pf_set_coalesce()
1440 resp = &p_iov->pf2vf_reply->default_resp; in qed_vf_pf_set_coalesce()
1461 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_get_igu_sb_id() local
1463 if (!p_iov) { in qed_vf_get_igu_sb_id()
1468 return p_iov->acquire_resp.resc.hw_sbs[sb_id].hw_sb_id; in qed_vf_get_igu_sb_id()
1474 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_set_sb_info() local
1476 if (!p_iov) { in qed_vf_set_sb_info()
1486 p_iov->sbs_info[sb_id] = p_sb; in qed_vf_set_sb_info()
1491 struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; in qed_vf_read_bulletin() local
1495 crc_size = sizeof(p_iov->bulletin.p_virt->crc); in qed_vf_read_bulletin()
1499 memcpy(&shadow, p_iov->bulletin.p_virt, p_iov->bulletin.size); in qed_vf_read_bulletin()
1502 if (shadow.version == p_iov->bulletin_shadow.version) in qed_vf_read_bulletin()
1507 p_iov->bulletin.size - crc_size); in qed_vf_read_bulletin()
1512 memcpy(&p_iov->bulletin_shadow, &shadow, p_iov->bulletin.size); in qed_vf_read_bulletin()