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: 2854592 Return-Path: X-Original-To: patchwork-linux-acpi@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 8770D9F494 for ; Fri, 6 Sep 2013 17:14:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 74C48202C7 for ; Fri, 6 Sep 2013 17:14:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 576DF202E8 for ; Fri, 6 Sep 2013 17:14:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754308Ab3IFROz (ORCPT ); Fri, 6 Sep 2013 13:14:55 -0400 Received: from mail-yh0-f51.google.com ([209.85.213.51]:42084 "EHLO mail-yh0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754209Ab3IFROz (ORCPT ); Fri, 6 Sep 2013 13:14:55 -0400 Received: by mail-yh0-f51.google.com with SMTP id t59so1296215yho.38 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=S5VL9zlJyIPnOG0BrBlrlD6vwyKB19VlHNWIbc8X4VEt71sDe8+i6iVuuOkoI7pWh1 LD0C5fFzbTRmGW4PEMB1iIC/KI0wy/ecr8CI2km+g/dSnEsgRJ9FgkAlopiociTdrA70 i+UkKpThAPGgzgo0NjRQuWbjSRHxnacq03qPIprzU4MMJhr09ZyBkYWc2fTyn2VJ6uq2 UFdySCsN/65iWFB5P0xbl31C9hhcfOh5zb0HKsRWkZFZECGWpvEP/0L9SantDGfobMDk 9e2kqRwInCX55SinbiDiBcv4w0ZR+u7puFRdIr9KGjZ4jd/btw4w/qqspLLm2t6E8e/D NYQA== X-Gm-Message-State: ALoCoQk1cupN5ZQH1/5EZOUbrRuZNHAa44aW49z+pU+coJlq683DTDOcyBozmXosgLn11o2UYS0Tp/WvnkMVYUeb7khTLEFWBPTHOk5GmCV0be70nj4TdHvWu7agxdx9wV3eFf2bRH2+PKIEnnPaK27wa7GniSc4EWc0dN0W01OxES5LTYrclzVMJOX4wxgQ1gn7sV1IvD2w5UYxV4x+JQJ4RBDZepkLAg== 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-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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=unavailable 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-acpi" 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