From: Myron Stowe Date: Thu, 30 Oct 2014 17:54:50 +0000 (-0600) Subject: PCI: Add informational printk for invalid BARs X-Git-Tag: v4.14-rc1~6347^2~1^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7e79c5f8cad2ac1dc26c03e1aa16216391a04dad;p=platform%2Fkernel%2Flinux-rpi.git 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 Reported-by: Martin Lucina Signed-off-by: Myron Stowe Signed-off-by: Bjorn Helgaas CC: Matthew Wilcox --- diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 529fcd7..6029ad7 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, goto fail; sz64 = pci_size(l64, sz64, mask64); - if (!sz64) + if (!sz64) { + dev_info(&dev->dev, FW_BUG "reg 0x%x: invalid BAR (can't size)\n", + pos); goto fail; + } if (res->flags & IORESOURCE_MEM_64) { if ((sizeof(dma_addr_t) < 8 || sizeof(resource_size_t) < 8) &&