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

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

From: Hans Zhang <18255117159@163.com>
Date: 2025-05-07 14:56:44
Also in: linux-amlogic, linux-pci, linux-rockchip, lkml


On 2025/5/7 15:38, Niklas Cassel wrote:
On Wed, May 07, 2025 at 01:34:37AM +0800, Hans Zhang wrote:

(snip)
quoted
  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.
  */
Dear Niklas,

Thank you very much for your reply and suggestions.
It will be added in the next version.

Best regards,
Hans
quoted
+	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