* [tip:x86/mrst] x86, pci: Add sanity check for PCI fixed bar probing
[not found] <43F901BD926A4E43B106BF17856F0755A321E8F7@orsmsx508.amr.corp.intel.com>
@ 2010-02-24 19:04 ` tip-bot for Jacob Pan
0 siblings, 0 replies; only message in thread
From: tip-bot for Jacob Pan @ 2010-02-24 19:04 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, jacob.jun.pan, tglx
Commit-ID: c54113823c777f035fa7444f8841fbccda4a5cc0
Gitweb: http://git.kernel.org/tip/c54113823c777f035fa7444f8841fbccda4a5cc0
Author: Jacob Pan <jacob.jun.pan@intel.com>
AuthorDate: Wed, 24 Feb 2010 09:42:50 -0800
Committer: H. Peter Anvin <hpa@zytor.com>
CommitDate: Wed, 24 Feb 2010 11:01:34 -0800
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>
---
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 6e9e1a3..8bf2fcb 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)
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))
^ permalink raw reply [flat|nested] only message in thread