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