Skip to content

Commit ee9a43b

Browse files
committed
Merge tag 'net-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from bluetooth. Current release - regressions: - eth: bnxt_en: fix memory out-of-bounds in bnxt_fill_hw_rss_tbl() on older chips Current release - new code bugs: - ethtool: fix off-by-one error / kdoc contradicting the code for max RSS context IDs - Bluetooth: hci_qca: - QCA6390: fix support on non-DT platforms - QCA6390: don't call pwrseq_power_off() twice - fix a NULL-pointer derefence at shutdown - eth: ice: fix incorrect assigns of FEC counters Previous releases - regressions: - mptcp: fix handling endpoints with both 'signal' and 'subflow' flags set - virtio-net: fix changing ring count when vq IRQ coalescing not supported - eth: gve: fix use of netif_carrier_ok() during reconfig / reset Previous releases - always broken: - eth: idpf: fix bugs in queue re-allocation on reconfig / reset - ethtool: fix context creation with no parameters Misc: - linkwatch: use system_unbound_wq to ease RTNL contention" * tag 'net-6.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (41 commits) net: dsa: microchip: disable EEE for KSZ8567/KSZ9567/KSZ9896/KSZ9897. ethtool: Fix context creation with no parameters net: ethtool: fix off-by-one error in max RSS context IDs net: pse-pd: tps23881: include missing bitfield.h header net: fec: Stop PPS on driver remove net: bcmgenet: Properly overlay PHY and MAC Wake-on-LAN capabilities l2tp: fix lockdep splat net: stmmac: dwmac4: fix PCS duplex mode decode idpf: fix UAFs when destroying the queues idpf: fix memleak in vport interrupt configuration idpf: fix memory leaks and crashes while performing a soft reset bnxt_en : Fix memory out-of-bounds in bnxt_fill_hw_rss_tbl() net: dsa: bcm_sf2: Fix a possible memory leak in bcm_sf2_mdio_register() net/smc: add the max value of fallback reason count Bluetooth: hci_sync: avoid dup filtering when passive scanning with adv monitor Bluetooth: l2cap: always unlock channel in l2cap_conless_channel() Bluetooth: hci_qca: fix a NULL-pointer derefence at shutdown Bluetooth: hci_qca: fix QCA6390 support on non-DT platforms Bluetooth: hci_qca: don't call pwrseq_power_off() twice for QCA6390 ice: Fix incorrect assigns of FEC counts ...
2 parents 9466b6a + 2ff4ceb commit ee9a43b

File tree

33 files changed

+276
-176
lines changed

33 files changed

+276
-176
lines changed

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13541,7 +13541,7 @@ MARVELL GIGABIT ETHERNET DRIVERS (skge/sky2)
1354113541
M: Mirko Lindner <[email protected]>
1354213542
M: Stephen Hemminger <[email protected]>
1354313543
13544-
S: Maintained
13544+
S: Odd fixes
1354513545
F: drivers/net/ethernet/marvell/sk*
1354613546

1354713547
MARVELL LIBERTAS WIRELESS DRIVER

drivers/bluetooth/hci_qca.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2160,7 +2160,7 @@ static void qca_power_shutdown(struct hci_uart *hu)
21602160
qcadev = serdev_device_get_drvdata(hu->serdev);
21612161
power = qcadev->bt_power;
21622162

2163-
if (power->pwrseq) {
2163+
if (power && power->pwrseq) {
21642164
pwrseq_power_off(power->pwrseq);
21652165
set_bit(QCA_BT_OFF, &qca->flags);
21662166
return;
@@ -2187,10 +2187,6 @@ static void qca_power_shutdown(struct hci_uart *hu)
21872187
}
21882188
break;
21892189

2190-
case QCA_QCA6390:
2191-
pwrseq_power_off(qcadev->bt_power->pwrseq);
2192-
break;
2193-
21942190
default:
21952191
gpiod_set_value_cansleep(qcadev->bt_en, 0);
21962192
}
@@ -2416,11 +2412,14 @@ static int qca_serdev_probe(struct serdev_device *serdev)
24162412
break;
24172413

24182414
case QCA_QCA6390:
2419-
qcadev->bt_power->pwrseq = devm_pwrseq_get(&serdev->dev,
2420-
"bluetooth");
2421-
if (IS_ERR(qcadev->bt_power->pwrseq))
2422-
return PTR_ERR(qcadev->bt_power->pwrseq);
2423-
break;
2415+
if (dev_of_node(&serdev->dev)) {
2416+
qcadev->bt_power->pwrseq = devm_pwrseq_get(&serdev->dev,
2417+
"bluetooth");
2418+
if (IS_ERR(qcadev->bt_power->pwrseq))
2419+
return PTR_ERR(qcadev->bt_power->pwrseq);
2420+
break;
2421+
}
2422+
fallthrough;
24242423

