Skip to content

Commit d20339f

Browse files
committed
Merge tag 'net-5.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni: "Including fixes from wireless and netfilter. Current release - regressions: - smc: fix af_ops of child socket pointing to released memory - wifi: ath9k: fix usage of driver-private space in tx_info Previous releases - regressions: - ipv6: fix panic when forwarding a pkt with no in6 dev - sctp: use the correct skb for security_sctp_assoc_request - smc: fix NULL pointer dereference in smc_pnet_find_ib() - sched: fix initialization order when updating chain 0 head - phy: don't defer probe forever if PHY IRQ provider is missing - dsa: revert "net: dsa: setup master before ports" - dsa: felix: fix tagging protocol changes with multiple CPU ports - eth: ice: - fix use-after-free when freeing @rx_cpu_rmap - revert "iavf: fix deadlock occurrence during resetting VF interface" - eth: lan966x: stop processing the MAC entry is port is wrong Previous releases - always broken: - sched: - flower: fix parsing of ethertype following VLAN header - taprio: check if socket flags are valid - nfc: add flush_workqueue to prevent uaf - veth: ensure eth header is in skb's linear part - eth: stmmac: fix altr_tse_pcs function when using a fixed-link - eth: macb: restart tx only if queue pointer is lagging - eth: macvlan: fix leaking skb in source mode with nodst option" * tag 'net-5.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (52 commits) net: bcmgenet: Revert "Use stronger register read/writes to assure ordering" rtnetlink: Fix handling of disabled L3 stats in RTM_GETSTATS replies net: dsa: felix: fix tagging protocol changes with multiple CPU ports tun: annotate access to queue->trans_start nfc: nci: add flush_workqueue to prevent uaf net: dsa: realtek: don't parse compatible string for RTL8366S net: dsa: realtek: fix Kconfig to assure consistent driver linkage net: ftgmac100: access hardware register after clock ready Revert "net: dsa: setup master before ports" macvlan: Fix leaking skb in source mode with nodst option netfilter: nf_tables: nft_parse_register can return a negative value net: lan966x: Stop processing the MAC entry is port is wrong. net: lan966x: Fix when a port's upper is changed. net: lan966x: Fix IGMP snooping when frames have vlan tag net: lan966x: Update lan966x_ptp_get_nominal_value sctp: Initialize daddr on peeled off socket net/smc: Fix af_ops of child socket pointing to released memory net/smc: Fix NULL pointer dereference in smc_pnet_find_ib() net/smc: use memcpy instead of snprintf to avoid out of bounds read net: macb: Restart tx only if queue pointer is lagging ...
2 parents b9b4c79 + 2df3fc4 commit d20339f

56 files changed

Lines changed: 292 additions & 185 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/devicetree/bindings/net/socionext,uniphier-ave4.yaml

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ description: |
1313
This describes the devicetree bindings for AVE ethernet controller
1414
implemented on Socionext UniPhier SoCs.
1515
16-
allOf:
17-
- $ref: ethernet-controller.yaml#
18-
1916
properties:
2017
compatible:
2118
enum:
@@ -44,25 +41,13 @@ properties:
4441
minItems: 1
4542
maxItems: 4
4643

47-
clock-names:
48-
oneOf:
49-
- items: # for Pro4
50-
- const: gio
51-
- const: ether
52-
- const: ether-gb
53-
- const: ether-phy
54-
- const: ether # for others
44+
clock-names: true
5545

5646
resets:
5747
minItems: 1
5848
maxItems: 2
5949

60-
reset-names:
61-
oneOf:
62-
- items: # for Pro4
63-
- const: gio
64-
- const: ether
65-
- const: ether # for others
50+
reset-names: true
6651

6752
socionext,syscon-phy-mode:
6853
$ref: /schemas/types.yaml#/definitions/phandle-array
@@ -78,6 +63,42 @@ properties:
7863
$ref: mdio.yaml#
7964
unevaluatedProperties: false
8065

66+
allOf:
67+
- $ref: ethernet-controller.yaml#
68+
- if:
69+
properties:
70+
compatible:
71+
contains:
72+
const: socionext,uniphier-pro4-ave4
73+
then:
74+
properties:
75+
clocks:
76+
minItems: 4
77+
maxItems: 4
78+
clock-names:
79+
items:
80+
- const: gio
81+
- const: ether
82+
- const: ether-gb
83+
- const: ether-phy
84+
resets:
85+
minItems: 2
86+
maxItems: 2
87+
reset-names:
88+
items:
89+
- const: gio
90+
- const: ether
91+
else:
92+
properties:
93+
clocks:
94+
maxItems: 1
95+
clock-names:
96+
const: ether
97+
resets:
98+
maxItems: 1
99+
reset-names:
100+
const: ether
101+
81102
required:
82103
- compatible
83104
- reg
@@ -90,7 +111,7 @@ required:
90111
- reset-names
91112
- mdio
92113

