]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.31/patches.arch/x86_restrict_pci_early_quirks_to_root_bridges.patch
Move xen patchset to new version's subdir.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.arch / x86_restrict_pci_early_quirks_to_root_bridges.patch
CommitLineData
00e5a55c
BS
1From: Andi Kleen <ak@linux.intel.com>
2Subject: Only scan the root bus in early PCI quirks.
3References: bnc#57886
4Patch-Mainline: submitted for .29
5
6We found a situation on Linus' machine that the Nvidia timer
7quirk hit on a Intel chipset system. The problem is that the
8system has a fancy Nvidia card with an own PCI bridge, and
9the early-quirks code looking for any NVidia bridge triggered
10on it incorrectly. This didn't lead a boot failure by luck,
11but the timer routing code selecting the wrong timer first and
12some ugly messages. It might lead to real problems on
13other systems.
14
15I checked all the devices which are currently checked for
16by early_quirks and it turns out they are all located in
17the root bus zero.
18
19So change the early-quirks loop to only scan bus 0. This
20incidently also saves quite some unnecessary scanning work,
21because early_quirks doesn't go through all the non root
22busses.
23
24The graphics card is not on bus 0, so it is not matched
25anymore.
26
27Signed-off-by: Andi Kleen <ak@linux.intel.com>
28Signed-off-by: Thomas Renninger <trenn@suse.de>
29
30Index: linux-2.6.28-rc5-test/arch/x86/kernel/early-quirks.c
31===================================================================
32--- linux-2.6.28-rc5-test.orig/arch/x86/kernel/early-quirks.c
33+++ linux-2.6.28-rc5-test/arch/x86/kernel/early-quirks.c
34@@ -200,6 +200,12 @@ struct chipset {
35 void (*f)(int num, int slot, int func);
36 };
37
38+/*
39+ * Only works for devices on the root bus. If you add any devices
40+ * not on bus 0 readd another loop level in early_quirks(). But
41+ * be careful because at least the Nvidia quirk here relies on
42+ * only matching on bus 0.
43+ */
44 static struct chipset early_qrk[] __initdata = {
45 { PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID,
46 PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, nvidia_bugs },
47@@ -266,17 +272,17 @@ static int __init check_dev_quirk(int nu
48
49 void __init early_quirks(void)
50 {
51- int num, slot, func;
52+ int slot, func;
53
54 if (!early_pci_allowed())
55 return;
56
57 /* Poor man's PCI discovery */
58- for (num = 0; num < 32; num++)
59- for (slot = 0; slot < 32; slot++)
60- for (func = 0; func < 8; func++) {
61- /* Only probe function 0 on single fn devices */
62- if (check_dev_quirk(num, slot, func))
63- break;
64- }
65+ /* Only scan the root bus */
66+ for (slot = 0; slot < 32; slot++)
67+ for (func = 0; func < 8; func++) {
68+ /* Only probe function 0 on single fn devices */
69+ if (check_dev_quirk(0, slot, func))
70+ break;
71+ }
72 }