| From: |
| FUJITA Tomonori <fujita.tomonori-AT-gmail.com> |
| To: |
| netdev-AT-vger.kernel.org |
| Subject: |
| [PATCH v2 0/3] Rust abstractions for network PHY drivers |
| Date: |
| Fri, 06 Oct 2023 18:49:08 +0900 |
| Message-ID: |
| <20231006094911.3305152-1-fujita.tomonori@gmail.com> |
| Cc: |
| rust-for-linux-AT-vger.kernel.org, andrew-AT-lunn.ch, miguel.ojeda.sandonis-AT-gmail.com, greg-AT-kroah.com |
| Archive-link: |
| Article |
This patchset adds Rust abstractions for network PHY drivers. It
doesn't fully cover the C APIs for PHY drivers yet but I think that
it's already useful. I implement two PHY drivers (Asix AX88772A PHYs
and Realtek Generic FE-GE). Seems they work well with real hardware.
The first patch introduces Rust bindings for the C APIs for network
PHY drivers.
The second patch adds the bindings to the ETHERNET PHY LIBRARY, and
also me as a maintainer of the Rust bindings (as Andrew Lunn
suggested).
The last patch introduces the Rust version of Asix PHY drivers,
drivers/net/phy/ax88796b.c. The features are equivalent to the C
version. You can choose C (by default) or Rust version on kernel
configuration.
There is no major changes from v1; build failure fix and function renaming.
v1:
https://lore.kernel.org/netdev/20231002085302.2274260-3-f...
FUJITA Tomonori (3):
rust: core abstractions for network PHY drivers
MAINTAINERS: add Rust PHY abstractions to the ETHERNET PHY LIBRARY
net: phy: add Rust Asix PHY driver
MAINTAINERS | 2 +
drivers/net/phy/Kconfig | 7 +
drivers/net/phy/Makefile | 6 +-
drivers/net/phy/ax88796b_rust.rs | 129 ++++++
init/Kconfig | 1 +
rust/Makefile | 1 +
rust/bindings/bindings_helper.h | 3 +
rust/kernel/lib.rs | 2 +
rust/kernel/net.rs | 5 +
rust/kernel/net/phy.rs | 706 +++++++++++++++++++++++++++++++
rust/uapi/uapi_helper.h | 1 +
11 files changed, 862 insertions(+), 1 deletion(-)
create mode 100644 drivers/net/phy/ax88796b_rust.rs
create mode 100644 rust/kernel/net.rs
create mode 100644 rust/kernel/net/phy.rs
base-commit: b2516f7af9d238ebc391bdbdae01ac9528f1109e
--
2.34.1