Skip to content

Commit 5c8013a

Browse files
committed
Merge tag 'net-6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from wireless. The ath12k fix to avoid FW crashes requires adding support for a number of new FW commands so it's quite large in terms of LoC. The rest is relatively small. Current release - fix to a fix: - ptp: fix breakage after ptp_vclock_in_use() rework Current release - regressions: - openvswitch: allocate struct ovs_pcpu_storage dynamically, static allocation may exhaust module loader limit on smaller systems Previous releases - regressions: - tcp: fix tcp_packet_delayed() for peers with no selective ACK support Previous releases - always broken: - wifi: ath12k: don't activate more links than firmware supports - tcp: make sure sockets open via passive TFO have valid NAPI ID - eth: bnxt_en: update MRU and RSS table of RSS contexts on queue reset, prevent Rx queues from silently hanging after queue reset - NFC: uart: set tty->disc_data only in success path" * tag 'net-6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (59 commits) net: airoha: Differentiate hwfd buffer size for QDMA0 and QDMA1 net: airoha: Compute number of descriptors according to reserved memory size tools: ynl: fix mixing ops and notifications on one socket net: atm: fix /proc/net/atm/lec handling net: atm: add lec_mutex mlxbf_gige: return EPROBE_DEFER if PHY IRQ is not available net: airoha: Always check return value from airoha_ppe_foe_get_entry() NFC: nci: uart: Set tty->disc_data only in success path calipso: Fix null-ptr-deref in calipso_req_{set,del}attr(). MAINTAINERS: Remove Shannon Nelson from MAINTAINERS file net: lan743x: fix potential out-of-bounds write in lan743x_ptp_io_event_clock_get() eth: fbnic: avoid double free when failing to DMA-map FW msg tcp: fix passive TFO socket having invalid NAPI ID selftests: net: add test for passive TFO socket NAPI ID selftests: net: add passive TFO test binary selftests: netdevsim: improve lib.sh include in peer.sh tipc: fix null-ptr-deref when acquiring remote ip of ethernet bearer Octeontx2-pf: Fix Backpresure configuration net: ftgmac100: select FIXED_PHY net: ethtool: remove duplicate defines for family info ...
2 parents 2477098 + 16ef63a commit 5c8013a

File tree

64 files changed

+2091
-288
lines changed

Some content is hidden

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

64 files changed

+2091
-288
lines changed

.mailmap

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -693,9 +693,10 @@ Serge Hallyn <[email protected]> <[email protected]>
693693
694694
695695
696-
697-
698-
696+
697+
698+
699+
699700
Sharath Chandra Vurukala <[email protected]> <[email protected]>
700701
701702

Documentation/netlink/specs/ethtool.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ protocol: genetlink-legacy
77
doc: Partial family for Ethtool Netlink.
88
uapi-header: linux/ethtool_netlink_generated.h
99

10+
c-family-name: ethtool-genl-name
11+
c-version-name: ethtool-genl-version
12+
1013
definitions:
1114
-
1215
name: udp-tunnel-type

MAINTAINERS

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,6 @@ F: arch/x86/include/asm/amd/node.h
11571157
F: arch/x86/kernel/amd_node.c
11581158

11591159
AMD PDS CORE DRIVER
1160-
M: Shannon Nelson <[email protected]>
11611160
M: Brett Creeley <[email protected]>
11621161
11631162
S: Maintained
@@ -9942,7 +9941,6 @@ F: drivers/fwctl/mlx5/
99429941

99439942
FWCTL PDS DRIVER
99449943
M: Brett Creeley <[email protected]>
9945-
R: Shannon Nelson <[email protected]>
99469944
99479945
S: Maintained
99489946
F: drivers/fwctl/pds/
@@ -19379,7 +19377,7 @@ F: crypto/pcrypt.c
1937919377
F: include/crypto/pcrypt.h
1938019378

1938119379
PDS DSC VIRTIO DATA PATH ACCELERATOR
19382-
R: Shannon Nelson <shannon.nelson@amd.com>
19380+
R: Brett Creeley <brett.creeley@amd.com>
1938319381
F: drivers/vdpa/pds/
1938419382

1938519383
PECI HARDWARE MONITORING DRIVERS
@@ -19401,7 +19399,6 @@ F: include/linux/peci-cpu.h
1940119399
F: include/linux/peci.h
1940219400

