From: FUJITA Tomonori <fujita.tomonori@gmail.com>
To: netdev@vger.kernel.org
Cc: kuba@kernel.org, rust-for-linux@vger.kernel.org, andrew@lunn.ch,
tmgross@umich.edu, miguel.ojeda.sandonis@gmail.com,
benno.lossin@proton.me, aliceryhl@google.com
Subject: [PATCH net-next v8 0/6] net: phy: add Applied Micro QT2025 PHY driver
Date: Wed, 28 Aug 2024 07:35:10 +0000 [thread overview]
Message-ID: <20240828073516.128290-1-fujita.tomonori@gmail.com> (raw)
This patchset adds a PHY driver for Applied Micro Circuits Corporation
QT2025.
The first patch adds Rust equivalent to include/linux/sizes.h, makes
code more readable. The 2-5th patches update the PHYLIB Rust bindings.
The 4th and 5th patches have been reviewed previously in a different
thread [1].
QT2025 PHY support was implemented as a part of an Ethernet driver for
Tehuti Networks TN40xx chips. Multiple vendors (DLink, Asus, Edimax,
QNAP, etc) developed adapters based on TN40xx chips. Tehuti Networks
went out of business and the driver wasn't merged into mainline. But
it's still distributed with some of the hardware (and also available
on some vendor sites).
The original driver handles multiple PHY hardware (AMCC QT2025, TI
TLK10232, Aqrate AQR105, and Marvell MV88X3120, MV88X3310, and
MV88E2010). I divided the original driver into MAC and PHY drivers and
implemented a QT2025 PHY driver in Rust.
The MAC driver for Tehuti Networks TN40xx chips was already merged in
6.11-rc1. The MAC and this PHY drivers have been tested with Edimax
EN-9320SFP+ 10G network adapter.
[1] https://lore.kernel.org/rust-for-linux/20240607052113.69026-1-fujita.tomonori@gmail.com/
v8
- add Debug trait to reg::{C22 and C45}
- add Andrew's Reviewed-by
v7: https://lore.kernel.org/netdev/20240824020617.113828-1-fujita.tomonori@gmail.com/
- add Trevor as Reviewer to MAINTAINERS file entry
- add Trevor Reviewed-by
- add/fix comments
- replace uppercase hex with lowercase
- remove unnecessary code
- update the commit message (1st patch)
v6: https://lore.kernel.org/netdev/20240820225719.91410-1-fujita.tomonori@gmail.com/
- improve comments
- make the logic to load firmware more readable
- add Copy trait to reg::{C22 and C45}
- add Trevor Reviewed-by
v5: https://lore.kernel.org/netdev/20240819005345.84255-1-fujita.tomonori@gmail.com/
- fix the comments (3th patch)
- add RUST_FW_LOADER_ABSTRACTIONS dependency
- add Andrew and Benno Reviewed-by
v4: https://lore.kernel.org/netdev/20240817051939.77735-1-fujita.tomonori@gmail.com/
- fix the comments
- add Andrew's Reviewed-by
- fix the order of tags
- remove wrong endianness conversion
v3: https://lore.kernel.org/netdev/20240804233835.223460-1-fujita.tomonori@gmail.com/
- use addr_of_mut!` to avoid intermediate mutable reference
- update probe callback's Safety comment
- add MODULE_FIRMWARE equivalent
- add Alice's Reviewed-by
v2: https://lore.kernel.org/netdev/20240731042136.201327-1-fujita.tomonori@gmail.com/
- add comments in accordance with the hw datasheet
- unify C22 and C45 APIs
- load firmware in probe callback instead of config_init
- use firmware API
- handle firmware endian
- check firmware size
- use SZ_*K constants
- avoid confusing phy_id variable
v1: https://lore.kernel.org/netdev/20240415104701.4772-1-fujita.tomonori@gmail.com/
FUJITA Tomonori (6):
rust: sizes: add commonly used constants
rust: net::phy support probe callback
rust: net::phy implement AsRef<kernel::device::Device> trait
rust: net::phy unified read/write API for C22 and C45 registers
rust: net::phy unified genphy_read_status function for C22 and C45
registers
net: phy: add Applied Micro QT2025 PHY driver
MAINTAINERS | 9 ++
drivers/net/phy/Kconfig | 7 +
drivers/net/phy/Makefile | 1 +
drivers/net/phy/ax88796b_rust.rs | 7 +-
drivers/net/phy/qt2025.rs | 103 ++++++++++++++
rust/kernel/lib.rs | 1 +
rust/kernel/net/phy.rs | 90 +++++++------
rust/kernel/net/phy/reg.rs | 224 +++++++++++++++++++++++++++++++
rust/kernel/sizes.rs | 26 ++++
rust/uapi/uapi_helper.h | 1 +
10 files changed, 426 insertions(+), 43 deletions(-)
create mode 100644 drivers/net/phy/qt2025.rs
create mode 100644 rust/kernel/net/phy/reg.rs
create mode 100644 rust/kernel/sizes.rs
base-commit: e5899b60f52a7591cfc2a2dec3e83710975117d7
--
2.34.1
next reply other threads:[~2024-08-28 7:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-28 7:35 FUJITA Tomonori [this message]
2024-08-28 7:35 ` [PATCH net-next v8 1/6] rust: sizes: add commonly used constants FUJITA Tomonori
2024-08-28 7:35 ` [PATCH net-next v8 2/6] rust: net::phy support probe callback FUJITA Tomonori
2024-08-28 7:35 ` [PATCH net-next v8 3/6] rust: net::phy implement AsRef<kernel::device::Device> trait FUJITA Tomonori
2024-08-28 7:35 ` [PATCH net-next v8 4/6] rust: net::phy unified read/write API for C22 and C45 registers FUJITA Tomonori
2024-08-28 7:35 ` [PATCH net-next v8 5/6] rust: net::phy unified genphy_read_status function " FUJITA Tomonori
2024-08-28 7:35 ` [PATCH net-next v8 6/6] net: phy: add Applied Micro QT2025 PHY driver FUJITA Tomonori
2024-08-30 9:30 ` [PATCH net-next v8 0/6] " patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240828073516.128290-1-fujita.tomonori@gmail.com \
--to=fujita.tomonori@gmail.com \
--cc=aliceryhl@google.com \
--cc=andrew@lunn.ch \
--cc=benno.lossin@proton.me \
--cc=kuba@kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).