* [PATCH AUTOSEL 5.4 148/175] PCI: Don't disable decoding when mmio_always_on is set
[not found] <20200608231848.3366970-1-sashal@kernel.org>
@ 2020-06-08 23:18 ` Sasha Levin
0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2020-06-08 23:18 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Jiaxun Yang, Bjorn Helgaas, Thomas Bogendoerfer, Sasha Levin, linux-pci
From: Jiaxun Yang <jiaxun.yang@flygoat.com>
[ 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>
---
drivers/pci/probe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index d3033873395d..48209d915de3 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1777,7 +1777,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");
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-09 0:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20200608231848.3366970-1-sashal@kernel.org>
2020-06-08 23:18 ` [PATCH AUTOSEL 5.4 148/175] PCI: Don't disable decoding when mmio_always_on is set Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).