Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/PCI: Ignore _SEG on HP xw9300

The xw9300 BIOS supplies _SEG methods that are incorrect, which results
in some LSI SCSI devices not being discovered. This adds a quirk to
ignore _SEG on this machine and default to zero.

The xw9300 has three host bridges:

ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-3f])
ACPI: PCI Root Bridge [PCI1] (domain 0001 [bus 40-7f])
ACPI: PCI Root Bridge [PCI2] (domain 0002 [bus 80-ff])

When the BIOS "ACPI Bus Segmentation" option is enabled (as it is by
default), the _SEG methods of the PCI1 and PCI2 bridges return 1 and 2,
respectively. However, the BIOS implementation appears to be incomplete,
and we can't enumerate devices in those domains.

But if we assume PCI1 and PCI2 really lead to buses in domain 0,
everything works fine. Windows XP and Vista also seem to ignore
these _SEG methods.

Reference: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=543308
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=15362
Reported-and-Tested-by: Sean M. Pappalardo <pegasus@renegadetech.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

+23 -2
+23 -2
arch/x86/pci/acpi.c
··· 22 22 }; 23 23 24 24 static bool pci_use_crs = true; 25 + static bool pci_ignore_seg = false; 25 26 26 27 static int __init set_use_crs(const struct dmi_system_id *id) 27 28 { ··· 36 35 return 0; 37 36 } 38 37 39 - static const struct dmi_system_id pci_use_crs_table[] __initconst = { 38 + static int __init set_ignore_seg(const struct dmi_system_id *id) 39 + { 40 + printk(KERN_INFO "PCI: %s detected: ignoring ACPI _SEG\n", id->ident); 41 + pci_ignore_seg = true; 42 + return 0; 43 + } 44 + 45 + static const struct dmi_system_id pci_crs_quirks[] __initconst = { 40 46 /* http://bugzilla.kernel.org/show_bug.cgi?id=14183 */ 41 47 { 42 48 .callback = set_use_crs, ··· 106 98 DMI_MATCH(DMI_BIOS_VERSION, "6JET85WW (1.43 )"), 107 99 }, 108 100 }, 101 + 102 + /* https://bugzilla.kernel.org/show_bug.cgi?id=15362 */ 103 + { 104 + .callback = set_ignore_seg, 105 + .ident = "HP xw9300", 106 + .matches = { 107 + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), 108 + DMI_MATCH(DMI_PRODUCT_NAME, "HP xw9300 Workstation"), 109 + }, 110 + }, 109 111 {} 110 112 }; 111 113 ··· 126 108 if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year < 2008) 127 109 pci_use_crs = false; 128 110 129 - dmi_check_system(pci_use_crs_table); 111 + dmi_check_system(pci_crs_quirks); 130 112 131 113 /* 132 114 * If the user specifies "pci=use_crs" or "pci=nocrs" explicitly, that ··· 472 454 #ifdef CONFIG_ACPI_NUMA 473 455 int pxm; 474 456 #endif 457 + 458 + if (pci_ignore_seg) 459 + domain = 0; 475 460 476 461 if (domain && !pci_domains_supported) { 477 462 printk(KERN_WARNING "pci_bus %04x:%02x: "