diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-04 23:48:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-04 23:48:20 -0400 |
commit | 95167aad6761ec8a0fc76506ed00439483208ee1 (patch) | |
tree | 9cf2386d9fc97585a76a15e826954ee5468ff2f7 /arch/x86 | |
parent | 7dee8dff47734ee52da2cd8b8ea9736e42c5062f (diff) | |
parent | 67d470e0e1711ca4a4c3a0e5524e0d580654053e (diff) |
Merge tag 'pci-v3.12-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI fix from Bjorn Helgaas:
"We merged what was intended to be an MMCONFIG cleanup, but in fact,
for systems without _CBA (which is almost everything), it broke
extended config space for domain 0 and it broke all config space for
other domains.
This reverts the change"
* tag 'pci-v3.12-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
Revert "x86/PCI: MMCONFIG: Check earlier for MMCONFIG region at address zero"
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/pci/mmconfig-shared.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index 5596c7bdd327..082e88129712 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c | |||
@@ -700,7 +700,7 @@ int pci_mmconfig_insert(struct device *dev, u16 seg, u8 start, u8 end, | |||
700 | if (!(pci_probe & PCI_PROBE_MMCONF) || pci_mmcfg_arch_init_failed) | 700 | if (!(pci_probe & PCI_PROBE_MMCONF) || pci_mmcfg_arch_init_failed) |
701 | return -ENODEV; | 701 | return -ENODEV; |
702 | 702 | ||
703 | if (start > end || !addr) | 703 | if (start > end) |
704 | return -EINVAL; | 704 | return -EINVAL; |
705 | 705 | ||
706 | mutex_lock(&pci_mmcfg_lock); | 706 | mutex_lock(&pci_mmcfg_lock); |
@@ -716,6 +716,11 @@ int pci_mmconfig_insert(struct device *dev, u16 seg, u8 start, u8 end, | |||
716 | return -EEXIST; | 716 | return -EEXIST; |
717 | } | 717 | } |
718 | 718 | ||
719 | if (!addr) { | ||
720 | mutex_unlock(&pci_mmcfg_lock); | ||
721 | return -EINVAL; | ||
722 | } | ||
723 | |||
719 | rc = -EBUSY; | 724 | rc = -EBUSY; |
720 | cfg = pci_mmconfig_alloc(seg, start, end, addr); | 725 | cfg = pci_mmconfig_alloc(seg, start, end, addr); |
721 | if (cfg == NULL) { | 726 | if (cfg == NULL) { |