aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMyron Stowe <myron.stowe@redhat.com>2018-08-13 14:19:39 -0400
committerBjorn Helgaas <bhelgaas@google.com>2018-08-14 10:07:31 -0400
commit3dbe97efe8bf450b183d6dee2305cbc032e6b8a4 (patch)
treebf2dd1c51f096328b6485161eabbc428afc3f011
parent2d1ce5ec2117d16047334a1aa4b62e0cfb5a0605 (diff)
PCI: Skip MPS logic for Virtual Functions (VFs)
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 <myron.stowe@redhat.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Cc: stable@vger.kernel.org # 4.3+ Cc: Keith Busch <keith.busch@intel.com> Cc: Sinan Kaya <okaya@kernel.org> Cc: Dongdong Liu <liudongdong3@huawei.com> Cc: Jon Mason <jdmason@kudzu.us>
-rw-r--r--drivers/pci/probe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 71412db3cbeb..c2533ed45fff 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1730,6 +1730,10 @@ static void pci_configure_mps(struct pci_dev *dev)
1730 if (!pci_is_pcie(dev) || !bridge || !pci_is_pcie(bridge)) 1730 if (!pci_is_pcie(dev) || !bridge || !pci_is_pcie(bridge))
1731 return; 1731 return;
1732 1732
1733 /* MPS and MRRS fields are of type 'RsvdP' for VFs, short-circuit out */
1734 if (dev->is_virtfn)
1735 return;
1736
1733 mps = pcie_get_mps(dev); 1737 mps = pcie_get_mps(dev);
1734 p_mps = pcie_get_mps(bridge); 1738 p_mps = pcie_get_mps(bridge);
1735 1739