Skip to content

Fix usb crash in qualcomm platforms - #1898

Merged
Pratham Pratap (ppratap-liveroot) merged 2 commits into
qualcomm-linux:tech/bus/usb/dwcfrom
Kriskura176767:fix-usb-crash
Sep 24, 2026
Merged

Pratham Pratap (ppratap-liveroot) merged 2 commits into
qualcomm-linux:tech/bus/usb/dwcfrom
Kriskura176767:fix-usb-crash

Conversation

@Kriskura176767

@Kriskura176767 Kriskura176767 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Fix usb crash in qualcomm platforms

Revert HEAD on dwc branch causing regression.

Add: https://lore.kernel.org/all/20260914-xhci-skip-phy-init-v1-1-9c46b31a5a39@oss.qualcomm.com/

CRs-Fixed: 4688400

…core

DWC3 driver does manage phys itself sufficiently for Qualcomm platforms.
If xhci-skip-phy-init is not set, the HCD core does a phy_init and phy_
exit is done only when roothub is being destroyed. Due to this, during
system suspend in host mode, although phy_exit is done by DWC3 core, the
init_count on phy is never down to zero since HCD core also did an init.
consequently causing phy's exit routine to not be called. Hence, add
support to skip phy management by USB core.

Some Exynos platforms still do rely on USB core for phy_calibrate calls,
hence disable USB core management for Qualcomm platforms only.

Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
Link: https://lore.kernel.org/all/20260914-xhci-skip-phy-init-v1-1-9c46b31a5a39@oss.qualcomm.com/
@qswat-orbit-external

Copy link
Copy Markdown

Dev Completion validation failed

CR: 4688400
Change Task: kernel.qli.0.0
Error: GenAI Assisted field must be set before moving change tasks to Development Complete. Please provide GenAI information.

The change task for this CR could not be moved to Dev Complete because of the error above. Please resolve the issue in Orbit and re-run the failed Orbit check.

@qcomlnxci
qcomlnxci requested review from a team, Pratham Pratap (ppratap-liveroot) and wcheng-eng and removed request for a team September 24, 2026 06:47

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ppratap-liveroot
Pratham Pratap (ppratap-liveroot) merged commit 6f24600 into qualcomm-linux:tech/bus/usb/dwc Sep 24, 2026
3 of 7 checks passed
@Kriskura176767
Kriskura176767 deleted the fix-usb-crash branch September 28, 2026 12:57
@qlijarvis

Copy link
Copy Markdown

🔨 Build Failure Analysis — PR #1898

PR: #1898
Build run: https://github.com/qualcomm-linux/kernel-config/actions/runs/35966197374

# Error File:Line PR-introduced? Root Cause
1 Merge conflict during automerge drivers/usb/dwc3/dwc3-qcom.c Yes PR reverts and re-adds overlapping code in dwc3-qcom.c, conflicting with existing changes in topic/tech/bus/usb/dwc branch

Verdict

The build failure is a merge conflict introduced by this PR during the automerge integration step, not a compilation error. The PR's revert-then-reimplement approach conflicts with existing changes in the topic/tech/bus/usb/dwc integration branch.

📎 Detailed analysis: Full report

@qlijarvis

Copy link
Copy Markdown

🔨 Build Failure Analysis — PR #1898

PR: #1898
Build run: https://github.com/qualcomm-linux/kernel-config/actions/runs/35966197374

# Error File:Line PR-introduced? Root Cause
1 Merge conflict during automerge drivers/usb/dwc3/dwc3-qcom.c Yes PR reverts and re-applies overlapping changes to the same file, causing conflict with topic/tech/bus/usb/dwc branch

Verdict

This is a merge conflict, not a compilation error. The PR introduces a merge conflict by reverting commit 590cde5 and then re-implementing the same functionality differently, which conflicts with existing changes in the integration branch.

📎 Detailed analysis: Full report

@qlijarvis

Copy link
Copy Markdown

PR #1898 — validate-patch

PR: #1898

Verdict Issues Detailed Report
❌ 18 Full report

Final Summary

  1. Lore link present: Yes - https://lore.kernel.org/all/20260914-xhci-skip-phy-init-v1-1-9c46b31a5a39@oss.qualcomm.com/ but message-ID mismatch with provided lore evidence
  2. Lore link matches PR commits: No - PR implements a completely different approach (5-file core dwc3 property system) vs lore patch (single-file software node approach). The code changes are semantically different.
  3. Upstream patch status: ✅ ACKed - Thinh Nguyen (maintainer) provided Acked-by on September 23, 2026 for the July 23 posting
  4. PR present in qcom-next/topics: Yes - all 2 commit(s) are present in qcom-next or topics

Recommendation: The PR author should either:

  1. Update the Link tag to reference the correct lore posting that matches the actual implementation in the PR, OR
  2. Replace commit 2/2 with a faithful backport of the July 23 lore patch (software node approach), OR
  3. If this is intentionally a different implementation, change the prefix from FROMLIST: to QCLINUX: or add a clear note explaining why the implementation differs from upstream
Verdict: ❌ — click to expand

🔍 Patch Validation

