Skip to content

BACKPORT: PCI: qcom: Only check bridge nodes for PERST# GPIOs - #1468

Open
Hariharan Sreedhar (hariharan-sree) wants to merge 1 commit into
qualcomm-linux:qcom-6.18.yfrom
hariharan-sree:check-bridge-nodes-for-prest
Open

Hariharan Sreedhar (hariharan-sree) wants to merge 1 commit into
qualcomm-linux:qcom-6.18.yfrom
hariharan-sree:check-bridge-nodes-for-prest

Conversation

@hariharan-sree

Copy link
Copy Markdown

qcom_pcie_parse_perst() walks the PCIe hierarchy described in the device tree below its Root Port and collects the PERST# GPIOs from each bridge node so all PERST# lines can be driven in unison during controller bring-up, reset and power sequencing.

However, the recursive device tree walk currently visits every available child node without checking that it is a PCI bridge. This allows the walk to leave the PCI hierarchy and collect reset lines from children of PCI Endpoint nodes, where those reset lines belong to other drivers.

This is reproducible on the Qualcomm RB3Gen2, where a Renesas uPD720201 USB host controller sits behind a PCIe switch downstream port. A Genesys GL3590 USB hub connected to that controller is described as a child of the PCI endpoint:

pcie@2,0 {
	device_type = "pci";

	usb-controller@0,0 {
		compatible = "pci1912,0014";

		hub@1 {
			compatible = "usb5e3,610";
			reset-gpios = <&tlmm 162 GPIO_ACTIVE_HIGH>;
		};
	};
};

The USB controller is a PCI Endpoint, and not a bridge, but the PERST# walk descends through it and incorrectly claims the hub's reset GPIO:

$ gpioinfo
line 162: unnamed output consumer=PERST#

As a result, the onboard-usb-dev driver cannot acquire its reset GPIO during probe:

onboard-usb-dev 1c08000.pcie:...:usb-controller@0,0:hub@1: \
  error -EBUSY: failed to get reset GPIO
onboard-usb-dev 1c08000.pcie:...:usb-controller@0,0:hub@1: \
  probe with driver onboard-usb-dev failed with error -16

The GPIO is also added to the root port's PERST# list and is asserted and deasserted as part of PCIe reset sequencing. On the RB3Gen2 this causes the USB hub to repeatedly re-enumerate:

[  116.479598] hub 2-1:1.0: USB hub found
[  116.488601] hub 2-1:1.0: USB hub found
[  116.496971] hub 2-1:1.0: USB hub found
...

This disrupts the hub and devices connected to it.

Restrict the recursive walk to children with device_type "pci", so PERST# GPIOs are collected only from PCI bridge nodes and the walk does not descend through endpoints.

qocm_pcie_parse_ports() has made the same distinction since commit 45df229 ("PCI: qcom: Restrict port parsing only to PCIe bridge child nodes"), but the PERST# walk added later did not carry over that check.

This bug is distinct from commit 3edb3a0 ("PCI: qcom: Skip PERST# GPIOs provided by downstream PCIe devices"), which filters PERST# GPIOs based on their provider. Here the GPIO is provided by the SoC TLMM; the bug is that reset-gpios is consumed from a non-bridge node at all.

Fixes: 2fd60a2 ("PCI: qcom: Parse PERST# from all PCIe bridge nodes")

Reviewed-by: Krishna Chaitanya Chundru krishna.chundru@oss.qualcomm.com
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260829-wip-obbardc-drivers-pcie-qcom-rb3gen2-usb-fix-v1-1-337821131a99@oss.qualcomm.com

CRs-fixed: 4748254

@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No Change Task Found

No associated change tasks found for CR 4748254 on any of the following entities:

Entities:

  • kernel.qli.2.0

CR: 4748254

Please ensure the CR has a change task associated with at least one of the entities for this branch.

@shashim-quic

Copy link
Copy Markdown

Merge Check Failed: No Change Task Found

No associated change tasks found for CR 4748254 on any of the following entities:

Entities:

  • kernel.qli.2.0

CR: 4748254

Please ensure the CR has a change task associated with at least one of the entities for this branch.

Hariharan Sreedhar (@hariharan-sree) please take care of this.