1940319401
PENSANDO ETHERNET DRIVERS
19404-
M: Shannon Nelson <[email protected]>
1940519402
M: Brett Creeley <[email protected]>
1940619403
1940719404
S: Maintained

drivers/atm/atmtcp.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,9 @@ static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb)
288288
struct sk_buff *new_skb;
289289
int result = 0;
290290

291-
if (!skb->len) return 0;
291+
if (skb->len < sizeof(struct atmtcp_hdr))
292+
goto done;
293+
292294
dev = vcc->dev_data;
293295
hdr = (struct atmtcp_hdr *) skb->data;
294296
if (hdr->length == ATMTCP_HDR_MAGIC) {

drivers/net/can/m_can/tcan4x5x-core.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -411,10 +411,11 @@ static int tcan4x5x_can_probe(struct spi_device *spi)
411411
priv = cdev_to_priv(mcan_class);
412412

413413
priv->power = devm_regulator_get_optional(&spi->dev, "vsup");
414-
if (PTR_ERR(priv->power) == -EPROBE_DEFER) {
415-
ret = -EPROBE_DEFER;
416-
goto out_m_can_class_free_dev;
417-
} else {
414+
if (IS_ERR(priv->power)) {
415+
if (PTR_ERR(priv->power) == -EPROBE_DEFER) {
416+
ret = -EPROBE_DEFER;
417+
goto out_m_can_class_free_dev;
418+
}
418419
priv->power = NULL;
419420
}
420421

drivers/net/ethernet/airoha/airoha_eth.c

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,23 +1065,18 @@ static void airoha_qdma_cleanup_tx_queue(struct airoha_queue *q)
10651065

10661066
static int airoha_qdma_init_hfwd_queues(struct airoha_qdma *qdma)
10671067
{
1068+
int size, index, num_desc = HW_DSCP_NUM;
10681069
struct airoha_eth *eth = qdma->eth;
10691070
int id = qdma - &eth->qdma[0];
1071+
u32 status, buf_size;
10701072
dma_addr_t dma_addr;
10711073
const char *name;
1072-
int size, index;
1073-
u32 status;
1074-
1075-
size = HW_DSCP_NUM * sizeof(struct airoha_qdma_fwd_desc);
1076-
if (!dmam_alloc_coherent(eth->dev, size, &dma_addr, GFP_KERNEL))
1077-
return -ENOMEM;
1078-
1079-
airoha_qdma_wr(qdma, REG_FWD_DSCP_BASE, dma_addr);
10801074

10811075
name = devm_kasprintf(eth->dev, GFP_KERNEL, "qdma%d-buf", id);
10821076
if (!name)
10831077
return -ENOMEM;
10841078

1079+
buf_size = id ? AIROHA_MAX_PACKET_SIZE / 2 : AIROHA_MAX_PACKET_SIZE;
10851080
index = of_property_match_string(eth->dev->of_node,
10861081
"memory-region-names", name);
10871082
if (index >= 0) {
@@ -1099,24 +1094,34 @@ static int airoha_qdma_init_hfwd_queues(struct airoha_qdma *qdma)
10991094
rmem = of_reserved_mem_lookup(np);
11001095
of_node_put(np);
11011096
dma_addr = rmem->base;
1097+
/* Compute the number of hw descriptors according to the
1098+
* reserved memory size and the payload buffer size
1099+
*/
1100+
num_desc = div_u64(rmem->size, buf_size);
11021101
} else {
1103-
size = AIROHA_MAX_PACKET_SIZE * HW_DSCP_NUM;
1102+
size = buf_size * num_desc;
11041103
if (!dmam_alloc_coherent(eth->dev, size, &dma_addr,
11051104
GFP_KERNEL))
11061105
return -ENOMEM;
11071106
}
11081107

11091108
airoha_qdma_wr(qdma, REG_FWD_BUF_BASE, dma_addr);
11101109

1110+
size = num_desc * sizeof(struct airoha_qdma_fwd_desc);
1111+
if (!dmam_alloc_coherent(eth->dev, size, &dma_addr, GFP_KERNEL))
1112+
return -ENOMEM;
1113+
1114+
airoha_qdma_wr(qdma, REG_FWD_DSCP_BASE, dma_addr);
1115+
/* QDMA0: 2KB. QDMA1: 1KB */
11111116
airoha_qdma_rmw(qdma, REG_HW_FWD_DSCP_CFG,
11121117
HW_FWD_DSCP_PAYLOAD_SIZE_MASK,
1113-
FIELD_PREP(HW_FWD_DSCP_PAYLOAD_SIZE_MASK, 0));
1118+
FIELD_PREP(HW_FWD_DSCP_PAYLOAD_SIZE_MASK, !!id));
11141119
airoha_qdma_rmw(qdma, REG_FWD_DSCP_LOW_THR, FWD_DSCP_LOW_THR_MASK,
11151120
FIELD_PREP(FWD_DSCP_LOW_THR_MASK, 128));
11161121
airoha_qdma_rmw(qdma, REG_LMGR_INIT_CFG,
11171122
LMGR_INIT_START | LMGR_SRAM_MODE_MASK |
11181123
HW_FWD_DESC_NUM_MASK,
1119-
FIELD_PREP(HW_FWD_DESC_NUM_MASK, HW_DSCP_NUM) |
1124+
FIELD_PREP(HW_FWD_DESC_NUM_MASK, num_desc) |
11201125
LMGR_INIT_START | LMGR_SRAM_MODE_MASK);
11211126

11221127
return read_poll_timeout(airoha_qdma_rr, status,

drivers/net/ethernet/airoha/airoha_ppe.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,8 +809,10 @@ airoha_ppe_foe_flow_l2_entry_update(struct airoha_ppe *ppe,
809809
int idle;
810810

811811
hwe = airoha_ppe_foe_get_entry(ppe, iter->hash);
812-
ib1 = READ_ONCE(hwe->ib1);
812+
if (!hwe)
813+
continue;
813814

815+
ib1 = READ_ONCE(hwe->ib1);
814816
state = FIELD_GET(AIROHA_FOE_IB1_BIND_STATE, ib1);
815817
if (state != AIROHA_FOE_STATE_BIND) {
816818
iter->hash = 0xffff;

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

Lines changed: 74 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10780,6 +10780,72 @@ void bnxt_del_one_rss_ctx(struct bnxt *bp, struct bnxt_rss_ctx *rss_ctx,
1078010780
bp->num_rss_ctx--;
1078110781
}
1078210782

10783+
static bool bnxt_vnic_has_rx_ring(struct bnxt *bp, struct bnxt_vnic_info *vnic,
10784+
int rxr_id)
10785+
{
10786+
u16 tbl_size = bnxt_get_rxfh_indir_size(bp->dev);
10787+
int i, vnic_rx;
10788+
10789+
/* Ntuple VNIC always has all the rx rings. Any change of ring id
10790+
* must be updated because a future filter may use it.
10791+
*/
10792+
if (vnic->flags & BNXT_VNIC_NTUPLE_FLAG)
10793+
return true;
10794+
10795+
for (i = 0; i < tbl_size; i++) {
10796+
if (vnic->flags & BNXT_VNIC_RSSCTX_FLAG)
10797+
vnic_rx = ethtool_rxfh_context_indir(vnic->rss_ctx)[i];
10798+
else
10799+
vnic_rx = bp->rss_indir_tbl[i];
10800+
10801+
if (rxr_id == vnic_rx)
10802+
return true;
10803+
}
10804+
10805+
return false;
10806+
}
10807+
10808+
static int bnxt_set_vnic_mru_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic,
10809+
u16 mru, int rxr_id)
10810+
{
10811+
int rc;
10812+
10813+
if (!bnxt_vnic_has_rx_ring(bp, vnic, rxr_id))
10814+
return 0;
10815+
10816+
if (mru) {
10817+
rc = bnxt_hwrm_vnic_set_rss_p5(bp, vnic, true);
10818+
if (rc) {
10819+
netdev_err(bp->dev, "hwrm vnic %d set rss failure rc: %d\n",
10820+
vnic->vnic_id, rc);
10821+
return rc;
10822+
}
10823+
}
10824+
vnic->mru = mru;
10825+
bnxt_hwrm_vnic_update(bp, vnic,
10826+
VNIC_UPDATE_REQ_ENABLES_MRU_VALID);
10827+
10828+
return 0;
10829+
}
10830+
10831+
static int bnxt_set_rss_ctx_vnic_mru(struct bnxt *bp, u16 mru, int rxr_id)
10832+
{
10833+
struct ethtool_rxfh_context *ctx;
10834+
unsigned long context;
10835+
int rc;
10836+
10837+
xa_for_each(&bp->dev->ethtool->rss_ctx, context, ctx) {
10838+
struct bnxt_rss_ctx *rss_ctx = ethtool_rxfh_context_priv(ctx);
10839+
struct bnxt_vnic_info *vnic = &rss_ctx->vnic;
10840+
10841+
rc = bnxt_set_vnic_mru_p5(bp, vnic, mru, rxr_id);
10842+
if (rc)
10843+
return rc;
10844+
}
10845+
10846+
return 0;
10847+
}
10848+
1078310849
static void bnxt_hwrm_realloc_rss_ctx_vnic(struct bnxt *bp)
1078410850
{
1078510851
bool set_tpa = !!(bp->flags & BNXT_FLAG_TPA);
@@ -15927,6 +15993,7 @@ static int bnxt_queue_start(struct net_device *dev, void *qmem, int idx)
1592715993
struct bnxt_vnic_info *vnic;
1592815994
struct bnxt_napi *bnapi;
1592915995
int i, rc;
15996+
u16 mru;
1593015997

1593115998
rxr = &bp->rx_ring[idx];
1593215999
clone = qmem;
@@ -15977,21 +16044,15 @@ static int bnxt_queue_start(struct net_device *dev, void *qmem, int idx)
1597716044
napi_enable_locked(&bnapi->napi);
1597816045
bnxt_db_nq_arm(bp, &cpr->cp_db, cpr->cp_raw_cons);
1597916046

16047+
mru = bp->dev->mtu + ETH_HLEN + VLAN_HLEN;
1598016048
for (i = 0; i < bp->nr_vnics; i++) {
1598116049
vnic = &bp->vnic_info[i];
1598216050

15983-
rc = bnxt_hwrm_vnic_set_rss_p5(bp, vnic, true);
15984-
if (rc) {
15985-
netdev_err(bp->dev, "hwrm vnic %d set rss failure rc: %d\n",
15986-
vnic->vnic_id, rc);
16051+
rc = bnxt_set_vnic_mru_p5(bp, vnic, mru, idx);
16052+
if (rc)
1598716053
return rc;
15988-
}
15989-
vnic->mru = bp->dev->mtu + ETH_HLEN + VLAN_HLEN;
15990-
bnxt_hwrm_vnic_update(bp, vnic,
15991-
VNIC_UPDATE_REQ_ENABLES_MRU_VALID);
1599216054
}
15993-
15994-
return 0;
16055+
return bnxt_set_rss_ctx_vnic_mru(bp, mru, idx);
1599516056

1599616057
err_reset:
1599716058
netdev_err(bp->dev, "Unexpected HWRM error during queue start rc: %d\n",
@@ -16013,10 +16074,10 @@ static int bnxt_queue_stop(struct net_device *dev, void *qmem, int idx)
1601316074

1601416075
for (i = 0; i < bp->nr_vnics; i++) {
1601516076
vnic = &bp->vnic_info[i];
16016-
vnic->mru = 0;
16017-
bnxt_hwrm_vnic_update(bp, vnic,
16018-
VNIC_UPDATE_REQ_ENABLES_MRU_VALID);
16077+
16078+
bnxt_set_vnic_mru_p5(bp, vnic, 0, idx);
1601916079
}
16080+
bnxt_set_rss_ctx_vnic_mru(bp, 0, idx);
1602016081
/* Make sure NAPI sees that the VNIC is disabled */
1602116082
synchronize_net();
1602216083
rxr = &bp->rx_ring[idx];

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

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,9 @@ void bnxt_ulp_stop(struct bnxt *bp)
231231
return;
232232

233233
mutex_lock(&edev->en_dev_lock);
234-
if (!bnxt_ulp_registered(edev)) {
235-
mutex_unlock(&edev->en_dev_lock);
236-
return;
237-
}
234+
if (!bnxt_ulp_registered(edev) ||
235+
(edev->flags & BNXT_EN_FLAG_ULP_STOPPED))
236+
goto ulp_stop_exit;
238237

239238
edev->flags |= BNXT_EN_FLAG_ULP_STOPPED;
240239
if (aux_priv) {
@@ -250,6 +249,7 @@ void bnxt_ulp_stop(struct bnxt *bp)
250249
adrv->suspend(adev, pm);
251250
}
252251
}
252+
ulp_stop_exit:
253253
mutex_unlock(&edev->en_dev_lock);
254254
}
255255

@@ -258,19 +258,13 @@ void bnxt_ulp_start(struct bnxt *bp, int err)
258258
struct bnxt_aux_priv *aux_priv = bp->aux_priv;
259259
struct bnxt_en_dev *edev = bp->edev;
260260

261-
if (!edev)
262-
return;
263-
264-
edev->flags &= ~BNXT_EN_FLAG_ULP_STOPPED;
265-
266-
if (err)
261+
if (!edev || err)
267262
return;
268263

269264
mutex_lock(&edev->en_dev_lock);
270-
if (!bnxt_ulp_registered(edev)) {
271-
mutex_unlock(&edev->en_dev_lock);
272-
return;
273-
}
265+
if (!bnxt_ulp_registered(edev) ||
266+
!(edev->flags & BNXT_EN_FLAG_ULP_STOPPED))
267+
goto ulp_start_exit;
274268

275269
if (edev->ulp_tbl->msix_requested)
276270
bnxt_fill_msix_vecs(bp, edev->msix_entries);
@@ -287,6 +281,8 @@ void bnxt_ulp_start(struct bnxt *bp, int err)
287281
adrv->resume(adev);
288282
}
289283
}
284+
ulp_start_exit:
285+
edev->flags &= ~BNXT_EN_FLAG_ULP_STOPPED;
290286
mutex_unlock(&edev->en_dev_lock);
291287
}
292288

drivers/net/ethernet/faraday/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ config FTGMAC100
3131
depends on ARM || COMPILE_TEST
3232
depends on !64BIT || BROKEN
3333
select PHYLIB
34+
select FIXED_PHY
3435
select MDIO_ASPEED if MACH_ASPEED_G6
3536
select CRC32
3637
help

drivers/net/ethernet/intel/e1000e/netdev.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3534,9 +3534,6 @@ s32 e1000e_get_base_timinca(struct e1000_adapter *adapter, u32 *timinca)
35343534
case e1000_pch_cnp:
35353535
case e1000_pch_tgp:
35363536
case e1000_pch_adp:
3537-
case e1000_pch_mtp:
3538-
case e1000_pch_lnp:
3539-
case e1000_pch_ptp:
35403537
case e1000_pch_nvp:
35413538
if (er32(TSYNCRXCTL) & E1000_TSYNCRXCTL_SYSCFI) {
35423539
/* Stable 24MHz frequency */
@@ -3552,6 +3549,17 @@ s32 e1000e_get_base_timinca(struct e1000_adapter *adapter, u32 *timinca)
35523549
adapter->cc.shift = shift;
35533550
}
35543551
break;
3552+
case e1000_pch_mtp:
3553+
case e1000_pch_lnp:
3554+
case e1000_pch_ptp:
3555+
/* System firmware can misreport this value, so set it to a
3556+
* stable 38400KHz frequency.
3557+
*/
3558+
incperiod = INCPERIOD_38400KHZ;
3559+
incvalue = INCVALUE_38400KHZ;
3560+
shift = INCVALUE_SHIFT_38400KHZ;
3561+
adapter->cc.shift = shift;
3562+
break;
35553563
case e1000_82574:
35563564
case e1000_82583:
35573565
/* Stable 25MHz frequency */

drivers/net/ethernet/intel/e1000e/ptp.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,15 +295,17 @@ void e1000e_ptp_init(struct e1000_adapter *adapter)
295295
case e1000_pch_cnp:
296296
case e1000_pch_tgp:
297297
case e1000_pch_adp:
298-
case e1000_pch_mtp:
299-
case e1000_pch_lnp:
300-
case e1000_pch_ptp:
301298
case e1000_pch_nvp:
302299
if (er32(TSYNCRXCTL) & E1000_TSYNCRXCTL_SYSCFI)
303300
adapter->ptp_clock_info.max_adj = MAX_PPB_24MHZ;
304301
else
305302
adapter->ptp_clock_info.max_adj = MAX_PPB_38400KHZ;
306303
break;
304+
case e1000_pch_mtp:
305+
case e1000_pch_lnp:
306+
case e1000_pch_ptp:
307+
adapter->ptp_clock_info.max_adj = MAX_PPB_38400KHZ;
308+
break;
307309
case e1000_82574:
308310
case e1000_82583:
309311
adapter->ptp_clock_info.max_adj = MAX_PPB_25MHZ;

0 commit comments

Comments
 (0)