diff options
author | Jacob Pan <jacob.jun.pan@intel.com> | 2010-02-24 12:42:50 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-02-24 14:01:34 -0500 |
commit | c54113823c777f035fa7444f8841fbccda4a5cc0 (patch) | |
tree | 5c456596db5a56a8fcfd3e97cfdce8acb55ef9ff | |
parent | 9eeeb09edba1e3544526611663472743ca584d36 (diff) |
x86, pci: Add sanity check for PCI fixed bar probing
While probing for the PCI fixed BAR capability in the extended PCI
configuration space we need to make sure raw_pci_ext_ops is
actually initialized.
Signed-off-by: Jacob Pan <jacob.jun.pan@intel.com>
LKML-Reference: <43F901BD926A4E43B106BF17856F0755A321E8F7@orsmsx508.amr.corp.intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | arch/x86/pci/mrst.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/pci/mrst.c b/arch/x86/pci/mrst.c index 6e9e1a35a5d7..8bf2fcb88d04 100644 --- a/arch/x86/pci/mrst.c +++ b/arch/x86/pci/mrst.c | |||
@@ -57,6 +57,10 @@ static int fixed_bar_cap(struct pci_bus *bus, unsigned int devfn) | |||
57 | u32 pcie_cap = 0, cap_data; | 57 | u32 pcie_cap = 0, cap_data; |
58 | 58 | ||
59 | pos = PCIE_CAP_OFFSET; | 59 | pos = PCIE_CAP_OFFSET; |
60 | |||
61 | if (!raw_pci_ext_ops) | ||
62 | return 0; | ||
63 | |||
60 | while (pos) { | 64 | while (pos) { |
61 | if (raw_pci_ext_ops->read(pci_domain_nr(bus), bus->number, | 65 | if (raw_pci_ext_ops->read(pci_domain_nr(bus), bus->number, |
62 | devfn, pos, 4, &pcie_cap)) | 66 | devfn, pos, 4, &pcie_cap)) |