93-
additionalProperties: false
114+
unevaluatedProperties: false
94115

95116
examples:
96117
- |

Documentation/networking/bonding.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ xmit_hash_policy
894894
Uses XOR of hardware MAC addresses and packet type ID
895895
field to generate the hash. The formula is
896896

897-
hash = source MAC XOR destination MAC XOR packet type ID
897+
hash = source MAC[5] XOR destination MAC[5] XOR packet type ID
898898
slave number = hash modulo slave count
899899

900900
This algorithm will place all traffic to a particular
@@ -910,7 +910,7 @@ xmit_hash_policy
910910
Uses XOR of hardware MAC addresses and IP addresses to
911911
generate the hash. The formula is
912912

913-
hash = source MAC XOR destination MAC XOR packet type ID
913+
hash = source MAC[5] XOR destination MAC[5] XOR packet type ID
914914
hash = hash XOR source IP XOR destination IP
915915
hash = hash XOR (hash RSHIFT 16)
916916
hash = hash XOR (hash RSHIFT 8)

MAINTAINERS

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ F: include/net/ieee80211_radiotap.h
201201
F: include/net/iw_handler.h
202202
F: include/net/wext.h
203203
F: include/uapi/linux/nl80211.h
204+
F: include/uapi/linux/wireless.h
204205
F: net/wireless/
205206

206207
8169 10/100/1000 GIGABIT ETHERNET DRIVER
@@ -12402,7 +12403,7 @@ F: drivers/mmc/host/mtk-sd.c
1240212403

1240312404
MEDIATEK MT76 WIRELESS LAN DRIVER
1240412405
M: Felix Fietkau <nbd@nbd.name>
12405-
M: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
12406+
M: Lorenzo Bianconi <lorenzo@kernel.org>
1240612407
M: Ryder Lee <ryder.lee@mediatek.com>
1240712408
R: Shayne Chen <shayne.chen@mediatek.com>
1240812409
R: Sean Wang <sean.wang@mediatek.com>
@@ -21227,10 +21228,8 @@ S: Maintained
2122721228
F: drivers/hid/hid-wiimote*
2122821229

2122921230
WILOCITY WIL6210 WIRELESS DRIVER
21230-
M: Maya Erez <merez@codeaurora.org>
2123121231
L: linux-wireless@vger.kernel.org
21232-
L: wil6210@qti.qualcomm.com
21233-
S: Supported
21232+
S: Orphan
2123421233
W: https://wireless.wiki.kernel.org/en/users/Drivers/wil6210
2123521234
F: drivers/net/wireless/ath/wil6210/
2123621235

drivers/base/dd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ int driver_deferred_probe_check_state(struct device *dev)
296296

297297
return -EPROBE_DEFER;
298298
}
299+
EXPORT_SYMBOL_GPL(driver_deferred_probe_check_state);
299300

