提交 3e5b1fec 编写于 作者: R Russell King (Oracle) 提交者: Jakub Kicinski

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 7cceb599 ("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.
Signed-off-by: NRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: NJakub Kicinski <kuba@kernel.org>
上级 9d922f5d
...@@ -84,6 +84,8 @@ enum phylink_op_type { ...@@ -84,6 +84,8 @@ enum phylink_op_type {
* struct phylink_config - PHYLINK configuration structure * struct phylink_config - PHYLINK configuration structure
* @dev: a pointer to a struct device associated with the MAC * @dev: a pointer to a struct device associated with the MAC
* @type: operation type of PHYLINK instance * @type: operation type of PHYLINK instance
* @legacy_pre_march2020: driver has not been updated for March 2020 updates
* (See commit 7cceb599d15d ("net: phylink: avoid mac_config calls")
* @pcs_poll: MAC PCS cannot provide link change interrupt * @pcs_poll: MAC PCS cannot provide link change interrupt
* @poll_fixed_state: if true, starts link_poll, * @poll_fixed_state: if true, starts link_poll,
* if MAC link is at %MLO_AN_FIXED mode. * if MAC link is at %MLO_AN_FIXED mode.
...@@ -97,6 +99,7 @@ enum phylink_op_type { ...@@ -97,6 +99,7 @@ enum phylink_op_type {
struct phylink_config { struct phylink_config {
struct device *dev; struct device *dev;
enum phylink_op_type type; enum phylink_op_type type;
bool legacy_pre_march2020;
bool pcs_poll; bool pcs_poll;
bool poll_fixed_state; bool poll_fixed_state;
bool ovr_an_inband; bool ovr_an_inband;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册