History

net: phylink: add legacy_pre_march2020 indicator

Add a boolean to phylink_config to indicate whether a driver has not been updated for the changes in commit 7cceb599d15d ("net: phylink: avoid mac_config calls"), and thus are reliant on the old behaviour. We were currently keying the phylink behaviour on the presence of a PCS, but this is sub-optimal for modern drivers that may not have a PCS. This commit merely introduces the new flag, but does not add any use, since we need all legacy drivers to set this flag before it can be used. Once these legacy drivers have been updated, we can remove this flag.

Russell King (Oracle) committed 4 years ago

Commit 3e5b1fe1 parent 9d922f51 file · +3 −0Browse files

Unified · Split

include/linux/phylink.h+3−0
@@ -84,6 +84,8 @@ enum phylink_op_type { · 83 unmodified lines
84 * struct phylink_config - PHYLINK configuration structure84 * struct phylink_config - PHYLINK configuration structure
85 * @dev: a pointer to a struct device associated with the MAC85 * @dev: a pointer to a struct device associated with the MAC
86 * @type: operation type of PHYLINK instance86 * @type: operation type of PHYLINK instance
87 * @legacy_pre_march2020: driver has not been updated for March 2020 updates
88 * (See commit 7cceb599d15d ("net: phylink: avoid mac_config calls")
87 * @pcs_poll: MAC PCS cannot provide link change interrupt89 * @pcs_poll: MAC PCS cannot provide link change interrupt
88 * @poll_fixed_state: if true, starts link_poll,90 * @poll_fixed_state: if true, starts link_poll,
89 * if MAC link is at %MLO_AN_FIXED mode.91 * if MAC link is at %MLO_AN_FIXED mode.
@@ -97,6 +99,7 @@ enum phylink_op_type { · 7 unmodified lines
97struct phylink_config {99struct phylink_config {
98 struct device *dev;100 struct device *dev;
99 enum phylink_op_type type;101 enum phylink_op_type type;
102 bool legacy_pre_march2020;
100 bool pcs_poll;103 bool pcs_poll;
101 bool poll_fixed_state;104 bool poll_fixed_state;
102 bool ovr_an_inband;105 bool ovr_an_inband;