提交 9357c93c 编写于 作者: X Xiongfeng Wang 提交者: Xie XiuQi

PCI: Add quirk for hisilicon NP devices 5896

hulk inclusion
category: bugfix
bugzilla: 13666
CVE: NA

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

Add pci quirk for hisilicon PCI Network Processor devices 5896.
The size of the unused BAR3 is set as 265T wrongly. This patch disalbes
this bar.
Signed-off-by: NRui Ding <rui.ding@huawei.com>
Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 0c6a0b9a
...@@ -5176,3 +5176,26 @@ static void quirk_reset_lenovo_thinkpad_p50_nvgpu(struct pci_dev *pdev) ...@@ -5176,3 +5176,26 @@ static void quirk_reset_lenovo_thinkpad_p50_nvgpu(struct pci_dev *pdev)
DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_NVIDIA, 0x13b1, DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_NVIDIA, 0x13b1,
PCI_CLASS_DISPLAY_VGA, 8, PCI_CLASS_DISPLAY_VGA, 8,
quirk_reset_lenovo_thinkpad_p50_nvgpu); quirk_reset_lenovo_thinkpad_p50_nvgpu);
static void pci_quirk_hisi_fixup_class(struct pci_dev *dev)
{
dev->class = PCI_BASE_CLASS_NETWORK << 8;
pci_info(dev, "force hisi class type to network\n");
}
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_HUAWEI, PCIE_DEVICE_ID_HISI_5896,
pci_quirk_hisi_fixup_class);
static void pci_quirk_hisi_fixup_bar(struct pci_dev *dev)
{
int i, start = 3;
for (i = start; i < PCI_NUM_RESOURCES; i++) {
dev->resource[i].start = 0;
dev->resource[i].end = 0;
dev->resource[i].flags = 0;
}
pci_info(dev, "force disable hisilicon np bar\n");
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_HUAWEI, PCIE_DEVICE_ID_HISI_5896,
pci_quirk_hisi_fixup_bar);
...@@ -2539,6 +2539,8 @@ ...@@ -2539,6 +2539,8 @@
#define PCI_VENDOR_ID_HUAWEI 0x19e5 #define PCI_VENDOR_ID_HUAWEI 0x19e5
#define PCI_DEVICE_ID_ZIP_PF 0xa250 #define PCI_DEVICE_ID_ZIP_PF 0xa250
#define PCI_DEVICE_ID_ZIP_VF 0xa251 #define PCI_DEVICE_ID_ZIP_VF 0xa251
/* Hisilicon PCIe NP devices */
#define PCIE_DEVICE_ID_HISI_5896 0x5896
#define PCI_VENDOR_ID_NETRONOME 0x19ee #define PCI_VENDOR_ID_NETRONOME 0x19ee
#define PCI_DEVICE_ID_NETRONOME_NFP3200 0x3200 #define PCI_DEVICE_ID_NETRONOME_NFP3200 0x3200
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册