public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 0/3] Add command to set MPS of all PCI Express devices
@ 2023-03-08  0:32 stcarlso
  2023-03-08  0:32 ` [PATCH 1/3] cmd: pci: Add command to set MPS of all PCIe devices stcarlso
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: stcarlso @ 2023-03-08  0:32 UTC (permalink / raw)
  To: u-boot

From: Stephen Carlson <stcarlso@linux.microsoft.com>

This patch set adds support for configuring the Maximum Payload Size
(MPS) for attached PCI Express devices. Modifying the MPS can increase
PCI Express performance or ensure compatibility with hot-plugged
devices.

New config CONFIG_CMD_PCI_MPS. If enabled, a new "pci_mps" command will
be added that accepts an argument describing a strategy to configure the
PCI Express payload size for devices that are currently attached. Two
strategies are currently supported:

"safe" emulates the Linux kernel's pci=pcie_bus_safe and sets all devices
to the minimum MPS supported by all devices.

"peer2peer" sets all devices to an MPS of 128 bytes, the only size which
must be supported by all compliant PCI Express devices, to ensure that
all devices can directly communicate with each other and with devices that
are hotplugged later.

A test for the sandbox environment is also added by advertising a
larger supported Maximum Payload Size in the swapcase device and
verifying that the pci_mps command can read and configure the MPS.

Stephen Carlson (3):
  cmd: pci: Add command to set MPS of all PCIe devices
  drivers: pci: sandbox: Add stub sandbox PCI MPS support
  test: Add test for new command pci_mps

 MAINTAINERS                   |   6 ++
 cmd/Kconfig                   |  10 ++
 cmd/Makefile                  |   1 +
 cmd/pci_mps.c                 | 167 ++++++++++++++++++++++++++++++++++
 configs/sandbox_defconfig     |   1 +
 drivers/misc/swap_case.c      |   3 +
 include/pci.h                 |   7 ++
 test/py/tests/test_pci_mps.py |  13 +++
 8 files changed, 208 insertions(+)
 create mode 100644 cmd/pci_mps.c
 create mode 100644 test/py/tests/test_pci_mps.py

-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-08 17:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-08  0:32 [PATCH 0/3] Add command to set MPS of all PCI Express devices stcarlso
2023-03-08  0:32 ` [PATCH 1/3] cmd: pci: Add command to set MPS of all PCIe devices stcarlso
2023-03-08  0:32 ` [PATCH 2/3] drivers: pci: sandbox: Add stub sandbox PCI MPS support stcarlso
2023-03-08  0:32 ` [PATCH 3/3] test: Add test for new command pci_mps stcarlso
2023-03-08 17:16   ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox