From patchwork Mon Nov 5 22:33:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 1700491 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id B54233FCA5 for ; Mon, 5 Nov 2012 22:33:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933460Ab2KEWdM (ORCPT ); Mon, 5 Nov 2012 17:33:12 -0500 Received: from mail-ee0-f74.google.com ([74.125.83.74]:57395 "EHLO mail-ee0-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933301Ab2KEWdJ (ORCPT ); Mon, 5 Nov 2012 17:33:09 -0500 Received: by mail-ee0-f74.google.com with SMTP id b57so410263eek.1 for ; Mon, 05 Nov 2012 14:33:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:user-agent:mime-version :content-type:content-transfer-encoding; bh=E/l8qoU8l0HbAwN6BSSRwgTlzucZkxqu6e4QTVc48Uw=; b=kbN/YtJmM97I3BXj60YV6DA2WMBYdTTFObmOJGtmIt0UzbtKlzXXXEW4CG6CLLLZ7q npP+qliGagrEUKMgf77Xztd3oVOZe1su2tiwsZ4n4YtzPbLim0Lyq2KzTjqMnbE/ftWw iILwfUfLDx8/LW1ysBFaeApvE/BpB+prsyLQIJUqZUQraark8h0p4h0I/cPsnqzwfIQp n6NhFFMGNttXnz/fzYUmtA7fhEpbTuS4pUUErSSOU+b/ol7K34cqnO5Bt83HTufZ9VJ+ rXkHb2o3abtuxtnZhjziHNtTF7WxZhvTx6AGsP4JHeJMZMuSlVYP5uedLSmeaPDbZeUL b01Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:user-agent:mime-version :content-type:content-transfer-encoding:x-gm-message-state; bh=E/l8qoU8l0HbAwN6BSSRwgTlzucZkxqu6e4QTVc48Uw=; b=OcWbVXJjubOEfdo8Q1BHboJULLki9xVRGbistSUM7yQ8mQkLzEMmGRZfMxY5yf1ItR r7J18ZXQFl36ZZ5ly09JCD4yrYvFtiIO5gDs5wfnu4ijh6/OXWkVxXSgT7R2gw36bKtv EqniyJ/25jpL/9vjtAfLq095LPnOn3hLR+8ifkDMuwM01PU3OY06GtQhLsG8RKUiDBm6 5h+uBLA4jVXMRoYrkzhvE3decMPiDRj1oqnyux5mliaVPzCteI0Ds6MMflVej08hvtG0 l5Gb5AnJwcv8oMkpyeUuXRL6RB0g/z/qFF1JVv8PTLKjQvvg1OEpmeZerGcFLJ66YFk7 Tb7A== Received: by 10.14.216.197 with SMTP id g45mr10911092eep.3.1352154787622; Mon, 05 Nov 2012 14:33:07 -0800 (PST) Received: from hpza10.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id z47si3446034eel.0.2012.11.05.14.33.07 (version=TLSv1/SSLv3 cipher=AES128-SHA); Mon, 05 Nov 2012 14:33:07 -0800 (PST) Received: from bhelgaas.mtv.corp.google.com (bhelgaas.mtv.corp.google.com [172.17.131.112]) by hpza10.eem.corp.google.com (Postfix) with ESMTP id 43C9220004E; Mon, 5 Nov 2012 14:33:07 -0800 (PST) Received: from bhelgaas.mtv.corp.google.com (unknown [IPv6:::1]) by bhelgaas.mtv.corp.google.com (Postfix) with ESMTP id 96FD1180A2B; Mon, 5 Nov 2012 14:33:06 -0800 (PST) Subject: [PATCH] x86/PCI: Ignore _SEG on HP xw9300 To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: "Sean M. Pappalardo" Date: Mon, 05 Nov 2012 15:33:06 -0700 Message-ID: <20121105223306.7246.36325.stgit@bhelgaas.mtv.corp.google.com> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmAtb64PlbQZv+0M3r14VMyWQzeOuPaBlSjUV4hRETdS9/4iMqugxTQuoRTT7RZt0AasXbqxgultVg7Xv/gP9ISQbuBEnP/ViXV+ur3tp/RP0i3z20MUST131L0S9bJJ+rRb/N5MA5tWyN2yCoJVRGAgcIeg++xJ8pewxqCTqbk2r83/VIC1+PyYtt9AtM3DrFKQbNw386C9QTpePGk0ZJnZG/iQQ== Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org 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 Signed-off-by: Bjorn Helgaas --- arch/x86/pci/acpi.c | 25 +++++++++++++++++++++++-- 1 files changed, 23 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 192397c..49e5195 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c @@ -22,6 +22,7 @@ struct pci_root_info { }; static bool pci_use_crs = true; +static bool pci_ignore_seg = false; static int __init set_use_crs(const struct dmi_system_id *id) { @@ -35,7 +36,14 @@ static int __init set_nouse_crs(const struct dmi_system_id *id) return 0; } -static const struct dmi_system_id pci_use_crs_table[] __initconst = { +static int __init set_ignore_seg(const struct dmi_system_id *id) +{ + printk(KERN_INFO "PCI: %s detected: ignoring ACPI _SEG\n", id->ident); + pci_ignore_seg = true; + return 0; +} + +static const struct dmi_system_id pci_crs_quirks[] __initconst = { /* http://bugzilla.kernel.org/show_bug.cgi?id=14183 */ { .callback = set_use_crs, @@ -98,6 +106,16 @@ static const struct dmi_system_id pci_use_crs_table[] __initconst = { DMI_MATCH(DMI_BIOS_VERSION, "6JET85WW (1.43 )"), }, }, + + /* https://bugzilla.kernel.org/show_bug.cgi?id=15362 */ + { + .callback = set_ignore_seg, + .ident = "HP xw9300", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP xw9300 Workstation"), + }, + }, {} }; @@ -108,7 +126,7 @@ void __init pci_acpi_crs_quirks(void) if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year < 2008) pci_use_crs = false; - dmi_check_system(pci_use_crs_table); + dmi_check_system(pci_crs_quirks); /* * If the user specifies "pci=use_crs" or "pci=nocrs" explicitly, that @@ -455,6 +473,9 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_pci_root *root) int pxm; #endif + if (pci_ignore_seg) + domain = 0; + if (domain && !pci_domains_supported) { printk(KERN_WARNING "pci_bus %04x:%02x: " "ignored (multiple domains not supported)\n",