Skip to content

phy: qcom: qmp-combo: Select LFPS detect only when SS link is confirm… - #1358

Open
tapas-rana2811 wants to merge 1 commit into
qualcomm-linux:qcom-6.18.yfrom
tapas-rana2811:tapar/phy-autonomous-mode-detection
Open

tapas-rana2811 wants to merge 1 commit into
qualcomm-linux:qcom-6.18.yfrom
tapas-rana2811:tapar/phy-autonomous-mode-detection

Conversation

@tapas-rana2811

Copy link
Copy Markdown

…ed present

qmp_combo_enable_autonomous_mode() picks the autonomous-mode wake
interrupt mask by comparing qmp->phy_mode against
PHY_MODE_USB_HOST_SS/PHY_MODE_USB_DEVICE_SS. This combo phy's
set_mode() only ever stores PHY_MODE_USB_HOST or PHY_MODE_USB_DEVICE
(dwc3 core and dwc3-qcom never pass the _SS/_HS/_FS/_LS variants to
this driver), so the comparison is always false and the phy is stuck
selecting ARCVR_DTCT_EN | ARCVR_DTCT_EVENT_SEL regardless of whether a
SuperSpeed device is actually attached, instead of using LFPS
detection (ALFPS_DTCT_EN) when appropriate.

Rather than growing the already overloaded enum phy_mode USB_*_SS/HS/
FS/LS split further, carry live SS-link presence through the existing
generic submode argument of phy_set_mode_ext(), as a new
enum qcom_usb_ss_state (UNKNOWN/PRESENT/ABSENT) shared via
include/linux/phy/phy-qcom-qmp-usb-ss.h. dwc3-qcom determines the
state from the USB3 root hub's attached child speed at suspend entry
and passes it down via phy_set_mode_ext(phy, PHY_MODE_USB_HOST,
ss_state); qmp_combo_usb_set_mode() validates and stores it, and
qmp_combo_enable_autonomous_mode() switches on it to pick the
interrupt mask.

CRs-fixed: 4673342

…ed present

  qmp_combo_enable_autonomous_mode() picks the autonomous-mode wake
  interrupt mask by comparing qmp->phy_mode against
  PHY_MODE_USB_HOST_SS/PHY_MODE_USB_DEVICE_SS. This combo phy's
  set_mode() only ever stores PHY_MODE_USB_HOST or PHY_MODE_USB_DEVICE
  (dwc3 core and dwc3-qcom never pass the _SS/_HS/_FS/_LS variants to
  this driver), so the comparison is always false and the phy is stuck
  selecting ARCVR_DTCT_EN | ARCVR_DTCT_EVENT_SEL regardless of whether a
  SuperSpeed device is actually attached, instead of using LFPS
  detection (ALFPS_DTCT_EN) when appropriate.

  Rather than growing the already overloaded enum phy_mode USB_*_SS/HS/
  FS/LS split further, carry live SS-link presence through the existing
  generic submode argument of phy_set_mode_ext(), as a new
  enum qcom_usb_ss_state (UNKNOWN/PRESENT/ABSENT) shared via
  include/linux/phy/phy-qcom-qmp-usb-ss.h. dwc3-qcom determines the
  state from the USB3 root hub's attached child speed at suspend entry
  and passes it down via phy_set_mode_ext(phy, PHY_MODE_USB_HOST,
  ss_state); qmp_combo_usb_set_mode() validates and stores it, and
  qmp_combo_enable_autonomous_mode() switches on it to pick the
  interrupt mask.

Signed-off-by: Tapas Rana <taparana@qti.qualcomm.com>
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: CR Not Eligible for Merge

CR 4673342 is not eligible for merge.

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

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

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

@qlijarvis

Copy link
Copy Markdown

PR #1358 — validate-patch

PR: #1358

Verdict Issues Detailed Report
❌ 1 Full report

Final Summary

  1. Lore link present: No — no lore.kernel.org link found in commit message; validation cannot proceed per skill Step 1
  2. Lore link matches PR commits: N/A — no lore link to compare against
  3. Upstream patch status: Not upstream — no evidence of upstream posting or acceptance
  4. PR present in qcom-next/topics: Partial - 1/1 commit(s) only have partial integration evidence
Verdict: ❌ — click to expand

🔍 Patch Validation

PR: #1358 - phy: qcom: qmp-combo: Select LFPS detect only when SS link is confirmed present
Upstream commit: N/A
Verdict: ❌ FAIL

Commit Message

Check Status Note
Subject matches upstream N/A No upstream lore link present
Body preserves rationale N/A No upstream lore link present
Fixes tag present/correct ❌ Missing - patch fixes a bug but has no Fixes tag
Authorship preserved N/A No upstream source to compare
Backport note (if applicable) N/A Not a backport
Vendor prefix ❌ Missing required prefix (QCLINUX:/PENDING:/FROMLIST:/UPSTREAM:)

