[PATCH net-next v3 0/2] net: phy: add Rust reference driver for ET1011C

From
Artem Lytkin <hidden>
Date
2026-02-24 16:49:29
Also in
lkml, rust-for-linux
Reply to
Artem Lytkin, 2026-02-24
This series adds a Rust reference driver for the LSI ET1011C PHY,
following the pattern established by the existing Rust Asix PHY driver
(ax88796b_rust.rs).

Patch 1 adds a speed() getter to phy::Device, needed to detect speed
changes in read_status.

Patch 2 adds the Rust ET1011C driver itself, implementing soft_reset
and read_status callbacks.

Changes since v2:
  - Replaced custom config_aneg with soft_reset callback using
    genphy_soft_reset(), which properly polls the self-clearing
    BMCR_RESET bit and handles autoneg/forced mode (Andrew Lunn)
  - Removed all BMCR constant definitions (no longer needed)
  - Dropped genphy_config_aneg() abstraction patch (no longer used)

Changes since v1:
  - Added speed() getter to properly detect speed changes (Andrew Lunn)
  - read_status now only reconfigures registers when speed changes,
    matching the C driver behavior (Andrew Lunn)

Artem Lytkin (2):
  rust: net: phy: add speed() getter to Device
  net: phy: add Rust reference driver for ET1011C

 drivers/net/phy/Kconfig         |  9 +++++
 drivers/net/phy/Makefile        |  6 ++-
 drivers/net/phy/et1011c_rust.rs | 69 +++++++++++++++++++++++++++++++++
 rust/kernel/net/phy.rs          |  8 ++++
 4 files changed, 91 insertions(+), 1 deletion(-)
 create mode 100644 drivers/net/phy/et1011c_rust.rs

-- 
2.43.0
Thread (20 messages) 20 messages, 3 authors, last reply 2026-02-24
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help