Lines Matching refs:cptvf

75 static void cptvf_send_msg_to_pf(struct otx_cptvf *cptvf,  in cptvf_send_msg_to_pf()  argument
79 writeq(mbx->msg, cptvf->reg_base + OTX_CPT_VFX_PF_MBOXX(0, 0)); in cptvf_send_msg_to_pf()
80 writeq(mbx->data, cptvf->reg_base + OTX_CPT_VFX_PF_MBOXX(0, 1)); in cptvf_send_msg_to_pf()
84 void otx_cptvf_handle_mbox_intr(struct otx_cptvf *cptvf) in otx_cptvf_handle_mbox_intr() argument
92 mbx.msg = readq(cptvf->reg_base + OTX_CPT_VFX_PF_MBOXX(0, 0)); in otx_cptvf_handle_mbox_intr()
93 mbx.data = readq(cptvf->reg_base + OTX_CPT_VFX_PF_MBOXX(0, 1)); in otx_cptvf_handle_mbox_intr()
99 cptvf->pf_acked = true; in otx_cptvf_handle_mbox_intr()
100 cptvf->num_vfs = mbx.data; in otx_cptvf_handle_mbox_intr()
103 cptvf->pf_acked = true; in otx_cptvf_handle_mbox_intr()
104 cptvf->vfid = mbx.data; in otx_cptvf_handle_mbox_intr()
105 dev_dbg(&cptvf->pdev->dev, "Received VFID %d\n", cptvf->vfid); in otx_cptvf_handle_mbox_intr()
108 cptvf->pf_acked = true; in otx_cptvf_handle_mbox_intr()
109 cptvf->vftype = mbx.data; in otx_cptvf_handle_mbox_intr()
110 dev_dbg(&cptvf->pdev->dev, "VF %d type %s group %d\n", in otx_cptvf_handle_mbox_intr()
111 cptvf->vfid, in otx_cptvf_handle_mbox_intr()
113 cptvf->vfgrp); in otx_cptvf_handle_mbox_intr()
116 cptvf->pf_acked = true; in otx_cptvf_handle_mbox_intr()
119 cptvf->pf_nacked = true; in otx_cptvf_handle_mbox_intr()
122 dev_err(&cptvf->pdev->dev, "Invalid msg from PF, msg 0x%llx\n", in otx_cptvf_handle_mbox_intr()
128 static int cptvf_send_msg_to_pf_timeout(struct otx_cptvf *cptvf, in cptvf_send_msg_to_pf_timeout() argument
134 cptvf->pf_acked = false; in cptvf_send_msg_to_pf_timeout()
135 cptvf->pf_nacked = false; in cptvf_send_msg_to_pf_timeout()
136 cptvf_send_msg_to_pf(cptvf, mbx); in cptvf_send_msg_to_pf_timeout()
138 while (!cptvf->pf_acked) { in cptvf_send_msg_to_pf_timeout()
139 if (cptvf->pf_nacked) in cptvf_send_msg_to_pf_timeout()
142 if (cptvf->pf_acked) in cptvf_send_msg_to_pf_timeout()
146 dev_err(&cptvf->pdev->dev, in cptvf_send_msg_to_pf_timeout()
148 mbx->msg, cptvf->vfid); in cptvf_send_msg_to_pf_timeout()
159 int otx_cptvf_check_pf_ready(struct otx_cptvf *cptvf) in otx_cptvf_check_pf_ready() argument
165 return cptvf_send_msg_to_pf_timeout(cptvf, &mbx); in otx_cptvf_check_pf_ready()
172 int otx_cptvf_send_vq_size_msg(struct otx_cptvf *cptvf) in otx_cptvf_send_vq_size_msg() argument
177 mbx.data = cptvf->qsize; in otx_cptvf_send_vq_size_msg()
179 return cptvf_send_msg_to_pf_timeout(cptvf, &mbx); in otx_cptvf_send_vq_size_msg()
185 int otx_cptvf_send_vf_to_grp_msg(struct otx_cptvf *cptvf, int group) in otx_cptvf_send_vf_to_grp_msg() argument
193 ret = cptvf_send_msg_to_pf_timeout(cptvf, &mbx); in otx_cptvf_send_vf_to_grp_msg()
196 cptvf->vfgrp = group; in otx_cptvf_send_vf_to_grp_msg()
204 int otx_cptvf_send_vf_priority_msg(struct otx_cptvf *cptvf) in otx_cptvf_send_vf_priority_msg() argument
210 mbx.data = cptvf->priority; in otx_cptvf_send_vf_priority_msg()
212 return cptvf_send_msg_to_pf_timeout(cptvf, &mbx); in otx_cptvf_send_vf_priority_msg()
218 int otx_cptvf_send_vf_up(struct otx_cptvf *cptvf) in otx_cptvf_send_vf_up() argument
224 return cptvf_send_msg_to_pf_timeout(cptvf, &mbx); in otx_cptvf_send_vf_up()
230 int otx_cptvf_send_vf_down(struct otx_cptvf *cptvf) in otx_cptvf_send_vf_down() argument
236 return cptvf_send_msg_to_pf_timeout(cptvf, &mbx); in otx_cptvf_send_vf_down()