Diff

File Status Notes
drivers/phy/qualcomm/phy-qcom-qmp-combo.c ⚠️ New ss_state field and logic; no upstream reference
drivers/usb/dwc3/dwc3-qcom.c ⚠️ New dwc3_qcom_read_ss_state() function; no upstream reference
include/linux/phy/phy-qcom-qmp-usb-ss.h ⚠️ New header file; no upstream reference

Issues

Critical:

  1. No lore.kernel.org link — The commit message lacks a Link: tag pointing to an upstream lore.kernel.org posting. Per the validate-patch skill Step 1, this is a FAIL condition.

  2. Missing vendor prefix — The subject line lacks a required prefix:

    • UPSTREAM: if merged into Linus's tree
    • FROMLIST: if posted to a mailing list but not yet merged
    • BACKPORT: if backporting an upstream commit with modifications
    • QCLINUX: if vendor-only with no upstream equivalent
    • PENDING: if work-in-progress not yet posted
    • WORKAROUND: if temporary fix not suitable for upstream
  3. Missing Fixes tag — The commit message describes a bug ("the comparison is always false and the phy is stuck selecting ARCVR_DTCT_EN | ARCVR_DTCT_EVENT_SEL regardless of whether a SuperSpeed device is actually attached") but does not include a Fixes: tag identifying the commit that introduced the issue.

Integration presence:

  • Per integration_presence_report.md: PARTIAL — subject or partial tree evidence found in qcom-next, but full change was not verified. This suggests the commit may be partially present or similar work exists, but the exact patch is not confirmed in qcom-next or kernel-topics.

Verdict

Do not merge without correction. This patch requires:

  1. Add a vendor prefix to the subject line:

    • If this is vendor-only work with no plans to upstream: use QCLINUX:
    • If this will be posted upstream: use PENDING: or FROMLIST: (after posting) with a Link: tag
    • If this is already upstream: use UPSTREAM: or BACKPORT: with a Link: tag
  2. Add a Fixes: tag identifying the commit that introduced the bug where qmp->phy_mode comparison always fails.

  3. If this patch is intended for upstream submission, post it to the appropriate mailing list (linux-phy, linux-usb) and add the Link: tag to the commit message.

Final Summary

  1. Lore link present: No — no lore.kernel.org link found in commit message; validation cannot proceed per skill Step 1
  2. Lore link matches PR commits: N/A — no lore link to compare against
  3. Upstream patch status: Not upstream — no evidence of upstream posting or acceptance
  4. PR present in qcom-next/topics: Partial — per integration_presence_report.md: "partial - subject or partial tree evidence found, but full change was not verified" (1/1 commits partial)

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

Commit Subject qcom-next topics Final
1/1 [PATCH] phy: qcom: qmp-combo: Select LFPS detect only when SS link is 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 #1358 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch ❌ 7 errors, 19 warnings, 2 checks — whitespace/indentation issues
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No DTS changes
sparse-check ✅ Passed
check-uapi-headers ✅ Passed (no UAPI changes)
check-patch-compliance ❌ Missing required subject prefix
tag-check ❌ Missing required subject prefix (mandatory for qcom-6.18.y)

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1358 - phy: qcom: qmp-combo: Select LFPS detect only when SS link is confirmed present
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/40718595720
Target branch: qcom-6.18.y

Checker Result Summary
checkpatch ❌ 7 errors, 19 warnings, 2 checks — whitespace/indentation issues
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No DTS changes
sparse-check ✅ Passed
check-uapi-headers ✅ Passed (no UAPI changes)
check-patch-compliance ❌ Missing required subject prefix
tag-check ❌ Missing required subject prefix (mandatory for qcom-6.18.y)

❌ checkpatch

Root cause: The patch contains widespread whitespace and indentation errors — spaces used instead of tabs for code indentation throughout drivers/usb/dwc3/dwc3-qcom.c.

Failure details:

ERROR: code indent should use tabs where possible
#132: FILE: drivers/usb/dwc3/dwc3-qcom.c:266:
+                return QCOM_USB_SS_ABSENT;

ERROR: code indent should use tabs where possible
#137: FILE: drivers/usb/dwc3/dwc3-qcom.c:271:
+                return QCOM_USB_SS_ABSENT;

ERROR: code indent should use tabs where possible
#144: FILE: drivers/usb/dwc3/dwc3-qcom.c:278:
+               return QCOM_USB_SS_ABSENT;

ERROR: space required before the open brace '{'
#157: FILE: drivers/usb/dwc3/dwc3-qcom.c:391:
+		for (i = 0; i < qcom->num_ports; i++){

ERROR: code indent should use tabs where possible
#161: FILE: drivers/usb/dwc3/dwc3-qcom.c:395:
+                                       qcom->ports[i].ss_state);

WARNING: please, no spaces at the start of a line (×19 instances)
WARNING: suspect code indent for conditional statements (×3 instances)
CHECK: Alignment should match open parenthesis
CHECK: Blank lines aren't necessary before a close brace '}'

Total: 7 errors, 19 warnings, 2 checks

Fix: Replace all leading spaces with tabs in drivers/usb/dwc3/dwc3-qcom.c:260-397. The kernel coding style requires tabs for indentation, not spaces.

# Fix whitespace issues
git rebase -i beba1a54e9c240a8c1e42466b8d87256c801d7fa
# mark commit as 'edit'
# Fix indentation in drivers/usb/dwc3/dwc3-qcom.c:
#   - Replace spaces with tabs for all code lines
#   - Add space before '{' on line 391: i++){  →  i++) {
#   - Fix alignment on line 395 to match open parenthesis
#   - Remove blank line before '}' on line 397
git add drivers/usb/dwc3/dwc3-qcom.c
git commit --amend --no-edit
git rebase --continue

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git beba1a54e9c240a8c1e42466b8d87256c801d7fa..e5a65fdb7b1b92e03a966a077ee53dd83befad83

❌ check-patch-compliance

Root cause: Commit subject does not start with a required prefix (FROMLIST:, FROMGIT:, UPSTREAM:, or BACKPORT:).

Failure details:

Checking commit: phy: qcom: qmp-combo: Select LFPS detect only when SS link is confirmed present
Commit summary does not start with a required prefix

Fix: Add an appropriate prefix to the commit subject based on the patch origin:

git rebase -i beba1a54e9c240a8c1e42466b8d87256c801d7fa
# mark commit as 'edit'
git commit --amend -m "FROMLIST: phy: qcom: qmp-combo: Select LFPS detect only when SS link is confirmed present"
# (keep the rest of the commit message unchanged)
git rebase --continue

Choose the correct prefix:

  • FROMLIST: — if posted to lore.kernel.org but not yet merged
  • FROMGIT: — if taken from a maintainer git tree
  • UPSTREAM: — if merged into Linus's mainline tree
  • BACKPORT: — if backported with modifications

Note: If this is a vendor-only patch with no upstream equivalent, use QCLINUX: — however, check-patch-compliance will still fail for QCLINUX: (known checker limitation). If the patch has been posted upstream, add a Link: trailer pointing to the lore.kernel.org URL.

Reproduce locally:

# Check if subject has valid prefix
git log --format="%s" beba1a54e9c240a8c1e42466b8d87256c801d7fa..e5a65fdb7b1b92e03a966a077ee53dd83befad83 | \
  grep -qE '^(FROMLIST|FROMGIT|UPSTREAM|BACKPORT):' || echo "MISSING PREFIX"

❌ tag-check

Root cause: The target branch is qcom-6.18.y (not qcom-next or qcom-next-staging), which requires every commit subject to start with a valid prefix tag. The commit subject lacks this required prefix.

Failure details:

Commit e5a65fdb7b1b ("phy: qcom: qmp-combo: Select LFPS detect only when SS link is confirmed present")
Subject line does not start with a required prefix.

All branches except qcom-next and qcom-next-staging require one of:
FROMLIST: / FROMGIT: / UPSTREAM: / BACKPORT: / QCLINUX: / PENDING: / WORKAROUND:

Fix: Same as check-patch-compliance above — add the appropriate prefix to the commit subject.

Reproduce locally:

git log --format="%H %s" beba1a54e9c240a8c1e42466b8d87256c801d7fa..e5a65fdb7b1b92e03a966a077ee53dd83befad83 | \
  while read sha subject; do
    if ! echo "$subject" | grep -qE '^(FROMLIST|FROMGIT|UPSTREAM|BACKPORT|QCLINUX|PENDING|WORKAROUND):'; then
      echo "MISSING prefix: $sha $subject"
    fi
  done

Verdict

3 blockers must be fixed before merge:

  1. checkpatch — Fix all whitespace/indentation errors (replace spaces with tabs in drivers/usb/dwc3/dwc3-qcom.c)
  2. check-patch-compliance — Add required subject prefix (FROMLIST:, FROMGIT:, UPSTREAM:, or BACKPORT:)
  3. tag-check — Same as Adding Email Checker  #2 (subject prefix is mandatory for qcom-6.18.y branch)

The code changes appear sound (sparse passed, no DT/UAPI issues), but the patch formatting and commit metadata must be corrected before this PR can be merged.

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