kernel: 5.10: compress 7xx patch numbering
[openwrt/staging/thess.git] / target / linux / generic / backport-5.10 / 743-v5.16-0004-net-dsa-b53-Drop-unused-cpu_port-field.patch
1 From 7d5af56418d7d01e43247a33b6fe6492ea871923 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:54 +0200
4 Subject: [PATCH] net: dsa: b53: Drop unused "cpu_port" field
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 It's set but never used anymore.
10
11 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
12 Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
13 Tested-by: Florian Fainelli <f.fainelli@gmail.com>
14 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
15 ---
16 drivers/net/dsa/b53/b53_common.c | 28 ----------------------------
17 drivers/net/dsa/b53/b53_priv.h | 1 -
18 2 files changed, 29 deletions(-)
19
20 --- a/drivers/net/dsa/b53/b53_common.c
21 +++ b/drivers/net/dsa/b53/b53_common.c
22 @@ -2286,7 +2286,6 @@ static const struct b53_chip_data b53_sw
23 .arl_bins = 2,
24 .arl_buckets = 1024,
25 .imp_port = 5,
26 - .cpu_port = B53_CPU_PORT_25,
27 .duplex_reg = B53_DUPLEX_STAT_FE,
28 },
29 {
30 @@ -2297,7 +2296,6 @@ static const struct b53_chip_data b53_sw
31 .arl_bins = 2,
32 .arl_buckets = 1024,
33 .imp_port = 5,
34 - .cpu_port = B53_CPU_PORT_25,
35 .duplex_reg = B53_DUPLEX_STAT_FE,
36 },
37 {
38 @@ -2308,7 +2306,6 @@ static const struct b53_chip_data b53_sw
39 .arl_bins = 4,
40 .arl_buckets = 1024,
41 .imp_port = 8,
42 - .cpu_port = B53_CPU_PORT,
43 .vta_regs = B53_VTA_REGS,
44 .duplex_reg = B53_DUPLEX_STAT_GE,
45 .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
46 @@ -2322,7 +2319,6 @@ static const struct b53_chip_data b53_sw
47 .arl_bins = 4,
48 .arl_buckets = 1024,
49 .imp_port = 8,
50 - .cpu_port = B53_CPU_PORT,
51 .vta_regs = B53_VTA_REGS,
52 .duplex_reg = B53_DUPLEX_STAT_GE,
53 .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
54 @@ -2336,7 +2332,6 @@ static const struct b53_chip_data b53_sw
55 .arl_bins = 4,
56 .arl_buckets = 1024,
57 .imp_port = 8,
58 - .cpu_port = B53_CPU_PORT,
59 .vta_regs = B53_VTA_REGS_9798,
60 .duplex_reg = B53_DUPLEX_STAT_GE,
61 .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
62 @@ -2350,7 +2345,6 @@ static const struct b53_chip_data b53_sw
63 .arl_bins = 4,
64 .arl_buckets = 1024,
65 .imp_port = 8,
66 - .cpu_port = B53_CPU_PORT,
67 .vta_regs = B53_VTA_REGS_9798,
68 .duplex_reg = B53_DUPLEX_STAT_GE,
69 .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
70 @@ -2365,7 +2359,6 @@ static const struct b53_chip_data b53_sw
71 .arl_buckets = 1024,
72 .vta_regs = B53_VTA_REGS,
73 .imp_port = 8,
74 - .cpu_port = B53_CPU_PORT,
75 .duplex_reg = B53_DUPLEX_STAT_GE,
76 .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
77 .jumbo_size_reg = B53_JUMBO_MAX_SIZE,
78 @@ -2378,7 +2371,6 @@ static const struct b53_chip_data b53_sw
79 .arl_bins = 4,
80 .arl_buckets = 1024,
81 .imp_port = 8,
82 - .cpu_port = B53_CPU_PORT,
83 .vta_regs = B53_VTA_REGS,
84 .duplex_reg = B53_DUPLEX_STAT_GE,
85 .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
86 @@ -2392,7 +2384,6 @@ static const struct b53_chip_data b53_sw
87 .arl_bins = 4,
88 .arl_buckets = 1024,
89 .imp_port = 8,
90 - .cpu_port = B53_CPU_PORT,
91 .vta_regs = B53_VTA_REGS,
92 .duplex_reg = B53_DUPLEX_STAT_GE,
93 .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
94 @@ -2406,7 +2397,6 @@ static const struct b53_chip_data b53_sw
95 .arl_bins = 4,
96 .arl_buckets = 1024,
97 .imp_port = 8,
98 - .cpu_port = B53_CPU_PORT,
99 .vta_regs = B53_VTA_REGS_63XX,
100 .duplex_reg = B53_DUPLEX_STAT_63XX,
101 .jumbo_pm_reg = B53_JUMBO_PORT_MASK_63XX,
102 @@ -2420,7 +2410,6 @@ static const struct b53_chip_data b53_sw
103 .arl_bins = 4,
104 .arl_buckets = 1024,
105 .imp_port = 8,
106 - .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
107 .vta_regs = B53_VTA_REGS,
108 .duplex_reg = B53_DUPLEX_STAT_GE,
109 .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
110 @@ -2434,7 +2423,6 @@ static const struct b53_chip_data b53_sw
111 .arl_bins = 4,
112 .arl_buckets = 1024,
113 .imp_port = 8,
114 - .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
115 .vta_regs = B53_VTA_REGS,
116 .duplex_reg = B53_DUPLEX_STAT_GE,
117 .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
118 @@ -2448,7 +2436,6 @@ static const struct b53_chip_data b53_sw
119 .arl_bins = 4,
120 .arl_buckets = 1024,
121 .imp_port = 8,
122 - .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
123 .vta_regs = B53_VTA_REGS,
124 .duplex_reg = B53_DUPLEX_STAT_GE,
125 .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
126 @@ -2462,7 +2449,6 @@ static const struct b53_chip_data b53_sw
127 .arl_bins = 4,
128 .arl_buckets = 1024,
129 .imp_port = 8,
130 - .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
131 .vta_regs = B53_VTA_REGS,
132 .duplex_reg = B53_DUPLEX_STAT_GE,
133 .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
134 @@ -2476,7 +2462,6 @@ static const struct b53_chip_data b53_sw
135 .arl_bins = 4,
136 .arl_buckets = 1024,
137 .imp_port = 8,
138 - .cpu_port = B53_CPU_PORT_25, /* TODO: auto detect */
139 .vta_regs = B53_VTA_REGS,
140 .duplex_reg = B53_DUPLEX_STAT_GE,
141 .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
142 @@ -2490,7 +2475,6 @@ static const struct b53_chip_data b53_sw
143 .arl_bins = 4,
144 .arl_buckets = 1024,
145 .imp_port = 8,
146 - .cpu_port = B53_CPU_PORT,
147 .vta_regs = B53_VTA_REGS,
148 .duplex_reg = B53_DUPLEX_STAT_GE,
149 .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
150 @@ -2504,7 +2488,6 @@ static const struct b53_chip_data b53_sw
151 .arl_bins = 4,
152 .arl_buckets = 1024,
153 .imp_port = 8,
154 - .cpu_port = B53_CPU_PORT,
155 .vta_regs = B53_VTA_REGS,
156 .duplex_reg = B53_DUPLEX_STAT_GE,
157 .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
158 @@ -2518,7 +2501,6 @@ static const struct b53_chip_data b53_sw
159 .arl_bins = 4,
160 .arl_buckets = 1024,
161 .imp_port = 8,
162 - .cpu_port = B53_CPU_PORT,
163 .vta_regs = B53_VTA_REGS,
164 .duplex_reg = B53_DUPLEX_STAT_GE,
165 .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
166 @@ -2532,7 +2514,6 @@ static const struct b53_chip_data b53_sw
167 .arl_bins = 4,
168 .arl_buckets = 256,
169 .imp_port = 8,
170 - .cpu_port = B53_CPU_PORT,
171 .vta_regs = B53_VTA_REGS,
172 .duplex_reg = B53_DUPLEX_STAT_GE,
173 .jumbo_pm_reg = B53_JUMBO_PORT_MASK,
174 @@ -2558,7 +2539,6 @@ static int b53_switch_init(struct b53_de
175 dev->vta_regs[2] = chip->vta_regs[2];
176 dev->jumbo_pm_reg = chip->jumbo_pm_reg;
177 dev->imp_port = chip->imp_port;
178 - dev->cpu_port = chip->cpu_port;
179 dev->num_vlans = chip->vlans;
180 dev->num_arl_bins = chip->arl_bins;
181 dev->num_arl_buckets = chip->arl_buckets;
182 @@ -2590,13 +2570,6 @@ static int b53_switch_init(struct b53_de
183 break;
184 #endif
185 }
186 - } else if (dev->chip_id == BCM53115_DEVICE_ID) {
187 - u64 strap_value;
188 -
189 - b53_read48(dev, B53_STAT_PAGE, B53_STRAP_VALUE, &strap_value);
190 - /* use second IMP port if GMII is enabled */
191 - if (strap_value & SV_GMII_CTRL_115)
192 - dev->cpu_port = 5;
193 }
194
195 dev->num_ports = fls(dev->enabled_ports);
196 --- a/drivers/net/dsa/b53/b53_priv.h
197 +++ b/drivers/net/dsa/b53/b53_priv.h
198 @@ -123,7 +123,6 @@ struct b53_device {
199 /* used ports mask */
200 u16 enabled_ports;
201 unsigned int imp_port;
202 - unsigned int cpu_port;
203
204 /* connect specific data */
205 u8 current_page;