From: Ruijun Ge geruijun@huawei.com
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: Xiongfeng Wang wangxiongfeng2@huawei.com Reviewed-by: Hanjun Guo guohanjun@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 Reviewed-by: Xiongfeng Wang wangxiongfeng2@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@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 a7676cdae529..9d93e681d4c5 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -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,