Skip to content

FROMLIST: phy: qcom: qmp-combo, usb: dwc3: qcom: carry live SS-link state for autonomous mode - #2433

Open
tapas-rana2811 wants to merge 3 commits into
qualcomm-linux:tech/bus/usb/allfrom
tapas-rana2811:tapar/cr-4730864-1358-ss-state-bus-all
Open

tapas-rana2811 wants to merge 3 commits into
qualcomm-linux:tech/bus/usb/allfrom
tapas-rana2811:tapar/cr-4730864-1358-ss-state-bus-all

Conversation

@tapas-rana2811

@tapas-rana2811 tapas-rana2811 commented Dec 1, 2026 •

Copy link
Copy Markdown

Combines the PHY-side and DWC3-side changes for live SuperSpeed-link state propagation used by QMP combo PHY autonomous mode. Previously split across two topic branches (tech/bus/usb/phy and tech/bus/usb/dwc) in #2264 and #2265; now that both land on tech/bus/usb/all, this is a single PR carrying the shared contract once plus both consumers:

  • Shared qcom_usb_ss_state submode contract (include/linux/phy/phy-qcom-qmp-usb-ss.h).
  • QMP combo PHY support to select LFPS detection only when a SuperSpeed link is confirmed present.
  • dwc3-qcom: read and pass the live SS-link state into the PHY at suspend entry.

CRs-Fixed: 4730864

Link: https://lore.kernel.org/all/20261106082716.128968-1-tapas.rana@oss.qualcomm.com/

Re-raised from #2264 and #2265, which closed because their base branches (tech/bus/usb/phy, tech/bus/usb/dwc) were removed. Same changes, combined and rebased onto tech/bus/usb/all.

…ract

dwc3 core only calls phy_set_mode()/phy_set_mode_ext() with the base
PHY_MODE_USB_HOST or PHY_MODE_USB_DEVICE. It never passes the
PHY_MODE_USB_{HOST,DEVICE}_SS/HS/FS/LS submode values to any PHY
driver. However, QMP PHY drivers need to know whether a SuperSpeed
link is present to select the correct autonomous-mode wake interrupt
mask, and phy_mode alone cannot carry that.

Add enum qcom_usb_ss_state (UNKNOWN/PRESENT/ABSENT) and carry it
through the existing submode argument of phy_set_mode_ext(), instead
of extending enum phy_mode further. UNKNOWN is the default so callers
that do not yet pass a real value keep current behavior.

Link: https://lore.kernel.org/all/20261106082716.128968-2-tapas.rana@oss.qualcomm.com/
Signed-off-by: Tapas Rana <tapas.rana@oss.qualcomm.com>
…is confirmed present

qmp_combo_enable_autonomous_mode() selects the autonomous-mode wake
interrupt mask by comparing qmp->phy_mode against
PHY_MODE_USB_HOST_SS/PHY_MODE_USB_DEVICE_SS. However, this driver's
set_mode() only ever stores PHY_MODE_USB_HOST or PHY_MODE_USB_DEVICE,
since dwc3 core and dwc3-qcom never pass the _SS variants. As a
result, the comparison is always false and the PHY always falls back
to the ARCVR_DTCT_EN | ARCVR_DTCT_EVENT_SEL mask instead of also
enabling ALFPS_DTCT_EN, regardless of whether a SuperSpeed device is
attached.

Store the qcom_usb_ss_state submode (added in the previous patch)
alongside phy_mode in qmp_combo_usb_set_mode(), and switch
qmp_combo_enable_autonomous_mode() on it instead of on phy_mode, so
LFPS detection is selected only when a SuperSpeed link is confirmed
present.

Link: https://lore.kernel.org/all/20261106082716.128968-3-tapas.rana@oss.qualcomm.com/
Signed-off-by: Tapas Rana <tapas.rana@oss.qualcomm.com>
@qlijarvis

Copy link
Copy Markdown

PR #2433 — validate-patch

PR: #2433

Verdict Issues Detailed Report
✅ 1 Full report