@qlijarvis

Copy link
Copy Markdown

PR #1468 — validate-patch

PR: #1468

Verdict Issues Detailed Report
⚠️ 0 Full report

Final Summary

  1. Lore link present: Yes - https://patch.msgid.link/20260829-wip-obbardc-drivers-pcie-qcom-rb3gen2-usb-fix-v1-1-337821131a99@oss.qualcomm.com
  2. Lore link matches PR commits: Cannot verify - lore fetch failed (Jarvis reported "no lore.kernel.org Link tags found" despite Link: tag being present in commit message)
  3. Upstream patch status: Cannot verify - lore evidence not available; Link: tag suggests patch was posted to mailing list
  4. PR present in qcom-next/topics: Yes - all 1 commit(s) are present in qcom-next or topics
Verdict: ⚠️ — click to expand

🔍 Patch Validation

PR: #1468 - BACKPORT: PCI: qcom: Only check bridge nodes for PERST# GPIOs
Upstream commit: https://patch.msgid.link/20260829-wip-obbardc-drivers-pcie-qcom-rb3gen2-usb-fix-v1-1-337821131a99@oss.qualcomm.com
Verdict: ⚠️ PARTIAL

Commit Message

Check Status Note
Subject matches upstream ⚠️ Cannot verify - lore fetch failed; BACKPORT: prefix present
Body preserves rationale ⚠️ Cannot verify - lore fetch failed; commit body is comprehensive
Fixes tag present/correct ✅ Fixes: 2fd60a2 present
Authorship preserved ⚠️ Cannot verify - lore fetch failed; From: Christopher Obbard present
Backport note (if applicable) ❌ Missing [ upstream commit <sha> ] note required for BACKPORT: prefix

Diff

File Status Notes
drivers/pci/controller/dwc/pcie-qcom.c ⚠️ Cannot verify against upstream - lore fetch failed; diff adds device_type check

Issues

  1. Missing backport note: BACKPORT: prefix requires [ upstream commit <sha> ] or equivalent note in commit body to identify the upstream source commit
  2. Lore fetch failure: Jarvis reported "no lore.kernel.org Link tags found" but Link: tag is present in commit message at line 77; upstream comparison could not be performed
  3. Date anomaly: Commit date is "Sat, 29 Aug 2026" (future date) - likely a typo; should be 2024 or 2025

Verdict

Cannot fully validate - lore evidence was not fetched despite Link: tag being present. Commit message structure is correct but missing required backport note. Request correction of backport note before merge.

