Skip to content

Commit 9c736ac

Browse files
committed
Merge tag 'net-6.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni: "Including fixes from Bluetooth. Current release - regressions: - ipv4: fix regression in local-broadcast routes - vsock: fix error-handling regression introduced in v6.17-rc1 Previous releases - regressions: - bluetooth: - mark connection as closed during suspend disconnect - fix set_local_name race condition - eth: - ice: fix NULL pointer dereference on reset - mlx5: fix memory leak in hws_pool_buddy_init error path - bnxt_en: fix stats context reservation logic - hv: fix loss of receive events from host during channel open Previous releases - always broken: - page_pool: fix incorrect mp_ops error handling - sctp: initialize more fields in sctp_v6_from_sk() - eth: - octeontx2-vf: fix max packet length errors - idpf: fix Tx flow scheduling to avoid Tx timeouts - bnxt_en: fix memory corruption during ifdown - ice: fix incorrect counter for buffer allocation failures - mlx5: fix lockdep assertion on sync reset unload event - fbnic: fixup rtnl_lock and devl_lock handling - xgmac: do not enable RX FIFO overflow interrupts - phy: mscc: fix when PTP clock is register and unregister Misc: - add Telit Cinterion LE910C4-WWX new compositions" * tag 'net-6.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (60 commits) net: ipv4: fix regression in local-broadcast routes net: macb: Disable clocks once fbnic: Move phylink resume out of service_task and into open/close fbnic: Fixup rtnl_lock and devl_lock handling related to mailbox code net: rose: fix a typo in rose_clear_routes() l2tp: do not use sock_hold() in pppol2tp_session_get_sock() sctp: initialize more fields in sctp_v6_from_sk() MAINTAINERS: rmnet: Update email addresses net: rose: include node references in rose_neigh refcount net: rose: convert 'use' field to refcount_t net: rose: split remove and free operations in rose_remove_neigh() net: hv_netvsc: fix loss of early receive events from host during channel open. net: stmmac: Set CIC bit only for TX queues with COE net: stmmac: xgmac: Correct supported speed modes net: stmmac: xgmac: Do not enable RX FIFO Overflow interrupts net/mlx5e: Set local Xoff after FW update net/mlx5e: Update and set Xon/Xoff upon port speed set net/mlx5e: Update and set Xon/Xoff upon MTU set net/mlx5: Prevent flow steering mode changes in switchdev mode net/mlx5: Nack sync reset when SFs are present ...
2 parents fa58e4f + 5189446 commit 9c736ac

Some content is hidden

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

69 files changed

+982
-789
lines changed

CREDITS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3222,6 +3222,10 @@ D: AIC5800 IEEE 1394, RAW I/O on 1394
32223222
D: Starter of Linux1394 effort
32233223
S: ask per mail for current address
32243224

3225+
N: Boris Pismenny
3226+
3227+
D: Kernel TLS implementation and offload support.
3228+
32253229
N: Nicolas Pitre
32263230
32273231
D: StrongARM SA1100 support integrator & hacker
@@ -4168,6 +4172,9 @@ S: 1513 Brewster Dr.
41684172
S: Carrollton, TX 75010
41694173
S: USA
41704174

4175+
N: Dave Watson
4176+
D: Kernel TLS implementation.
4177+
41714178
N: Tim Waugh
41724179
41734180
D: Co-architect of the parallel-port sharing system

MAINTAINERS

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ S: Maintained
937937
F: drivers/gpio/gpio-altera.c
938938

939939
ALTERA TRIPLE SPEED ETHERNET DRIVER
940-
M: Joyce Ooi <joyce.ooi@intel.com>
940+
M: Boon Khai Ng <boon.khai.ng@altera.com>
941941
942942
S: Maintained
943943
F: drivers/net/ethernet/altera/
@@ -17848,7 +17848,6 @@ F: net/ipv6/syncookies.c
1784817848
F: net/ipv6/tcp*.c
1784917849

1785017850
NETWORKING [TLS]
17851-
M: Boris Pismenny <[email protected]>
1785217851
M: John Fastabend <[email protected]>
1785317852
M: Jakub Kicinski <[email protected]>
1785417853
@@ -20878,8 +20877,8 @@ S: Maintained
2087820877
F: drivers/firmware/qcom/qcom_qseecom_uefisecapp.c
2087920878

2088020879
QUALCOMM RMNET DRIVER
20881-
M: Subash Abhinov Kasiviswanathan <quic_subashab@quicinc.com>
20882-
M: Sean Tranchetti <quic_stranche@quicinc.com>
20880+
M: Subash Abhinov Kasiviswanathan <[email protected].com>
20881+
M: Sean Tranchetti <[email protected].com>
2088320882
2088420883
S: Maintained
2088520884
F: Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst

drivers/atm/atmtcp.c

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,19 @@ static struct atm_vcc *find_vcc(struct atm_dev *dev, short vpi, int vci)
279279
return NULL;
280280
}
281281

282+
static int atmtcp_c_pre_send(struct atm_vcc *vcc, struct sk_buff *skb)
283+
{
284+
struct atmtcp_hdr *hdr;
285+
286+
if (skb->len < sizeof(struct atmtcp_hdr))
287+
return -EINVAL;
288+
289+
hdr = (struct atmtcp_hdr *)skb->data;
290+
if (hdr->length == ATMTCP_HDR_MAGIC)
291+
return -EINVAL;
292+
293+
return 0;
294+
}
282295

283296
static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb)
284297
{
@@ -288,9 +301,6 @@ static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb)
288301
struct sk_buff *new_skb;
289302
int result = 0;
290303

291-
if (skb->len < sizeof(struct atmtcp_hdr))
292-
goto done;
293-
294304
dev = vcc->dev_data;
295305
hdr = (struct atmtcp_hdr *) skb->data;
296306
if (hdr->length == ATMTCP_HDR_MAGIC) {
@@ -347,6 +357,7 @@ static const struct atmdev_ops atmtcp_v_dev_ops = {
347357

348358
static const struct atmdev_ops atmtcp_c_dev_ops = {
349359
.close = atmtcp_c_close,
360+
.pre_send = atmtcp_c_pre_send,
350361
.send = atmtcp_c_send
351362
};
352363

drivers/isdn/hardware/mISDN/hfcpci.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,13 @@
3939

4040
#include "hfc_pci.h"
4141

42+
static void hfcpci_softirq(struct timer_list *unused);
4243
static const char *hfcpci_revision = "2.0";
4344

4445
static int HFC_cnt;
4546
static uint debug;
4647
static uint poll, tics;
47-
static struct timer_list hfc_tl;
48+
static DEFINE_TIMER(hfc_tl, hfcpci_softirq);
4849
static unsigned long hfc_jiffies;
4950

5051
MODULE_AUTHOR("Karsten Keil");
@@ -2305,8 +2306,7 @@ hfcpci_softirq(struct timer_list *unused)
23052306
hfc_jiffies = jiffies + 1;
23062307
else
23072308
hfc_jiffies += tics;
2308-
hfc_tl.expires = hfc_jiffies;
2309-
add_timer(&hfc_tl);
2309+
mod_timer(&hfc_tl, hfc_jiffies);
23102310
}
23112311

23122312
static int __init
@@ -2332,10 +2332,8 @@ HFC_init(void)
23322332
if (poll != HFCPCI_BTRANS_THRESHOLD) {
23332333
printk(KERN_INFO "%s: Using alternative poll value of %d\n",
23342334
__func__, poll);
2335-
timer_setup(&hfc_tl, hfcpci_softirq, 0);
2336-
hfc_tl.expires = jiffies + tics;
2337-
hfc_jiffies = hfc_tl.expires;
2338-
add_timer(&hfc_tl);
2335+
hfc_jiffies = jiffies + tics;
2336+
mod_timer(&hfc_tl, hfc_jiffies);
23392337
} else
23402338
tics = 0; /* indicate the use of controller's timer */
23412339

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

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8016,14 +8016,20 @@ static int __bnxt_reserve_rings(struct bnxt *bp)
80168016
}
80178017
rx_rings = min_t(int, rx_rings, hwr.grp);
80188018
hwr.cp = min_t(int, hwr.cp, bp->cp_nr_rings);
8019-
if (hwr.stat > bnxt_get_ulp_stat_ctxs(bp))
8019+
if (bnxt_ulp_registered(bp->edev) &&
8020+
hwr.stat > bnxt_get_ulp_stat_ctxs(bp))
80208021
hwr.stat -= bnxt_get_ulp_stat_ctxs(bp);
80218022
hwr.cp = min_t(int, hwr.cp, hwr.stat);
80228023
rc = bnxt_trim_rings(bp, &rx_rings, &hwr.tx, hwr.cp, sh);
80238024
if (bp->flags & BNXT_FLAG_AGG_RINGS)
80248025
hwr.rx = rx_rings << 1;
80258026
tx_cp = bnxt_num_tx_to_cp(bp, hwr.tx);
80268027
hwr.cp = sh ? max_t(int, tx_cp, rx_rings) : tx_cp + rx_rings;
8028+
if (hwr.tx != bp->tx_nr_rings) {
8029+
netdev_warn(bp->dev,
8030+
"Able to reserve only %d out of %d requested TX rings\n",
8031+
hwr.tx, bp->tx_nr_rings);
8032+
}
80278033
bp->tx_nr_rings = hwr.tx;
80288034

