704-05-v5.17-net-mtk_eth_soc-mark-as-a-legacy_pre_march2020-drive.patch 1.2 KB

1234567891011121314151617181920212223242526272829
  1. From b06515367facfadcf5e70cf6f39db749cf4eb5e3 Mon Sep 17 00:00:00 2001
  2. From: "Russell King (Oracle)" <[email protected]>
  3. Date: Thu, 9 Dec 2021 13:11:43 +0000
  4. Subject: [PATCH] net: mtk_eth_soc: mark as a legacy_pre_march2020 driver
  5. mtk_eth_soc has not been updated for commit 7cceb599d15d ("net: phylink:
  6. avoid mac_config calls"), and makes use of state->speed and
  7. state->duplex in contravention of the phylink documentation. This makes
  8. reliant on the legacy behaviours, so mark it as a legacy driver.
  9. Signed-off-by: Russell King (Oracle) <[email protected]>
  10. Signed-off-by: Jakub Kicinski <[email protected]>
  11. ---
  12. drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ++++
  13. 1 file changed, 4 insertions(+)
  14. --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
  15. +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
  16. @@ -3275,6 +3275,10 @@ static int mtk_add_mac(struct mtk_eth *e
  17. mac->phylink_config.dev = &eth->netdev[id]->dev;
  18. mac->phylink_config.type = PHYLINK_NETDEV;
  19. + /* This driver makes use of state->speed/state->duplex in
  20. + * mac_config
  21. + */
  22. + mac->phylink_config.legacy_pre_march2020 = true;
  23. mac->phylink_config.mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
  24. MAC_10 | MAC_100 | MAC_1000 | MAC_2500FD;