Skip to content

Commit 25041a4

Browse files
committed
Merge tag 'net-6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni: "Including fixes from can, wifi, netfilter, bluetooth and ebpf. Current release - regressions: - bpf: sockmap: avoid potential NULL dereference in sk_psock_verdict_data_ready() - wifi: iwlwifi: fix -Warray-bounds bug in iwl_mvm_wait_d3_notif() - phylink: actually fix ksettings_set() ethtool call - eth: dwmac-qcom-ethqos: fix a regression on EMAC < 3 Current release - new code bugs: - wifi: mt76: fix possible NULL pointer dereference in mt7996_mac_write_txwi() Previous releases - regressions: - netfilter: fix NULL pointer dereference in nf_confirm_cthelper - wifi: rtw88/rtw89: correct PS calculation for SUPPORTS_DYNAMIC_PS - openvswitch: fix upcall counter access before allocation - bluetooth: - fix use-after-free in hci_remove_ltk/hci_remove_irk - fix l2cap_disconnect_req deadlock - nic: bnxt_en: prevent kernel panic when receiving unexpected PHC_UPDATE event Previous releases - always broken: - core: annotate rfs lockless accesses - sched: fq_pie: ensure reasonable TCA_FQ_PIE_QUANTUM values - netfilter: add null check for nla_nest_start_noflag() in nft_dump_basechain_hook() - bpf: fix UAF in task local storage - ipv4: ping_group_range: allow GID from 2147483648 to 4294967294 - ipv6: rpl: fix route of death. - tcp: gso: really support BIG TCP - mptcp: fixes for user-space PM address advertisement - smc: avoid to access invalid RMBs' MRs in SMCRv1 ADD LINK CONT - can: avoid possible use-after-free when j1939_can_rx_register fails - batman-adv: fix UaF while rescheduling delayed work - eth: qede: fix scheduling while atomic - eth: ice: make writes to /dev/gnssX synchronous" * tag 'net-6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (83 commits) bnxt_en: Implement .set_port / .unset_port UDP tunnel callbacks bnxt_en: Prevent kernel panic when receiving unexpected PHC_UPDATE event bnxt_en: Skip firmware fatal error recovery if chip is not accessible bnxt_en: Query default VLAN before VNIC setup on a VF bnxt_en: Don't issue AP reset during ethtool's reset operation bnxt_en: Fix bnxt_hwrm_update_rss_hash_cfg() net: bcmgenet: Fix EEE implementation eth: ixgbe: fix the wake condition eth: bnxt: fix the wake condition lib: cpu_rmap: Fix potential use-after-free in irq_cpu_rmap_release() bpf: Add extra path pointer check to d_path helper net: sched: fix possible refcount leak in tc_chain_tmplt_add() net: sched: act_police: fix sparse errors in tcf_police_dump() net: openvswitch: fix upcall counter access before allocation net: sched: move rtm_tca_policy declaration to include file ice: make writes to /dev/gnssX synchronous net: sched: add rcu annotations around qdisc->qdisc_sleeping rfs: annotate lockless accesses to RFS sock flow table rfs: annotate lockless accesses to sk->sk_rxhash virtio_net: use control_buf for coalesce params ...
2 parents 79b6fad + 6c0ec7a commit 25041a4

File tree

105 files changed

+788
-386
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

+788
-386
lines changed

