Merge tag 'pci-v5.8-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
[platform/kernel/linux-starfive.git] / drivers / pci / probe.c
index dd88391..2f66988 100644 (file)
@@ -1825,7 +1825,7 @@ int pci_setup_device(struct pci_dev *dev)
        /* Device class may be changed after fixup */
        class = dev->class >> 8;
 
-       if (dev->non_compliant_bars) {
+       if (dev->non_compliant_bars && !dev->mmio_always_on) {
                pci_read_config_word(dev, PCI_COMMAND, &cmd);
                if (cmd & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) {
                        pci_info(dev, "device has non-compliant BARs; disabling IO/MEM decoding\n");