80298035
/* If we cannot reserve all the RX rings, reset the RSS map only
@@ -12851,6 +12857,17 @@ static int bnxt_set_xps_mapping(struct bnxt *bp)
1285112857
return rc;
1285212858
}
1285312859

12860+
static int bnxt_tx_nr_rings(struct bnxt *bp)
12861+
{
12862+
return bp->num_tc ? bp->tx_nr_rings_per_tc * bp->num_tc :
12863+
bp->tx_nr_rings_per_tc;
12864+
}
12865+
12866+
static int bnxt_tx_nr_rings_per_tc(struct bnxt *bp)
12867+
{
12868+
return bp->num_tc ? bp->tx_nr_rings / bp->num_tc : bp->tx_nr_rings;
12869+
}
12870+
1285412871
static int __bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init)
1285512872
{
1285612873
int rc = 0;
@@ -12868,6 +12885,13 @@ static int __bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init)
1286812885
if (rc)
1286912886
return rc;
1287012887

12888+
/* Make adjustments if reserved TX rings are less than requested */
12889+
bp->tx_nr_rings -= bp->tx_nr_rings_xdp;
12890+
bp->tx_nr_rings_per_tc = bnxt_tx_nr_rings_per_tc(bp);
12891+
if (bp->tx_nr_rings_xdp) {
12892+
bp->tx_nr_rings_xdp = bp->tx_nr_rings_per_tc;
12893+
bp->tx_nr_rings += bp->tx_nr_rings_xdp;
12894+
}
1287112895
rc = bnxt_alloc_mem(bp, irq_re_init);
1287212896
if (rc) {
1287312897
netdev_err(bp->dev, "bnxt_alloc_mem err: %x\n", rc);
@@ -16325,7 +16349,7 @@ static void bnxt_trim_dflt_sh_rings(struct bnxt *bp)
1632516349
bp->cp_nr_rings = min_t(int, bp->tx_nr_rings_per_tc, bp->rx_nr_rings);
1632616350
bp->rx_nr_rings = bp->cp_nr_rings;
1632716351
bp->tx_nr_rings_per_tc = bp->cp_nr_rings;
16328-
bp->tx_nr_rings = bp->tx_nr_rings_per_tc;
16352+
bp->tx_nr_rings = bnxt_tx_nr_rings(bp);
1632916353
}
1633016354

1633116355
static int bnxt_set_dflt_rings(struct bnxt *bp, bool sh)
@@ -16357,7 +16381,7 @@ static int bnxt_set_dflt_rings(struct bnxt *bp, bool sh)
1635716381
bnxt_trim_dflt_sh_rings(bp);
1635816382
else
1635916383
bp->cp_nr_rings = bp->tx_nr_rings_per_tc + bp->rx_nr_rings;
16360-
bp->tx_nr_rings = bp->tx_nr_rings_per_tc;
16384+
bp->tx_nr_rings = bnxt_tx_nr_rings(bp);
1636116385

1636216386
avail_msix = bnxt_get_max_func_irqs(bp) - bp->cp_nr_rings;
1636316387
if (avail_msix >= BNXT_MIN_ROCE_CP_RINGS) {
@@ -16370,7 +16394,7 @@ static int bnxt_set_dflt_rings(struct bnxt *bp, bool sh)
1637016394
rc = __bnxt_reserve_rings(bp);
1637116395
if (rc && rc != -ENODEV)
1637216396
netdev_warn(bp->dev, "Unable to reserve tx rings\n");
16373-
bp->tx_nr_rings_per_tc = bp->tx_nr_rings;
16397+
bp->tx_nr_rings_per_tc = bnxt_tx_nr_rings_per_tc(bp);
1637416398
if (sh)
1637516399
bnxt_trim_dflt_sh_rings(bp);
1637616400

@@ -16379,7 +16403,7 @@ static int bnxt_set_dflt_rings(struct bnxt *bp, bool sh)
1637916403
rc = __bnxt_reserve_rings(bp);
1638016404
if (rc && rc != -ENODEV)
1638116405
netdev_warn(bp->dev, "2nd rings reservation failed.\n");
16382-
bp->tx_nr_rings_per_tc = bp->tx_nr_rings;
16406+
bp->tx_nr_rings_per_tc = bnxt_tx_nr_rings_per_tc(bp);
1638316407
}
1638416408
if (BNXT_CHIP_TYPE_NITRO_A0(bp)) {
1638516409
bp->rx_nr_rings++;
@@ -16413,7 +16437,7 @@ static int bnxt_init_dflt_ring_mode(struct bnxt *bp)
1641316437
if (rc)
1641416438
goto init_dflt_ring_err;
1641516439

16416-
bp->tx_nr_rings_per_tc = bp->tx_nr_rings;
16440+
bp->tx_nr_rings_per_tc = bnxt_tx_nr_rings_per_tc(bp);
1641716441

1641816442
bnxt_set_dflt_rfs(bp);
1641916443

drivers/net/ethernet/cadence/macb_main.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3090,7 +3090,7 @@ static void gem_update_stats(struct macb *bp)
30903090
/* Add GEM_OCTTXH, GEM_OCTRXH */
30913091
val = bp->macb_reg_readl(bp, offset + 4);
30923092
bp->ethtool_stats[i] += ((u64)val) << 32;
3093-
*(p++) += ((u64)val) << 32;
3093+
*p += ((u64)val) << 32;
30943094
}
30953095
}
30963096

