Lines Matching refs:vf_data
128 static int qm_get_regs(struct hisi_qm *qm, struct acc_vf_data *vf_data) in qm_get_regs() argument
133 ret = qm_read_regs(qm, QM_VF_AEQ_INT_MASK, &vf_data->aeq_int_mask, 1); in qm_get_regs()
139 ret = qm_read_regs(qm, QM_VF_EQ_INT_MASK, &vf_data->eq_int_mask, 1); in qm_get_regs()
146 &vf_data->ifc_int_source, 1); in qm_get_regs()
152 ret = qm_read_regs(qm, QM_IFC_INT_MASK, &vf_data->ifc_int_mask, 1); in qm_get_regs()
158 ret = qm_read_regs(qm, QM_IFC_INT_SET_V, &vf_data->ifc_int_set, 1); in qm_get_regs()
164 ret = qm_read_regs(qm, QM_PAGE_SIZE, &vf_data->page_size, 1); in qm_get_regs()
171 ret = qm_read_regs(qm, QM_EQC_DW0, vf_data->qm_eqc_dw, 7); in qm_get_regs()
178 ret = qm_read_regs(qm, QM_AEQC_DW0, vf_data->qm_aeqc_dw, 7); in qm_get_regs()
187 static int qm_set_regs(struct hisi_qm *qm, struct acc_vf_data *vf_data) in qm_set_regs() argument
198 ret = qm_write_regs(qm, QM_VF_AEQ_INT_MASK, &vf_data->aeq_int_mask, 1); in qm_set_regs()
204 ret = qm_write_regs(qm, QM_VF_EQ_INT_MASK, &vf_data->eq_int_mask, 1); in qm_set_regs()
211 &vf_data->ifc_int_source, 1); in qm_set_regs()
217 ret = qm_write_regs(qm, QM_IFC_INT_MASK, &vf_data->ifc_int_mask, 1); in qm_set_regs()
223 ret = qm_write_regs(qm, QM_IFC_INT_SET_V, &vf_data->ifc_int_set, 1); in qm_set_regs()
229 ret = qm_write_regs(qm, QM_QUE_ISO_CFG_V, &vf_data->que_iso_cfg, 1); in qm_set_regs()
235 ret = qm_write_regs(qm, QM_PAGE_SIZE, &vf_data->page_size, 1); in qm_set_regs()
242 ret = qm_write_regs(qm, QM_EQC_DW0, vf_data->qm_eqc_dw, 7); in qm_set_regs()
249 ret = qm_write_regs(qm, QM_AEQC_DW0, vf_data->qm_aeqc_dw, 7); in qm_set_regs()
356 struct acc_vf_data *vf_data = &migf->vf_data; in vf_qm_check_match() local
366 if (vf_data->acc_magic != ACC_DEV_MAGIC) { in vf_qm_check_match()
371 if (vf_data->dev_id != hisi_acc_vdev->vf_dev->device) { in vf_qm_check_match()
383 if (ret != vf_data->qp_num) { in vf_qm_check_match()
397 if (vf_data->que_iso_cfg != que_iso_state) { in vf_qm_check_match()
402 ret = qm_write_regs(vf_qm, QM_VF_STATE, &vf_data->vf_qm_state, 1); in vf_qm_check_match()
408 hisi_acc_vdev->vf_qm_state = vf_data->vf_qm_state; in vf_qm_check_match()
414 struct acc_vf_data *vf_data) in vf_qm_get_match_data() argument
421 vf_data->acc_magic = ACC_DEV_MAGIC; in vf_qm_get_match_data()
423 vf_data->dev_id = hisi_acc_vdev->vf_dev->device; in vf_qm_get_match_data()
426 ret = pf_qm_get_qp_num(pf_qm, vf_id, &vf_data->qp_base); in vf_qm_get_match_data()
432 vf_data->qp_num = ret; in vf_qm_get_match_data()
435 ret = qm_read_regs(pf_qm, QM_QUE_ISO_CFG_V, &vf_data->que_iso_cfg, 1); in vf_qm_get_match_data()
449 struct acc_vf_data *vf_data = &migf->vf_data; in vf_qm_load_data() local
459 qm->eqe_dma = vf_data->eqe_dma; in vf_qm_load_data()
460 qm->aeqe_dma = vf_data->aeqe_dma; in vf_qm_load_data()
461 qm->sqc_dma = vf_data->sqc_dma; in vf_qm_load_data()
462 qm->cqc_dma = vf_data->cqc_dma; in vf_qm_load_data()
464 qm->qp_base = vf_data->qp_base; in vf_qm_load_data()
465 qm->qp_num = vf_data->qp_num; in vf_qm_load_data()
467 ret = qm_set_regs(qm, vf_data); in vf_qm_load_data()
492 struct acc_vf_data *vf_data = &migf->vf_data; in vf_qm_state_save() local
499 vf_data->vf_qm_state = QM_NOT_READY; in vf_qm_state_save()
500 hisi_acc_vdev->vf_qm_state = vf_data->vf_qm_state; in vf_qm_state_save()
505 vf_data->vf_qm_state = QM_READY; in vf_qm_state_save()
506 hisi_acc_vdev->vf_qm_state = vf_data->vf_qm_state; in vf_qm_state_save()
514 ret = qm_get_regs(vf_qm, vf_data); in vf_qm_state_save()
519 vf_data->eqe_dma = vf_data->qm_eqc_dw[1]; in vf_qm_state_save()
520 vf_data->eqe_dma <<= QM_XQC_ADDR_OFFSET; in vf_qm_state_save()
521 vf_data->eqe_dma |= vf_data->qm_eqc_dw[0]; in vf_qm_state_save()
522 vf_data->aeqe_dma = vf_data->qm_aeqc_dw[1]; in vf_qm_state_save()
523 vf_data->aeqe_dma <<= QM_XQC_ADDR_OFFSET; in vf_qm_state_save()
524 vf_data->aeqe_dma |= vf_data->qm_aeqc_dw[0]; in vf_qm_state_save()
527 ret = qm_get_sqc(vf_qm, &vf_data->sqc_dma); in vf_qm_state_save()
533 ret = qm_get_cqc(vf_qm, &vf_data->cqc_dma); in vf_qm_state_save()
683 u8 *vf_data = (u8 *)&migf->vf_data; in hisi_acc_vf_resume_write() local
705 ret = copy_from_user(vf_data + *pos, buf, len); in hisi_acc_vf_resume_write()
826 u8 *vf_data = (u8 *)&migf->vf_data; in hisi_acc_vf_save_read() local
828 ret = copy_to_user(buf, vf_data + *pos, len); in hisi_acc_vf_save_read()
872 ret = vf_qm_get_match_data(hisi_acc_vdev, &migf->vf_data); in hisi_acc_open_saving_migf()