Skip to content

Retire the default_smbusespi uart-service constructor#912

Merged
dymk merged 1 commit into
OpenDevicePartnership:mainfrom
dymk:dymk/retire-default-smbusespi
Jul 6, 2026
Merged

Retire the default_smbusespi uart-service constructor#912
dymk merged 1 commit into
OpenDevicePartnership:mainfrom
dymk:dymk/retire-default-smbusespi

Conversation

@dymk

@dymk dymk commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Final step of the DSP0253 serial-framing unification: the SMBus/eSPI uart-service convenience path has no remaining callers, so this removes it.

Context

This completes the cascade that moved the EC ↔ SP UART relay off the hand-rolled SMBus/eSPI framing and onto DSP0253 serial (MctpSerialMedium):

With every consumer now on MctpSerialService::default_mctp_serial, default_smbusespi and the DefaultService alias are dead code.

Change

uart-service/src/lib.rs only:

  • Remove the DefaultService<R> alias and its default_smbusespi constructor.
  • Drop the now-unused SmbusEspiMedium / SmbusEspiReplyContext imports.
  • Update the module doc to point at MctpSerialService.

SmbusEspiMedium itself is untouched — it stays in mctp-rs and remains in use by espi-service and the relay layer. Only the uart-service convenience wrapper is retired; the generic Service<R, M> can still be built with any medium via Service::new.

Verification

  • cargo build / cargo clippy --all-targets — clean
  • cargo test — 245 passed / 5 ignored
  • cargo deny check advisories + cargo vet — pass
  • Confirmed zero remaining default_smbusespi / DefaultService references (incl. examples)

Assisted-by: GitHub Copilot:claude-opus-4.8

The SMBus/eSPI uart-service path is unused: all EC platforms now build
their uart-service through `MctpSerialService::default_mctp_serial`
(DSP0253 serial), and no other caller constructs the SmbusEspi variant.

Remove the `DefaultService` alias and its `default_smbusespi`
constructor, along with the now-unused `SmbusEspiMedium` /
`SmbusEspiReplyContext` imports. `SmbusEspiMedium` itself stays in
mctp-rs and remains in use by espi-service; only the uart-service
convenience wrapper is retired. The generic `Service<R, M>` can still be
constructed with any medium via `Service::new`.

Assisted-by: GitHub Copilot:claude-opus-4.8
Copilot AI review requested due to automatic review settings July 6, 2026 20:30
@dymk dymk requested a review from a team as a code owner July 6, 2026 20:30

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.

Pull request overview

This PR removes the now-dead DefaultService<R> alias and its default_smbusespi() constructor from uart-service, completing the migration to DSP0253 serial framing via MctpSerialService::default_mctp_serial(). It also drops the corresponding unused SmbusEspiMedium/SmbusEspiReplyContext imports and updates the crate-level docs to steer users to the serial baseline. The generic Service<R, M> remains available for constructing a UART relay with any mctp_rs::MctpMedium, so this change strictly retires the SMBus/eSPI convenience wrapper rather than the underlying medium support.

Changes:

  • Remove DefaultService<R> and default_smbusespi() from the public API.
  • Remove now-unused mctp_rs::smbus_espi::{SmbusEspiMedium, SmbusEspiReplyContext} imports.
  • Update module docs to reference MctpSerialService as the baseline constructor/alias.

Step-by-step review guide

  1. Crate-level guidance update

    • The top-level docs now direct users to MctpSerialService (DSP0253 serial) and to Service::new for other media.
    • This is the primary “migration hint” surface for users reading rustdoc; worth confirming it matches the intended supported path.
  2. Public API surface reduction

    • The DefaultService<R> = Service<R, SmbusEspiMedium> alias and default_smbusespi() constructor are removed.
    • This is an intentional API removal; within this repo, there are no remaining references to DefaultService or default_smbusespi (confirmed by search).
  3. Serial baseline remains

    • MctpSerialService<R> and default_mctp_serial() remain as the canonical convenience constructor, with per-response destination EID still overridden in process_response.

Potential issues

No issues found.

@dymk dymk merged commit 7201449 into OpenDevicePartnership:main Jul 6, 2026
16 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