Re: [v2] PCI: dwc: Add the debugfs property to provide the LTSSM status of the PCIe link

From: Hans Zhang
Date: Fri Feb 14 2025 - 03:37:08 EST




On 2025/2/13 22:34, Niklas Cassel wrote:
+int dwc_pcie_debugfs_init(struct dw_pcie *pci)
+{
+ char dirname[DWC_DEBUGFS_BUF_MAX];
+ struct device *dev = pci->dev;
+ struct dentry *dir;
+ int ret;
+
+ /* Create main directory for each platform driver */
+ snprintf(dirname, DWC_DEBUGFS_BUF_MAX, "dwc_pcie_%s", dev_name(dev));
+ dir = debugfs_create_dir(dirname, NULL);
+ if (IS_ERR(dir))
+ return PTR_ERR(dir);
+
+ pci->debugfs = dir;
+ ret = dwc_pcie_rasdes_debugfs_init(pci, dir);
+ if (ret)
+ dev_dbg(dev, "rasdes debugfs init failed\n");
+
+ dwc_pcie_ltssm_debugfs_init(pci, dir);
+
+ return 0;
+}
+

Stray newline here.
This causes:

/home/nks/src/linux/.git/worktrees/linux-scratch/rebase-apply/patch:136: new blank line at EOF.
+
warning: 1 line adds whitespace errors.

when doing git am.


Also, this patch does not apply anymore, because of a conflict introduce by:
112aba9a7934 ("PCI: dwc: Remove LTSSM state test in dw_pcie_suspend_noirq()")

Which added:
+ DW_PCIE_LTSSM_DETECT_WAIT = 0x6,
to drivers/pci/controller/dwc/pcie-designware.h


Thank you very much, Niklas.

I will git pull the latest code and fix it.


Best regards
Hans