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: 4897381 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 521449F430 for ; Fri, 12 Sep 2014 18:01:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4C8D02021B for ; Fri, 12 Sep 2014 18:05:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 026DE2024C for ; Fri, 12 Sep 2014 18:05:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752396AbaILSFp (ORCPT ); Fri, 12 Sep 2014 14:05:45 -0400 Received: from mail-ig0-f182.google.com ([209.85.213.182]:36574 "EHLO mail-ig0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752392AbaILSDu (ORCPT ); Fri, 12 Sep 2014 14:03:50 -0400 Received: by mail-ig0-f182.google.com with SMTP id h18so966748igc.15 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=OmcuR7onUnEfIkpab+cGW3dxN+GtYdCqHfer1juF0ys2fC8MRbs+ekmbAdc1/cNc8z 1Q5X9+9UShGduJhuZSZuXNQtIzv7mJRhc4CIkR7y/34sm8qB/eZRxucMA3dsF8cI7mnu IgbM8N18tnts/tMRtP9VAldTrgG38ZnHSfSsFPOg/Fp16xj3s/iVzdOuAaozlov12QUi l7HXCGau/65b7jDkBfdH5jSt8q5kSOtCJzeEPl++KMPA77p3/n8fffyWjoiKxPB7ffrr EiAriUTXSaU5s1AZQtWx3/ZmRsRM67JPP1yinfbfP/h54H/3kL6rQLoR+Eh1tBta6KAQ KB4Q== X-Gm-Message-State: ALoCoQn6TzN9VT5S5c5/lEObPdLEhxABxYK4GTNJU0/dhXaOmDTF4+gys827PJgOEPapS2bujHav 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-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@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=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 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-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/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,