Repository navigation
tcpm-service/ucsi: Fix GET_CAM_SUPPORTED data len - #982
Draft
RobertZ2011 wants to merge 5 commits into
Draft
RobertZ2011 wants to merge 5 commits into
RobertZ2011 wants to merge 5 commits into
Conversation
RobertZ2011
force-pushed
the
ucsi-alternate-modes-length
branch
2 times, most recently
from
November 12, 2026 18:01
9beba08 to
5f12b88
Compare
Cargo Vet Audit Passed
|
RobertZ2011
force-pushed
the
ucsi-alternate-modes-length
branch
2 times, most recently
from
November 17, 2026 18:03
2edfdc7 to
9f14787
Compare
Cover GET_CAM_SUPPORTED pagination and bitmap byte boundaries on a single port. Assert connector capability and status response lengths in the basic UCSI integration test. Assisted-by: GitHub Copilot:gpt-6.1-sol Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e1157c04-c885-431f-8db1-29fb9f614dc4
RobertZ2011
force-pushed
the
ucsi-alternate-modes-length
branch
from
November 17, 2026 18:04
9f14787 to
9b83df0
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Failed LPM commands clear the CCI error bit because they reach the command-complete branch, suppressing required error reporting.
1 open issue
What changed in this PR
This PR corrects GET_CAM_SUPPORTED response lengths in the TCPM service’s UCSI handling by counting connector alternate modes and calculating the bitmap’s byte length.
Changes:
- Add alternate-mode enumeration and response-length overrides, and populate lengths for other LPM responses.
- Add integration tests for empty lists, pagination, and bitmap byte boundaries; update existing length assertions.
- Update the pinned
embedded-usb-pdrevision in both lockfiles.
| File | Description |
|---|---|
tcpm-service/tests/ucsi_get_cam_supported.rs |
Adds response-length and pagination regression tests. |
tcpm-service/tests/ucsi_basic.rs |
Checks capability and connector-status response lengths. |
tcpm-service/src/service/ucsi.rs |
Calculates response lengths and separates completion/error handling. |
examples/std/Cargo.lock |
Updates the example’s USB-PD dependency revision. |
Cargo.lock |
Updates the workspace’s USB-PD dependency revision. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.