Skip to content

FROMLIST: PCI: qcom: Add register dump support for PCIe Link Down events - #941

Open
ziyuezhang-123 wants to merge 1 commit into
qualcomm-linux:qcom-6.18.yfrom
ziyuezhang-123:for-6.18/pci-qcom-add-register-dump-for-link-down
Open

FROMLIST: PCI: qcom: Add register dump support for PCIe Link Down events#941
ziyuezhang-123 wants to merge 1 commit into
qualcomm-linux:qcom-6.18.yfrom
ziyuezhang-123:for-6.18/pci-qcom-add-register-dump-for-link-down

Conversation

@ziyuezhang-123

Copy link
Copy Markdown

When the PCIe link goes down unexpectedly, being able to inspect the
state of key controller registers at the time of failure is valuable
for root-causing the issue.

If a storage endpoint is present downstream, the dump is printed
directly via dev_err() so it is visible in dmesg immediately, since a
devcoredump read from userspace could otherwise race with a storage
failure. Otherwise, the buffer is handed to the devcoredump framework
so it can be collected from /sys/class/devcoredump/ for offline
analysis.

To keep the dump readable given the number of registers involved,
entries are packed as "offset: value" pairs, QCOM_PCIE_DUMP_REGS_PER_LINE
(4) per dmesg line, with a section header ("DBI registers:", "PARF
registers:", "MHI registers:") identifying each register group.

Also expose the same dump on demand via a new "regdump" debugfs file
under the existing per-controller debugfs directory, so the register
state can be inspected without needing an actual Link Down event.

Link: https://lore.kernel.org/r/20260811-regdump-v1-1-f22db3fb37c2@oss.qualcomm.com

When the PCIe link goes down unexpectedly, being able to inspect the
state of key controller registers at the time of failure is valuable
for root-causing the issue.

If a storage endpoint is present downstream, the dump is printed
directly via dev_err() so it is visible in dmesg immediately, since a
devcoredump read from userspace could otherwise race with a storage
failure. Otherwise, the buffer is handed to the devcoredump framework
so it can be collected from /sys/class/devcoredump/ for offline
analysis.

To keep the dump readable given the number of registers involved,
entries are packed as "offset: value" pairs, QCOM_PCIE_DUMP_REGS_PER_LINE
(4) per dmesg line, with a section header ("DBI registers:", "PARF
registers:", "MHI registers:") identifying each register group.

Also expose the same dump on demand via a new "regdump" debugfs file
under the existing per-controller debugfs directory, so the register
state can be inspected without needing an actual Link Down event.

Link: https://lore.kernel.org/r/20260811-regdump-v1-1-f22db3fb37c2@oss.qualcomm.com
Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
Signed-off-by: Ziyue Zhang <ziyue.zhang@oss.qualcomm.com>
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No CR Numbers Found

Error: No Change Request numbers were found.

Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests.

@qlijarvis

Copy link
Copy Markdown

PR #941 — validate-patch

PR: #941

Verdict Issues Detailed Report
⚠️ 2 Full report

Final Summary

  1. Lore link present: Yes — https://lore.kernel.org/r/20260811-regdump-v1-1-f22db3fb37c2@oss.qualcomm.com
  2. Lore link matches PR commits: Yes — diff content faithful to lore with legitimate tree-specific adaptations (2 register definitions added that already exist in lore's base)
  3. Upstream patch status: ⏳ Decision Pending — posted Aug 11, 2026 (1 day ago); no maintainer feedback yet
  4. PR present in qcom-next/topics: Partial - 1/1 commit(s) only have partial integration evidence
Verdict: ⚠️ — click to expand

🔍 Patch Validation

PR: #941 - FROMLIST: PCI: qcom: Add register dump support for PCIe Link Down events
Upstream commit: https://lore.kernel.org/r/20260811-regdump-v1-1-f22db3fb37c2@oss.qualcomm.com
Verdict: ⚠️ PARTIAL

Commit Message

Check Status Note
Subject matches upstream Subject correctly prefixed with FROMLIST:
Body preserves rationale Full commit message preserved verbatim
Fixes tag present/correct N/A No Fixes tag in upstream patch
Authorship preserved ⚠️ Original author preserved in From:, but extra Signed-off-by: Ziyue Zhang added (submitter) - correct for FROMLIST
Backport note (if applicable) N/A Not a backport

Diff

File Status Notes
pcie-designware.h Identical - 6 lines added (SD-EQ register definitions)
pcie-qcom.c ⚠️ 330 lines vs 328 lines - PR adds PARF_INT_ALL_STATUS and PARF_STATUS definitions that already exist in lore's base tree
pci_regs.h Identical - 2 lines added

Issues

  • Context difference in register definitions: The PR patch adds PARF_INT_ALL_STATUS (0x228) and PARF_STATUS (0x230) as new definitions, but in the lore patch these already exist in the base file (shown as context lines). This indicates the PR is based on an older tree that doesn't have these definitions yet. The additions are legitimate adaptations for the target tree, not semantic changes.
  • Extra Signed-off-by: The PR adds Signed-off-by: Ziyue Zhang <ziyue.zhang@oss.qualcomm.com> which is not in the upstream patch. For FROMLIST: commits, this is correct - the submitter (Ziyue Zhang) who cherry-picked and applied the patch adds their own sign-off, while the original author (Krishna Chaitanya Chundru) is preserved in From: and their Signed-off-by: is retained.

Upstream Patch Status

Commit Community Verdict
PCI: qcom: Add register dump support for PCIe Link Down events ⏳ Decision Pending — posted Aug 11, 2026; no maintainer replies yet

Dependency Check

  • ✅ No prerequisite patches mentioned
  • ✅ No missing header/helper changes

qcom-next/topics Presence

Commit Status
FROMLIST: PCI: qcom: Add register dump support for PCIe Link Down events ⚠️ Partial - subject or partial tree evidence found, but full change was not verified (per integration_presence_report.md)

Verdict

Merge with awareness of context differences. The patch faithfully represents the upstream lore posting with two legitimate adaptations: (1) register definitions that already exist in the lore base tree are added here because the target tree doesn't have them yet, and (2) the submitter's sign-off is correctly added per FROMLIST conventions. The core functionality (register dump logic, debugfs interface, devcoredump integration) is identical. The partial qcom-next presence suggests the patch may be in flight or partially integrated.

Final Summary

  1. Lore link present: Yes — https://lore.kernel.org/r/20260811-regdump-v1-1-f22db3fb37c2@oss.qualcomm.com
  2. Lore link matches PR commits: Yes — diff content faithful to lore with legitimate tree-specific adaptations (2 register definitions added that already exist in lore's base)
  3. Upstream patch status: ⏳ Decision Pending — posted Aug 11, 2026 (1 day ago); no maintainer feedback yet
  4. PR present in qcom-next/topics: Partial — 1/1 commit has partial integration evidence (per integration_presence_report.md)

Deterministic Integration Presence

Integration Presence Report

This report is generated by Jarvis before validate-patch runs.
It is the authoritative source for whether PR changes are already present
in qcom-next or in the kernel topic branches.

Kernel repo: /local/mnt/workspace/sgaud/Qgenie/image_pipeline/kernel
qcom-next ref: 49dbe0dae5cfb7a1eb3434cde6fc7ba37924fe94
topics remote: topics -> https://github.com/qualcomm-linux/kernel-topics
topics fetch: fetched

Commit Subject qcom-next topics Final
1/1 [PATCH] FROMLIST: PCI: qcom: Add register dump support for PCIe Link partial - subject or partial tree evidence found, but full change was not verified missing - no subject, patch-id, or full tree-content match found partial

Final Status

overall_status: PARTIAL
present_commits: 0/1
partial_commits: 1/1
missing_commits: 0/1
topics_checked_for_commits: 1/1
final_summary: PR present in qcom-next/topics: Partial - 1/1 commit(s) only have partial integration evidence

@qlijarvis

Copy link
Copy Markdown

PR #941 — checker-log-analyzer

PR: #941
Checker run: https://github.com/qualcomm-linux/kernel-config/actions/runs/31574299551

Checker Result Summary
Checker Result Summary
checkpatch 1 style check: multiple blank lines
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check Passed
check-uapi-headers All UAPI headers backwards compatible
check-patch-compliance Content mismatch with lore link
tag-check Subject has valid FROMLIST: prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #941 - FROMLIST: PCI: qcom: Add register dump support for PCIe Link Down events
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/31574299551

Checker Result Summary
checkpatch 1 style check: multiple blank lines
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check Passed
check-uapi-headers All UAPI headers backwards compatible
check-patch-compliance Content mismatch with lore link
tag-check Subject has valid FROMLIST: prefix

❌ checkpatch

Root cause: Multiple consecutive blank lines at drivers/pci/controller/dwc/pcie-qcom.c:2012

Failure details:

CHECK: Please don't use multiple blank lines
#477: FILE: drivers/pci/controller/dwc/pcie-qcom.c:2012:
+
+

7c8dda592b711f988ea53d337deb16beeae39a72 total: 0 errors, 0 warnings, 1 checks, 448 lines checked
Commit 7c8dda592b71 ("FROMLIST: PCI: qcom: Add register dump support for PCIe Link Down events") has style problems, please review.

Fix: Remove one of the consecutive blank lines at line 2012 in drivers/pci/controller/dwc/pcie-qcom.c:2012

# Edit the file to remove the extra blank line
git add drivers/pci/controller/dwc/pcie-qcom.c
git commit --amend --no-edit

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git 8635749eab9a8a3a2e3533b2077d70c8b16857ba..7c8dda592b711f988ea53d337deb16beeae39a72

❌ check-patch-compliance

Root cause: The PR commit subject includes the FROMLIST: prefix, but the upstream lore patch does not have this prefix.

Failure details:

Checking commit: FROMLIST: PCI: qcom: Add register dump support for PCIe Link Down events
Change is different from the one mentioned in Link

The lore patch at https://lore.kernel.org/r/20260811-regdump-v1-1-f22db3fb37c2@oss.qualcomm.com has subject:

Subject: [PATCH] PCI: qcom: Add register dump support for PCIe Link Down events

But the PR commit has:

Subject: [PATCH] FROMLIST: PCI: qcom: Add register dump support for PCIe Link Down events

The FROMLIST: prefix is a Qualcomm internal convention and should not be part of the upstream patch subject. The checker compares the PR commit against the lore patch and detects this difference.

Fix: This is expected behavior for FROMLIST: patches in the Qualcomm kernel tree. The FROMLIST: prefix is added when integrating upstream patches into the vendor tree to track their origin. The content difference is limited to the subject line prefix only.

Verification: Compare the actual code changes (not the subject line):

b4 am --single-message -C -l -3 https://lore.kernel.org/r/20260811-regdump-v1-1-f22db3fb37c2@oss.qualcomm.com -o /tmp/lore-patch
# Compare only the diff content (excluding subject):
git format-patch -1 7c8dda592b711f988ea53d337deb16beeae39a72 --stdout | awk '/^diff/,/^--$/' > /tmp/pr-diff
awk '/^diff/,/^--$/' /tmp/lore-patch/*.mbx > /tmp/lore-diff
diff /tmp/pr-diff /tmp/lore-diff

If the only difference is the FROMLIST: prefix in the subject line, this is acceptable and expected for vendor tree integration.

Reproduce locally:

bash ../kernel-checkers/check-patch-compliance.sh --kernel-src . --base 8635749eab9a8a3a2e3533b2077d70c8b16857ba --head 7c8dda592b711f988ea53d337deb16beeae39a72

Verdict

2 issues to address:

  1. Blocker: Remove the extra blank line in pcie-qcom.c:2012 (checkpatch CHECK)
  2. Expected: The check-patch-compliance content mismatch is due to the FROMLIST: prefix, which is standard practice for integrating upstream patches into the Qualcomm vendor tree. Verify that the actual code changes match the lore patch exactly (excluding the subject prefix).

Recommendation: Fix the checkpatch style issue (extra blank line), then verify that the code content matches the upstream lore patch. The FROMLIST: prefix difference is expected and acceptable for vendor tree integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants