703-12-v5.17-net-phylink-add-legacy_pre_march2020-indicator.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From 3e5b1feccea7db576353ffc302f78d522e4116e6 Mon Sep 17 00:00:00 2001
  2. From: "Russell King (Oracle)" <[email protected]>
  3. Date: Thu, 9 Dec 2021 13:11:32 +0000
  4. Subject: [PATCH] net: phylink: add legacy_pre_march2020 indicator
  5. Add a boolean to phylink_config to indicate whether a driver has not
  6. been updated for the changes in commit 7cceb599d15d ("net: phylink:
  7. avoid mac_config calls"), and thus are reliant on the old behaviour.
  8. We were currently keying the phylink behaviour on the presence of a
  9. PCS, but this is sub-optimal for modern drivers that may not have a
  10. PCS.
  11. This commit merely introduces the new flag, but does not add any use,
  12. since we need all legacy drivers to set this flag before it can be
  13. used. Once these legacy drivers have been updated, we can remove this
  14. flag.
  15. Signed-off-by: Russell King (Oracle) <[email protected]>
  16. Signed-off-by: Jakub Kicinski <[email protected]>
  17. ---
  18. include/linux/phylink.h | 3 +++
  19. 1 file changed, 3 insertions(+)
  20. --- a/include/linux/phylink.h
  21. +++ b/include/linux/phylink.h
  22. @@ -84,6 +84,8 @@ enum phylink_op_type {
  23. * struct phylink_config - PHYLINK configuration structure
  24. * @dev: a pointer to a struct device associated with the MAC
  25. * @type: operation type of PHYLINK instance
  26. + * @legacy_pre_march2020: driver has not been updated for March 2020 updates
  27. + * (See commit 7cceb599d15d ("net: phylink: avoid mac_config calls")
  28. * @pcs_poll: MAC PCS cannot provide link change interrupt
  29. * @poll_fixed_state: if true, starts link_poll,
  30. * if MAC link is at %MLO_AN_FIXED mode.
  31. @@ -97,6 +99,7 @@ enum phylink_op_type {
  32. struct phylink_config {
  33. struct device *dev;
  34. enum phylink_op_type type;
  35. + bool legacy_pre_march2020;
  36. bool pcs_poll;
  37. bool poll_fixed_state;
  38. bool ovr_an_inband;