From: Longfang Liu liulongfang@huawei.com
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4JA4W
----------------------------------------------------------------------
In the previous driver, the queue isolation configuration register of the PF page was mixed with the queue isolation configuration register of the VF page, which resulted in mismatch and error in the configuration information during migration. Because the BIT0 of the queue isolation register of the PF page is consistent with the value of the queue isolation register of the VF page, Therefore, driver can only read the registers of the VF page.
Signed-off-by: Longfang Liu liulongfang@huawei.com Signed-off-by: Yang Shen shenyang39@huawei.com Reviewed-by: Hao Fang fanghao11@huawei.com Acked-by: Xie XiuQi xiexiuqi@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- drivers/crypto/hisilicon/migration/acc_vf_migration.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/crypto/hisilicon/migration/acc_vf_migration.c b/drivers/crypto/hisilicon/migration/acc_vf_migration.c index 7dcea3b9a6c6..920f19916fea 100644 --- a/drivers/crypto/hisilicon/migration/acc_vf_migration.c +++ b/drivers/crypto/hisilicon/migration/acc_vf_migration.c @@ -381,12 +381,6 @@ static int qm_rw_regs_write(struct hisi_qm *qm, struct acc_vf_data *vf_data) return ret; }
- ret = qm_write_reg(qm, QM_QUE_ISO_CFG_V, &vf_data->que_iso_cfg, 1); - if (ret) { - dev_err(dev, "failed to write QM_QUE_ISO_CFG_V!\n"); - return ret; - } - ret = qm_write_reg(qm, QM_PAGE_SIZE, &vf_data->page_size, 1); if (ret) { dev_err(dev, "failed to write QM_PAGE_SIZE!\n"); @@ -518,6 +512,7 @@ static int vf_match_info_check(struct hisi_qm *qm, struct acc_vf_migration *acc_vf_dev) { struct acc_vf_data *vf_data = acc_vf_dev->vf_data; + struct hisi_qm *pf_qm = acc_vf_dev->pf_qm; struct device *dev = &qm->pdev->dev; u32 que_iso_state; int ret; @@ -541,7 +536,7 @@ static int vf_match_info_check(struct hisi_qm *qm, }
/* vf isolation state check */ - ret = qm_read_reg(qm, QM_QUE_ISO_CFG_V, &que_iso_state, 1); + ret = qm_read_reg(pf_qm, QM_QUE_ISO_CFG_V, &que_iso_state, 1); if (ret) { dev_err(dev, "failed to read QM_QUE_ISO_CFG_V!\n"); return ret;