PCI: Use ROM images from firmware only if no other ROM source available
authorMatthew Garrett <matthew.garrett@nebula.com>
Tue, 19 Mar 2013 21:26:57 +0000 (17:26 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 19 Mar 2013 21:51:14 +0000 (14:51 -0700)
commit547b524636249fbe906ab78a50ab0017c490316c
tree3b593eff925865bed80b1c8fccf74952ca30947a
parent5c7c3361d177120a9980971380b52f84c2d9c97d
PCI: Use ROM images from firmware only if no other ROM source available

Mantas Mikulėnas reported that his graphics hardware failed to
initialise after commit f9a37be0f02a ("x86: Use PCI setup data").

The aim of this commit was to ensure that ROM images were available on
some Apple systems that don't expose the GPU ROM via any other source.
In this case, UEFI appears to have provided a broken ROM image that we
were using even though there was a perfectly valid ROM available via
other sources.  The simplest way to handle this seems to be to just
re-order pci_map_rom() and leave any firmare-supplied ROM to last.

Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Tested-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/pci/rom.c