aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/rom.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-09 04:32:48 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-09 04:32:48 -0500
commit4ad476e11f94fd3724c6e272d8220e99cd222b27 (patch)
treea8684d4ecbfe1d2b2b1e29ed74de65394ad21b43 /drivers/pci/rom.c
parent304cc6ae1bf7a8e6d00053fbe0b7e2b26cdddda2 (diff)
parent8e4921515c1a379539607eb443d51c30f4f7f338 (diff)
Merge commit 'v2.6.29-rc4' into tracing/core
Diffstat (limited to 'drivers/pci/rom.c')
-rw-r--r--drivers/pci/rom.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c
index 132a78159b60..29cbe47f219f 100644
--- a/drivers/pci/rom.c
+++ b/drivers/pci/rom.c
@@ -63,7 +63,7 @@ void pci_disable_rom(struct pci_dev *pdev)
63 * The PCI window size could be much larger than the 63 * The PCI window size could be much larger than the
64 * actual image size. 64 * actual image size.
65 */ 65 */
66size_t pci_get_rom_size(void __iomem *rom, size_t size) 66size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size)
67{ 67{
68 void __iomem *image; 68 void __iomem *image;
69 int last_image; 69 int last_image;
@@ -72,8 +72,10 @@ size_t pci_get_rom_size(void __iomem *rom, size_t size)
72 do { 72 do {
73 void __iomem *pds; 73 void __iomem *pds;
74 /* Standard PCI ROMs start out with these bytes 55 AA */ 74 /* Standard PCI ROMs start out with these bytes 55 AA */
75 if (readb(image) != 0x55) 75 if (readb(image) != 0x55) {
76 dev_err(&pdev->dev, "Invalid ROM contents\n");
76 break; 77 break;
78 }
77 if (readb(image + 1) != 0xAA) 79 if (readb(image + 1) != 0xAA)
78 break; 80 break;
79 /* get the PCI data structure and check its signature */ 81 /* get the PCI data structure and check its signature */
@@ -159,7 +161,7 @@ void __iomem *pci_map_rom(struct pci_dev *pdev, size_t *size)
159 * size is much larger than the actual size of the ROM. 161 * size is much larger than the actual size of the ROM.
160 * True size is important if the ROM is going to be copied. 162 * True size is important if the ROM is going to be copied.
161 */ 163 */
162 *size = pci_get_rom_size(rom, *size); 164 *size = pci_get_rom_size(pdev, rom, *size);
163 return rom; 165 return rom;
164} 166}
165 167