[PATCH 3/3] PCI: Add a informational printk for invalid BARs
From: Myron Stowe
Date: Thu Oct 30 2014 - 13:56:54 EST
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@xxxxxxxxxxxxxx>
Reported-by: Martin Lucina <martin@xxxxxxxxxx>
Signed-off-by: Myron Stowe <myron.stowe@xxxxxxxxxx>
Cc: Matthew Wilcox <willy@xxxxxxxxxxxxxxx>
---
drivers/pci/probe.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 5c13279..2953c1d 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -271,8 +271,11 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
sz64 = pci_size(l64, sz64, mask64);
- if (!sz64)
+ if (!sz64) {
+ dev_info(&dev->dev, "%sreg 0x%x: invalid BAR (can't size)\n",
+ FW_BUG, pos);
goto fail;
+ }
region.start = l64;
region.end = l64 + sz64;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/