]> git.baikalelectronics.ru Git - kernel.git/commit
PNP: Don't check for overlaps with unassigned PCI BARs
authorBjorn Helgaas <bhelgaas@google.com>
Tue, 3 Mar 2015 22:13:56 +0000 (16:13 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 12 Mar 2015 17:30:00 +0000 (12:30 -0500)
commit05b65b43521f126253908cc453f59903a494d801
treebfc4f5cf96d818a9eda6ceb5a28759057e039521
parent9cbe621030a9cce16d27329dac74fd4b1c1d9412
PNP: Don't check for overlaps with unassigned PCI BARs

After 9f4754549d8d ("PNP: disable PNP motherboard resources that overlap
PCI BARs"), we disable and warn about PNP resources that overlap PCI BARs.
But we assume that all PCI BARs are valid, which is incorrect, because a
BAR may not have any space assigned to it.  In that case, we will not
enable the BAR, so no other resource can conflict with it.

Ignore PCI BARs that are unassigned, as indicated by IORESOURCE_UNSET.

Firmware often leaves PCI BARs unassigned, containing zero.  Zero is a
valid BAR value, so we can't just check for that, but the PCI core can set
IORESOURCE_UNSET when it detects an unassigned BAR by other means.  This
should get rid of many of the annoying messages like this:

  pnp 00:00: disabling [io  0x0061] because it overlaps 0001:05:00.0 BAR 0 [io  0x0000-0x00ff]

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/pnp/quirks.c