提交 ba785600 编写于 作者: R Ruijun Ge 提交者: Zheng Zengkai

PCI: fix the wrong class type for HiSilicon NP 5896

hulk inclusion
category: bugfix
bugzilla: 13666 https://gitee.com/openeuler/kernel/issues/I4DDEL
CVE: NA

-----------------------------------------------------------------------------

The following patch set the class type as 'PCI_BASE_CLASS_NETWORK'. But
'PCI_BASE_CLASS_NETWORK' is actually the higher 8 bits of the class type
of a network device. We should set it as 'PCI_CLASS_NETWORK_ETHERNET'.
This patch fixes it.

Fixes: ba8bc9c15d20 ("PCI: Add quirk for hisilicon NP devices 5896")
Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NRuijun Ge <geruijun@huawei.com>
Reviewed-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 1b12fe25
......@@ -5625,7 +5625,7 @@ static void quirk_switchtec_ntb_dma_alias(struct pci_dev *pdev)
static void pci_quirk_hisi_fixup_class(struct pci_dev *dev)
{
dev->class = PCI_BASE_CLASS_NETWORK << 8;
dev->class = PCI_CLASS_NETWORK_ETHERNET << 8;
pci_info(dev, "force hisi class type to network\n");
}
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_HUAWEI, PCIE_DEVICE_ID_HISI_5896,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册