Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
33 lines
1.3 KiB
Diff
33 lines
1.3 KiB
Diff
From 99d0f3a1095f4c938b1665025c29411edafe8a01 Mon Sep 17 00:00:00 2001
|
|
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
|
|
Date: Tue, 21 Mar 2023 15:58:44 +0000
|
|
Subject: [PATCH] net: dpaa2-mac: use Autoneg bit rather than an_enabled
|
|
|
|
The Autoneg bit in the advertising bitmap and state->an_enabled are
|
|
always identical. Thus, we will be removing state->an_enabled.
|
|
|
|
Use the Autoneg bit in the advertising bitmap to indicate whether
|
|
autonegotiation should be used, rather than using the an_enabled
|
|
member which will be going away. This means we use the same condition
|
|
as phylink_mii_c22_pcs_config().
|
|
|
|
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
|
|
Reviewed-by: Simon Horman <simon.horman@corigine.com>
|
|
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
---
|
|
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
|
|
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
|
|
@@ -158,7 +158,8 @@ static void dpaa2_mac_config(struct phyl
|
|
struct dpmac_link_state *dpmac_state = &mac->state;
|
|
int err;
|
|
|
|
- if (state->an_enabled)
|
|
+ if (linkmode_test_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
|
|
+ state->advertising))
|
|
dpmac_state->options |= DPMAC_LINK_OPT_AUTONEG;
|
|
else
|
|
dpmac_state->options &= ~DPMAC_LINK_OPT_AUTONEG;
|