1286911d2e340a525e4edb6211506f52f5ba8cf3
[librecmc/librecmc.git] /
1 From b290c6384afabbca5ae6e2af72fb1b2bc37922be Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Thu, 16 Sep 2021 14:03:52 +0200
4 Subject: [PATCH] net: dsa: b53: Drop BCM5301x workaround for a wrong CPU/IMP
5  port
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 On BCM5301x port 8 requires a fixed link when used.
11
12 Years ago when b53 was an libreCMC downstream driver (with configuration
13 based on sometimes bugged NVRAM) there was a need for a fixup. In case
14 of forcing fixed link for (incorrectly specified) port 5 the code had to
15 actually setup port 8 link.
16
17 For upstream b53 driver with setup based on DT there is no need for that
18 workaround. In DT we have and require correct ports setup.
19
20 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
21 Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
22 Tested-by: Florian Fainelli <f.fainelli@gmail.com>
23 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
24 ---
25  drivers/net/dsa/b53/b53_common.c | 6 ------
26  1 file changed, 6 deletions(-)
27
28 --- a/drivers/net/dsa/b53/b53_common.c
29 +++ b/drivers/net/dsa/b53/b53_common.c
30 @@ -1291,12 +1291,6 @@ static void b53_adjust_link(struct dsa_s
31                                 return;
32                         }
33                 }
34 -       } else if (is5301x(dev)) {
35 -               if (port != dev->cpu_port) {
36 -                       b53_force_port_config(dev, dev->cpu_port, 2000,
37 -                                             DUPLEX_FULL, true, true);
38 -                       b53_force_link(dev, dev->cpu_port, 1);
39 -               }
40         }
41  
42         /* Re-negotiate EEE if it was enabled already */