diff options
author | Timothy S. Nelson <wayland@wayland.id.au> | 2009-01-30 06:12:47 +1100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-02-12 09:31:10 -0800 |
commit | ae59010c012538c749abc8bf760855a71b014072 (patch) | |
tree | 267f7a9b5225c963ea112329cfac4db09a310409 /include | |
parent | ca9e7b96abf17668950e16329b6e6c9233d72653 (diff) | |
download | lwn-ae59010c012538c749abc8bf760855a71b014072.tar.gz lwn-ae59010c012538c749abc8bf760855a71b014072.zip |
PCI: return error on failure to read PCI ROMs
commit 97c44836cdec1ea713a15d84098a1a908157e68f upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/pci.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 426e029dbe72..911b99d1966a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -639,7 +639,7 @@ int pci_select_bars(struct pci_dev *dev, unsigned long flags); /* ROM control related routines */ void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); -size_t pci_get_rom_size(void __iomem *rom, size_t size); +size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size); /* Power management related routines */ int pci_save_state(struct pci_dev *dev); |