提交 f020f120 编写于 作者: Y yekai13 提交者: Xie XiuQi

hpre:fix the call trace wrong when unbind the hpre device.

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

Fix the call trace wrong when unbind the hpre device.

Feature or Bugfix:Bugfix
Signed-off-by: Nyekai (A) <yekai13@huawei.com>
Reviewed-by: Nxuzaibo <xuzaibo@huawei.com>
Reviewed-by: NZhou Wang <wangzhou1@hisilicon.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 14d0b027
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#define HPRE_PF_DEF_Q_NUM 64 #define HPRE_PF_DEF_Q_NUM 64
#define HPRE_PF_DEF_Q_BASE 0 #define HPRE_PF_DEF_Q_BASE 0
#define HPRE_RESET 0 #define HPRE_RESET 0
#define HPRE_WAIT_DELAY 1000
struct hpre_ctrl; struct hpre_ctrl;
......
...@@ -1054,12 +1054,21 @@ static int hpre_sriov_configure(struct pci_dev *pdev, int num_vfs) ...@@ -1054,12 +1054,21 @@ static int hpre_sriov_configure(struct pci_dev *pdev, int num_vfs)
} }
#endif #endif
static void hpre_remove_wait_delay(struct hpre *hpre)
{
while (hisi_qm_frozen(&hpre->qm))
;
udelay(HPRE_WAIT_DELAY);
}
static void hpre_remove(struct pci_dev *pdev) static void hpre_remove(struct pci_dev *pdev)
{ {
struct hpre *hpre = pci_get_drvdata(pdev); struct hpre *hpre = pci_get_drvdata(pdev);
struct hisi_qm *qm = &hpre->qm; struct hisi_qm *qm = &hpre->qm;
int ret; int ret;
if (uacce_mode != UACCE_MODE_NOUACCE)
hpre_remove_wait_delay(hpre);
hpre_algs_unregister(); hpre_algs_unregister();
hpre_remove_from_list(hpre); hpre_remove_from_list(hpre);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册