Centos-kernel-stream-10/rust
Izabela Bakollari 3609046782 net: phy: pass PHY driver to .match_phy_device OP
JIRA: https://issues.redhat.com/browse/RHEL-75590

commit 31afd6bc55cc0093c3e5b0a368319e423d4de8ea
Author: Christian Marangi <ansuelsmth@gmail.com>
Date:   Sat May 17 22:13:45 2025 +0200

    net: phy: pass PHY driver to .match_phy_device OP

    Pass PHY driver pointer to .match_phy_device OP in addition to phydev.
    Having access to the PHY driver struct might be useful to check the
    PHY ID of the driver is being matched for in case the PHY ID scanned in
    the phydev is not consistent.

    A scenario for this is a PHY that change PHY ID after a firmware is
    loaded, in such case, the PHY ID stored in PHY device struct is not
    valid anymore and PHY will manually scan the ID in the match_phy_device
    function.

    Having the PHY driver info is also useful for those PHY driver that
    implement multiple simple .match_phy_device OP to match specific MMD PHY
    ID. With this extra info if the parsing logic is the same, the matching
    function can be generalized by using the phy_id in the PHY driver
    instead of hardcoding.

    Rust wrapper callback is updated to align to the new match_phy_device
    arguments.

    Suggested-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
    Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
    Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
    Reviewed-by: Benno Lossin <lossin@kernel.org> # for Rust
    Reviewed-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
    Link: https://patch.msgid.link/20250517201353.5137-2-ansuelsmth@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Signed-off-by: Izabela Bakollari <ibakolla@redhat.com>
2025-07-22 13:10:29 +02:00
..
bindings rust: sort blk includes in bindings_helper.h 2024-08-21 00:37:02 +02:00
helpers rust: add helper for mutex_trylock 2025-06-25 15:57:33 -04:00
kernel net: phy: pass PHY driver to .match_phy_device OP 2025-07-22 13:10:29 +02:00
macros Rust changes for v6.12 2024-09-25 10:25:40 -07:00
uapi rust: net::phy unified read/write API for C22 and C45 registers 2024-08-30 10:27:35 +01:00
.gitignore rust: support running Rust documentation tests as KUnit ones 2023-07-19 09:32:53 -06:00
Makefile Rust changes for v6.12 2024-09-25 10:25:40 -07:00
bindgen_parameters rust: fix `ARCH_SLAB_MINALIGN` multiple definition error 2024-09-26 17:52:35 +02:00
build_error.rs rust: add `build_error` crate 2022-12-04 01:59:16 +01:00
compiler_builtins.rs rust: add intrinsics to fix `-Os` builds 2024-08-10 00:05:10 +02:00
exports.c rust: kbuild: auto generate helper exports 2024-08-19 11:09:02 +02:00