Skip to content

Commit 9bc62af

Browse files
committed
Merge tag 'net-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Current release - regressions: - dsa: bcm_sf2: fix array overrun in bcm_sf2_num_active_ports() Previous releases - regressions: - introduce a shutdown method to mdio device drivers, and make DSA switch drivers compatible with masters disappearing on shutdown; preventing infinite reference wait - fix issues in mdiobus users related to ->shutdown vs ->remove - virtio-net: fix pages leaking when building skb in big mode - xen-netback: correct success/error reporting for the SKB-with-fraglist - dsa: tear down devlink port regions when tearing down the devlink port on error - nexthop: fix division by zero while replacing a resilient group - hns3: check queue, vf, vlan ids range before using Previous releases - always broken: - napi: fix race against netpoll causing NAPI getting stuck - mlx4_en: ensure link operstate is updated even if link comes up before netdev registration - bnxt_en: fix TX timeout when TX ring size is set to the smallest - enetc: fix illegal access when reading affinity_hint; prevent oops on sysfs access - mtk_eth_soc: avoid creating duplicate offload entries Misc: - core: correct the sock::sk_lock.owned lockdep annotations" * tag 'net-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (51 commits) atlantic: Fix issue in the pm resume flow. net/mlx4_en: Don't allow aRFS for encapsulated packets net: mscc: ocelot: fix forwarding from BLOCKING ports remaining enabled net: ethernet: mtk_eth_soc: avoid creating duplicate offload entries nfc: st-nci: Add SPI ID matching DT compatible MAINTAINERS: remove Guvenc Gulce as net/smc maintainer nexthop: Fix memory leaks in nexthop notification chain listeners mptcp: ensure tx skbs always have the MPTCP ext qed: rdma - don't wait for resources under hw error recovery flow s390/qeth: fix deadlock during failing recovery s390/qeth: Fix deadlock in remove_discipline s390/qeth: fix NULL deref in qeth_clear_working_pool_list() net: dsa: realtek: register the MDIO bus under devres net: dsa: don't allocate the slave_mii_bus using devres Doc: networking: Fox a typo in ice.rst net: dsa: fix dsa_tree_setup error path net/smc: fix 'workqueue leaked lock' in smc_conn_abort_work net/smc: add missing error check in smc_clc_prfx_set() net: hns3: fix a return value error in hclge_get_reset_status() net: hns3: check vlan id before using it ...
2 parents 1f82822 + 4d88c33 commit 9bc62af

File tree

105 files changed

+931
-284
lines changed

Some content is hidden

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

105 files changed

+931
-284
lines changed

Documentation/networking/device_drivers/ethernet/intel/ice.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ NOTES:
851851
- 0x88A8 traffic will not be received unless VLAN stripping is disabled with
852852
the following command::
853853

854-
# ethool -K <ethX> rxvlan off
854+
# ethtool -K <ethX> rxvlan off
855855

856856
- 0x88A8/0x8100 double VLANs cannot be used with 0x8100 or 0x8100/0x8100 VLANS
857857
configured on the same port. 0x88a8/0x8100 traffic will not be received if

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16955,7 +16955,6 @@ F: drivers/misc/sgi-xp/
1695516955

1695616956
SHARED MEMORY COMMUNICATIONS (SMC) SOCKETS
1695716957
M: Karsten Graul <[email protected]>
16958-
M: Guvenc Gulce <[email protected]>
1695916958
1696016959
S: Supported
1696116960
W: http://www.ibm.com/developerworks/linux/linux390/

arch/s390/include/asm/ccwgroup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ int ccwgroup_create_dev(struct device *root, struct ccwgroup_driver *gdrv,
5555
int num_devices, const char *buf);
5656

5757
extern int ccwgroup_set_online(struct ccwgroup_device *gdev);
58-
extern int ccwgroup_set_offline(struct ccwgroup_device *gdev);
58+
int ccwgroup_set_offline(struct ccwgroup_device *gdev, bool call_gdrv);
5959

6060
extern int ccwgroup_probe_ccwdev(struct ccw_device *cdev);
6161
extern void ccwgroup_remove_ccwdev(struct ccw_device *cdev);

