From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A0BD0C678D5 for ; Wed, 8 Mar 2023 00:33:05 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2F4C885C5E; Wed, 8 Mar 2023 01:32:59 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="q22LCgUK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B19F385936; Wed, 8 Mar 2023 01:32:48 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by phobos.denx.de (Postfix) with ESMTP id C470C85C3E for ; Wed, 8 Mar 2023 01:32:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=stcarlso@linux.microsoft.com Received: from STCARLSO-0732.corp.microsoft.com (unknown [131.107.159.124]) by linux.microsoft.com (Postfix) with ESMTPSA id BCE6020C14D5 for ; Tue, 7 Mar 2023 16:32:38 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com BCE6020C14D5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1678235558; bh=00whZ7L/JDjE+Lu8n6HuN955KCuWeklnMiyF7b1NL/M=; h=From:To:Subject:Date:From; b=q22LCgUKhvtaQcgL7ZTeVkH7SKXT4ZbOujHJ5VSkusBjEMeQxCkqRddLtjnj7MFXV WisbYiNfstItcVQfJh946oGR+tHz4fAwidhtsd3cNoePldKstLy4wDmYkye0mw/OqD eo6LLKactDTzA77YXTVodQrFyXZMDYaC+sgVYmJg= From: stcarlso@linux.microsoft.com To: u-boot@lists.denx.de Subject: [PATCH 0/3] Add command to set MPS of all PCI Express devices Date: Tue, 7 Mar 2023 16:32:31 -0800 Message-Id: <20230308003234.465014-1-stcarlso@linux.microsoft.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean From: Stephen Carlson 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