PR: #1898 - Revert and re-apply FROMLIST: usb: dwc3: qcom: Add support to skip phy management by USB core
Upstream commit: https://lore.kernel.org/all/20260914-xhci-skip-phy-init-v1-1-9c46b31a5a39@oss.qualcomm.com/
Verdict: ❌ FAIL

Commit Message

Check Status Note
Subject matches upstream ❌ Commit 2/2: Subject differs significantly - lore has single-file change, PR has 5-file change
Body preserves rationale ✅ Core rationale preserved
Fixes tag present/correct N/A No Fixes tag in upstream
Authorship preserved ✅ Author matches: Krishna Kurapati
Backport note (if applicable) N/A FROMLIST prefix used correctly

Diff

File Status Notes
drivers/usb/dwc3/dwc3-qcom.c ❌ CRITICAL MISMATCH - Lore patch adds dwc3_qcom_set_swnode() function and #include <linux/property.h>. PR removes these and uses completely different implementation via probe_data.properties.skip_phy_init = true
drivers/usb/dwc3/core.c ❌ NOT IN LORE - PR adds new code not present in upstream patch
drivers/usb/dwc3/core.h ❌ NOT IN LORE - PR adds new field not present in upstream patch
drivers/usb/dwc3/glue.h ❌ NOT IN LORE - PR adds new field not present in upstream patch
drivers/usb/dwc3/host.c ❌ NOT IN LORE - PR adds new code not present in upstream patch

Issues

CRITICAL: Semantic divergence from upstream

The PR commit 2/2 claims to be FROMLIST: but implements a completely different approach than the lore patch:

Lore patch approach (July 23, 2026):

  • Single file change: drivers/usb/dwc3/dwc3-qcom.c
  • Adds dwc3_qcom_set_swnode() helper function
  • Uses device_create_managed_software_node() to set xhci-skip-phy-init-quirk property
  • Adds #include <linux/property.h>

PR commit 2/2 approach (September 14, 2026):

  • Five file changes across dwc3 core
  • Adds new skip_phy_init field to struct dwc3 and struct dwc3_properties
  • Propagates property through dwc3_get_software_properties() → dwc3_host_init()
  • Sets property in dwc3_qcom_probe() via probe_data.properties.skip_phy_init = true
  • Does NOT use software node approach at all

Message-ID mismatch:

  • PR Link tag references: 20260914-xhci-skip-phy-init-v1-1-9c46b31a5a39@oss.qualcomm.com (September 14)
  • Lore mbox shows original posting: 20260723-dwc3-skip-init-quirk-v1-1-97682bb44ebd@oss.qualcomm.com (July 23)
  • These are different patch series with different message IDs and different dates

Upstream status inconsistency:

  • Lore patch (July 23) received Acked-by: Thinh Nguyen on September 23, 2026
  • PR claims to be from September 14, 2026 posting
  • The September 14 message-ID in the PR Link tag does not match the July 23 lore evidence provided

Commit 1/2 (Revert) issue:

  • Reverts commit 590cde5f7fa5 which appears to be the software-node approach
  • But commit 2/2 then applies a different implementation, not the original
  • This creates confusion about what is actually being applied

Verdict

❌ REJECT - This PR cannot be merged as-is. The commit labeled FROMLIST: does not faithfully represent the upstream lore patch. The implementation approach is fundamentally different (core dwc3 property propagation vs. qcom-specific software node), and the Link tag references a different message-ID than the lore evidence provided.

Final Summary

  1. Lore link present: Yes - https://lore.kernel.org/all/20260914-xhci-skip-phy-init-v1-1-9c46b31a5a39@oss.qualcomm.com/ but message-ID mismatch with provided lore evidence
  2. Lore link matches PR commits: No - PR implements a completely different approach (5-file core dwc3 property system) vs lore patch (single-file software node approach). The code changes are semantically different.
  3. Upstream patch status: ✅ ACKed - Thinh Nguyen (maintainer) provided Acked-by on September 23, 2026 for the July 23 posting
  4. PR present in qcom-next/topics: Yes - both commits present per integration_presence_report.md (commit 1/2 at 386485a, commit 2/2 at 6f24600)

Recommendation: The PR author should either:

  1. Update the Link tag to reference the correct lore posting that matches the actual implementation in the PR, OR
  2. Replace commit 2/2 with a faithful backport of the July 23 lore patch (software node approach), OR
  3. If this is intentionally a different implementation, change the prefix from FROMLIST: to QCLINUX: or add a clear note explaining why the implementation differs from upstream

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

Commit Subject qcom-next topics Final
1/2 [PATCH 1/2] Revert "FROMLIST: usb: dwc3: qcom: Add support to skip missing - no subject, patch-id, or full tree-content match found present - exact patch-id match at 386485a present
2/2 [PATCH 2/2] FROMLIST: usb: dwc3: qcom: Add support to skip phy partial - subject or partial tree evidence found, but full change was not verified present - exact patch-id match at 6f24600 present

Final Status

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

@qlijarvis

Copy link
Copy Markdown