Final Summary

  1. Lore link present: Yes - https://patch.msgid.link/20260829-wip-obbardc-drivers-pcie-qcom-rb3gen2-usb-fix-v1-1-337821131a99@oss.qualcomm.com
  2. Lore link matches PR commits: Cannot verify - lore fetch failed (Jarvis reported "no lore.kernel.org Link tags found" despite Link: tag being present in commit message)
  3. Upstream patch status: Cannot verify - lore evidence not available; Link: tag suggests patch was posted to mailing list
  4. PR present in qcom-next/topics: Yes - commit present in qcom-next at 1b3b0bc (exact patch-id match 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: 7c0b6150bd83144b578c83e2d693f4459a8dc04a
topics remote: topics -> https://github.com/qualcomm-linux/kernel-topics
topics fetch: fetched

Commit Subject qcom-next topics Final
1/1 [PATCH] BACKPORT: PCI: qcom: Only check bridge nodes for PERST# GPIOs present - exact patch-id match at 1b3b0bc skipped - not checked because qcom-next already contains the change present

Final Status

overall_status: PASS
present_commits: 1/1
partial_commits: 0/1
missing_commits: 0/1
topics_checked_for_commits: 0/1
final_summary: PR present in qcom-next/topics: Yes - all 1 commit(s) are present in qcom-next or topics

@qlijarvis

Copy link
Copy Markdown

PR #1468 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch ❌ 2 warnings: unknown commit IDs in commit message
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check ✅ Passed
check-uapi-headers ✅ Passed
check-patch-compliance ✅ Passed
tag-check ✅ Subject has valid BACKPORT: prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1468 - BACKPORT: PCI: qcom: Only check bridge nodes for PERST# GPIOs
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/44069221191
Target branch: qcom-6.18.y

Checker Result Summary
checkpatch ❌ 2 warnings: unknown commit IDs in commit message
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check ✅ Passed
check-uapi-headers ✅ Passed
check-patch-compliance ✅ Passed
tag-check ✅ Subject has valid BACKPORT: prefix

❌ checkpatch

Root cause: Commit message references two upstream commit IDs that are not present in the qcom-6.18.y branch history.

Failure details:

WARNING: Unknown commit id '3edb3a038d42', maybe rebased or not pulled?
#68: 
This bug is distinct from commit 3edb3a038d42 ("PCI: qcom: Skip PERST#

WARNING: Unknown commit id '2fd60a2edb83', maybe rebased or not pulled?
#73: 
Fixes: 2fd60a2edb83 ("PCI: qcom: Parse PERST# from all PCIe bridge nodes")

c8c8eb472a60e6e6aec980d5a9fe398147b2ba27 total: 0 errors, 2 warnings, 0 checks, 17 lines checked

Analysis:

This is a BACKPORT commit targeting the qcom-6.18.y stable branch. The warnings are expected because:

  1. Commit 3edb3a038d42 is referenced in the commit body (line 68) to distinguish this bug from a different issue
  2. Commit 2fd60a2edb83 is referenced in the Fixes: tag (line 73) as the upstream commit that introduced the bug

Both commits exist in mainline Linux but are not present in the qcom-6.18.y branch history. This is normal for backport commits — they reference upstream commit IDs that may not exist in the target stable branch.

Verdict: These warnings are informational only and do not block the merge. The commit message correctly documents the upstream context and the Fixes: tag properly identifies the upstream commit that introduced the bug.

Fix: No action required. These warnings are expected for backport commits and do not indicate a defect.

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git 6748acc4fe43c27db4428c36f2d3218bdba99f46..c8c8eb472a60e6e6aec980d5a9fe398147b2ba27

Verdict

Ready to merge. The checkpatch warnings are informational only and expected for backport commits that reference upstream commit IDs not present in the stable branch. All other checkers passed successfully.

@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: CR Not Eligible for Merge

CR 4748254 is not eligible for merge.

The parent software image for kernel.qli.2.0 is not development complete.

Entity: kernel.qli.2.0
CR: 4748254
Reason: CR_CANNOT_MERGE

Please ensure the CR passes both CCT (ComponentChangeTasks) and ICT (Integration Change Tasks) validations.

qcom_pcie_parse_perst() walks the PCIe hierarchy described in the device
tree below its Root Port and collects the PERST# GPIOs from each bridge
node so all PERST# lines can be driven in unison during controller
bring-up, reset and power sequencing.

However, the recursive device tree walk currently visits every available
child node without checking that it is a PCI bridge. This allows the walk
to leave the PCI hierarchy and collect reset lines from children of PCI
Endpoint nodes, where those reset lines belong to other drivers.

This is reproducible on the Qualcomm RB3Gen2, where a Renesas uPD720201
USB host controller sits behind a PCIe switch downstream port. A Genesys
GL3590 USB hub connected to that controller is described as a child of
the PCI endpoint:

	pcie@2,0 {
		device_type = "pci";

		usb-controller@0,0 {
			compatible = "pci1912,0014";

			hub@1 {
				compatible = "usb5e3,610";
				reset-gpios = <&tlmm 162 GPIO_ACTIVE_HIGH>;
			};
		};
	};

The USB controller is a PCI Endpoint, and not a bridge, but the PERST#
walk descends through it and incorrectly claims the hub's reset GPIO:

	$ gpioinfo
	line 162: unnamed output consumer=PERST#

As a result, the onboard-usb-dev driver cannot acquire its reset GPIO
during probe:

	onboard-usb-dev 1c08000.pcie:...:usb-controller@0,0:hub@1: \
	  error -EBUSY: failed to get reset GPIO
	onboard-usb-dev 1c08000.pcie:...:usb-controller@0,0:hub@1: \
	  probe with driver onboard-usb-dev failed with error -16

The GPIO is also added to the root port's PERST# list and is asserted
and deasserted as part of PCIe reset sequencing. On the RB3Gen2 this
causes the USB hub to repeatedly re-enumerate:

	[  116.479598] hub 2-1:1.0: USB hub found
	[  116.488601] hub 2-1:1.0: USB hub found
	[  116.496971] hub 2-1:1.0: USB hub found
	...

This disrupts the hub and devices connected to it.

Restrict the recursive walk to children with device_type "pci", so
PERST# GPIOs are collected only from PCI bridge nodes and the walk
does not descend through endpoints.

qocm_pcie_parse_ports() has made the same distinction since
commit 45df229 ("PCI: qcom: Restrict port parsing only to PCIe
bridge child nodes"), but the PERST# walk added later did not carry over
that check.

This bug is distinct from commit cf30f5f ("PCI: qcom: Skip PERST#
GPIOs provided by downstream PCIe devices"), which filters PERST# GPIOs
based on their provider. Here the GPIO is provided by the SoC TLMM; the
bug is that reset-gpios is consumed from a non-bridge node at all.

Fixes: 9f7ba84 ("PCI: qcom: Parse PERST# from all PCIe bridge nodes")
Signed-off-by: Christopher Obbard <chris.obbard@oss.qualcomm.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Reviewed-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260829-wip-obbardc-drivers-pcie-qcom-rb3gen2-usb-fix-v1-1-337821131a99@oss.qualcomm.com
@qlijarvis

Copy link
Copy Markdown

PR #1468 — validate-patch

PR: #1468

Verdict Issues Detailed Report
⚠️ 3 Full report

Final Summary

  1. Lore link present: Yes — patch.msgid.link URL found (valid lore redirect, but not recognized by Jarvis fetch logic)
  2. Lore link matches PR commits: Cannot verify — lore patch not fetched due to URL format not being recognized
  3. Upstream patch status: Cannot verify — lore thread not fetched; cannot determine if ACKed/NACKed/Pending
  4. PR present in qcom-next/topics: Yes - all 1 commit(s) are present in qcom-next or topics
Verdict: ⚠️ — click to expand

🔍 Patch Validation

PR: #1468 — BACKPORT: PCI: qcom: Only check bridge nodes for PERST# GPIOs
Upstream commit: https://patch.msgid.link/20260829-wip-obbardc-drivers-pcie-qcom-rb3gen2-usb-fix-v1-1-337821131a99@oss.qualcomm.com
Verdict: ⚠️ PARTIAL

Commit Message

Check Status Note
Subject matches upstream ⚠️ Cannot verify — lore patch not fetched (patch.msgid.link not recognized by Jarvis)
Body preserves rationale ⚠️ Cannot verify — lore patch not fetched
Fixes tag present/correct ✅ Fixes: 9f7ba84c579b present
Authorship preserved ⚠️ Cannot verify — lore patch not fetched; From: is Christopher Obbard, appropriate for BACKPORT
Backport note (if applicable) ❌ Missing [ upstream commit <sha> ] note in commit body

Diff

File Status Notes
drivers/pci/controller/dwc/pcie-qcom.c ⚠️ Cannot verify against upstream — lore patch not fetched

Issues

  • Missing backport note: BACKPORT commits should include [ upstream commit <sha> ] or equivalent in the commit body to reference the original upstream commit SHA
  • Lore link format: The Link tag uses patch.msgid.link instead of lore.kernel.org/r/<message-id>. While patch.msgid.link is a valid redirect service, using the canonical lore.kernel.org format is preferred for consistency
  • Cannot verify diff faithfulness: Without the fetched lore patch, cannot confirm the diff is identical to upstream or verify if adaptations are legitimate

Verdict

Cannot fully validate — lore patch was not fetched because Jarvis only recognized literal lore.kernel.org URLs and did not handle the patch.msgid.link redirect. The commit message structure is correct for a BACKPORT, but is missing the required [ upstream commit <sha> ] backport note. The commit is already present in qcom-next, suggesting it has been reviewed and merged.

Final Summary

  1. Lore link present: Yes — patch.msgid.link URL found (valid lore redirect, but not recognized by Jarvis fetch logic)
  2. Lore link matches PR commits: Cannot verify — lore patch not fetched due to URL format not being recognized
  3. Upstream patch status: Cannot verify — lore thread not fetched; cannot determine if ACKed/NACKed/Pending
  4. PR present in qcom-next/topics: Yes — present in qcom-next at 1b3b0bc2b3672e928e06997444528f8797579eb2 (exact patch-id match)

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: 8fffe4778122b8d4fac6dd8396a2de99e05be00f
topics remote: topics -> https://github.com/qualcomm-linux/kernel-topics
topics fetch: fetched

Commit Subject qcom-next topics Final
1/1 [PATCH] BACKPORT: PCI: qcom: Only check bridge nodes for PERST# GPIOs present - exact patch-id match at 1b3b0bc skipped - not checked because qcom-next already contains the change present

Final Status

overall_status: PASS
present_commits: 1/1
partial_commits: 0/1
missing_commits: 0/1
topics_checked_for_commits: 0/1
final_summary: PR present in qcom-next/topics: Yes - all 1 commit(s) are present in qcom-next or topics

@qlijarvis

Copy link
Copy Markdown

PR #1468 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch ❌ 1 error, 1 warning: commit reference and Fixes: tag missing UPSTREAM: prefix
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check ✅ Passed
check-uapi-headers ✅ Passed
check-patch-compliance ✅ Passed
tag-check ✅ Subject has valid BACKPORT: prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1468 - BACKPORT: PCI: qcom: Only check bridge nodes for PERST# GPIOs
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/46597372794
Target branch: qcom-6.18.y

Checker Result Summary
checkpatch ❌ 1 error, 1 warning: commit reference and Fixes: tag missing UPSTREAM: prefix
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check ✅ Passed
check-uapi-headers ✅ Passed
check-patch-compliance ✅ Passed
tag-check ✅ Subject has valid BACKPORT: prefix

❌ checkpatch

Root cause: Commit references in the commit message body lack the UPSTREAM: prefix that checkpatch expects for backported patches.

Failure details:

ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' 
  - ie: 'commit cf30f5f18429 ("UPSTREAM: PCI: qcom: Skip PERST# GPIOs provided by downstream PCIe devices")'
#68: 
This bug is distinct from commit cf30f5f18429 ("PCI: qcom: Skip PERST#
GPIOs provided by downstream PCIe devices"), which filters PERST# GPIOs

WARNING: Please use correct Fixes: style 'Fixes: <12+ chars of sha1> ("<title line>")' 
  - ie: 'Fixes: 9f7ba84c579b ("UPSTREAM: PCI: qcom: Parse PERST# from all PCIe bridge nodes")'
#73: 
Fixes: 9f7ba84c579b ("PCI: qcom: Parse PERST# from all PCIe bridge nodes")

Analysis:

The commit message references two upstream commits:

  1. Line 68: commit cf30f5f18429 ("PCI: qcom: Skip PERST# GPIOs provided by downstream PCIe devices")
  2. Line 73 (Fixes tag): Fixes: 9f7ba84c579b ("PCI: qcom: Parse PERST# from all PCIe bridge nodes")

Both commit titles are missing the UPSTREAM: prefix that checkpatch expects when referencing commits in a BACKPORT: patch. This is a style requirement specific to the Qualcomm kernel tree to maintain consistency in how upstream commits are referenced.

Fix:

Update the commit message to add UPSTREAM: prefix to both commit references:

git rebase -i 67052fb51b10   # mark commit 33f76487e5f8 as 'edit'
git commit --amend
# Edit the commit message:
#   Line 68: commit cf30f5f18429 ("UPSTREAM: PCI: qcom: Skip PERST# GPIOs provided by downstream PCIe devices")
#   Line 73: Fixes: 9f7ba84c579b ("UPSTREAM: PCI: qcom: Parse PERST# from all PCIe bridge nodes")
git rebase --continue

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git 67052fb51b10..33f76487e5f8

Verdict

1 blocker to fix before merge: Update commit message to add UPSTREAM: prefix to the two commit references (line 68 and line 73). This is a trivial metadata fix that does not affect the code change itself.

All other checkers passed cleanly. The code change is correct and the BACKPORT: prefix is properly applied to the subject line.

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.

4 participants