300301
static void deferred_probe_timeout_work_func(struct work_struct *work)
301302
{

drivers/net/dsa/ocelot/felix.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,13 +670,36 @@ static int felix_change_tag_protocol(struct dsa_switch *ds, int cpu,
670670
struct ocelot *ocelot = ds->priv;
671671
struct felix *felix = ocelot_to_felix(ocelot);
672672
enum dsa_tag_protocol old_proto = felix->tag_proto;
673+
bool cpu_port_active = false;
674+
struct dsa_port *dp;
673675
int err;
674676

675677
if (proto != DSA_TAG_PROTO_SEVILLE &&
676678
proto != DSA_TAG_PROTO_OCELOT &&
677679
proto != DSA_TAG_PROTO_OCELOT_8021Q)
678680
return -EPROTONOSUPPORT;
679681

682+
/* We don't support multiple CPU ports, yet the DT blob may have
683+
* multiple CPU ports defined. The first CPU port is the active one,
684+
* the others are inactive. In this case, DSA will call
685+
* ->change_tag_protocol() multiple times, once per CPU port.
686+
* Since we implement the tagging protocol change towards "ocelot" or
687+
* "seville" as effectively initializing the NPI port, what we are
688+
* doing is effectively changing who the NPI port is to the last @cpu
689+
* argument passed, which is an unused DSA CPU port and not the one
690+
* that should actively pass traffic.
691+
* Suppress DSA's calls on CPU ports that are inactive.
692+
*/
693+
dsa_switch_for_each_user_port(dp, ds) {
694+
if (dp->cpu_dp->index == cpu) {
695+
cpu_port_active = true;
696+
break;
697+
}
698+
}
699+
700+
if (!cpu_port_active)
701+
return 0;
702+
680703
felix_del_tag_protocol(ds, cpu, old_proto);
681704

682705
err = felix_set_tag_protocol(ds, cpu, proto);

drivers/net/dsa/ocelot/felix_vsc9959.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2316,7 +2316,7 @@ static int felix_pci_probe(struct pci_dev *pdev,
23162316

23172317
err = dsa_register_switch(ds);
23182318
if (err) {
2319-
dev_err(&pdev->dev, "Failed to register DSA switch: %d\n", err);
2319+
dev_err_probe(&pdev->dev, err, "Failed to register DSA switch\n");
23202320
goto err_register_ds;
23212321
}
23222322

drivers/net/dsa/realtek/Kconfig

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,46 @@ menuconfig NET_DSA_REALTEK
99
help
1010
Select to enable support for Realtek Ethernet switch chips.
1111

12+
Note that at least one interface driver must be enabled for the
13+
subdrivers to be loaded. Moreover, an interface driver cannot achieve
14+
anything without at least one subdriver enabled.
15+
16+
if NET_DSA_REALTEK
17+
1218
config NET_DSA_REALTEK_MDIO
13-
tristate "Realtek MDIO connected switch driver"
14-
depends on NET_DSA_REALTEK
19+
tristate "Realtek MDIO interface driver"
1520
depends on OF
21+
depends on NET_DSA_REALTEK_RTL8365MB || NET_DSA_REALTEK_RTL8366RB
22+
depends on NET_DSA_REALTEK_RTL8365MB || !NET_DSA_REALTEK_RTL8365MB
23+
depends on NET_DSA_REALTEK_RTL8366RB || !NET_DSA_REALTEK_RTL8366RB
1624
help
1725
Select to enable support for registering switches configured
1826
through MDIO.
1927

2028
config NET_DSA_REALTEK_SMI
21-
tristate "Realtek SMI connected switch driver"
22-
depends on NET_DSA_REALTEK
29+
tristate "Realtek SMI interface driver"
2330
depends on OF
31+
depends on NET_DSA_REALTEK_RTL8365MB || NET_DSA_REALTEK_RTL8366RB
32+
depends on NET_DSA_REALTEK_RTL8365MB || !NET_DSA_REALTEK_RTL8365MB
33+
depends on NET_DSA_REALTEK_RTL8366RB || !NET_DSA_REALTEK_RTL8366RB
2434
help
2535
Select to enable support for registering switches connected
2636
through SMI.
2737

2838
config NET_DSA_REALTEK_RTL8365MB
2939
tristate "Realtek RTL8365MB switch subdriver"
30-
depends on NET_DSA_REALTEK
31-
depends on NET_DSA_REALTEK_SMI || NET_DSA_REALTEK_MDIO
40+
imply NET_DSA_REALTEK_SMI
41+
imply NET_DSA_REALTEK_MDIO
3242
select NET_DSA_TAG_RTL8_4
3343
help
3444
Select to enable support for Realtek RTL8365MB-VC and RTL8367S.
3545

3646
config NET_DSA_REALTEK_RTL8366RB
3747
tristate "Realtek RTL8366RB switch subdriver"
38-
depends on NET_DSA_REALTEK
39-
depends on NET_DSA_REALTEK_SMI || NET_DSA_REALTEK_MDIO
48+
imply NET_DSA_REALTEK_SMI
49+
imply NET_DSA_REALTEK_MDIO
4050
select NET_DSA_TAG_RTL4_A
4151
help
42-
Select to enable support for Realtek RTL8366RB
52+
Select to enable support for Realtek RTL8366RB.
53+
54+
endif

drivers/net/dsa/realtek/realtek-smi.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -546,11 +546,6 @@ static const struct of_device_id realtek_smi_of_match[] = {
546546
.data = &rtl8366rb_variant,
547547
},
548548
#endif
549-
{
550-
/* FIXME: add support for RTL8366S and more */
551-
.compatible = "realtek,rtl8366s",
552-
.data = NULL,
553-
},
554549
#if IS_ENABLED(CONFIG_NET_DSA_REALTEK_RTL8365MB)
555550
{
556551
.compatible = "realtek,rtl8365mb",

drivers/net/ethernet/aquantia/atlantic/aq_nic.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,8 @@ int aq_nic_start(struct aq_nic_s *self)
486486
if (err < 0)
487487
goto err_exit;
488488

489-
for (i = 0U, aq_vec = self->aq_vec[0];
490-
self->aq_vecs > i; ++i, aq_vec = self->aq_vec[i]) {
489+
for (i = 0U; self->aq_vecs > i; ++i) {
490+
aq_vec = self->aq_vec[i];
491491
err = aq_vec_start(aq_vec);
492492
if (err < 0)
493493
goto err_exit;
@@ -517,8 +517,8 @@ int aq_nic_start(struct aq_nic_s *self)
517517
mod_timer(&self->polling_timer, jiffies +
518518
AQ_CFG_POLLING_TIMER_INTERVAL);
519519
} else {
520-
for (i = 0U, aq_vec = self->aq_vec[0];
521-
self->aq_vecs > i; ++i, aq_vec = self->aq_vec[i]) {
520+
for (i = 0U; self->aq_vecs > i; ++i) {
521+
aq_vec = self->aq_vec[i];
522522
err = aq_pci_func_alloc_irq(self, i, self->ndev->name,
523523
aq_vec_isr, aq_vec,
524524
aq_vec_get_affinity_mask(aq_vec));

drivers/net/ethernet/aquantia/atlantic/aq_vec.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ static int aq_vec_poll(struct napi_struct *napi, int budget)
4343
if (!self) {
4444
err = -EINVAL;
4545
} else {
46-
for (i = 0U, ring = self->ring[0];
47-
self->tx_rings > i; ++i, ring = self->ring[i]) {
46+
for (i = 0U; self->tx_rings > i; ++i) {
47+
ring = self->ring[i];
4848
u64_stats_update_begin(&ring[AQ_VEC_RX_ID].stats.rx.syncp);
4949
ring[AQ_VEC_RX_ID].stats.rx.polls++;
5050
u64_stats_update_end(&ring[AQ_VEC_RX_ID].stats.rx.syncp);
@@ -182,8 +182,8 @@ int aq_vec_init(struct aq_vec_s *self, const struct aq_hw_ops *aq_hw_ops,
182182
self->aq_hw_ops = aq_hw_ops;
183183
self->aq_hw = aq_hw;
184184

185-
for (i = 0U, ring = self->ring[0];
186-
self->tx_rings > i; ++i, ring = self->ring[i]) {
185+
for (i = 0U; self->tx_rings > i; ++i) {
186+
ring = self->ring[i];
187187
err = aq_ring_init(&ring[AQ_VEC_TX_ID], ATL_RING_TX);
188188
if (err < 0)
189189
goto err_exit;
@@ -224,8 +224,8 @@ int aq_vec_start(struct aq_vec_s *self)
224224
unsigned int i = 0U;
225225
int err = 0;
226226

227-
for (i = 0U, ring = self->ring[0];
228-
self->tx_rings > i; ++i, ring = self->ring[i]) {
227+
for (i = 0U; self->tx_rings > i; ++i) {
228+
ring = self->ring[i];
229229
err = self->aq_hw_ops->hw_ring_tx_start(self->aq_hw,
230230
&ring[AQ_VEC_TX_ID]);
231231
if (err < 0)
@@ -248,8 +248,8 @@ void aq_vec_stop(struct aq_vec_s *self)
248248
struct aq_ring_s *ring = NULL;
249249
unsigned int i = 0U;
250250

251-
for (i = 0U, ring = self->ring[0];
252-
self->tx_rings > i; ++i, ring = self->ring[i]) {
251+
for (i = 0U; self->tx_rings > i; ++i) {
252+
ring = self->ring[i];
253253
self->aq_hw_ops->hw_ring_tx_stop(self->aq_hw,
254254
&ring[AQ_VEC_TX_ID]);
255255

@@ -268,8 +268,8 @@ void aq_vec_deinit(struct aq_vec_s *self)
268268
if (!self)
269269
goto err_exit;
270270

271-
for (i = 0U, ring = self->ring[0];
272-
self->tx_rings > i; ++i, ring = self->ring[i]) {
271+
for (i = 0U; self->tx_rings > i; ++i) {
272+
ring = self->ring[i];
273273
aq_ring_tx_clean(&ring[AQ_VEC_TX_ID]);
274274
aq_ring_rx_deinit(&ring[AQ_VEC_RX_ID]);
275275
}
@@ -297,8 +297,8 @@ void aq_vec_ring_free(struct aq_vec_s *self)
297297
if (!self)
298298
goto err_exit;
299299

300-
for (i = 0U, ring = self->ring[0];
301-
self->tx_rings > i; ++i, ring = self->ring[i]) {
300+
for (i = 0U; self->tx_rings > i; ++i) {
301+
ring = self->ring[i];
302302
aq_ring_free(&ring[AQ_VEC_TX_ID]);
303303
if (i < self->rx_rings)
304304
aq_ring_free(&ring[AQ_VEC_RX_ID]);

0 commit comments

Comments
 (0)