@@ -5399,19 +5399,16 @@ static void macb_remove(struct platform_device *pdev)
53995399

54005400
if (dev) {
54015401
bp = netdev_priv(dev);
5402+
unregister_netdev(dev);
54025403
phy_exit(bp->sgmii_phy);
54035404
mdiobus_unregister(bp->mii_bus);
54045405
mdiobus_free(bp->mii_bus);
54055406

5406-
unregister_netdev(dev);
5407+
device_set_wakeup_enable(&bp->pdev->dev, 0);
54075408
cancel_work_sync(&bp->hresp_err_bh_work);
54085409
pm_runtime_disable(&pdev->dev);
54095410
pm_runtime_dont_use_autosuspend(&pdev->dev);
5410-
if (!pm_runtime_suspended(&pdev->dev)) {
5411-
macb_clks_disable(bp->pclk, bp->hclk, bp->tx_clk,
5412-
bp->rx_clk, bp->tsu_clk);
5413-
pm_runtime_set_suspended(&pdev->dev);
5414-
}
5411+
pm_runtime_set_suspended(&pdev->dev);
54155412
phylink_destroy(bp->phylink);
54165413
free_netdev(dev);
54175414
}

drivers/net/ethernet/dlink/dl2k.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ get_stats (struct net_device *dev)
10991099
dev->stats.rx_bytes += dr32(OctetRcvOk);
11001100
dev->stats.tx_bytes += dr32(OctetXmtOk);
11011101

1102-
dev->stats.multicast = dr32(McstFramesRcvdOk);
1102+
dev->stats.multicast += dr32(McstFramesRcvdOk);
11031103
dev->stats.collisions += dr32(SingleColFrames)
11041104
+ dr32(MultiColFrames);
11051105

drivers/net/ethernet/intel/ice/ice.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,7 @@ enum ice_pf_flags {
510510
ICE_FLAG_LINK_LENIENT_MODE_ENA,
511511
ICE_FLAG_PLUG_AUX_DEV,
512512
ICE_FLAG_UNPLUG_AUX_DEV,
513+
ICE_FLAG_AUX_DEV_CREATED,
513514
ICE_FLAG_MTU_CHANGED,
514515
ICE_FLAG_GNSS, /* GNSS successfully initialized */
515516
ICE_FLAG_DPLL, /* SyncE/PTP dplls initialized */

drivers/net/ethernet/intel/ice/ice_adapter.c

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,53 @@
1313
static DEFINE_XARRAY(ice_adapters);
1414
static DEFINE_MUTEX(ice_adapters_mutex);
1515

16-
static unsigned long ice_adapter_index(u64 dsn)
16+
#define ICE_ADAPTER_FIXED_INDEX BIT_ULL(63)
17+
18+
#define ICE_ADAPTER_INDEX_E825C \
19+
(ICE_DEV_ID_E825C_BACKPLANE | ICE_ADAPTER_FIXED_INDEX)
20+
21+
static u64 ice_adapter_index(struct pci_dev *pdev)
1722
{
23+
switch (pdev->device) {
24+
case ICE_DEV_ID_E825C_BACKPLANE:
25+
case ICE_DEV_ID_E825C_QSFP:
26+
case ICE_DEV_ID_E825C_SFP:
27+
case ICE_DEV_ID_E825C_SGMII:
28+
/* E825C devices have multiple NACs which are connected to the
29+
* same clock source, and which must share the same
30+
* ice_adapter structure. We can't use the serial number since
31+
* each NAC has its own NVM generated with its own unique
32+
* Device Serial Number. Instead, rely on the embedded nature
33+
* of the E825C devices, and use a fixed index. This relies on
34+
* the fact that all E825C physical functions in a given
35+
* system are part of the same overall device.
36+
*/
37+
return ICE_ADAPTER_INDEX_E825C;
38+
default:
39+
return pci_get_dsn(pdev) & ~ICE_ADAPTER_FIXED_INDEX;
40+
}
41+
}
42+
43+
static unsigned long ice_adapter_xa_index(struct pci_dev *pdev)
44+
{
45+
u64 index = ice_adapter_index(pdev);
46+
1847
#if BITS_PER_LONG == 64
19-
return dsn;
48+
return index;
2049
#else
21-
return (u32)dsn ^ (u32)(dsn >> 32);
50+
return (u32)index ^ (u32)(index >> 32);
2251
#endif
2352
}
2453

25-
static struct ice_adapter *ice_adapter_new(u64 dsn)
54+
static struct ice_adapter *ice_adapter_new(struct pci_dev *pdev)
2655
{
2756
struct ice_adapter *adapter;
2857

2958
adapter = kzalloc(sizeof(*adapter), GFP_KERNEL);
3059
if (!adapter)
3160
return NULL;
3261

33-
adapter->device_serial_number = dsn;
62+
adapter->index = ice_adapter_index(pdev);
3463
spin_lock_init(&adapter->ptp_gltsyn_time_lock);
3564
spin_lock_init(&adapter->txq_ctx_lock);
3665
refcount_set(&adapter->refcount, 1);
@@ -64,24 +93,23 @@ static void ice_adapter_free(struct ice_adapter *adapter)
6493
*/
6594
struct ice_adapter *ice_adapter_get(struct pci_dev *pdev)
6695
{
67-
u64 dsn = pci_get_dsn(pdev);
6896
struct ice_adapter *adapter;
6997
unsigned long index;
7098
int err;
7199

72-
index = ice_adapter_index(dsn);
100+
index = ice_adapter_xa_index(pdev);
73101
scoped_guard(mutex, &ice_adapters_mutex) {
74102
err = xa_insert(&ice_adapters, index, NULL, GFP_KERNEL);
75103
if (err == -EBUSY) {
76104
adapter = xa_load(&ice_adapters, index);
77105
refcount_inc(&adapter->refcount);
78-
WARN_ON_ONCE(adapter->device_serial_number != dsn);
106+
WARN_ON_ONCE(adapter->index != ice_adapter_index(pdev));
79107
return adapter;
80108
}
81109
if (err)
82110
return ERR_PTR(err);
83111

84-
adapter = ice_adapter_new(dsn);
112+
adapter = ice_adapter_new(pdev);
85113
if (!adapter)
86114
return ERR_PTR(-ENOMEM);
87115
xa_store(&ice_adapters, index, adapter, GFP_KERNEL);
@@ -100,11 +128,10 @@ struct ice_adapter *ice_adapter_get(struct pci_dev *pdev)
100128
*/
101129
void ice_adapter_put(struct pci_dev *pdev)
102130
{
103-
u64 dsn = pci_get_dsn(pdev);
104131
struct ice_adapter *adapter;
105132
unsigned long index;
106133

107-
index = ice_adapter_index(dsn);
134+
index = ice_adapter_xa_index(pdev);
108135
scoped_guard(mutex, &ice_adapters_mutex) {
109136
adapter = xa_load(&ice_adapters, index);
110137
if (WARN_ON(!adapter))

drivers/net/ethernet/intel/ice/ice_adapter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ struct ice_port_list {
3333
* @txq_ctx_lock: Spinlock protecting access to the GLCOMM_QTX_CNTX_CTL register
3434
* @ctrl_pf: Control PF of the adapter
3535
* @ports: Ports list
36-
* @device_serial_number: DSN cached for collision detection on 32bit systems
36+
* @index: 64-bit index cached for collision detection on 32bit systems
3737
*/
3838
struct ice_adapter {
3939
refcount_t refcount;
@@ -44,7 +44,7 @@ struct ice_adapter {
4444

4545
struct ice_pf *ctrl_pf;
4646
struct ice_port_list ports;
47-
u64 device_serial_number;
47+
u64 index;
4848
};
4949

5050
struct ice_adapter *ice_adapter_get(struct pci_dev *pdev);

0 commit comments

Comments
 (0)