PCI: Add PCI ROM helper for platform-provided ROM images
authorMatthew Garrett <matthew.garrett@nebula.com>
Tue, 26 Mar 2013 21:25:54 +0000 (17:25 -0400)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 26 Mar 2013 23:19:41 +0000 (17:19 -0600)
commitfffe01f7a768d07cc50ace71abe28fbf2f786a43
tree6e20b8c21f80d5d27f473e59fdb1696e165fbe1e
parent8bb9660418e05bb1845ac1a2428444d78e322cc7
PCI: Add PCI ROM helper for platform-provided ROM images

It turns out that some UEFI systems provide apparently an apparently valid
PCI ROM BAR that turns out to contain garbage, so the attempt in 547b52463
to prefer the ROM from the BAR actually breaks a different set of machines.
As Linus pointed out, the graphics drivers are probably in the best
position to make this judgement, so this basically reverts 547b52463 and
f9a37be0f and adds a new helper function. Followup patches will add support
to nouveau and radeon for probing this ROM source if they can't find a ROM
from some other source.

[bhelgaas: added reporter and bugzilla pointers, s/f4eb5ff05/547b52463]
Reference: https://bugzilla.redhat.com/show_bug.cgi?id=927451
Reference: http://lkml.kernel.org/r/kg69ef$vdb$1@ger.gmane.org
Reported-by: Mantas Mikulėnas <grawity@gmail.com>
Reported-by: Chris Murphy <bugzilla@colorremedies.com>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/rom.c
include/linux/pci.h