rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v1 0/4] Rust abstractions for network PHY drivers
@ 2023-09-13 13:36 FUJITA Tomonori
  2023-09-13 13:36 ` [RFC PATCH v1 1/4] rust: core " FUJITA Tomonori
                   ` (4 more replies)
  0 siblings, 5 replies; 79+ messages in thread
From: FUJITA Tomonori @ 2023-09-13 13:36 UTC (permalink / raw)
  To: rust-for-linux; +Cc: andrew

Hi,

Thhis patchset adds Rust abstractions for network PHY drivers. It
doesn't fully cover the C APIs for PHY drivers but I think that it's
already useful. I implement two PHY drivers (Realtek Generic FE-GE [1]
and Asix AX88772A PHYs [2]). Seems they work well with real hardware.

Without the user of the abstractions, it's hard to review so I include
the [4/4] patch, which adds the Asix PHY driver to samples/rust.

If you are interested in the past discussion like why abstractions for
PHY drivers?, please check out [3]. The short answer is it's much
easier to implement useful abstractions for PHY drivers rather than
for network drivers.

Before submitting to netdev, I would like to iron out Rust issues.
Any feedback is welcome. Thanks!

[1] https://github.com/fujita/rust-realtek-phy
[2] https://github.com/fujita/rust-asix-phy
[3] https://lwn.net/ml/netdev/20230710073703.147351-1-fujita.tomonori@gmail.com/


FUJITA Tomonori (4):
  rust: core abstractions for network PHY drivers
  rust: phy: add module device table support
  MAINTAINERS: add Rust PHY abstractions file to the ETHERNET PHY
    LIBRARY
  sample: rust: add Asix PHY driver

 MAINTAINERS                     |   1 +
 rust/bindings/bindings_helper.h |   3 +
 rust/kernel/lib.rs              |   2 +
 rust/kernel/net.rs              |   6 +
 rust/kernel/net/phy.rs          | 687 ++++++++++++++++++++++++++++++++
 samples/rust/Kconfig            |  13 +
 samples/rust/Makefile           |   1 +
 samples/rust/rust_ax88796b.rs   | 105 +++++
 8 files changed, 818 insertions(+)
 create mode 100644 rust/kernel/net.rs
 create mode 100644 rust/kernel/net/phy.rs
 create mode 100644 samples/rust/rust_ax88796b.rs


base-commit: 0bb80ecc33a8fb5a682236443c1e740d5c917d1d
-- 
2.34.1


^ permalink raw reply	[flat|nested] 79+ messages in thread

end of thread, other threads:[~2023-10-09 12:27 UTC | newest]

Thread overview: 79+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-13 13:36 [RFC PATCH v1 0/4] Rust abstractions for network PHY drivers FUJITA Tomonori
2023-09-13 13:36 ` [RFC PATCH v1 1/4] rust: core " FUJITA Tomonori
2023-09-13 20:11   ` Andrew Lunn
2023-09-13 20:49     ` Boqun Feng
2023-09-13 21:05       ` Andrew Lunn
2023-09-13 21:32         ` Boqun Feng
2023-09-14  4:10           ` Trevor Gross
2023-09-13 22:14     ` Miguel Ojeda
2023-09-14  0:30       ` Andrew Lunn
2023-09-14 11:03         ` Miguel Ojeda
2023-09-14 12:24           ` Andrew Lunn
2023-09-17  9:44           ` FUJITA Tomonori
2023-09-17 10:17     ` FUJITA Tomonori
2023-09-17 15:06       ` Andrew Lunn
2023-09-17 18:42         ` Trevor Gross
2023-09-17 19:08           ` Andrew Lunn
2023-09-18  0:49             ` Trevor Gross
2023-09-18  1:18               ` Andrew Lunn
2023-09-18  2:22                 ` Trevor Gross
2023-09-18  3:44                   ` FUJITA Tomonori
2023-09-18 13:13                     ` Andrew Lunn
2023-09-18  6:01         ` FUJITA Tomonori
2023-09-14  5:47   ` Trevor Gross
2023-09-14 10:17     ` Jarkko Sakkinen
2023-09-14 19:46       ` Trevor Gross
2023-09-14 12:39     ` Andrew Lunn
2023-09-14 19:42       ` Trevor Gross
2023-09-14 19:53         ` Trevor Gross
2023-09-18  9:56   ` Finn Behrens
2023-09-18 13:22     ` Andrew Lunn
2023-09-18 10:22   ` Benno Lossin
2023-09-18 13:09     ` FUJITA Tomonori
2023-09-18 15:20       ` Benno Lossin
2023-09-19 10:26         ` FUJITA Tomonori
2023-09-20 13:24           ` Benno Lossin
2023-09-13 13:36 ` [RFC PATCH v1 2/4] rust: phy: add module device table support FUJITA Tomonori
2023-09-14  6:26   ` Trevor Gross
2023-09-14  7:23     ` Trevor Gross
2023-09-17  6:30       ` FUJITA Tomonori
2023-09-17 15:13         ` Andrew Lunn
2023-09-13 13:36 ` [RFC PATCH v1 3/4] MAINTAINERS: add Rust PHY abstractions file to the ETHERNET PHY LIBRARY FUJITA Tomonori
2023-09-13 18:57   ` Andrew Lunn
2023-09-17 12:32     ` FUJITA Tomonori
2023-09-19 12:06       ` Miguel Ojeda
2023-09-19 16:33         ` Andrew Lunn
2023-09-22 23:17           ` Trevor Gross
2023-09-23  0:05           ` Miguel Ojeda
2023-09-23  1:36             ` Andrew Lunn
2023-09-23 10:19               ` Miguel Ojeda
2023-09-23 14:42                 ` Andrew Lunn
2023-10-09 12:26                   ` Miguel Ojeda
2023-09-13 13:36 ` [RFC PATCH v1 4/4] sample: rust: add Asix PHY driver FUJITA Tomonori
2023-09-13 14:11   ` Andrew Lunn
2023-09-13 16:53     ` Greg KH
2023-09-13 18:50       ` Andrew Lunn
2023-09-13 18:59         ` Greg KH
2023-09-13 20:20           ` Andrew Lunn
2023-09-13 20:38             ` Greg KH
2023-09-13 16:56   ` Greg KH
2023-09-13 18:43     ` Andrew Lunn
2023-09-13 19:15   ` Andrew Lunn
2023-09-17 11:28     ` FUJITA Tomonori
2023-09-17 15:46       ` Andrew Lunn
2023-09-18  8:35         ` FUJITA Tomonori
2023-09-18 13:37           ` Andrew Lunn
2023-09-24  9:12             ` FUJITA Tomonori
2023-09-24  9:59               ` Miguel Ojeda
2023-09-24 15:31               ` Andrew Lunn
2023-09-24 17:31                 ` Miguel Ojeda
2023-09-24 17:44                   ` Andrew Lunn
2023-09-24 18:44                     ` Miguel Ojeda
2023-09-18 22:23 ` [RFC PATCH v1 0/4] Rust abstractions for network PHY drivers Trevor Gross
2023-09-18 22:48   ` Andrew Lunn
2023-09-18 23:46     ` Trevor Gross
2023-09-19  6:24       ` FUJITA Tomonori
2023-09-19  7:41         ` Trevor Gross
2023-09-19 16:12         ` Andrew Lunn
2023-09-19  6:16   ` FUJITA Tomonori
2023-09-19  8:05     ` Trevor Gross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).