drivers/net/dsa/b53/b53_mdio.c

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,25 @@ static int b53_mdio_probe(struct mdio_device *mdiodev)
351351
static void b53_mdio_remove(struct mdio_device *mdiodev)
352352
{
353353
struct b53_device *dev = dev_get_drvdata(&mdiodev->dev);
354-
struct dsa_switch *ds = dev->ds;
355354

356-
dsa_unregister_switch(ds);
355+
if (!dev)
356+
return;
357+
358+
b53_switch_remove(dev);
359+
360+
dev_set_drvdata(&mdiodev->dev, NULL);
361+
}
362+
363+
static void b53_mdio_shutdown(struct mdio_device *mdiodev)
364+
{
365+
struct b53_device *dev = dev_get_drvdata(&mdiodev->dev);
366+
367+
if (!dev)
368+
return;
369+
370+
b53_switch_shutdown(dev);
371+
372+
dev_set_drvdata(&mdiodev->dev, NULL);
357373
}
358374

359375
static const struct of_device_id b53_of_match[] = {
@@ -373,6 +389,7 @@ MODULE_DEVICE_TABLE(of, b53_of_match);
373389
static struct mdio_driver b53_mdio_driver = {
374390
.probe = b53_mdio_probe,
375391
.remove = b53_mdio_remove,
392+
.shutdown = b53_mdio_shutdown,
376393
.mdiodrv.driver = {
377394
.name = "bcm53xx",
378395
.of_match_table = b53_of_match,

drivers/net/dsa/b53/b53_mmap.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,21 @@ static int b53_mmap_remove(struct platform_device *pdev)
316316
if (dev)
317317
b53_switch_remove(dev);
318318

319+
platform_set_drvdata(pdev, NULL);
320+
319321
return 0;
320322
}
321323

324+
static void b53_mmap_shutdown(struct platform_device *pdev)
325+
{
326+
struct b53_device *dev = platform_get_drvdata(pdev);
327+
328+
if (dev)
329+
b53_switch_shutdown(dev);
330+
331+
platform_set_drvdata(pdev, NULL);
332+
}
333+
322334
static const struct of_device_id b53_mmap_of_table[] = {
323335
{ .compatible = "brcm,bcm3384-switch" },
324336
{ .compatible = "brcm,bcm6328-switch" },
@@ -331,6 +343,7 @@ MODULE_DEVICE_TABLE(of, b53_mmap_of_table);
331343
static struct platform_driver b53_mmap_driver = {
332344
.probe = b53_mmap_probe,
333345
.remove = b53_mmap_remove,
346+
.shutdown = b53_mmap_shutdown,
334347
.driver = {
335348
.name = "b53-switch",
336349
.of_match_table = b53_mmap_of_table,

drivers/net/dsa/b53/b53_priv.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,11 @@ static inline void b53_switch_remove(struct b53_device *dev)
228228
dsa_unregister_switch(dev->ds);
229229
}
230230

231+
static inline void b53_switch_shutdown(struct b53_device *dev)
232+
{
233+
dsa_switch_shutdown(dev->ds);
234+
}
235+
231236
#define b53_build_op(type_op_size, val_type) \
232237
static inline int b53_##type_op_size(struct b53_device *dev, u8 page, \
233238
u8 reg, val_type val) \

drivers/net/dsa/b53/b53_spi.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,21 @@ static int b53_spi_remove(struct spi_device *spi)
321321
if (dev)
322322
b53_switch_remove(dev);
323323

324+
spi_set_drvdata(spi, NULL);
325+
324326
return 0;
325327
}
326328

329+
static void b53_spi_shutdown(struct spi_device *spi)
330+
{
331+
struct b53_device *dev = spi_get_drvdata(spi);
332+
333+
if (dev)
334+
b53_switch_shutdown(dev);
335+
336+
spi_set_drvdata(spi, NULL);
337+
}
338+
327339
static const struct of_device_id b53_spi_of_match[] = {
328340
{ .compatible = "brcm,bcm5325" },
329341
{ .compatible = "brcm,bcm5365" },
@@ -344,6 +356,7 @@ static struct spi_driver b53_spi_driver = {
344356
},
345357
.probe = b53_spi_probe,
346358
.remove = b53_spi_remove,
359+
.shutdown = b53_spi_shutdown,
347360
};
348361

349362
module_spi_driver(b53_spi_driver);

drivers/net/dsa/b53/b53_srab.c

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,17 +629,34 @@ static int b53_srab_probe(struct platform_device *pdev)
629629
static int b53_srab_remove(struct platform_device *pdev)
630630
{
631631
struct b53_device *dev = platform_get_drvdata(pdev);
632-
struct b53_srab_priv *priv = dev->priv;
633632

634-
b53_srab_intr_set(priv, false);
633+
if (!dev)
634+
return 0;
635+
636+
b53_srab_intr_set(dev->priv, false);
635637
b53_switch_remove(dev);
636638

639+
platform_set_drvdata(pdev, NULL);
640+
637641
return 0;
638642
}
639643

644+
static void b53_srab_shutdown(struct platform_device *pdev)
645+
{
646+
struct b53_device *dev = platform_get_drvdata(pdev);
647+
648+
if (!dev)
649+
return;
650+
651+
b53_switch_shutdown(dev);
652+
653+
platform_set_drvdata(pdev, NULL);
654+
}
655+
640656
static struct platform_driver b53_srab_driver = {
641657
.probe = b53_srab_probe,
642658
.remove = b53_srab_remove,
659+
.shutdown = b53_srab_shutdown,
643660
.driver = {
644661
.name = "b53-srab-switch",
645662
.of_match_table = b53_srab_of_match,

drivers/net/dsa/bcm_sf2.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static unsigned int bcm_sf2_num_active_ports(struct dsa_switch *ds)
6868
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
6969
unsigned int port, count = 0;
7070

71-
for (port = 0; port < ARRAY_SIZE(priv->port_sts); port++) {
71+
for (port = 0; port < ds->num_ports; port++) {
7272
if (dsa_is_cpu_port(ds, port))
7373
continue;
7474
if (priv->port_sts[port].enabled)
@@ -1512,6 +1512,9 @@ static int bcm_sf2_sw_remove(struct platform_device *pdev)
15121512
{
15131513
struct bcm_sf2_priv *priv = platform_get_drvdata(pdev);
15141514

1515+
if (!priv)
1516+
return 0;
1517+
15151518
priv->wol_ports_mask = 0;
15161519
/* Disable interrupts */
15171520
bcm_sf2_intr_disable(priv);
@@ -1523,13 +1526,18 @@ static int bcm_sf2_sw_remove(struct platform_device *pdev)
15231526
if (priv->type == BCM7278_DEVICE_ID)
15241527
reset_control_assert(priv->rcdev);
15251528

1529+
platform_set_drvdata(pdev, NULL);
1530+
15261531
return 0;
15271532
}
15281533

15291534
static void bcm_sf2_sw_shutdown(struct platform_device *pdev)
15301535
{
15311536
struct bcm_sf2_priv *priv = platform_get_drvdata(pdev);
15321537

1538+
if (!priv)
1539+
return;
1540+
15331541
/* For a kernel about to be kexec'd we want to keep the GPHY on for a
15341542
* successful MDIO bus scan to occur. If we did turn off the GPHY
15351543
* before (e.g: port_disable), this will also power it back on.
@@ -1538,6 +1546,10 @@ static void bcm_sf2_sw_shutdown(struct platform_device *pdev)
15381546
*/
15391547
if (priv->hw_params.num_gphy == 1)
15401548
bcm_sf2_gphy_enable_set(priv->dev->ds, true);
1549+
1550+
dsa_switch_shutdown(priv->dev->ds);
1551+
1552+
platform_set_drvdata(pdev, NULL);
15411553
}
15421554

15431555
#ifdef CONFIG_PM_SLEEP

drivers/net/dsa/dsa_loop.c

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,10 +340,29 @@ static int dsa_loop_drv_probe(struct mdio_device *mdiodev)
340340
static void dsa_loop_drv_remove(struct mdio_device *mdiodev)
341341
{
342342
struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev);
343-
struct dsa_loop_priv *ps = ds->priv;
343+
struct dsa_loop_priv *ps;
344+
345+
if (!ds)
346+
return;
347+
348+
ps = ds->priv;
344349

345350
dsa_unregister_switch(ds);
346351
dev_put(ps->netdev);
352+
353+
dev_set_drvdata(&mdiodev->dev, NULL);
354+
}
355+
356+
static void dsa_loop_drv_shutdown(struct mdio_device *mdiodev)
357+
{
358+
struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev);
359+
360+
if (!ds)
361+
return;
362+
363+
dsa_switch_shutdown(ds);
364+
365+
dev_set_drvdata(&mdiodev->dev, NULL);
347366
}
348367

349368
static struct mdio_driver dsa_loop_drv = {
@@ -352,6 +371,7 @@ static struct mdio_driver dsa_loop_drv = {
352371
},
353372
.probe = dsa_loop_drv_probe,
354373
.remove = dsa_loop_drv_remove,
374+
.shutdown = dsa_loop_drv_shutdown,
355375
};
356376

357377
#define NUM_FIXED_PHYS (DSA_LOOP_NUM_PORTS - 2)

0 commit comments

Comments
 (0)