24252424
default:
24262425
qcadev->bt_en = devm_gpiod_get_optional(&serdev->dev, "enable",

drivers/net/dsa/bcm_sf2.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,8 +675,10 @@ static int bcm_sf2_mdio_register(struct dsa_switch *ds)
675675
of_remove_property(child, prop);
676676

677677
phydev = of_phy_find_device(child);
678-
if (phydev)
678+
if (phydev) {
679679
phy_device_remove(phydev);
680+
phy_device_free(phydev);
681+
}
680682
}
681683

682684
err = mdiobus_register(priv->user_mii_bus);

drivers/net/dsa/microchip/ksz_common.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2578,7 +2578,11 @@ static u32 ksz_get_phy_flags(struct dsa_switch *ds, int port)
25782578
if (!port)
25792579
return MICREL_KSZ8_P1_ERRATA;
25802580
break;
2581+
case KSZ8567_CHIP_ID:
25812582
case KSZ9477_CHIP_ID:
2583+
case KSZ9567_CHIP_ID:
2584+
case KSZ9896_CHIP_ID:
2585+
case KSZ9897_CHIP_ID:
25822586
/* KSZ9477 Errata DS80000754C
25832587
*
25842588
* Module 4: Energy Efficient Ethernet (EEE) feature select must
@@ -2588,6 +2592,13 @@ static u32 ksz_get_phy_flags(struct dsa_switch *ds, int port)
25882592
* controls. If not disabled, the PHY ports can auto-negotiate
25892593
* to enable EEE, and this feature can cause link drops when
25902594
* linked to another device supporting EEE.
2595+
*
2596+
* The same item appears in the errata for the KSZ9567, KSZ9896,
2597+
* and KSZ9897.
2598+
*
2599+
* A similar item appears in the errata for the KSZ8567, but
2600+
* provides an alternative workaround. For now, use the simple
2601+
* workaround of disabling the EEE feature for this device too.
25912602
*/
25922603
return MICREL_NO_EEE;
25932604
}
@@ -3764,6 +3775,11 @@ static int ksz_port_set_mac_address(struct dsa_switch *ds, int port,
37643775
return -EBUSY;
37653776
}
37663777

