Skip to content

[cpp-RCP-03] MDIO endpoint uses an invented Clause 22/45 PHY-address model instead of the spec's addressing scheme #72

Closed

Description

@SoundMatt

Location: include/rcp/mdio.hpp — MdioClause enum, MdioRequest struct (phy_address/device_or_reg/register_address), kMaxPhyAddress range check (~lines 45-97).

Finding: The MDIO endpoint here is modeled entirely around an IEEE 802.3 Clause-22/Clause-45-style PHY-register access scheme: a 5-bit PHY address, a device-or-register field, and a clause selector. The governing specification's actual MDIO endpoint addressing scheme is different — it's keyed by a small mode selector (single/multiple word access to an MMD or MMS), a device/module address, and a payload whose width depends on which of those modes is selected, following the addressing convention referenced from the relevant OPEN Alliance SPI companion spec rather than a raw Clause-22/45 PHY address. There is no PHY-address or Clause-22/45 concept in the governing spec's MDIO section at all, so the whole address model implemented here is a different scheme, not merely a narrower encoding of the same one.

Recommendation: Rebuild the MDIO request/response types around the spec's actual mode/address/payload fields (a small mode selector, an address field sized per the referenced addressing convention, and a payload whose width is selected by the mode), and remove the Clause-22/45 abstraction — it doesn't correspond to anything the spec defines for this endpoint.

Verification: Independently re-read include/rcp/mdio.hpp against current HEAD (commit 4b9449a, 2026-07-29), and cross-checked against the governing specification's MDIO endpoint section, which documents a mode-selector + address + variable-width-payload scheme with no PHY-address or clause concept. Confirmed the divergence.

Filed from the 2026-07-29 ecosystem audit register; independently re-verified against current HEAD before filing.

Activity

  1. added a commit that references this issue on Jul 30, 2026
  2. SoundMatt commented on Jul 30, 2026

    @SoundMatt
    OwnerAuthor

    Fixed by #91 (merged), which was not auto-linked because the PR description's bold markdown around the issue numbers broke GitHub's closing-keyword parser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions