Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e79c5f8 authored by Myron Stowe's avatar Myron Stowe Committed by Bjorn Helgaas
Browse files

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: default avatarWilliam Unruh <unruh@physics.ubc.ca>
Reported-by: default avatarMartin Lucina <martin@lucina.net>
Signed-off-by: default avatarMyron Stowe <myron.stowe@redhat.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
CC: Matthew Wilcox <willy@linux.intel.com>
parent f795d86a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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) &&