Skip to content

ucsi/v1_2: Fix GET_PD_MESSAGE offsets - #122

Merged
RobertZ2011 merged 1 commit into
OpenDevicePartnership:mainfrom
RobertZ2011:fix-get-pd-message-offsets
Oct 27, 2026
Merged

RobertZ2011 merged 1 commit into
OpenDevicePartnership:mainfrom
RobertZ2011:fix-get-pd-message-offsets

Conversation

@RobertZ2011

Copy link
Copy Markdown
Contributor

No description provided.

@RobertZ2011 RobertZ2011 self-assigned this Oct 27, 2026
@RobertZ2011 RobertZ2011 added the bug Something isn't working label Oct 27, 2026
@RobertZ2011 RobertZ2011 added this to EC Oct 27, 2026
@RobertZ2011
RobertZ2011 requested a balanced review from Copilot October 27, 2026 17:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The localized field corrections and updated test vectors are consistent across all three files, with no unresolved findings.

No open issues 🎉

What changed in this PR

This PR corrects the UCSI v1.2 GET_PD_MESSAGE wire layout and aligns existing tests with the corrected encoding.

Changes:

  • Expand the message-offset field to eight bits and shift the byte-count and message-type fields accordingly.
  • Update encoding, decoding, and invalid-message-type test vectors across the command layers.
File Description
src/​ucsi/​v1_2/​mod.rs Update the top-level command encoding fixture.
src/​ucsi/​v1_2/​lpm/​mod.rs Update valid and invalid command decoding fixtures.
src/​ucsi/​v1_2/​lpm/​get_pd_message.rs Correct bitfield ranges and associated round-trip and validation fixtures.

Review effort: Balanced

@RobertZ2011
RobertZ2011 marked this pull request as ready for review October 27, 2026 17:11
@RobertZ2011
RobertZ2011 requested a review from a team as a code owner October 27, 2026 17:11
@RobertZ2011
RobertZ2011 enabled auto-merge (squash) October 27, 2026 17:11
@RobertZ2011 RobertZ2011 moved this to In Progress in EC Oct 27, 2026
@RobertZ2011
RobertZ2011 force-pushed the fix-get-pd-message-offsets branch from b265f8c to 73c5184 Compare October 27, 2026 17:35
@RobertZ2011
RobertZ2011 merged commit c902691 into OpenDevicePartnership:main Oct 27, 2026
10 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in EC Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

UCSI 1.2: GET_PD_MESSAGE mispacks Message Offset, Number of Bytes and Response Message Type

4 participants