Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67d470e0 authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

Revert "x86/PCI: MMCONFIG: Check earlier for MMCONFIG region at address zero"

This reverts commit 07f9b61c.

07f9b61c was intended to be a cleanup that didn't change anything, but in
fact, for systems without _CBA (which is almost everything), it broke
extended config space for domain 0 and all config space for other domains.

Reference: http://lkml.kernel.org/r/20131004011806.GE20450@dangermouse.emea.sgi.com


Reported-by: default avatarHedi Berriche <hedi@sgi.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 4a10c2ac
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -700,7 +700,7 @@ int pci_mmconfig_insert(struct device *dev, u16 seg, u8 start, u8 end,
	if (!(pci_probe & PCI_PROBE_MMCONF) || pci_mmcfg_arch_init_failed)
		return -ENODEV;

	if (start > end || !addr)
	if (start > end)
		return -EINVAL;

	mutex_lock(&pci_mmcfg_lock);
@@ -716,6 +716,11 @@ int pci_mmconfig_insert(struct device *dev, u16 seg, u8 start, u8 end,
		return -EEXIST;
	}

	if (!addr) {
		mutex_unlock(&pci_mmcfg_lock);
		return -EINVAL;
	}

	rc = -EBUSY;
	cfg = pci_mmconfig_alloc(seg, start, end, addr);
	if (cfg == NULL) {