
PCI: fix the wrong class type for HiSilicon NP 5896 hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8US9L?from=project-issue 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: Xiongfeng Wang <wangxiongfeng2@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com> Signed-off-by: Ruijun Ge <geruijun@huawei.com> Signed-off-by: Jiangtian Feng <fengjiangtian@huawei.com> Signed-off-by: Jiangtian Feng <fengjiangtian@huawei.com> --- drivers/pci/quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index e19055d879e5..e37ffcb5f47d 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -5836,7 +5836,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, -- 2.33.0