Retire the default_smbusespi uart-service constructor#912
Merged
dymk merged 1 commit intoJul 6, 2026
Conversation
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
Contributor
There was a problem hiding this comment.
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>anddefault_smbusespi()from the public API. - Remove now-unused
mctp_rs::smbus_espi::{SmbusEspiMedium, SmbusEspiReplyContext}imports. - Update module docs to reference
MctpSerialServiceas the baseline constructor/alias.
Step-by-step review guide
-
Crate-level guidance update
- The top-level docs now direct users to
MctpSerialService(DSP0253 serial) and toService::newfor other media. - This is the primary “migration hint” surface for users reading rustdoc; worth confirming it matches the intended supported path.
- The top-level docs now direct users to
-
Public API surface reduction
- The
DefaultService<R> = Service<R, SmbusEspiMedium>alias anddefault_smbusespi()constructor are removed. - This is an intentional API removal; within this repo, there are no remaining references to
DefaultServiceordefault_smbusespi(confirmed by search).
- The
-
Serial baseline remains
MctpSerialService<R>anddefault_mctp_serial()remain as the canonical convenience constructor, with per-response destination EID still overridden inprocess_response.
Potential issues
No issues found.
RobertZ2011
approved these changes
Jul 6, 2026
kurtjd
approved these changes
Jul 6, 2026
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.
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):ec-test-lib→ DSP0253default_mctp_serialdefault_mctp_serialconstructorWith every consumer now on
MctpSerialService::default_mctp_serial,default_smbusespiand theDefaultServicealias are dead code.Change
uart-service/src/lib.rsonly:DefaultService<R>alias and itsdefault_smbusespiconstructor.SmbusEspiMedium/SmbusEspiReplyContextimports.MctpSerialService.SmbusEspiMediumitself is untouched — it stays inmctp-rsand remains in use byespi-serviceand the relay layer. Only the uart-service convenience wrapper is retired; the genericService<R, M>can still be built with any medium viaService::new.Verification
cargo build/cargo clippy --all-targets— cleancargo test— 245 passed / 5 ignoredcargo deny check advisories+cargo vet— passdefault_smbusespi/DefaultServicereferences (incl. examples)Assisted-by: GitHub Copilot:claude-opus-4.8