hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IDA4OZ -------------------------------- This reverts commit 9b0bfa99350a6049471b37927d7b941f61dd5edb. The commit causes the CX6 NIC to be unrecognized, so revert it to temporarily avoid this issue. Fixes: 9b0bfa99350a ("PCI/MSI: Set device flag indicating only 32-bit MSI support") Signed-off-by: Tengda Wu <wutengda2@huawei.com> --- drivers/pci/msi.c | 8 ++++---- drivers/pci/probe.c | 6 ------ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 0d6711e07bca..edbb05145479 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -624,11 +624,11 @@ static int msi_verify_entries(struct pci_dev *dev) struct msi_desc *entry; for_each_pci_msi_entry(entry, dev) { - if (entry->msg.address_hi && dev->no_64bit_msi) { - pci_err(dev, "arch assigned 64-bit MSI address %#x%08x but device only supports 32 bits\n", - entry->msg.address_hi, entry->msg.address_lo); + if (!dev->no_64bit_msi || !entry->msg.address_hi) + continue; + pci_err(dev, "Device has broken 64-bit MSI but arch" + " tried to assign one above 4G\n"); return -EIO; - } } return 0; } diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index d41f5fd2c205..77772e6f4e35 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1724,8 +1724,6 @@ static u8 pci_hdr_type(struct pci_dev *dev) static void pci_msi_setup_pci_dev(struct pci_dev *dev) { - u16 ctrl; - /* * Disable the MSI hardware to avoid screaming interrupts * during boot. This is the power on reset default so @@ -1735,10 +1733,6 @@ static void pci_msi_setup_pci_dev(struct pci_dev *dev) if (dev->msi_cap) pci_msi_set_enable(dev, 0); - pci_read_config_word(dev, dev->msi_cap + PCI_MSI_FLAGS, &ctrl); - if (!(ctrl & PCI_MSI_FLAGS_64BIT)) - dev->no_64bit_msi = 1; - dev->msix_cap = pci_find_capability(dev, PCI_CAP_ID_MSIX); if (dev->msix_cap) pci_msix_clear_and_set_ctrl(dev, PCI_MSIX_FLAGS_ENABLE, 0); -- 2.34.1