Final Summary

  1. Lore link present: Yes — all 3 commits have correct Link: tags
  2. Lore link matches PR commits: Yes — diff content faithful to lore for all 3 patches
  3. Upstream patch status: ⏳ Decision Pending — posted Nov 6, 2026; sashiko-bot review found no new issues; no maintainer ACK/NAK yet
  4. PR present in qcom-next/topics: Fail - 1/3 commit(s) are missing from both qcom-next and topics
Verdict: ✅ — click to expand

🔍 Patch Validation

PR: #2433
Upstream commits:

Commit Message

Check Status Note
Subject matches upstream ✅ All 3 patches have correct FROMLIST: prefix + upstream subject
Body preserves rationale ✅ Commit message bodies match lore patches
Fixes tag present/correct N/A No Fixes tags in upstream patches
Authorship preserved ✅ All patches authored by Tapas Rana, Signed-off-by present
Backport note (if applicable) N/A FROMLIST: patches, not backports

Diff

File Status Notes
include/linux/phy/phy-qcom-qmp-usb-ss.h ✅ New file, content matches lore patch 1
drivers/phy/qualcomm/phy-qcom-qmp-combo.c ✅ Changes match lore patch 2
drivers/usb/dwc3/dwc3-qcom.c ✅ Changes match lore patch 3

Issues

  • ⚠️ Integration presence: 1/3 commits missing from qcom-next/topics, 2/3 partial
    • Patch 1/3: missing from both qcom-next and topics
    • Patch 2/3: partial evidence in qcom-next (subject/partial tree), missing from topics
    • Patch 3/3: partial evidence in qcom-next (subject/partial tree), missing from topics

Verdict

Patches are faithful to upstream lore postings. All three commits correctly use FROMLIST: prefix, preserve original authorship, include Link: tags pointing to lore.kernel.org, and have diffs that match the upstream patches. However, the patches are not yet fully integrated into qcom-next or kernel-topics branches.

