x86/PCI: Simplify Dell DMI B1 quirk
No need for such convoluted code, when all we need is to call one function in one specific case. Tested-by: Narendra K <Narendra.K@dell.com> # DellEMC PowerEdge 1950, R730XD Signed-off-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
6c51c82c60
commit
f5ab3b70a6
@ -24,7 +24,6 @@ unsigned int pci_probe = PCI_PROBE_BIOS | PCI_PROBE_CONF1 | PCI_PROBE_CONF2 |
|
|||||||
|
|
||||||
unsigned int pci_early_dump_regs;
|
unsigned int pci_early_dump_regs;
|
||||||
static int pci_bf_sort;
|
static int pci_bf_sort;
|
||||||
static int smbios_type_b1_flag;
|
|
||||||
int pci_routeirq;
|
int pci_routeirq;
|
||||||
int noioapicquirk;
|
int noioapicquirk;
|
||||||
#ifdef CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS
|
#ifdef CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS
|
||||||
@ -197,34 +196,18 @@ static int __init set_bf_sort(const struct dmi_system_id *d)
|
|||||||
static void __init read_dmi_type_b1(const struct dmi_header *dm,
|
static void __init read_dmi_type_b1(const struct dmi_header *dm,
|
||||||
void *private_data)
|
void *private_data)
|
||||||
{
|
{
|
||||||
u8 *d = (u8 *)dm + 4;
|
u8 *data = (u8 *)dm + 4;
|
||||||
|
|
||||||
if (dm->type != 0xB1)
|
if (dm->type != 0xB1)
|
||||||
return;
|
return;
|
||||||
switch (((*(u32 *)d) >> 9) & 0x03) {
|
if ((((*(u32 *)data) >> 9) & 0x03) == 0x01)
|
||||||
case 0x00:
|
set_bf_sort((const struct dmi_system_id *)private_data);
|
||||||
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 __init find_sort_method(const struct dmi_system_id *d)
|
static int __init find_sort_method(const struct dmi_system_id *d)
|
||||||
{
|
{
|
||||||
dmi_walk(read_dmi_type_b1, NULL);
|
dmi_walk(read_dmi_type_b1, (void *)d);
|
||||||
|
return 0;
|
||||||
if (smbios_type_b1_flag == 1) {
|
|
||||||
set_bf_sort(d);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user