Documentation/netlink/specs/ethtool.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ attribute-sets:
223223
name: tx-min-frag-size
224224
type: u32
225225
-
226-
name: tx-min-frag-size
226+
name: rx-min-frag-size
227227
type: u32
228228
-
229229
name: verify-enabled
@@ -294,7 +294,7 @@ attribute-sets:
294294
name: master-slave-state
295295
type: u8
296296
-
297-
name: master-slave-lanes
297+
name: lanes
298298
type: u32
299299
-
300300
name: rate-matching
@@ -322,7 +322,7 @@ attribute-sets:
322322
name: ext-substate
323323
type: u8
324324
-
325-
name: down-cnt
325+
name: ext-down-cnt
326326
type: u32
327327
-
328328
name: debug
@@ -577,7 +577,7 @@ attribute-sets:
577577
name: phc-index
578578
type: u32
579579
-
580-
name: cable-test-nft-nest-result
580+
name: cable-test-ntf-nest-result
581581
attributes:
582582
-
583583
name: pair
@@ -586,7 +586,7 @@ attribute-sets:
586586
name: code
587587
type: u8
588588
-
589-
name: cable-test-nft-nest-fault-length
589+
name: cable-test-ntf-nest-fault-length
590590
attributes:
591591
-
592592
name: pair
@@ -595,16 +595,16 @@ attribute-sets:
595595
name: cm
596596
type: u32
597597
-
598-
name: cable-test-nft-nest
598+
name: cable-test-ntf-nest
599599
attributes:
600600
-
601601
name: result
602602
type: nest
603-
nested-attributes: cable-test-nft-nest-result
603+
nested-attributes: cable-test-ntf-nest-result
604604
-
605605
name: fault-length
606606
type: nest
607-
nested-attributes: cable-test-nft-nest-fault-length
607+
nested-attributes: cable-test-ntf-nest-fault-length
608608
-
609609
name: cable-test
610610
attributes:
@@ -618,7 +618,7 @@ attribute-sets:
618618
-
619619
name: nest
620620
type: nest
621-
nested-attributes: cable-test-nft-nest
621+
nested-attributes: cable-test-ntf-nest
622622
-
623623
name: cable-test-tdr-cfg
624624
attributes:
@@ -776,7 +776,7 @@ attribute-sets:
776776
name: hist-bkt-hi
777777
type: u32
778778
-
779-
name: hist-bkt-val
779+
name: hist-val
780780
type: u64
781781
-
782782
name: stats
@@ -965,7 +965,7 @@ operations:
965965
- duplex
966966
- master-slave-cfg
967967
- master-slave-state
968-
- master-slave-lanes
968+
- lanes
969969
- rate-matching
970970
dump: *linkmodes-get-op
971971
-
@@ -999,7 +999,7 @@ operations:
999999
- sqi-max
10001000
- ext-state
10011001
- ext-substate
1002-
- down-cnt
1002+
- ext-down-cnt
10031003
dump: *linkstate-get-op
10041004
-
10051005
name: debug-get
@@ -1351,7 +1351,7 @@ operations:
13511351
reply:
13521352
attributes:
13531353
- header
1354-
- cable-test-nft-nest
1354+
- cable-test-ntf-nest
13551355
-
13561356
name: cable-test-tdr-act
13571357
doc: Cable test TDR.
@@ -1539,7 +1539,7 @@ operations:
15391539
- hkey
15401540
dump: *rss-get-op
15411541
-
1542-
name: plca-get
1542+
name: plca-get-cfg
15431543
doc: Get PLCA params.
15441544

15451545
attribute-set: plca
@@ -1561,7 +1561,7 @@ operations:
15611561
- burst-tmr
15621562
dump: *plca-get-op
15631563
-
1564-
name: plca-set
1564+
name: plca-set-cfg
15651565
doc: Set PLCA params.
15661566

15671567
attribute-set: plca
@@ -1585,7 +1585,7 @@ operations:
15851585
-
15861586
name: plca-ntf
15871587
doc: Notification for change in PLCA params.
1588-
notify: plca-get
1588+
notify: plca-get-cfg
15891589
-
15901590
name: mm-get
15911591
doc: Get MAC Merge configuration and state

Documentation/networking/ip-sysctl.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,8 +1352,8 @@ ping_group_range - 2 INTEGERS
13521352
Restrict ICMP_PROTO datagram sockets to users in the group range.
13531353
The default is "1 0", meaning, that nobody (not even root) may
13541354
create ping sockets. Setting it to "100 100" would grant permissions
1355-
to the single group. "0 4294967295" would enable it for the world, "100
1356-
4294967295" would enable it for the users, but not daemons.
1355+
to the single group. "0 4294967294" would enable it for the world, "100
1356+
4294967294" would enable it for the users, but not daemons.
13571357

