From: Myron Stowe <myron.stowe@redhat.com>
To: bhelgaas@google.com, linux-pci@vger.kernel.org
Cc: willy@linux.intel.com, unruh@physics.ubc.ca,
linux-kernel@vger.kernel.org, martin@lucina.net
Subject: [PATCH 3/3] PCI: Add a informational printk for invalid BARs
Date: Thu, 30 Oct 2014 11:54:50 -0600 [thread overview]
Message-ID: <20141030175450.22238.79504.stgit@amt.stowe> (raw)
In-Reply-To: <20141030175430.22238.47671.stgit@amt.stowe>
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;
next prev parent reply other threads:[~2014-10-30 17:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-30 17:54 [PATCH 0/3] PCI: Fix detection of read-only BARs Myron Stowe
2014-10-30 17:54 ` [PATCH 1/3] PCI: Restore " Myron Stowe
2014-11-11 1:02 ` Bjorn Helgaas
2014-10-30 17:54 ` [PATCH 2/3] PCI: Re-factor __pci_read_base Myron Stowe
2014-10-30 17:54 ` Myron Stowe [this message]
2014-11-11 3:31 ` [PATCH 0/3] PCI: Fix detection of read-only BARs Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141030175450.22238.79504.stgit@amt.stowe \
--to=myron.stowe@redhat.com \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=martin@lucina.net \
--cc=unruh@physics.ubc.ca \
--cc=willy@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox