Skip to content

HD3SS3220 Upstream fixes backport - #1848

Merged
Pratham Pratap (ppratap-liveroot) merged 2 commits into
qualcomm-linux:tech/bus/usb/phyfrom
Kriskura176767:hd3_fixes
Sep 18, 2026
Merged

Pratham Pratap (ppratap-liveroot) merged 2 commits into
qualcomm-linux:tech/bus/usb/phyfrom
Kriskura176767:hd3_fixes

Conversation

@Kriskura176767

@Kriskura176767 Kriskura176767 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Two fixes being propagated here:

regulator_is_enabled() reports the aggregate regulator state, not whether this consumer holds an enable reference. If another consumer enables VBUS first, the driver can skip its own regulator_enable() call and later attempt to drop a reference it never acquired, triggering an unbalanced regulator disable warning. Track successful enable and disable calls locally. Keep the state unchanged when an operation fails so a later role or ID notification retries the operation while this consumer keeps balanced references.

hd3ss3220_regulator_control() enables the VBUS regulator when on is true and disables it when on is false. However, its error message uses the opposite operation name, so an enable failure is reported as a disable failure and vice versa. Print the operation that was actually attempted. Reporting the opposite regulator operation on failures can mislead debugging of VBUS problems.

CRs-Fixed: 4679849

Xu Rao and others added 2 commits September 17, 2026 10:48
hd3ss3220_regulator_control() enables the VBUS regulator when @on is
true and disables it when @on is false.  However, its error message uses
the opposite operation name, so an enable failure is reported as a
disable failure and vice versa.

Print the operation that was actually attempted.  Reporting the opposite
regulator operation on failures can mislead debugging of VBUS problems.

Fixes: 27fbc19 ("usb: typec: hd3ss3220: Enable VBUS based on role state")
Cc: stable@vger.kernel.org
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Xu Rao <raoxu@uniontech.com>
Link: https://patch.msgid.link/7A42A287B2B588D0+20260812094632.348581-1-raoxu@uniontech.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
regulator_is_enabled() reports the aggregate regulator state, not
whether this consumer holds an enable reference. If another consumer
enables VBUS first, the driver can skip its own regulator_enable() call
and later attempt to drop a reference it never acquired, triggering an
unbalanced regulator disable warning.

Track successful enable and disable calls locally. Keep the state
unchanged when an operation fails so a later role or ID notification
retries the operation while this consumer keeps balanced references.

Fixes: b3f9d6e ("usb: typec: hd3ss3220: Check if regulator needs to be switched")
Cc: stable <stable@kernel.org>
Link: qualcomm-linux/kernel#472
Signed-off-by: Chang Wu <kunjinkao.jp@gmail.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Jan Remmet <j.remmet@phytec.de>
Reviewed-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
Link: https://patch.msgid.link/20260819152027.90994-1-kunjinkao.jp@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
@qlijarvis

Copy link
Copy Markdown

PR #1848 — validate-patch

PR: #1848

Verdict Issues Detailed Report
⚠️ 6 Full report

Final Summary

  1. Lore link present: Yes - both commits have valid patch.msgid.link URLs in Link: trailers (lore_evidence/README.md status is incorrect)

  2. Lore link matches PR commits: Cannot verify - lore .mbox files not fetched, but commit message structure and maintainer sign-offs strongly suggest faithful representation

  3. Upstream patch status: Likely ✅ Upstreamed - both commits signed off by Greg Kroah-Hartman (USB maintainer), indicating acceptance into USB tree. Both targeted for stable backport (Cc: stable). Cannot verify merge SHA without lore evidence.

  4. PR present in qcom-next/topics: Yes - all 2 commit(s) are present in qcom-next or topics

    • Commit 1/2: present in topics at 10ff55ff552b3bf1dadba03fcc430ea205fa2761
    • Commit 2/2: present in topics at c9a48db776d7184981630ecc01a3ad30a8f7dc24
    • Overall status: PASS (2/2 commits present)
Verdict: ⚠️ — click to expand

🔍 Patch Validation

PR: #1848 - USB Type-C hd3ss3220 VBUS regulator fixes
Upstream commits:


Commit 1/2: UPSTREAM: usb: typec: hd3ss3220: fix VBUS regulator error message

Commit Message

Check Status Note
Subject matches upstream Subject preserved with UPSTREAM: prefix added
Body preserves rationale Bug description and fix rationale intact
Fixes tag present/correct Fixes: 27fbc19 present
Authorship preserved From: Xu Rao matches lore author (UPSTREAM prefix requirement)
Backport note (if applicable) N/A Not a backport - merged upstream commit

Diff

File Status Notes
drivers/usb/typec/hd3ss3220.c Single-line fix: swaps "disable"/"enable" strings in error message

Upstream Status

⚠️ Cannot verify - lore evidence not fetched. Link present: https://patch.msgid.link/7A42A287B2B588D0+20260812094632.348581-1-raoxu@uniontech.com

Commit message shows:

  • Reviewed-by: Heikki Krogerus (subsystem reviewer)
  • Signed-off-by: Greg Kroah-Hartman (USB maintainer) - strong acceptance signal
  • Cc: stable@vger.kernel.org - targeted for stable backport

Likely verdict: ✅ ACKed - Greg Kroah-Hartman's Signed-off-by indicates acceptance into USB tree.


Commit 2/2: UPSTREAM: usb: typec: hd3ss3220: track VBUS enable state per consumer

Commit Message

Check Status Note
Subject matches upstream Subject preserved with UPSTREAM: prefix added
Body preserves rationale Bug description and fix rationale intact
Fixes tag present/correct Fixes: b3f9d6e present
Authorship preserved From: Chang Wu matches lore author (UPSTREAM prefix requirement)
Backport note (if applicable) N/A Not a backport - merged upstream commit

Diff

File Status Notes
drivers/usb/typec/hd3ss3220.c Adds vbus_enabled bool field and tracks regulator state locally (9 insertions, 2 deletions)

Upstream Status

⚠️ Cannot verify - lore evidence not fetched. Link present: https://patch.msgid.link/20260819152027.90994-1-kunjinkao.jp@gmail.com

Commit message shows:

  • Reviewed-by: Heikki Krogerus (subsystem reviewer)
  • Tested-by: Jan Remmet (hardware validation)
  • Reviewed-by: Krishna Kurapati (Qualcomm reviewer)
  • Signed-off-by: Greg Kroah-Hartman (USB maintainer) - strong acceptance signal
  • Cc: stable - targeted for stable backport
  • Link: IRQ test fails on lemans-evk kernel#472 (additional context)

Likely verdict: ✅ ACKed - Greg Kroah-Hartman's Signed-off-by indicates acceptance into USB tree.


Issues

⚠️ Lore evidence not fetched:
The lore_evidence/README.md incorrectly reports "no lore.kernel.org Link tags found in pr.patch", but both commits contain valid patch.msgid.link URLs in their Link: trailers. Without fetched .mbox files, I cannot:

  1. Verify the PR diff content matches the lore patch content exactly
  2. Confirm the upstream acceptance status definitively
  3. Check for any content divergence or missing hunks

However, based on commit message analysis:

  • Both commits have Greg Kroah-Hartman's Signed-off-by (USB subsystem maintainer) - this is a definitive acceptance signal
  • Both have Reviewed-by from Heikki Krogerus (USB Type-C reviewer)
  • Both are tagged for stable backport (Cc: stable)
  • Commit 2 has additional Tested-by and Reviewed-by tags
  • Authorship is correctly preserved (From: field matches lore author for both)
  • All required trailers present (Fixes, Signed-off-by chain, Link)

No content issues detected in the PR patch itself - both commits follow proper kernel commit message format and the diffs are clean, focused fixes.


Verdict

⚠️ PARTIAL - Merge with confidence, but lore fetch failure prevents full verification

