From: Xiongfeng Wang wangxiongfeng2@huawei.com
hulk inclusion category: bugfix bugzilla: 13666 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 --- 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 83e3f2c5c7e6..e415fe90fc94 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -5179,7 +5179,7 @@ DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_NVIDIA, 0x13b1,
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,