提交 2de0e279 编写于 作者: Y yumeng18 提交者: Xie XiuQi

hpre: set power state to PCI_D0

driver inclusion
category:bugfix
bugzilla:NA
CVE:NA

when u unbind and bind 'hisi_hpre' device quickly, hisi_hpre may not load,
as dmesg like:
[ 1006.414257] hisi_hpre 0000:79:00.0: qm register to uacce
[ 1006.419550] hisi_hpre 0000:79:00.0: register to noiommu mode, it's not safe for kernel
[ 1006.437566] hisi_hpre 0000:79:00.0: Refused to change power state, currently in D3
[ 1006.445111] hisi_hpre 0000:79:00.0: Failed to enable MSI vectors!
[ 1006.451190] hisi_hpre: probe of 0000:79:00.0 failed with error -28

Feature or Bugfix: Bugfix
Signed-off-by: Nyumeng18 <yumeng18@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>
上级 21a2e182
......@@ -866,6 +866,8 @@ static int hpre_probe(struct pci_dev *pdev, const struct pci_device_id *id)
if (!hpre)
return -ENOMEM;
pci_set_drvdata(pdev, hpre);
if (pci_enable_device(pdev) < 0)
return -ENODEV;
qm = &hpre->qm;
ret = hpre_qm_pre_init(qm, pdev);
if (ret)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册