From: Hao Fang fanghao11@huawei.com
The spin_lock need to destroy and mem region need to unmap, hisi_qm_clear_info() can do this.
Signed-off-by: Hao Fang fanghao11@huawei.com --- drv/hisi_qm_udrv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drv/hisi_qm_udrv.c b/drv/hisi_qm_udrv.c index 0baa85c..4c80959 100644 --- a/drv/hisi_qm_udrv.c +++ b/drv/hisi_qm_udrv.c @@ -449,10 +449,10 @@ void hisi_qm_free_qp(handle_t h_qp) }
wd_release_ctx_force(qp->h_ctx); - wd_ctx_unmap_qfr(qp->h_ctx, UACCE_QFRT_MMIO); - wd_ctx_unmap_qfr(qp->h_ctx, UACCE_QFRT_DUS); - if (qp->h_sgl_pool) - hisi_qm_destroy_sglpool(qp->h_sgl_pool); + + hisi_qm_destroy_sglpool(qp->h_sgl_pool); + + hisi_qm_clear_info(qp);
free(qp); }