From patchwork Fri Sep 12 18:03:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 4897371 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 847A59F430 for ; Fri, 12 Sep 2014 18:00:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0219F20221 for ; Fri, 12 Sep 2014 18:05:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C1FBB2021B for ; Fri, 12 Sep 2014 18:05:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752398AbaILSFo (ORCPT ); Fri, 12 Sep 2014 14:05:44 -0400 Received: from mail-ig0-f181.google.com ([209.85.213.181]:55100 "EHLO mail-ig0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752396AbaILSDu (ORCPT ); Fri, 12 Sep 2014 14:03:50 -0400 Received: by mail-ig0-f181.google.com with SMTP id h3so959684igd.14 for ; Fri, 12 Sep 2014 11:03:49 -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=nv+JqWpzPqs4H7gnw0m3RI0/1aAZ4A+gHCHy/78pNCo=; b=QjxxS09QTwk0jF4DrCipkS853Y9hDhSngx+43pnUxSJFHVUFQYg7kdxYtgba0SuyBG f1JV4RimzyAsrhuxqGfQZwMR/YuigJcZ5UGy8m5f1SuLPGNV8Fe6B4NHVlBDW0mAZa9e Kiz0KtbyC6Gbr5JcIoxzVUyuoouwOuEOmbx3RVxqWqmJptv4pJtscjK25vNxIDPsQBkA nNbhvGYwotUO7SseHMz9Dj5C3fUFWQGkZCSZ22RgCNAPmFMWEeU892YBLy58r90FxWBy DWiOMvjSvM5mLKUAGrt2oIAzE9M2KN0UF0JiiW1anuVVteyQ4J0tNwH8N4SO4eMwZCsm +TXA== 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=nv+JqWpzPqs4H7gnw0m3RI0/1aAZ4A+gHCHy/78pNCo=; b=k+S4VAgIuKyx3ePbIa5LmYjZqgAEeyrqd3mZeuPV35udQ3vOU1UU4xFAcj7SyBJ3Lj Yigetqde39ZRvl53jXdnrRn6zAegGs0BzWOHLeOTOaFYM06OK5GrfJ7g6WFg5m2k/nTA 2776Meb5OohGG47JdUgCPRL4fWwk3OhDORCuhIKybvkMmCMJP6VvZ2ym5j7qmNNvdFm7 3TEwkZaTS6WxKDKUXfeyYOkX6p73xT9gkakujGzisUFkVIF5QAshqW22o+SOvKxHU+Yd bRvdujhw3BY9UzhfABpnMITMn3lRZ+K6IdcNJ1qWfF/+WGlVRpfKApn2GLNtAi3cZwnm aH0A== X-Gm-Message-State: ALoCoQkGuyPjlwZiuXFMF0kNenZnD3CfixCqpWH7BsvK0Q0X+5jlzVrYGb11UZPlxXT6cgLx1xHF X-Received: by 10.50.43.138 with SMTP id w10mr4169383igl.33.1410545029570; Fri, 12 Sep 2014 11:03:49 -0700 (PDT) Received: from localhost ([172.16.49.108]) by mx.google.com with ESMTPSA id z2sm2077472igl.16.2014.09.12.11.03.48 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 12 Sep 2014 11:03:49 -0700 (PDT) Subject: [PATCH v1 09/13] PCI: Apply _HPP settings to PCIe devices as well as PCI and PCI-X To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: Rajat Jain , Linus Torvalds , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Yinghai Lu Date: Fri, 12 Sep 2014 12:03:48 -0600 Message-ID: <20140912180348.1630.24201.stgit@bhelgaas-glaptop2.roam.corp.google.com> In-Reply-To: <20140912180141.1630.17120.stgit@bhelgaas-glaptop2.roam.corp.google.com> References: <20140912180141.1630.17120.stgit@bhelgaas-glaptop2.roam.corp.google.com> 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.0 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 The ACPI _HPP method was defined before PCIe existed, so its documentation only mentions PCI. The _HPX Type 0 setting record is essentially identical to _HPP, but the spec (ACPI rev 5.0, sec 6.2.8.1) says it should be applied to PCI, PCI-X, and PCIe devices, with settings being ignored if they are not applicable. Some platforms with both conventional PCI and PCIe devices provide only _HPP (not _HPX), so treat _HPP the same way as an _HPX Type 0 record and apply it to PCIe devices as well as PCI and PCI-X. Signed-off-by: Bjorn Helgaas --- drivers/pci/probe.c | 9 +-------- 1 file changed, 1 insertion(+), 8 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/pci/probe.c b/drivers/pci/probe.c index 4b3b29bc7a82..003d112a783d 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1249,15 +1249,8 @@ static void program_hpp_type0(struct pci_dev *dev, struct hpp_type0 *hpp) { u16 pci_cmd, pci_bctl; - if (!hpp) { - /* - * Perhaps we *should* use default settings for PCIe, but - * pciehp didn't, so we won't either. - */ - if (pci_is_pcie(dev)) - return; + if (!hpp) hpp = &pci_default_type0; - } if (hpp->revision > 1) { dev_warn(&dev->dev,