3778+
/* Need to initialize variable as the code to fill in settings may
3779+
* not be executed.
3780+
*/
3781+
wol.wolopts = 0;
3782+
37673783
ksz_get_wol(ds, dp->index, &wol);
37683784
if (wol.wolopts & WAKE_MAGIC) {
37693785
dev_err(ds->dev,

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7591,19 +7591,20 @@ static bool bnxt_need_reserve_rings(struct bnxt *bp)
75917591
int rx = bp->rx_nr_rings, stat;
75927592
int vnic, grp = rx;
75937593

7594-
if (hw_resc->resv_tx_rings != bp->tx_nr_rings &&
7595-
bp->hwrm_spec_code >= 0x10601)
7596-
return true;
7597-
75987594
/* Old firmware does not need RX ring reservations but we still
75997595
* need to setup a default RSS map when needed. With new firmware
76007596
* we go through RX ring reservations first and then set up the
76017597
* RSS map for the successfully reserved RX rings when needed.
76027598
*/
7603-
if (!BNXT_NEW_RM(bp)) {
7599+
if (!BNXT_NEW_RM(bp))
76047600
bnxt_check_rss_tbl_no_rmgr(bp);
7601+
7602+
if (hw_resc->resv_tx_rings != bp->tx_nr_rings &&
7603+
bp->hwrm_spec_code >= 0x10601)
7604+
return true;
7605+
7606+
if (!BNXT_NEW_RM(bp))
76057607
return false;
7606-
}
76077608

76087609
vnic = bnxt_get_total_vnics(bp, rx);
76097610

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5290,7 +5290,7 @@ void bnxt_ethtool_free(struct bnxt *bp)
52905290
const struct ethtool_ops bnxt_ethtool_ops = {
52915291
.cap_link_lanes_supported = 1,
52925292
.cap_rss_ctx_supported = 1,
5293-
.rxfh_max_context_id = BNXT_MAX_ETH_RSS_CTX,
5293+
.rxfh_max_num_contexts = BNXT_MAX_ETH_RSS_CTX + 1,
52945294
.rxfh_indir_space = BNXT_MAX_RSS_TABLE_ENTRIES_P5,
52955295
.rxfh_priv_size = sizeof(struct bnxt_rss_ctx),
52965296
.supported_coalesce_params = ETHTOOL_COALESCE_USECS |

drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,15 @@ void bcmgenet_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
4242
struct bcmgenet_priv *priv = netdev_priv(dev);
4343
struct device *kdev = &priv->pdev->dev;
4444

45-
if (dev->phydev) {
45+
if (dev->phydev)
4646
phy_ethtool_get_wol(dev->phydev, wol);
47-
if (wol->supported)
48-
return;
49-
}
5047

51-
if (!device_can_wakeup(kdev)) {
52-
wol->supported = 0;
53-
wol->wolopts = 0;
48+
/* MAC is not wake-up capable, return what the PHY does */
49+
if (!device_can_wakeup(kdev))
5450
return;
55-
}
5651

57-
wol->supported = WAKE_MAGIC | WAKE_MAGICSECURE | WAKE_FILTER;
52+
/* Overlay MAC capabilities with that of the PHY queried before */
53+
wol->supported |= WAKE_MAGIC | WAKE_MAGICSECURE | WAKE_FILTER;
5854
wol->wolopts = priv->wolopts;
5955
memset(wol->sopass, 0, sizeof(wol->sopass));
6056

drivers/net/ethernet/freescale/fec_ptp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,9 @@ void fec_ptp_stop(struct platform_device *pdev)
775775
struct net_device *ndev = platform_get_drvdata(pdev);
776776
struct fec_enet_private *fep = netdev_priv(ndev);
777777

778+
if (fep->pps_enable)
779+
fec_ptp_enable_pps(fep, 0);
780+
778781
cancel_delayed_work_sync(&fep->time_keep);
779782
hrtimer_cancel(&fep->perout_timer);
780783
if (fep->ptp_clock)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ static int gve_set_channels(struct net_device *netdev,
495495
return -EINVAL;
496496
}
497497

498-
if (!netif_carrier_ok(netdev)) {
498+
if (!netif_running(netdev)) {
499499
priv->tx_cfg.num_queues = new_tx;
500500
priv->rx_cfg.num_queues = new_rx;
501501
return 0;

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,7 +1566,7 @@ static int gve_set_xdp(struct gve_priv *priv, struct bpf_prog *prog,
15661566
u32 status;
15671567

15681568
old_prog = READ_ONCE(priv->xdp_prog);
1569-
if (!netif_carrier_ok(priv->dev)) {
1569+
if (!netif_running(priv->dev)) {
15701570
WRITE_ONCE(priv->xdp_prog, prog);
15711571
if (old_prog)
15721572
bpf_prog_put(old_prog);
@@ -1847,7 +1847,7 @@ int gve_adjust_queues(struct gve_priv *priv,
18471847
rx_alloc_cfg.qcfg = &new_rx_config;
18481848
tx_alloc_cfg.num_rings = new_tx_config.num_queues;
18491849

1850-
if (netif_carrier_ok(priv->dev)) {
1850+
if (netif_running(priv->dev)) {
18511851
err = gve_adjust_config(priv, &tx_alloc_cfg, &rx_alloc_cfg);
18521852
return err;
18531853
}
@@ -2064,7 +2064,7 @@ static int gve_set_features(struct net_device *netdev,
20642064

20652065
if ((netdev->features & NETIF_F_LRO) != (features & NETIF_F_LRO)) {
20662066
netdev->features ^= NETIF_F_LRO;
2067-
if (netif_carrier_ok(netdev)) {
2067+
if (netif_running(netdev)) {
20682068
err = gve_adjust_config(priv, &tx_alloc_cfg, &rx_alloc_cfg);
20692069
if (err)
20702070
goto revert_features;
@@ -2359,7 +2359,7 @@ static int gve_reset_recovery(struct gve_priv *priv, bool was_up)
23592359

23602360
int gve_reset(struct gve_priv *priv, bool attempt_teardown)
23612361
{
2362-
bool was_up = netif_carrier_ok(priv->dev);
2362+
bool was_up = netif_running(priv->dev);
23632363
int err;
23642364

23652365
dev_info(&priv->pdev->dev, "Performing reset\n");
@@ -2700,7 +2700,7 @@ static void gve_shutdown(struct pci_dev *pdev)
27002700
{
27012701
struct net_device *netdev = pci_get_drvdata(pdev);
27022702
struct gve_priv *priv = netdev_priv(netdev);
2703-
bool was_up = netif_carrier_ok(priv->dev);
2703+
bool was_up = netif_running(priv->dev);
27042704

27052705
rtnl_lock();
27062706
if (was_up && gve_close(priv->dev)) {
@@ -2718,7 +2718,7 @@ static int gve_suspend(struct pci_dev *pdev, pm_message_t state)
27182718
{
27192719
struct net_device *netdev = pci_get_drvdata(pdev);
27202720
struct gve_priv *priv = netdev_priv(netdev);
2721-
bool was_up = netif_carrier_ok(priv->dev);
2721+
bool was_up = netif_running(priv->dev);
27222722

27232723
priv->suspend_cnt++;
27242724
rtnl_lock();

0 commit comments

Comments
 (0)