2
0

715-10-v6.4-net-dpaa2-mac-use-Autoneg-bit-rather-than-an_enabled.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. From 99d0f3a1095f4c938b1665025c29411edafe8a01 Mon Sep 17 00:00:00 2001
  2. From: "Russell King (Oracle)" <[email protected]>
  3. Date: Tue, 21 Mar 2023 15:58:44 +0000
  4. Subject: [PATCH] net: dpaa2-mac: use Autoneg bit rather than an_enabled
  5. The Autoneg bit in the advertising bitmap and state->an_enabled are
  6. always identical. Thus, we will be removing state->an_enabled.
  7. Use the Autoneg bit in the advertising bitmap to indicate whether
  8. autonegotiation should be used, rather than using the an_enabled
  9. member which will be going away. This means we use the same condition
  10. as phylink_mii_c22_pcs_config().
  11. Signed-off-by: Russell King (Oracle) <[email protected]>
  12. Reviewed-by: Simon Horman <[email protected]>
  13. Signed-off-by: Jakub Kicinski <[email protected]>
  14. ---
  15. drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 3 ++-
  16. 1 file changed, 2 insertions(+), 1 deletion(-)
  17. --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
  18. +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
  19. @@ -158,7 +158,8 @@ static void dpaa2_mac_config(struct phyl
  20. struct dpmac_link_state *dpmac_state = &mac->state;
  21. int err;
  22. - if (state->an_enabled)
  23. + if (linkmode_test_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
  24. + state->advertising))
  25. dpmac_state->options |= DPMAC_LINK_OPT_AUTONEG;
  26. else
  27. dpmac_state->options &= ~DPMAC_LINK_OPT_AUTONEG;