PR #1898 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch ⏭️ Not executed - automerge failed
dt-binding-check ⏭️ Not executed - automerge failed
dtb-check ⏭️ Not executed - automerge failed
sparse-check ⏭️ Not executed - automerge failed
check-uapi-headers ⏭️ Not executed - automerge failed
check-patch-compliance ⏭️ Not executed - automerge failed
tag-check N/A Topic branch - prefix check not applicable
automerge ❌ Merge conflict during integration

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1898 - Revert and reapply "usb: dwc3: qcom: Add support to skip phy management by USB core"
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/35966197384

Checker Result Summary
checkpatch ⏭️ Not executed - automerge failed
dt-binding-check ⏭️ Not executed - automerge failed
dtb-check ⏭️ Not executed - automerge failed
sparse-check ⏭️ Not executed - automerge failed
check-uapi-headers ⏭️ Not executed - automerge failed
check-patch-compliance ⏭️ Not executed - automerge failed
tag-check N/A Topic branch - prefix check not applicable
automerge ❌ Merge conflict during integration

❌ automerge — Integration Failure

Root cause: Merge conflict in drivers/usb/dwc3/dwc3-qcom.c when integrating topic branch tech/bus/usb/dwc with qcom-next baseline.

Failure details:

** Merging topic branch: topic/tech/bus/usb/dwc
Auto-merging drivers/usb/dwc3/core.c
Auto-merging drivers/usb/dwc3/core.h
Auto-merging drivers/usb/dwc3/dwc3-qcom.c
CONFLICT (content): Merge conflict in drivers/usb/dwc3/dwc3-qcom.c
Auto-merging drivers/usb/dwc3/host.c
Automatic merge failed; fix conflicts and then commit the result.

Analysis:

This PR contains two commits:

  1. Patch 1/2: Revert of commit 590cde5f7fa5 ("FROMLIST: usb: dwc3: qcom: Add support to skip phy management by USB core")
  2. Patch 2/2: Re-application of the same feature with a different implementation approach

The conflict occurs because:

  • The original commit being reverted (Patch 1/2) used device_create_managed_software_node() to set the xhci-skip-phy-init-quirk property
  • The new implementation (Patch 2/2) uses a different approach via dwc->skip_phy_init flag in the DWC3 core
  • The qcom-next baseline likely contains changes to drivers/usb/dwc3/dwc3-qcom.c that conflict with the revert

Fix:

The conflict must be resolved manually. The resolution strategy depends on what changes exist in qcom-next:

  1. Identify conflicting changes in qcom-next:

    git clone https://github.com/qualcomm-linux/kernel.git
    cd kernel
    git checkout qcom-next
    git log --oneline --all --grep="dwc3-qcom" -- drivers/usb/dwc3/dwc3-qcom.c | head -20
  2. Resolve the conflict:

    # Fetch the PR branch
    git fetch https://github.com/qualcomm-linux/kernel-topics.git tech/bus/usb/dwc
    git checkout qcom-next
    git merge FETCH_HEAD
    
    # Manually edit drivers/usb/dwc3/dwc3-qcom.c to resolve conflicts
    # Strategy: Accept the PR's changes (remove the old swnode approach, keep the new skip_phy_init approach)
    
    git add drivers/usb/dwc3/dwc3-qcom.c
    git commit
  3. Alternative - Rebase the topic branch:

    git checkout tech/bus/usb/dwc
    git rebase qcom-next
    # Resolve conflicts during rebase
    git rebase --continue

Reproduce locally:

git clone https://github.com/qualcomm-linux/kernel.git
cd kernel
git fetch origin qcom-next
git checkout qcom-next
git fetch https://github.com/qualcomm-linux/kernel-topics.git tech/bus/usb/dwc:topic-branch
git merge topic-branch
# Conflict will appear in drivers/usb/dwc3/dwc3-qcom.c

📋 Patch Content Summary

Patch 1/2: Revert "FROMLIST: usb: dwc3: qcom: Add support to skip phy management by USB core"

  • Removes dwc3_qcom_set_swnode() function
  • Removes #include <linux/property.h>
  • Removes call to dwc3_qcom_set_swnode() in probe function

Patch 2/2: FROMLIST: usb: dwc3: qcom: Add support to skip phy management by USB core

Subject prefix check: Both commits have valid FROMLIST: prefixes (Patch 1 is a revert of a FROMLIST commit, Patch 2 is a new FROMLIST commit).


Verdict

❌ Cannot merge - automerge conflict must be resolved first.

Blockers:

  1. Merge conflict in drivers/usb/dwc3/dwc3-qcom.c prevents integration with qcom-next

Next steps:

  1. Investigate what changes in qcom-next conflict with this revert+reapply
  2. Manually resolve the conflict by choosing the correct resolution strategy
  3. Either:
    • Rebase the topic branch on top of current qcom-next, OR
    • Update the PR to account for conflicting changes in qcom-next
  4. Re-trigger CI after conflict resolution

Note: All kernel-checker jobs (checkpatch, dt-binding-check, dtb-check, sparse-check, check-uapi-headers, check-patch-compliance) were skipped because the automerge step failed. These checks will run automatically once the merge conflict is resolved.

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