diff options
author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2020-05-26 12:21:12 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-06-22 10:05:19 +0300 |
commit | 40a94a1ac783b878ec083b87242450949ae26eaf (patch) | |
tree | a78efa7ff18dd855070f3c2f7942ea5242aaf8e9 | |
parent | 133b3d2401e3b61370362c917018179ef0253e55 (diff) | |
download | linux-40a94a1ac783b878ec083b87242450949ae26eaf.tar.xz |
PCI: Don't disable decoding when mmio_always_on is set
[ Upstream commit b6caa1d8c80cb71b6162cb1f1ec13aa655026c9f ]
Don't disable MEM/IO decoding when a device have both non_compliant_bars
and mmio_always_on.
That would allow us quirk devices with junk in BARs but can't disable
their decoding.
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Acked-by: Bjorn Helgaas <helgaas@kernel.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/pci/probe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index fa4c386c8cd8..a21c04d8a40b 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1634,7 +1634,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"); |