aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMyron Stowe <myron.stowe@redhat.com>2014-10-30 13:54:50 -0400
committerBjorn Helgaas <bhelgaas@google.com>2014-11-19 17:07:42 -0500
commit7e79c5f8cad2ac1dc26c03e1aa16216391a04dad (patch)
tree72176348356d3958a4294b77dfdf6519dc3cf309
parentf795d86aaa578501551a2d1b463eac4bbea84db2 (diff)
PCI: Add informational printk for invalid BARs
As a consequence of restoring the detection of invalid BARs, add a new informational printk like the following when such occurrences are encountered. pci ssss:bb:dd.f: [Firmware Bug]: reg 0xXX: invalid BAR (can't size) Reported-by: William Unruh <unruh@physics.ubc.ca> Reported-by: Martin Lucina <martin@lucina.net> Signed-off-by: Myron Stowe <myron.stowe@redhat.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> CC: Matthew Wilcox <willy@linux.intel.com>
-rw-r--r--drivers/pci/probe.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 529fcd782e43..6029ad786146 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -247,8 +247,11 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
247 goto fail; 247 goto fail;
248 248
249 sz64 = pci_size(l64, sz64, mask64); 249 sz64 = pci_size(l64, sz64, mask64);
250 if (!sz64) 250 if (!sz64) {
251 dev_info(&dev->dev, FW_BUG "reg 0x%x: invalid BAR (can't size)\n",
252 pos);
251 goto fail; 253 goto fail;
254 }
252 255
253 if (res->flags & IORESOURCE_MEM_64) { 256 if (res->flags & IORESOURCE_MEM_64) {
254 if ((sizeof(dma_addr_t) < 8 || sizeof(resource_size_t) < 8) && 257 if ((sizeof(dma_addr_t) < 8 || sizeof(resource_size_t) < 8) &&