Thread (18 messages) 18 messages, 4 authors, 2025-05-15

Re: [PATCH v3 1/3] PCI: Configure root port MPS during host probing

From: Niklas Cassel <cassel@kernel.org>
Date: 2025-05-07 07:38:09
Also in: linux-amlogic, linux-pci, linux-rockchip, lkml

On Wed, May 07, 2025 at 01:34:37AM +0800, Hans Zhang wrote:

(snip)
quoted hunk ↗ jump to hunk
 static void pci_configure_mps(struct pci_dev *dev)
 {
 	struct pci_dev *bridge = pci_upstream_bridge(dev);
@@ -2178,6 +2209,10 @@ static void pci_configure_mps(struct pci_dev *dev)
 		return;
 	}
We should probably add a comment explaining why we are doing this here.

Perhaps something like:

/*
 * Unless MPS strategy is PCIE_BUS_TUNE_OFF (don't touch MPS at all),
 * start off by setting root ports' MPS to MPSS. Depending on the MPS
 * strategy, and the MPSS of the devices below the root port, the MPS
 * of the root port might get overriden later.
 */

+	if (pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT &&
+	    pcie_bus_config != PCIE_BUS_TUNE_OFF)
+		pcie_write_mps(dev, 128 << dev->pcie_mpss);
+
 	if (!bridge || !pci_is_pcie(bridge))
 		return;
 

Kind regards,
Niklas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help