diff options
author | Timothy S. Nelson <wayland@wayland.id.au> | 2009-01-29 14:12:47 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-02-04 19:58:41 -0500 |
commit | 97c44836cdec1ea713a15d84098a1a908157e68f (patch) | |
tree | bc544c64ed8eeb3feb2f0b210ae7db04a40e1bae /arch/ia64/sn | |
parent | 3419c75e15f82c3ab09bd944fddbde72c9e4b3ea (diff) |
PCI: return error on failure to read PCI ROMs
This patch makes the ROM reading code return an error to user space if
the size of the ROM read is equal to 0.
The patch also emits a warnings if the contents of the ROM are invalid,
and documents the effects of the "enable" file on ROM reading.
Signed-off-by: Timothy S. Nelson <wayland@wayland.id.au>
Acked-by: Alex Villacis-Lasso <a_villacis@palosanto.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/ia64/sn')
-rw-r--r-- | arch/ia64/sn/kernel/io_acpi_init.c | 2 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/io_init.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/ia64/sn/kernel/io_acpi_init.c b/arch/ia64/sn/kernel/io_acpi_init.c index c5a214026a77..d0223abbbbd4 100644 --- a/arch/ia64/sn/kernel/io_acpi_init.c +++ b/arch/ia64/sn/kernel/io_acpi_init.c | |||
@@ -443,7 +443,7 @@ sn_acpi_slot_fixup(struct pci_dev *dev) | |||
443 | size = pci_resource_len(dev, PCI_ROM_RESOURCE); | 443 | size = pci_resource_len(dev, PCI_ROM_RESOURCE); |
444 | addr = ioremap(pcidev_info->pdi_pio_mapped_addr[PCI_ROM_RESOURCE], | 444 | addr = ioremap(pcidev_info->pdi_pio_mapped_addr[PCI_ROM_RESOURCE], |
445 | size); | 445 | size); |
446 | image_size = pci_get_rom_size(addr, size); | 446 | image_size = pci_get_rom_size(dev, addr, size); |
447 | dev->resource[PCI_ROM_RESOURCE].start = (unsigned long) addr; | 447 | dev->resource[PCI_ROM_RESOURCE].start = (unsigned long) addr; |
448 | dev->resource[PCI_ROM_RESOURCE].end = | 448 | dev->resource[PCI_ROM_RESOURCE].end = |
449 | (unsigned long) addr + image_size - 1; | 449 | (unsigned long) addr + image_size - 1; |
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index 4e1801bad83a..e2eb2da60f96 100644 --- a/arch/ia64/sn/kernel/io_init.c +++ b/arch/ia64/sn/kernel/io_init.c | |||
@@ -269,7 +269,7 @@ sn_io_slot_fixup(struct pci_dev *dev) | |||
269 | 269 | ||
270 | rom = ioremap(pci_resource_start(dev, PCI_ROM_RESOURCE), | 270 | rom = ioremap(pci_resource_start(dev, PCI_ROM_RESOURCE), |
271 | size + 1); | 271 | size + 1); |
272 | image_size = pci_get_rom_size(rom, size + 1); | 272 | image_size = pci_get_rom_size(dev, rom, size + 1); |
273 | dev->resource[PCI_ROM_RESOURCE].end = | 273 | dev->resource[PCI_ROM_RESOURCE].end = |
274 | dev->resource[PCI_ROM_RESOURCE].start + | 274 | dev->resource[PCI_ROM_RESOURCE].start + |
275 | image_size - 1; | 275 | image_size - 1; |