Skip to content

Commit

Permalink
x86, pci: Add sanity check for PCI fixed bar probing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jacob Pan authored and H. Peter Anvin committed Feb 24, 2010
1 parent 9eeeb09 commit c541138
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/x86/pci/mrst.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ static int fixed_bar_cap(struct pci_bus *bus, unsigned int devfn)
u32 pcie_cap = 0, cap_data;

pos = PCIE_CAP_OFFSET;

if (!raw_pci_ext_ops)
return 0;

while (pos) {
if (raw_pci_ext_ops->read(pci_domain_nr(bus), bus->number,
devfn, pos, 4, &pcie_cap))
Expand Down

0 comments on commit c541138

Please sign in to comment.