Skip to contentSkip to conversation

Fix dumb bug in mmconfig fix

PATCH New Andi Kleen 1 participant 1 message Dec 16, 2005

lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

PATCH 1/1 Fix dumb bug in mmconfig fix

Use correct address when referencing mmconfig aperture while checking for broken MCFG. This was a typo when porting the code from 64bit to 32bit. It caused oopses at boot on some ThinkPads.

Should definitely go into 2.6.15.

arch/i386/pci/mmconfig.c +1 -1
Index: linux/arch/i386/pci/mmconfig.c
===================================================================
@@ -155,7 +155,7 @@ static __init void unreachable_devices(v
 		addr = get_base_addr(0, 0, PCI_DEVFN(i, 0));
 		if (addr != 0)
 			pci_exp_set_dev_base(addr, 0, PCI_DEVFN(i, 0));
-		if (addr == 0 || readl((u32 *)addr) != val1)
+		if (addr == 0 || readl((u32 *)mmcfg_virt_addr) != val1)
 			set_bit(i, fallback_slots);
 		spin_unlock_irqrestore(&pci_config_lock, flags);
 	}