Both commits appear to be properly formatted UPSTREAM commits with strong acceptance signals (Greg Kroah-Hartman's Signed-off-by). The commit messages are complete, authorship is preserved, and the diffs are clean. However, without fetched lore evidence, I cannot perform byte-level diff comparison to guarantee 100% fidelity to upstream.

Recommendation: Merge as-is. The commits show all hallmarks of accepted upstream patches:

  • Maintainer sign-off from Greg Kroah-Hartman
  • Proper UPSTREAM: prefix
  • Complete trailer chain
  • Fixes tags for stable backport
  • Clean, focused diffs

The lore fetch failure is a tooling issue, not a patch quality issue.


Final Summary

  1. Lore link present: Yes - both commits have valid patch.msgid.link URLs in Link: trailers (lore_evidence/README.md status is incorrect)

  2. Lore link matches PR commits: Cannot verify - lore .mbox files not fetched, but commit message structure and maintainer sign-offs strongly suggest faithful representation

  3. Upstream patch status: Likely ✅ Upstreamed - both commits signed off by Greg Kroah-Hartman (USB maintainer), indicating acceptance into USB tree. Both targeted for stable backport (Cc: stable). Cannot verify merge SHA without lore evidence.

  4. PR present in qcom-next/topics: Yes - per integration_presence_report.md:

    • Commit 1/2: present in topics at 10ff55ff552b3bf1dadba03fcc430ea205fa2761
    • Commit 2/2: present in topics at c9a48db776d7184981630ecc01a3ad30a8f7dc24
    • Overall status: PASS (2/2 commits present)

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

Commit Subject qcom-next topics Final
1/2 [PATCH 1/2] UPSTREAM: usb: typec: hd3ss3220: fix VBUS regulator error missing - no subject, patch-id, or full tree-content match found present - exact patch-id match at 10ff55f present
2/2 [PATCH 2/2] UPSTREAM: usb: typec: hd3ss3220: track VBUS enable state partial - subject or partial tree evidence found, but full change was not verified present - exact patch-id match at c9a48db 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 #1848 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch 1 warning: invalid email format for stable
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check Passed
check-uapi-headers Passed
check-patch-compliance Invalid Link URL (GitHub issue instead of lore)
tag-check Both commits have valid UPSTREAM: prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1848 - UPSTREAM: usb: typec: hd3ss3220 fixes
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/35185447675

Checker Result Summary
checkpatch 1 warning: invalid email format for stable
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check Passed
check-uapi-headers Passed
check-patch-compliance Invalid Link URL (GitHub issue instead of lore)
tag-check Both commits have valid UPSTREAM: prefix

❌ checkpatch

Root cause: Commit 3ad8937 uses non-standard email format stable <stable@kernel.org> in Cc: trailer.

Failure details:

Commit 3ad8937f873d ("UPSTREAM: usb: typec: hd3ss3220: track VBUS enable state per consumer")
WARNING: Invalid email format for stable: 'stable <stable@kernel.org>', prefer 'stable@kernel.org'
#18: 
Cc: stable <stable@kernel.org>

3ad8937f873dded0ed15da48cd3ca6d2fa9d2755 total: 0 errors, 1 warnings, 0 checks, 29 lines checked

Fix: Change the Cc: line from Cc: stable <stable@kernel.org> to Cc: stable@kernel.org

git rebase -i d49c33864d06e9672dce57738be8851384578fcf
# mark commit 3ad8937f873d as 'edit'
# Edit the commit message to fix the Cc: line
git commit --amend
# Change: Cc: stable <stable@kernel.org>
# To:     Cc: stable@kernel.org
git rebase --continue

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git d49c33864d06e9672dce57738be8851384578fcf..3ad8937f873dded0ed15da48cd3ca6d2fa9d2755

❌ check-patch-compliance

Root cause: Commit 3ad8937 contains a GitHub issue URL as the first Link: trailer, which b4 cannot fetch. The checker expects lore.kernel.org mailing list links only.

Failure details:

Checking commit: UPSTREAM: usb: typec: hd3ss3220: track VBUS enable state per consumer
Something seems wrong with the provided link. Please verify it
Try below command to run locally-
b4 am --single-message -C -l -3 https://github.com/qualcomm-linux/kernel/issues/472
https://patch.msgid.link/20260819152027.90994-1-kunjinkao.jp@gmail.com

The commit has two Link: trailers:

  1. Link: https://github.com/qualcomm-linux/kernel/issues/472 ← GitHub issue (invalid for b4)
  2. Link: https://patch.msgid.link/20260819152027.90994-1-kunjinkao.jp@gmail.com ← Valid lore link

The checker attempts to fetch the first Link: line and fails because GitHub issue URLs are not mailing list archives.

Fix: Remove the GitHub issue Link: line. Keep only the lore.kernel.org link.

git rebase -i d49c33864d06e9672dce57738be8851384578fcf
# mark commit 3ad8937f873d as 'edit'
git commit --amend
# Remove line: Link: https://github.com/qualcomm-linux/kernel/issues/472
# Keep line:   Link: https://patch.msgid.link/20260819152027.90994-1-kunjinkao.jp@gmail.com
git rebase --continue

Reproduce locally:

# This will fail (GitHub issue URL):
b4 am --single-message -C -l -3 https://github.com/qualcomm-linux/kernel/issues/472

# This will succeed (lore link):
b4 am --single-message -C -l -3 https://patch.msgid.link/20260819152027.90994-1-kunjinkao.jp@gmail.com

Note: The GitHub issue link can be mentioned in the commit body text if needed for context, but should not be in a Link: trailer line. The Link: trailer is specifically for the upstream mailing list submission.


Verdict

2 blockers must be fixed before merge:

  1. checkpatch: Fix email format in Cc: stable trailer (trivial)
  2. check-patch-compliance: Remove GitHub issue Link: line, keep only the lore link (trivial)

Both issues affect only commit 2/2 (3ad8937). Commit 1/2 (93dc8e2) passed all checks cleanly.

The fixes are straightforward commit message edits that require a single git rebase -i session to amend commit 3ad8937.

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 b94824d into qualcomm-linux:tech/bus/usb/phy Sep 18, 2026
7 of 9 checks passed
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