lkml.org 
[lkml]   [2014]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 3/3] PCI: Add a informational printk for invalid BARs
From
Date
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>
Cc: Matthew Wilcox <willy@linux.intel.com>
---
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;


\
 
 \ /
  Last update: 2014-10-30 19:21    [W:0.067 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site