From patchwork Fri Sep 6 17:14:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 2854593 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 815E89F494 for ; Fri, 6 Sep 2013 17:15:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 57373202C3 for ; Fri, 6 Sep 2013 17:14:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 453B3202C7 for ; Fri, 6 Sep 2013 17:14:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754278Ab3IFROz (ORCPT ); Fri, 6 Sep 2013 13:14:55 -0400 Received: from mail-yh0-f41.google.com ([209.85.213.41]:54407 "EHLO mail-yh0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754006Ab3IFROy (ORCPT ); Fri, 6 Sep 2013 13:14:54 -0400 Received: by mail-yh0-f41.google.com with SMTP id f73so1317900yha.14 for ; Fri, 06 Sep 2013 10:14:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=/iNAvQ29mAfMZb8pY0ABnHTvQeOYN09SdtHOMatHA44=; b=lU/Tbh3Oth+Ar84AP8Od+IlxqRnuIwUwI0tCV7PSeGXI5nVn07cBhAMlDV2EvKh7DE aevfoo8uJY0oiZTeHGtasarHii3zNfjggpWH0ScAljXBF/fURHdcQORO8tl9v5rNKjE2 q1hG6Z2tlyrbBgGExUEdE19Jy3SwhhWy/8AEu7ZS290QLh+QexHF84t41b5THgv0YPLy RhM2vqtsPX4Qj7HwHXt3zb+Om6bSulaheBKBXZWsK/o1qBIx5trVMvA/IRorH5dt8er9 DxHqwgxqzxZZEWNmXCY6TimqQm0V9KCzS1tqVMDucqLwfBYBlaKSHfT5WxV3doqntcUp rpeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=/iNAvQ29mAfMZb8pY0ABnHTvQeOYN09SdtHOMatHA44=; b=cH71C816ffNJJHvJzII1jkX6iDNVwPu56Ro1rh6SODXmgd2dWd8BN/hgt7Ztb+IOtd k4WhguNrgaTGp207Av6VIixJ+D/kE2GwmxGWvoHv47c5i3EOSvYinrKfzM2ag0u1Oozu vtw4uvd3brh3sv9hNAD1M5pc4UKEPD6TLUFuosVl8l9dl6SnNnYZYiETXYtU3AaJoubG wVLUScDI1cXtM7o9HJgpGV4ihXzaEm/z9pCdW/v1KVQznBxOYJ7O5b8eFg2fshe8x4RS bEAtXG1jJ7If6RQSKE9RAw8StQFCzZpomqBVLrQeSrrg1TOOKgBucQF+NzpsGEUrqzKJ lhuw== X-Gm-Message-State: ALoCoQlNwPJBRmi+UwRbV3oZIO1XGIz6AgkzwFmRKG8Otaz5XDW0x3nNCifd0wqllKH1QRTEjCguqLZKKA580eI21shxoaRf9PYXMHirwbpmDi05s2vBmyNF9srXv8LiW/QSdg+pgE7eCKDNGOs3b6rZK5SrV9DFHJgdOPypAiePEijev7Elo7HSLavo4iLAE4mYORaGwrJ6H6zGoGVCjWXu+xyPqDy9dC2YBx3Lc3/ouxdCO2ovx2Y= X-Received: by 10.236.117.12 with SMTP id i12mr3228188yhh.29.1378487694285; Fri, 06 Sep 2013 10:14:54 -0700 (PDT) Received: from localhost ([172.16.53.165]) by mx.google.com with ESMTPSA id h66sm4088184yhb.7.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 06 Sep 2013 10:14:53 -0700 (PDT) Subject: [PATCH 11/14] PCI/ACPI: Skip _OSC control tests if _OSC support call failed To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: "Rafael J. Wysocki" , linux-acpi@vger.kernel.org, Len Brown Date: Fri, 06 Sep 2013 11:14:51 -0600 Message-ID: <20130906171451.11482.47944.stgit@bhelgaas-glaptop> In-Reply-To: <20130906171010.11482.34235.stgit@bhelgaas-glaptop> References: <20130906171010.11482.34235.stgit@bhelgaas-glaptop> User-Agent: StGit/0.16 MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If the _OSC support notification fails, we will never request control (because "support == OSC_PCI_SEGMENT_GROUPS_SUPPORT", which doesn't include all the features in ACPI_PCIE_REQ_SUPPORT), so we can return early to simplify the code. Signed-off-by: Bjorn Helgaas --- drivers/acpi/pci_root.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 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/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 0e20041..67cc43a 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -363,7 +363,7 @@ EXPORT_SYMBOL(acpi_pci_osc_control_set); static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm, int *clear_aspm) { - u32 support, base_support, control; + u32 support, control; acpi_status status; struct acpi_device *device = root->device; acpi_handle handle = device->handle; @@ -372,7 +372,7 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm, * All supported architectures that use ACPI have support for * PCI domains, so we indicate this in _OSC support capabilities. */ - support = base_support = OSC_PCI_SEGMENT_GROUPS_SUPPORT; + support = OSC_PCI_SEGMENT_GROUPS_SUPPORT; if (pci_ext_cfg_avail()) support |= OSC_PCI_EXT_CONFIG_SUPPORT; if (pcie_aspm_support_enabled()) @@ -381,10 +381,10 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm, support |= OSC_PCI_MSI_SUPPORT; status = acpi_pci_osc_support(root, support); if (ACPI_FAILURE(status)) { - dev_info(&device->dev, "ACPI _OSC support " - "notification failed, disabling PCIe ASPM\n"); + dev_info(&device->dev, "_OSC failed (%s); disabling ASPM\n", + acpi_format_exception(status)); *no_aspm = 1; - support = base_support; + return; } if (!pcie_ports_disabled