Lines Matching refs:vf

8 static void cpt_send_msg_to_vf(struct cpt_device *cpt, int vf,  in cpt_send_msg_to_vf()  argument
12 cpt_write_csr64(cpt->reg_base, CPTX_PF_VFX_MBOXX(0, vf, 1), in cpt_send_msg_to_vf()
14 cpt_write_csr64(cpt->reg_base, CPTX_PF_VFX_MBOXX(0, vf, 0), mbx->msg); in cpt_send_msg_to_vf()
20 static void cpt_mbox_send_ack(struct cpt_device *cpt, int vf, in cpt_mbox_send_ack() argument
25 cpt_send_msg_to_vf(cpt, vf, mbx); in cpt_mbox_send_ack()
28 static void cpt_clear_mbox_intr(struct cpt_device *cpt, u32 vf) in cpt_clear_mbox_intr() argument
31 cpt_write_csr64(cpt->reg_base, CPTX_PF_MBOX_INTX(0, 0), (1 << vf)); in cpt_clear_mbox_intr()
37 static void cpt_cfg_qlen_for_vf(struct cpt_device *cpt, int vf, u32 size) in cpt_cfg_qlen_for_vf() argument
41 pf_qx_ctl.u = cpt_read_csr64(cpt->reg_base, CPTX_PF_QX_CTL(0, vf)); in cpt_cfg_qlen_for_vf()
44 cpt_write_csr64(cpt->reg_base, CPTX_PF_QX_CTL(0, vf), pf_qx_ctl.u); in cpt_cfg_qlen_for_vf()
50 static void cpt_cfg_vq_priority(struct cpt_device *cpt, int vf, u32 pri) in cpt_cfg_vq_priority() argument
54 pf_qx_ctl.u = cpt_read_csr64(cpt->reg_base, CPTX_PF_QX_CTL(0, vf)); in cpt_cfg_vq_priority()
56 cpt_write_csr64(cpt->reg_base, CPTX_PF_QX_CTL(0, vf), pf_qx_ctl.u); in cpt_cfg_vq_priority()
86 static void cpt_handle_mbox_intr(struct cpt_device *cpt, int vf) in cpt_handle_mbox_intr() argument
88 struct cpt_vf_info *vfx = &cpt->vfinfo[vf]; in cpt_handle_mbox_intr()
96 mbx.msg = cpt_read_csr64(cpt->reg_base, CPTX_PF_VFX_MBOXX(0, vf, 0)); in cpt_handle_mbox_intr()
97 mbx.data = cpt_read_csr64(cpt->reg_base, CPTX_PF_VFX_MBOXX(0, vf, 1)); in cpt_handle_mbox_intr()
98 dev_dbg(dev, "%s: Mailbox msg 0x%llx from VF%d", __func__, mbx.msg, vf); in cpt_handle_mbox_intr()
103 cpt_mbox_send_ack(cpt, vf, &mbx); in cpt_handle_mbox_intr()
107 mbx.data = vf; in cpt_handle_mbox_intr()
108 cpt_send_msg_to_vf(cpt, vf, &mbx); in cpt_handle_mbox_intr()
114 cpt_mbox_send_ack(cpt, vf, &mbx); in cpt_handle_mbox_intr()
118 cpt_cfg_qlen_for_vf(cpt, vf, vfx->qlen); in cpt_handle_mbox_intr()
119 cpt_mbox_send_ack(cpt, vf, &mbx); in cpt_handle_mbox_intr()
122 vftype = cpt_bind_vq_to_grp(cpt, vf, (u8)mbx.data); in cpt_handle_mbox_intr()
125 vf, mbx.data); in cpt_handle_mbox_intr()
128 vf, mbx.data); in cpt_handle_mbox_intr()
131 cpt_send_msg_to_vf(cpt, vf, &mbx); in cpt_handle_mbox_intr()
136 cpt_cfg_vq_priority(cpt, vf, vfx->priority); in cpt_handle_mbox_intr()
137 cpt_mbox_send_ack(cpt, vf, &mbx); in cpt_handle_mbox_intr()
141 vf, mbx.msg); in cpt_handle_mbox_intr()
149 u8 vf; in cpt_mbox_intr_handler() local
153 for (vf = 0; vf < CPT_MAX_VF_NUM; vf++) { in cpt_mbox_intr_handler()
154 if (intr & (1ULL << vf)) { in cpt_mbox_intr_handler()
155 dev_dbg(&cpt->pdev->dev, "Intr from VF %d\n", vf); in cpt_mbox_intr_handler()
156 cpt_handle_mbox_intr(cpt, vf); in cpt_mbox_intr_handler()
157 cpt_clear_mbox_intr(cpt, vf); in cpt_mbox_intr_handler()