diff options
author | Myron Stowe <myron.stowe@redhat.com> | 2018-08-13 20:19:46 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2018-08-14 16:09:33 +0200 |
commit | 9f0e89359775ee21fe1ea732e34edb52aef5addf (patch) | |
tree | a20e2bfb12626b4bc68374cebbf1c5273a648771 /drivers/pci/pci-sysfs.c | |
parent | PCI: Skip MPS logic for Virtual Functions (VFs) (diff) | |
download | linux-9f0e89359775ee21fe1ea732e34edb52aef5addf.tar.xz linux-9f0e89359775ee21fe1ea732e34edb52aef5addf.zip |
PCI: Match Root Port's MPS to endpoint's MPSS as necessary
In commit 27d868b5e6cf ("PCI: Set MPS to match upstream bridge"), we made
sure every device's MPS setting matches its upstream bridge, making it more
likely that a hot-added device will work in a system with an optimized MPS
configuration.
Recently I've started encountering systems where the endpoint device's MPSS
capability is less than its Root Port's current MPS value, thus the
endpoint is not capable of matching its upstream bridge's MPS setting (see:
bugzilla via "Link:" below). This leaves the system vulnerable - the
upstream Root Port could respond with larger TLPs than the device can
handle, and the device will consider them to be 'Malformed'.
One could use the "pci=pcie_bus_safe" kernel parameter to work around the
issue, but that forces a user to supply a kernel parameter to get the
system to function reliably and may end up limiting MPS settings of other
unrelated, sub-topologies which could benefit from maintaining their larger
values.
Augment Keith's approach to include tuning down a Root Port's MPS setting
when its hot-added endpoint device is not capable of matching it.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=200527
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Jon Mason <jdmason@kudzu.us>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Sinan Kaya <okaya@kernel.org>
Cc: Dongdong Liu <liudongdong3@huawei.com>
Diffstat (limited to 'drivers/pci/pci-sysfs.c')
0 files changed, 0 insertions, 0 deletions