diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-02-25 14:35:57 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-12 07:33:10 -0700 |
commit | 591add21a1f098cf92494581b815e5de486faa6e (patch) | |
tree | ea5fac617680014b193271edacbdf96bafdeeee5 /include | |
parent | 319f9d43118f0d3ac29ee30ea6d211ea87917a47 (diff) | |
download | linux-stable-591add21a1f098cf92494581b815e5de486faa6e.tar.gz linux-stable-591add21a1f098cf92494581b815e5de486faa6e.tar.bz2 linux-stable-591add21a1f098cf92494581b815e5de486faa6e.zip |
PCI: Disable IO/MEM decoding for devices with non-compliant BARs
commit b84106b4e2290c081cdab521fa832596cdfea246 upstream.
The PCI config header (first 64 bytes of each device's config space) is
defined by the PCI spec so generic software can identify the device and
manage its usage of I/O, memory, and IRQ resources.
Some non-spec-compliant devices put registers other than BARs where the
BARs should be. When the PCI core sizes these "BARs", the reads and writes
it does may have unwanted side effects, and the "BAR" may appear to
describe non-sensical address space.
Add a flag bit to mark non-compliant devices so we don't touch their BARs.
Turn off IO/MEM decoding to prevent the devices from consuming address
space, since we can't read the BARs to find out what that address space
would be.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/pci.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 27716254dcc5..60042ab5d7bd 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -359,6 +359,7 @@ struct pci_dev { unsigned int io_window_1k:1; /* Intel P2P bridge 1K I/O windows */ unsigned int irq_managed:1; unsigned int has_secondary_link:1; + unsigned int non_compliant_bars:1; /* broken BARs; ignore them */ pci_dev_flags_t dev_flags; atomic_t enable_cnt; /* pci_enable_device has been called */ |