From 2b65df66b04b58301ce68ad9d069951036a85afc Mon Sep 17 00:00:00 2001 From: "Narendra_K@Dell.com" Date: Tue, 14 Dec 2010 09:57:12 -0800 Subject: [PATCH] --- yaml --- r: 231075 b: refs/heads/master c: 6e8af08dfa40b747002207d3ce8e8b43a050d99f h: refs/heads/master i: 231073: 6894592c873a1a6ccce3b132a6aebd01ba64f56d 231071: 7d0cc22de4a74b8fcd2d0cd8bd10581276734f33 v: v3 --- [refs] | 2 +- trunk/arch/x86/pci/common.c | 41 +++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 7936ef8011de..ec24ae0331ca 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fe31e69740eddc7316071ed5165fed6703c8cd12 +refs/heads/master: 6e8af08dfa40b747002207d3ce8e8b43a050d99f diff --git a/trunk/arch/x86/pci/common.c b/trunk/arch/x86/pci/common.c index f7c8a399978c..5fe75026ecc2 100644 --- a/trunk/arch/x86/pci/common.c +++ b/trunk/arch/x86/pci/common.c @@ -22,6 +22,7 @@ unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 | unsigned int pci_early_dump_regs; static int pci_bf_sort; +static int smbios_type_b1_flag; int pci_routeirq; int noioapicquirk; #ifdef CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS @@ -185,6 +186,39 @@ static int __devinit set_bf_sort(const struct dmi_system_id *d) return 0; } +static void __devinit read_dmi_type_b1(const struct dmi_header *dm, + void *private_data) +{ + u8 *d = (u8 *)dm + 4; + + if (dm->type != 0xB1) + return; + switch (((*(u32 *)d) >> 9) & 0x03) { + case 0x00: + printk(KERN_INFO "dmi type 0xB1 record - unknown flag\n"); + break; + case 0x01: /* set pci=bfsort */ + smbios_type_b1_flag = 1; + break; + case 0x02: /* do not set pci=bfsort */ + smbios_type_b1_flag = 2; + break; + default: + break; + } +} + +static int __devinit find_sort_method(const struct dmi_system_id *d) +{ + dmi_walk(read_dmi_type_b1, NULL); + + if (smbios_type_b1_flag == 1) { + set_bf_sort(d); + return 0; + } + return -1; +} + /* * Enable renumbering of PCI bus# ranges to reach all PCI busses (Cardbus) */ @@ -212,6 +246,13 @@ static const struct dmi_system_id __devinitconst pciprobe_dmi_table[] = { }, }, #endif /* __i386__ */ + { + .callback = find_sort_method, + .ident = "Dell System", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + }, + }, { .callback = set_bf_sort, .ident = "Dell PowerEdge 1950",