Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1336535imm; Thu, 23 Aug 2018 01:03:06 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwtDFfOh4qNQPlTZuoULV6pWEm1AOyAzdWz+esTzpTCWgly2eBRGR5zXLOft3yYsKcyjCRz X-Received: by 2002:a17:902:6b44:: with SMTP id g4-v6mr57363977plt.50.1535011386453; Thu, 23 Aug 2018 01:03:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535011386; cv=none; d=google.com; s=arc-20160816; b=VTRWM7e+YrebMp8mnVFhl9LMyAfo8ipaTeYXeBUZKJDP/U2ZBjw1LQe4smp7gO7SI7 cs6C1/A94TlrfzgJ4iqJqBgQHGLEQvSXg/TrSNe9e/a2TEHvP0G/vkpXZ0t5ePM1A8l5 ah4IJ+el0JE6jeBd0oEo0nUC3vcG8fJr8dT8LRq5LnzfGCp1Qb59r3Ecp7yEKoVtexR5 QbVJ6N/ZxgfU+VE1grGH5ln7lpG9rJA3VzKJ3fd/9YUKfhdBtlh4W8eonmzZHjRdBV2Q rxhQgsxwcG7JA5m22M726yOVDmCBFdtAfLacbZIB5jkfXql9DQ2dtnJ1ZB/q4x4Dh1Lb POoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Cf/WAN18u6F7kDnCtE/44f6lDIwhSVSjGww88sQKTtQ=; b=v6f3j7r/MKt9Pg44p6gvYkkgGF3j99/oxHDy05C5EhP/nJymGxIQKaQGslixY3z0Ep Mo897GJVC3ttLLhJuX3tQq4ggimjT1FW3EMJdGEkAL9T7/hUmSru+6pMMdf44bmm5Wl4 r9ss7yYR9VC1k8KEVB5i7klWnZfDQHzsxnbNpdH9E75y5H3p/r59sRYPPvyxsVh1xKJK 3bS8rcF3u9TRHYeG1jZH0IGlLvkTs7PhNQZ7OmL4qcUzmlEjui2vUoHTO/IPAL3P7P74 ARDuTHXXUOTxW+BJb3SKWohdBtfpbqUVcHbYVJt+eSjFV4/zekeXMuRkGSJnxRxdP+2q XNbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g6-v6si3401017plp.225.2018.08.23.01.02.51; Thu, 23 Aug 2018 01:03:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728771AbeHWL3U (ORCPT + 99 others); Thu, 23 Aug 2018 07:29:20 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44158 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727623AbeHWL3U (ORCPT ); Thu, 23 Aug 2018 07:29:20 -0400 Received: from localhost (5355525A.cm-6-6b.dynamic.ziggo.nl [83.85.82.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 9C888C49; Thu, 23 Aug 2018 08:00:41 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Myron Stowe , Bjorn Helgaas , Keith Busch , Sinan Kaya , Dongdong Liu , Jon Mason Subject: [PATCH 4.4 76/79] PCI: Skip MPS logic for Virtual Functions (VFs) Date: Thu, 23 Aug 2018 09:53:52 +0200 Message-Id: <20180823074924.155579322@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180823074918.641878835@linuxfoundation.org> References: <20180823074918.641878835@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Myron Stowe commit 3dbe97efe8bf450b183d6dee2305cbc032e6b8a4 upstream. PCIe r4.0, sec 9.3.5.4, "Device Control Register", shows both Max_Payload_Size (MPS) and Max_Read_request_Size (MRRS) to be 'RsvdP' for VFs. Just prior to the table it states: "PF and VF functionality is defined in Section 7.5.3.4 except where noted in Table 9-16. For VF fields marked 'RsvdP', the PF setting applies to the VF." All of which implies that with respect to Max_Payload_Size Supported (MPSS), MPS, and MRRS values, we should not be paying any attention to the VF's fields, but rather only to the PF's. Only looking at the PF's fields also logically makes sense as it's the sole physical interface to the PCIe bus. Link: https://bugzilla.kernel.org/show_bug.cgi?id=200527 Fixes: 27d868b5e6cf ("PCI: Set MPS to match upstream bridge") Signed-off-by: Myron Stowe Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org # 4.3+ Cc: Keith Busch Cc: Sinan Kaya Cc: Dongdong Liu Cc: Jon Mason Signed-off-by: Greg Kroah-Hartman --- drivers/pci/probe.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1338,6 +1338,10 @@ static void pci_configure_mps(struct pci if (!pci_is_pcie(dev) || !bridge || !pci_is_pcie(bridge)) return; + /* MPS and MRRS fields are of type 'RsvdP' for VFs, short-circuit out */ + if (dev->is_virtfn) + return; + mps = pcie_get_mps(dev); p_mps = pcie_get_mps(bridge);