13581358
tcp_early_demux - BOOLEAN
13591359
Enable early demux for established TCP sockets.

drivers/bluetooth/hci_qca.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ enum qca_flags {
7878
QCA_HW_ERROR_EVENT,
7979
QCA_SSR_TRIGGERED,
8080
QCA_BT_OFF,
81-
QCA_ROM_FW
81+
QCA_ROM_FW,
82+
QCA_DEBUGFS_CREATED,
8283
};
8384

8485
enum qca_capabilities {
@@ -635,6 +636,9 @@ static void qca_debugfs_init(struct hci_dev *hdev)
635636
if (!hdev->debugfs)
636637
return;
637638

639+
if (test_and_set_bit(QCA_DEBUGFS_CREATED, &qca->flags))
640+
return;
641+
638642
ibs_dir = debugfs_create_dir("ibs", hdev->debugfs);
639643

640644
/* read only */

drivers/net/dsa/lan9303-core.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,8 +1188,6 @@ static int lan9303_port_fdb_add(struct dsa_switch *ds, int port,
11881188
struct lan9303 *chip = ds->priv;
11891189

11901190
dev_dbg(chip->dev, "%s(%d, %pM, %d)\n", __func__, port, addr, vid);
1191-
if (vid)
1192-
return -EOPNOTSUPP;
11931191

11941192
return lan9303_alr_add_port(chip, addr, port, false);
11951193
}
@@ -1201,8 +1199,6 @@ static int lan9303_port_fdb_del(struct dsa_switch *ds, int port,
12011199
struct lan9303 *chip = ds->priv;
12021200

12031201
dev_dbg(chip->dev, "%s(%d, %pM, %d)\n", __func__, port, addr, vid);
1204-
if (vid)
1205-
return -EOPNOTSUPP;
12061202
lan9303_alr_del_port(chip, addr, port);
12071203

12081204
return 0;

drivers/net/dsa/qca/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ config NET_DSA_QCA8K_LEDS_SUPPORT
2020
bool "Qualcomm Atheros QCA8K Ethernet switch family LEDs support"
2121
depends on NET_DSA_QCA8K
2222
depends on LEDS_CLASS=y || LEDS_CLASS=NET_DSA_QCA8K
23+
depends on LEDS_TRIGGERS
2324
help
2425
This enabled support for LEDs present on the Qualcomm Atheros
2526
QCA8K Ethernet switch chips.

drivers/net/ethernet/amd/pds_core/dev.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,15 @@ bool pdsc_is_fw_running(struct pdsc *pdsc)
6868

6969
bool pdsc_is_fw_good(struct pdsc *pdsc)
7070
{
71-
u8 gen = pdsc->fw_status & PDS_CORE_FW_STS_F_GENERATION;
71+
bool fw_running = pdsc_is_fw_running(pdsc);
72+
u8 gen;
7273

73-
return pdsc_is_fw_running(pdsc) && gen == pdsc->fw_generation;
74+
/* Make sure to update the cached fw_status by calling
75+
* pdsc_is_fw_running() before getting the generation
76+
*/
77+
gen = pdsc->fw_status & PDS_CORE_FW_STS_F_GENERATION;
78+
79+
return fw_running && gen == pdsc->fw_generation;
7480
}
7581

7682
static u8 pdsc_devcmd_status(struct pdsc *pdsc)

drivers/net/ethernet/broadcom/bcmsysport.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2531,9 +2531,9 @@ static int bcm_sysport_probe(struct platform_device *pdev)
25312531
priv->irq0 = platform_get_irq(pdev, 0);
25322532
if (!priv->is_lite) {
25332533
priv->irq1 = platform_get_irq(pdev, 1);
2534-
priv->wol_irq = platform_get_irq(pdev, 2);
2534+
priv->wol_irq = platform_get_irq_optional(pdev, 2);
25352535
} else {
2536-
priv->wol_irq = platform_get_irq(pdev, 1);
2536+
priv->wol_irq = platform_get_irq_optional(pdev, 1);
25372537
}
25382538
if (priv->irq0 <= 0 || (priv->irq1 <= 0 && !priv->is_lite)) {
25392539
ret = -EINVAL;

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

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ static void bnxt_tx_int(struct bnxt *bp, struct bnxt_napi *bnapi, int nr_pkts)
692692

693693
__netif_txq_completed_wake(txq, nr_pkts, tx_bytes,
694694
bnxt_tx_avail(bp, txr), bp->tx_wake_thresh,
695-
READ_ONCE(txr->dev_state) != BNXT_DEV_STATE_CLOSING);
695+
READ_ONCE(txr->dev_state) == BNXT_DEV_STATE_CLOSING);
696696
}
697697

698698
static struct page *__bnxt_alloc_rx_page(struct bnxt *bp, dma_addr_t *mapping,
@@ -2365,6 +2365,9 @@ static int bnxt_async_event_process(struct bnxt *bp,
23652365
struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
23662366
u64 ns;
23672367

2368+
if (!ptp)
2369+
goto async_event_process_exit;
2370+
23682371
spin_lock_bh(&ptp->ptp_lock);
23692372
bnxt_ptp_update_current_time(bp);
23702373
ns = (((u64)BNXT_EVENT_PHC_RTC_UPDATE(data1) <<
@@ -4763,6 +4766,9 @@ int bnxt_hwrm_func_drv_rgtr(struct bnxt *bp, unsigned long *bmap, int bmap_size,
47634766
if (event_id == ASYNC_EVENT_CMPL_EVENT_ID_ERROR_RECOVERY &&
47644767
!(bp->fw_cap & BNXT_FW_CAP_ERROR_RECOVERY))
47654768
continue;
4769+
if (event_id == ASYNC_EVENT_CMPL_EVENT_ID_PHC_UPDATE &&
4770+
!bp->ptp_cfg)
4771+
continue;
47664772
__set_bit(bnxt_async_events_arr[i], async_events_bmap);
47674773
}
47684774
if (bmap && bmap_size) {
@@ -5350,6 +5356,7 @@ static void bnxt_hwrm_update_rss_hash_cfg(struct bnxt *bp)
53505356
if (hwrm_req_init(bp, req, HWRM_VNIC_RSS_QCFG))
53515357
return;
53525358

5359+
req->vnic_id = cpu_to_le16(vnic->fw_vnic_id);
53535360
/* all contexts configured to same hash_type, zero always exists */
53545361
req->rss_ctx_idx = cpu_to_le16(vnic->fw_rss_cos_lb_ctx[0]);
53555362
resp = hwrm_req_hold(bp, req);
@@ -8812,6 +8819,9 @@ static int bnxt_init_chip(struct bnxt *bp, bool irq_re_init)
88128819
goto err_out;
88138820
}
88148821

8822+
if (BNXT_VF(bp))
8823+
bnxt_hwrm_func_qcfg(bp);
8824+
88158825
rc = bnxt_setup_vnic(bp, 0);
88168826
if (rc)
88178827
goto err_out;
@@ -11598,6 +11608,7 @@ static void bnxt_tx_timeout(struct net_device *dev, unsigned int txqueue)
1159811608
static void bnxt_fw_health_check(struct bnxt *bp)
1159911609
{
1160011610
struct bnxt_fw_health *fw_health = bp->fw_health;
11611+
struct pci_dev *pdev = bp->pdev;
1160111612
u32 val;
1160211613

1160311614
if (!fw_health->enabled || test_bit(BNXT_STATE_IN_FW_RESET, &bp->state))
@@ -11611,15 +11622,15 @@ static void bnxt_fw_health_check(struct bnxt *bp)
1161111622
}
1161211623

1161311624
val = bnxt_fw_health_readl(bp, BNXT_FW_HEARTBEAT_REG);
11614-
if (val == fw_health->last_fw_heartbeat) {
11625+
if (val == fw_health->last_fw_heartbeat && pci_device_is_present(pdev)) {
1161511626
fw_health->arrests++;
1161611627
goto fw_reset;
1161711628
}
1161811629

1161911630
fw_health->last_fw_heartbeat = val;
1162011631

1162111632
val = bnxt_fw_health_readl(bp, BNXT_FW_RESET_CNT_REG);
11622-
if (val != fw_health->last_fw_reset_cnt) {
11633+
if (val != fw_health->last_fw_reset_cnt && pci_device_is_present(pdev)) {
1162311634
fw_health->discoveries++;
1162411635
goto fw_reset;
1162511636
}
@@ -13025,26 +13036,37 @@ static void bnxt_cfg_ntp_filters(struct bnxt *bp)
1302513036

1302613037
#endif /* CONFIG_RFS_ACCEL */
1302713038

13028-
static int bnxt_udp_tunnel_sync(struct net_device *netdev, unsigned int table)
13039+
static int bnxt_udp_tunnel_set_port(struct net_device *netdev, unsigned int table,
13040+
unsigned int entry, struct udp_tunnel_info *ti)
1302913041
{
1303013042
struct bnxt *bp = netdev_priv(netdev);
13031-
struct udp_tunnel_info ti;
1303213043
unsigned int cmd;
1303313044

13034-
udp_tunnel_nic_get_port(netdev, table, 0, &ti);
13035-
if (ti.type == UDP_TUNNEL_TYPE_VXLAN)
13045+
if (ti->type == UDP_TUNNEL_TYPE_VXLAN)
1303613046
cmd = TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_VXLAN;
1303713047
else
1303813048
cmd = TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_GENEVE;
1303913049

13040-
if (ti.port)
13041-
return bnxt_hwrm_tunnel_dst_port_alloc(bp, ti.port, cmd);
13050+
return bnxt_hwrm_tunnel_dst_port_alloc(bp, ti->port, cmd);
13051+
}
13052+
13053+
static int bnxt_udp_tunnel_unset_port(struct net_device *netdev, unsigned int table,
13054+
unsigned int entry, struct udp_tunnel_info *ti)
13055+
{
13056+
struct bnxt *bp = netdev_priv(netdev);
13057+
unsigned int cmd;
13058+
13059+
if (ti->type == UDP_TUNNEL_TYPE_VXLAN)
13060+
cmd = TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_VXLAN;
13061+
else
13062+
cmd = TUNNEL_DST_PORT_FREE_REQ_TUNNEL_TYPE_GENEVE;
1304213063

1304313064
return bnxt_hwrm_tunnel_dst_port_free(bp, cmd);
1304413065
}
1304513066

1304613067
static const struct udp_tunnel_nic_info bnxt_udp_tunnels = {
13047-
.sync_table = bnxt_udp_tunnel_sync,
13068+
.set_port = bnxt_udp_tunnel_set_port,
13069+
.unset_port = bnxt_udp_tunnel_unset_port,
1304813070
.flags = UDP_TUNNEL_NIC_INFO_MAY_SLEEP |
1304913071
UDP_TUNNEL_NIC_INFO_OPEN_ONLY,
1305013072
.tables = {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3831,7 +3831,7 @@ static int bnxt_reset(struct net_device *dev, u32 *flags)
38313831
}
38323832
}
38333833

3834-
if (req & BNXT_FW_RESET_AP) {
3834+
if (!BNXT_CHIP_P4_PLUS(bp) && (req & BNXT_FW_RESET_AP)) {
38353835
/* This feature is not supported in older firmware versions */
38363836
if (bp->hwrm_spec_code >= 0x10803) {
38373837
if (!bnxt_firmware_reset_ap(dev)) {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,7 @@ int bnxt_ptp_init(struct bnxt *bp, bool phc_cfg)
952952
bnxt_ptp_timecounter_init(bp, true);
953953
bnxt_ptp_adjfine_rtc(bp, 0);
954954
}
955+
bnxt_hwrm_func_drv_rgtr(bp, NULL, 0, true);
955956

956957
ptp->ptp_info = bnxt_ptp_caps;
957958
if ((bp->fw_cap & BNXT_FW_CAP_PTP_PPS)) {

0 commit comments

Comments
 (0)