From patchwork Fri Sep 12 18:04:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 4897271 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6BBD6BEEA5 for ; Fri, 12 Sep 2014 18:04:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CD4DF20221 for ; Fri, 12 Sep 2014 18:04:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A7C522024C for ; Fri, 12 Sep 2014 18:04:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750883AbaILSEO (ORCPT ); Fri, 12 Sep 2014 14:04:14 -0400 Received: from mail-ig0-f176.google.com ([209.85.213.176]:54376 "EHLO mail-ig0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752527AbaILSEL (ORCPT ); Fri, 12 Sep 2014 14:04:11 -0400 Received: by mail-ig0-f176.google.com with SMTP id hn15so957915igb.3 for ; Fri, 12 Sep 2014 11:04:11 -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=0Dnd18+5keVHNgLwCbiLVJQENlJ6gIMOG28NAlggsV0=; b=AOJsU3jXsg1ZTnCAeep3vVnkyscO8WQWeAJ3I2oZvrbQ+4mHvwqSKNuGuBPVfdXrT3 kcFN2/thH9TPNFSFDHdi+kwhRc5Puoh7g5WOwSzG0uN0d+rhNJbbKOPMizmg3VvfHBBR TyZbGqGaSf0Cdb5/uRLE52vf/ffFhDEFWXbaIUgUCm+Vz7zQ9NCW3GFVK3PWsSXiv48t kApjSQ/ZsRHLt40e4Exf7aL03WhANPi7AhZt3kcji8zhMtWMACfXgGWQzA9L8K+iDHA7 YptmwfMAEp3LG80R8Ri1hnKNE6zcJg8FlHmPUY96g1agVcCHtQ4o+wnxUJtIAKeyM5qd 1ayQ== 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=0Dnd18+5keVHNgLwCbiLVJQENlJ6gIMOG28NAlggsV0=; b=ESkK+AYPdFBFz3hLelboYYkYsp4mcQJNB+UPOpUEUTuTCvaBtnT48t5w4dGSvxaOfd Olu+Hk2XWW7xYIjI6U+CH/bhYMgKiBuSyw5fclc+CiWIB+Mho4Oetv4SI2rjZQPe8L5c aykjzTWkhydHeMaXMx0TQCoR5Ga8UhWW0mf49u4okuio5YW5BI6VMrz0O8lrkPLS58K+ d2vxCZoPd/iDrPPhDvKdhPKdNF+IcNcayfNlDSjEfVfmfrmE28a2ve4Fo+gEcPe3n2hB OIu+s/AR0T1kmyfNLRaqg3e8zrPGJMSyM6impGv0fN0SwgGm1BdHuGwZ7u32oBOhM0Zt qZ/g== X-Gm-Message-State: ALoCoQnaWG8QxD442XAuPTtysvwBxdu7bLD6J/vZ5GQqgkJKG+3hleBn0LRhFFeBF4YpTrln3ByD X-Received: by 10.50.137.41 with SMTP id qf9mr4308750igb.25.1410545050796; Fri, 12 Sep 2014 11:04:10 -0700 (PDT) Received: from localhost ([172.16.49.108]) by mx.google.com with ESMTPSA id ka2sm2091697igb.7.2014.09.12.11.04.10 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 12 Sep 2014 11:04:10 -0700 (PDT) Subject: [PATCH v1 12/13] PCI: Preserve MPS and MRRS when applying _HPX settings 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:04:09 -0600 Message-ID: <20140912180409.1630.66534.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=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 Linux manages MPS and MRRS settings to keep them consistent across the PCIe fabric. BIOS doesn't participate in Linux scheme, so ignore that part of any _HPX settings it supplies. Signed-off-by: Bjorn Helgaas --- drivers/pci/probe.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 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 1ff2105ba401..cb411fbb6435 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1301,6 +1301,16 @@ static void program_hpp_type2(struct pci_dev *dev, struct hpp_type2 *hpp) return; } + /* + * Don't allow _HPX to change MPS or MRRS settings. We manage + * those to make sure they're consistent with the rest of the + * platform. + */ + hpp->pci_exp_devctl_and |= PCI_EXP_DEVCTL_PAYLOAD | + PCI_EXP_DEVCTL_READRQ; + hpp->pci_exp_devctl_or &= ~(PCI_EXP_DEVCTL_PAYLOAD | + PCI_EXP_DEVCTL_READRQ); + /* Initialize Device Control Register */ pcie_capability_clear_and_set_word(dev, PCI_EXP_DEVCTL, ~hpp->pci_exp_devctl_and, hpp->pci_exp_devctl_or);