Skip to content

Commit 0c1be0c

Browse files
author
Your Name
committed
Merge branch 'net-next-2025-04-02--00-00' into HEAD
2 parents f11a40d + f96b66d commit 0c1be0c

File tree

106 files changed

+1129
-568
lines changed

Some content is hidden

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

106 files changed

+1129
-568
lines changed

CREDITS

+4
Original file line numberDiff line numberDiff line change
@@ -3662,6 +3662,10 @@ S: 149 Union St.
36623662
S: Kingston, Ontario
36633663
S: Canada K7L 2P4
36643664

3665+
N: Pravin B Shelar
3666+
3667+
D: Open vSwitch maintenance and contributions
3668+
36653669
N: John Shifflett
36663670
36673671

Documentation/networking/netdevices.rst

+23
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,29 @@ there are two sets of interfaces: ``dev_xxx`` and ``netif_xxx`` (e.g.,
343343
acquiring the instance lock themselves, while the ``netif_xxx`` functions
344344
assume that the driver has already acquired the instance lock.
345345

346+
Notifiers and netdev instance lock
347+
==================================
348+
349+
For device drivers that implement shaping or queue management APIs,
350+
some of the notifiers (``enum netdev_cmd``) are running under the netdev
351+
instance lock.
352+
353+
For devices with locked ops, currently only the following notifiers are
354+
running under the lock:
355+
* ``NETDEV_REGISTER``
356+
* ``NETDEV_UP``
357+
358+
The following notifiers are running without the lock:
359+
* ``NETDEV_UNREGISTER``
360+
361+
There are no clear expectations for the remaining notifiers. Notifiers not on
362+
the list may run with or without the instance lock, potentially even invoking
363+
the same notifier type with and without the lock from different code paths.
364+
The goal is to eventually ensure that all (or most, with a few documented
365+
exceptions) notifiers run under the instance lock. Please extend this
366+
documentation whenever you make explicit assumption about lock being held
367+
from a notifier.
368+
346369
NETDEV_INTERNAL symbol namespace
347370
================================
348371

MAINTAINERS

+13-4
Original file line numberDiff line numberDiff line change
@@ -16805,6 +16805,13 @@ F: net/ethtool/mm.c
1680516805
F: tools/testing/selftests/drivers/net/hw/ethtool_mm.sh
1680616806
K: ethtool_mm
1680716807

16808+
NETWORKING [ETHTOOL PHY TOPOLOGY]
16809+
M: Maxime Chevallier <[email protected]>
16810+
F: Documentation/networking/phy-link-topology.rst
16811+
F: drivers/net/phy/phy_link_topology.c
16812+
F: include/linux/phy_link_topology.h
16813+
F: net/ethtool/phy.c
16814+
1680816815
NETWORKING [GENERAL]
1680916816
M: "David S. Miller" <[email protected]>
1681016817
M: Eric Dumazet <[email protected]>
@@ -18089,7 +18096,9 @@ F: drivers/irqchip/irq-ompic.c
1808918096
F: drivers/irqchip/irq-or1k-*
1809018097

1809118098
OPENVSWITCH
18092-
M: Pravin B Shelar <[email protected]>
18099+
M: Aaron Conole <[email protected]>
18100+
M: Eelco Chaudron <[email protected]>
18101+
M: Ilya Maximets <[email protected]>
1809318102
1809418103
1809518104
S: Maintained
@@ -19861,7 +19870,7 @@ F: Documentation/devicetree/bindings/i2c/qcom,i2c-geni-qcom.yaml
1986119870
F: drivers/i2c/busses/i2c-qcom-geni.c
1986219871

1986319872
QUALCOMM I2C CCI DRIVER
19864-
M: Loic Poulain <loic.poulain@linaro.org>
19873+
M: Loic Poulain <loic.poulain@oss.qualcomm.com>
1986519874
M: Robert Foss <[email protected]>
1986619875
1986719876
@@ -19994,7 +20003,7 @@ F: Documentation/devicetree/bindings/media/*venus*
1999420003
F: drivers/media/platform/qcom/venus/
1999520004

1999620005
QUALCOMM WCN36XX WIRELESS DRIVER
19997-
M: Loic Poulain <loic.poulain@linaro.org>
20006+
M: Loic Poulain <loic.poulain@oss.qualcomm.com>
1999820007
1999920008
S: Supported
2000020009
W: https://wireless.wiki.kernel.org/en/users/Drivers/wcn36xx
@@ -26032,7 +26041,7 @@ F: kernel/workqueue.c
2603226041
F: kernel/workqueue_internal.h
2603326042

2603426043
WWAN DRIVERS
26035-
M: Loic Poulain <loic.poulain@linaro.org>
26044+
M: Loic Poulain <loic.poulain@oss.qualcomm.com>
2603626045
M: Sergey Ryazanov <[email protected]>
2603726046
R: Johannes Berg <[email protected]>
2603826047

drivers/firmware/cirrus/Kconfig

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ config FW_CS_DSP_KUNIT_TEST_UTILS
1212
config FW_CS_DSP_KUNIT_TEST
1313
tristate "KUnit tests for Cirrus Logic cs_dsp" if !KUNIT_ALL_TESTS
1414
depends on KUNIT && REGMAP
15-
default KUNIT_ALL_TESTS
1615
select FW_CS_DSP
1716
select FW_CS_DSP_KUNIT_TEST_UTILS
1817
help

drivers/net/arcnet/com20020-pci.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -251,18 +251,25 @@ static int com20020pci_probe(struct pci_dev *pdev,
251251
card->tx_led.default_trigger = devm_kasprintf(&pdev->dev,
252252
GFP_KERNEL, "arc%d-%d-tx",
253253
dev->dev_id, i);
254+
if (!card->tx_led.default_trigger)
255+
return -ENOMEM;
254256
card->tx_led.name = devm_kasprintf(&pdev->dev, GFP_KERNEL,
255257
"pci:green:tx:%d-%d",
256258
dev->dev_id, i);
257-
259+
if (!card->tx_led.name)
260+
return -ENOMEM;
258261
card->tx_led.dev = &dev->dev;
259262
card->recon_led.brightness_set = led_recon_set;
260263
card->recon_led.default_trigger = devm_kasprintf(&pdev->dev,
261264
GFP_KERNEL, "arc%d-%d-recon",
262265
dev->dev_id, i);
266+
if (!card->recon_led.default_trigger)
267+
return -ENOMEM;
263268
card->recon_led.name = devm_kasprintf(&pdev->dev, GFP_KERNEL,
264269
"pci:red:recon:%d-%d",
265270
dev->dev_id, i);
271+
if (!card->recon_led.name)
272+
return -ENOMEM;
266273
card->recon_led.dev = &dev->dev;
267274

268275
ret = devm_led_classdev_register(&pdev->dev, &card->tx_led);

drivers/net/bonding/bond_main.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -1098,8 +1098,13 @@ static void bond_do_fail_over_mac(struct bonding *bond,
10981098
old_active = bond_get_old_active(bond, new_active);
10991099

11001100
if (old_active) {
1101-
bond_hw_addr_copy(tmp_mac, new_active->dev->dev_addr,
1102-
new_active->dev->addr_len);
1101+
if (memcmp(old_active->dev->dev_addr, new_active->dev->dev_addr,
1102+
new_active->dev->addr_len) == 0)
1103+
bond_hw_addr_copy(tmp_mac, new_active->perm_hwaddr,
1104+
new_active->dev->addr_len);
1105+
else
1106+
bond_hw_addr_copy(tmp_mac, new_active->dev->dev_addr,
1107+
new_active->dev->addr_len);
11031108
bond_hw_addr_copy(ss.__data,
11041109
old_active->dev->dev_addr,
11051110
old_active->dev->addr_len);

drivers/net/dsa/mv88e6xxx/chip.c

+7-4
Original file line numberDiff line numberDiff line change
@@ -7350,13 +7350,13 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
73507350
err = mv88e6xxx_switch_reset(chip);
73517351
mv88e6xxx_reg_unlock(chip);
73527352
if (err)
7353-
goto out;
7353+
goto out_phy;
73547354

73557355
if (np) {
73567356
chip->irq = of_irq_get(np, 0);
73577357
if (chip->irq == -EPROBE_DEFER) {
73587358
err = chip->irq;
7359-
goto out;
7359+
goto out_phy;
73607360
}
73617361
}
73627362

@@ -7375,7 +7375,7 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
73757375
mv88e6xxx_reg_unlock(chip);
73767376

73777377
if (err)
7378-
goto out;
7378+
goto out_phy;
73797379

73807380
if (chip->info->g2_irqs > 0) {
73817381
err = mv88e6xxx_g2_irq_setup(chip);
@@ -7409,6 +7409,8 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
74097409
mv88e6xxx_g1_irq_free(chip);
74107410
else
74117411
mv88e6xxx_irq_poll_free(chip);
7412+
out_phy:
7413+
mv88e6xxx_phy_destroy(chip);
74127414
out:
74137415
if (pdata)
74147416
dev_put(pdata->netdev);
@@ -7431,7 +7433,6 @@ static void mv88e6xxx_remove(struct mdio_device *mdiodev)
74317433
mv88e6xxx_ptp_free(chip);
74327434
}
74337435

7434-
mv88e6xxx_phy_destroy(chip);
74357436
mv88e6xxx_unregister_switch(chip);
74367437

74377438
mv88e6xxx_g1_vtu_prob_irq_free(chip);
@@ -7444,6 +7445,8 @@ static void mv88e6xxx_remove(struct mdio_device *mdiodev)
74447445
mv88e6xxx_g1_irq_free(chip);
74457446
else
74467447
mv88e6xxx_irq_poll_free(chip);
7448+
7449+
mv88e6xxx_phy_destroy(chip);
74477450
}
74487451

74497452
static void mv88e6xxx_shutdown(struct mdio_device *mdiodev)

drivers/net/dsa/mv88e6xxx/phy.c

+3
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,10 @@ static void mv88e6xxx_phy_ppu_state_init(struct mv88e6xxx_chip *chip)
229229

230230
static void mv88e6xxx_phy_ppu_state_destroy(struct mv88e6xxx_chip *chip)
231231
{
232+
mutex_lock(&chip->ppu_mutex);
232233
del_timer_sync(&chip->ppu_timer);
234+
cancel_work_sync(&chip->ppu_work);
235+
mutex_unlock(&chip->ppu_mutex);
233236
}
234237

235238
int mv88e6185_phy_ppu_read(struct mv88e6xxx_chip *chip, struct mii_bus *bus,

drivers/net/dummy.c

+1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ static void dummy_setup(struct net_device *dev)
105105
dev->netdev_ops = &dummy_netdev_ops;
106106
dev->ethtool_ops = &dummy_ethtool_ops;
107107
dev->needs_free_netdev = true;
108+
dev->request_ops_lock = true;
108109

109110
/* Fill in device structure with ethernet-generic values. */
110111
dev->flags |= IFF_NOARP;

drivers/net/ethernet/airoha/airoha_eth.c

+22-9
Original file line numberDiff line numberDiff line change
@@ -2028,7 +2028,7 @@ static int airoha_qdma_set_tx_ets_sched(struct airoha_gdm_port *port,
20282028
struct tc_ets_qopt_offload_replace_params *p = &opt->replace_params;
20292029
enum tx_sched_mode mode = TC_SCH_SP;
20302030
u16 w[AIROHA_NUM_QOS_QUEUES] = {};
2031-
int i, nstrict = 0, nwrr, qidx;
2031+
int i, nstrict = 0;
20322032

20332033
if (p->bands > AIROHA_NUM_QOS_QUEUES)
20342034
return -EINVAL;
@@ -2046,17 +2046,17 @@ static int airoha_qdma_set_tx_ets_sched(struct airoha_gdm_port *port,
20462046
* lowest priorities with respect to SP ones.
20472047
* e.g: WRR0, WRR1, .., WRRm, SP0, SP1, .., SPn
20482048
*/
2049-
nwrr = p->bands - nstrict;
2050-
qidx = nstrict && nwrr ? nstrict : 0;
2051-
for (i = 1; i <= p->bands; i++) {
2052-
if (p->priomap[i % AIROHA_NUM_QOS_QUEUES] != qidx)
2049+
for (i = 0; i < nstrict; i++) {
2050+
if (p->priomap[p->bands - i - 1] != i)
20532051
return -EINVAL;
2054-
2055-
qidx = i == nwrr ? 0 : qidx + 1;
20562052
}
20572053

2058-
for (i = 0; i < nwrr; i++)
2054+
for (i = 0; i < p->bands - nstrict; i++) {
2055+
if (p->priomap[i] != nstrict + i)
2056+
return -EINVAL;
2057+
20592058
w[i] = p->weights[nstrict + i];
2059+
}
20602060

20612061
if (!nstrict)
20622062
mode = TC_SCH_WRR8;
@@ -2358,7 +2358,7 @@ static int airoha_tc_get_htb_get_leaf_queue(struct airoha_gdm_port *port,
23582358
return -EINVAL;
23592359
}
23602360

2361-
opt->qid = channel;
2361+
opt->qid = AIROHA_NUM_TX_RING + channel;
23622362

23632363
return 0;
23642364
}
@@ -2454,6 +2454,19 @@ static void airoha_metadata_dst_free(struct airoha_gdm_port *port)
24542454
}
24552455
}
24562456

2457+
bool airoha_is_valid_gdm_port(struct airoha_eth *eth,
2458+
struct airoha_gdm_port *port)
2459+
{
2460+
int i;
2461+
2462+
for (i = 0; i < ARRAY_SIZE(eth->ports); i++) {
2463+
if (eth->ports[i] == port)
2464+
return true;
2465+
}
2466+
2467+
return false;
2468+
}
2469+
24572470
static int airoha_alloc_gdm_port(struct airoha_eth *eth,
24582471
struct device_node *np, int index)
24592472
{

drivers/net/ethernet/airoha/airoha_eth.h

+3
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,9 @@ u32 airoha_rmw(void __iomem *base, u32 offset, u32 mask, u32 val);
532532
#define airoha_qdma_clear(qdma, offset, val) \
533533
airoha_rmw((qdma)->regs, (offset), (val), 0)
534534

535+
bool airoha_is_valid_gdm_port(struct airoha_eth *eth,
536+
struct airoha_gdm_port *port);
537+
535538
void airoha_ppe_check_skb(struct airoha_ppe *ppe, u16 hash);
536539
int airoha_ppe_setup_tc_block_cb(enum tc_setup_type type, void *type_data,
537540
void *cb_priv);

drivers/net/ethernet/airoha/airoha_ppe.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@ static int airoha_get_dsa_port(struct net_device **dev)
197197
#endif
198198
}
199199

200-
static int airoha_ppe_foe_entry_prepare(struct airoha_foe_entry *hwe,
200+
static int airoha_ppe_foe_entry_prepare(struct airoha_eth *eth,
201+
struct airoha_foe_entry *hwe,
201202
struct net_device *dev, int type,
202203
struct airoha_flow_data *data,
203204
int l4proto)
@@ -225,6 +226,9 @@ static int airoha_ppe_foe_entry_prepare(struct airoha_foe_entry *hwe,
225226
struct airoha_gdm_port *port = netdev_priv(dev);
226227
u8 pse_port;
227228

229+
if (!airoha_is_valid_gdm_port(eth, port))
230+
return -EINVAL;
231+
228232
if (dsa_port >= 0)
229233
pse_port = port->id == 4 ? FE_PSE_PORT_GDM4 : port->id;
230234
else
@@ -633,7 +637,7 @@ static int airoha_ppe_flow_offload_replace(struct airoha_gdm_port *port,
633637
!is_valid_ether_addr(data.eth.h_dest))
634638
return -EINVAL;
635639

636-
err = airoha_ppe_foe_entry_prepare(&hwe, odev, offload_type,
640+
err = airoha_ppe_foe_entry_prepare(eth, &hwe, odev, offload_type,
637641
&data, l4proto);
638642
if (err)
639643
return err;

drivers/net/ethernet/broadcom/bnxt/bnxt.c

+2
Original file line numberDiff line numberDiff line change
@@ -16698,6 +16698,7 @@ static void bnxt_shutdown(struct pci_dev *pdev)
1669816698
if (!dev)
1669916699
return;
1670016700

16701+
rtnl_lock();
1670116702
netdev_lock(dev);
1670216703
bp = netdev_priv(dev);
1670316704
if (!bp)
@@ -16717,6 +16718,7 @@ static void bnxt_shutdown(struct pci_dev *pdev)
1671716718

1671816719
shutdown_exit:
1671916720
netdev_unlock(dev);
16721+
rtnl_unlock();
1672016722
}
1672116723

1672216724
#ifdef CONFIG_PM_SLEEP

drivers/net/ethernet/google/gve/gve_main.c

+4
Original file line numberDiff line numberDiff line change
@@ -2077,7 +2077,9 @@ static void gve_handle_reset(struct gve_priv *priv)
20772077

20782078
if (gve_get_do_reset(priv)) {
20792079
rtnl_lock();
2080+
netdev_lock(priv->dev);
20802081
gve_reset(priv, false);
2082+
netdev_unlock(priv->dev);
20812083
rtnl_unlock();
20822084
}
20832085
}
@@ -2714,13 +2716,15 @@ static void gve_shutdown(struct pci_dev *pdev)
27142716
bool was_up = netif_running(priv->dev);
27152717

27162718
rtnl_lock();
2719+
netdev_lock(netdev);
27172720
if (was_up && gve_close(priv->dev)) {
27182721
/* If the dev was up, attempt to close, if close fails, reset */
27192722
gve_reset_and_teardown(priv, was_up);
27202723
} else {
27212724
/* If the dev wasn't up or close worked, finish tearing down */
27222725
gve_teardown_priv_resources(priv);
27232726
}
2727+
netdev_unlock(netdev);
27242728
rtnl_unlock();
27252729
}
27262730

drivers/net/ethernet/marvell/mvpp2/mvpp2.h

+3
Original file line numberDiff line numberDiff line change
@@ -1113,6 +1113,9 @@ struct mvpp2 {
11131113

11141114
/* Spinlocks for CM3 shared memory configuration */
11151115
spinlock_t mss_spinlock;
1116+
1117+
/* Spinlock for shared PRS parser memory and shadow table */
1118+
spinlock_t prs_spinlock;
11161119
};
11171120

11181121
struct mvpp2_pcpu_stats {

drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -7723,8 +7723,9 @@ static int mvpp2_probe(struct platform_device *pdev)
77237723
if (mvpp2_read(priv, MVPP2_VER_ID_REG) == MVPP2_VER_PP23)
77247724
priv->hw_version = MVPP23;
77257725

7726-
/* Init mss lock */
7726+
/* Init locks for shared packet processor resources */
77277727
spin_lock_init(&priv->mss_spinlock);
7728+
spin_lock_init(&priv->prs_spinlock);
77287729

77297730
/* Initialize network controller */
77307731
err = mvpp2_init(pdev, priv);

0 commit comments

Comments
 (0)