Final Summary

  1. Lore link present: Yes — all 3 commits have correct Link: tags
  2. Lore link matches PR commits: Yes — diff content faithful to lore for all 3 patches
  3. Upstream patch status: ⏳ Decision Pending — posted Nov 6, 2026; sashiko-bot review found no new issues; no maintainer ACK/NAK yet
  4. PR present in qcom-next/topics: ❌ Fail — 1/3 missing, 2/3 partial (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: 8fffe4778122b8d4fac6dd8396a2de99e05be00f
topics remote: topics -> https://github.com/qualcomm-linux/kernel-topics
topics fetch: fetched

Commit Subject qcom-next topics Final
1/3 [PATCH 1/3] FROMLIST: phy: qcom-qmp-usb-ss: add shared SS-link-state missing - no subject, patch-id, or full tree-content match found missing - no subject, patch-id, or full tree-content match found missing
2/3 [PATCH 2/3] FROMLIST: phy: qcom: qmp-combo: Select LFPS detect only 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
3/3 [PATCH 3/3] FROMLIST: usb: dwc3: qcom: pass live SS-link state into 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: FAIL
present_commits: 0/3
partial_commits: 2/3
missing_commits: 1/3
topics_checked_for_commits: 3/3
final_summary: PR present in qcom-next/topics: Fail - 1/3 commit(s) are missing from both qcom-next and topics

@qlijarvis

Copy link
Copy Markdown

PR #2433 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch ✅ All 3 commits passed with no style issues
dt-binding-check ⏭️ Skipped - no DT binding changes
dtb-check ⏭️ Skipped - no devicetree changes
sparse-check ✅ Passed - no static analysis warnings
check-uapi-headers ✅ Passed - no UAPI/ABI changes
check-patch-compliance ❌ Content mismatch on commit 3/3
tag-check ✅ All commits have valid FROMLIST: prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #2433 - FROMLIST: usb: dwc3: qcom: pass live SS-link state into PHY at suspend entry
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/46585567348

Checker Result Summary
checkpatch ✅ All 3 commits passed with no style issues
dt-binding-check ⏭️ Skipped - no DT binding changes
dtb-check ⏭️ Skipped - no devicetree changes
sparse-check ✅ Passed - no static analysis warnings
check-uapi-headers ✅ Passed - no UAPI/ABI changes
check-patch-compliance ❌ Content mismatch on commit 3/3
tag-check ✅ All commits have valid FROMLIST: prefix

❌ check-patch-compliance

Root cause: Commit a9206ee ("FROMLIST: usb: dwc3: qcom: pass live SS-link state into PHY at suspend entry") has content differences from the upstream patch referenced in its Link: trailer.

Failure details:

Checking commit: FROMLIST: usb: dwc3: qcom: pass live SS-link state into PHY at suspend entry
Change is different from the one mentioned in Link

The checker compared the PR commit against the lore.kernel.org patch at:
https://lore.kernel.org/all/20261106082716.128968-4-tapas.rana@oss.qualcomm.com/

and detected that the patch content differs from the upstream version.

Analysis:

This failure indicates one of the following scenarios:

  1. Legitimate adaptation — The patch was modified for the downstream tree (e.g., context differences, additional includes, or vendor-specific adjustments). If this is intentional, the commit message should document the changes with a note like:

    [ tapas: adapted for downstream - added vendor-specific XYZ ]
    
  2. Missing/extra hunks — The PR may be missing changes from the upstream patch, or may include additional changes not present upstream.

  3. Context-only shift — The checker may be flagging context line differences that don't affect the actual code changes (false positive).

Fix:

  1. Fetch the upstream patch and compare:

    b4 am --single-message -C -l -3 \
      https://lore.kernel.org/all/20261106082716.128968-4-tapas.rana@oss.qualcomm.com/ \
      -o /tmp/upstream
    
    # Compare the actual code changes (+/- lines only)
    diff <(git format-patch -1 a9206eefdcac --stdout | \
           awk '/^diff/,/^--$/' | grep -E '^[+-][^+-]') \
         <(awk '/^diff/,/^--$/' /tmp/upstream/*.mbx | grep -E '^[+-][^+-]')
  2. Classify the difference:

    • If context-only → No action needed; this is a checker limitation.
    • If legitimate adaptation → Add a note to the commit message documenting the change:
      git rebase -i <base_sha>  # mark commit as 'reword'
      # Add adaptation note before Signed-off-by:
      [ tapas: <describe the adaptation> ]
    • If missing hunk → Cherry-pick the missing changes from upstream.
    • If extra hunk → Either remove it or attribute it separately.
  3. Verify the Link URL is correct:

    • Ensure the Link: trailer points to the exact upstream patch (not a cover letter or different version).

Reproduce locally:

cd <kernel-tree>
git checkout a9206eefdcac
../kernel-checkers/check-patch-compliance.sh

Verdict

1 blocker to fix before merge: The content mismatch in commit 3/3 must be resolved. Either document the adaptation in the commit message, or align the patch content with the upstream version referenced in the Link: trailer.

All other checkers passed cleanly:

  • ✅ checkpatch: No coding style issues
  • ✅ sparse-check: No static analysis warnings
  • ✅ tag-check: All commits properly prefixed with FROMLIST:
  • ✅ UAPI/ABI: No breaking changes

…d entry

dwc3_qcom_suspend() puts each host port into autonomous/wake mode
without ever telling the PHY whether a SuperSpeed device is currently
attached. qmp_combo_enable_autonomous_mode(), made SS-aware in the
previous patch, therefore has no live signal to act on and always
sees QCOM_USB_SS_UNKNOWN, falling back to the legacy receiver-detect
mask regardless of actual link state.

Add dwc3_qcom_read_ss_state() to check each port's USB3 roothub for
an attached child device running at SuperSpeed or above, and pass the
result as the submode argument of phy_set_mode_ext() so the PHY can
select LFPS detection when appropriate.

Link: https://lore.kernel.org/all/20261106082716.128968-4-tapas.rana@oss.qualcomm.com/
Signed-off-by: Tapas Rana <tapas.rana@oss.qualcomm.com>
@tapas-rana2811
tapas-rana2811 force-pushed the tapar/cr-4730864-1358-ss-state-bus-all branch from a9206ee to aef9f27 Compare December 1, 2026 07:13
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.

2 participants