projects/linux·commit 9c736ace

Merge tag 'net-6.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

9c736ace · Linus Torvalds <[email protected]> · 2025-08-28 17:35:51 -07:00

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
  ...
Commit
9c736ace0666efe68efd53fcdfa2c6653c3e0e72
Parents
fa58e4f6 · 5189446b

Merge commit. Changes below are compared with the first parent: fa58e4f6.

Changes

69 files changed · +982 −789

FileStatusAddDelContent
CREDITSmodified+7−0View file
MAINTAINERSmodified+3−4View file
drivers/atm/atmtcp.cmodified+14−3View file
drivers/isdn/hardware/mISDN/hfcpci.cmodified+5−7View file
drivers/net/ethernet/broadcom/bnxt/bnxt.cmodified+30−6View file
drivers/net/ethernet/cadence/macb_main.cmodified+4−7View file
drivers/net/ethernet/dlink/dl2k.cmodified+1−1View file
drivers/net/ethernet/intel/ice/ice.hmodified+1−0View file
drivers/net/ethernet/intel/ice/ice_adapter.cmodified+38−11View file
drivers/net/ethernet/intel/ice/ice_adapter.hmodified+2−2View file
drivers/net/ethernet/intel/ice/ice_ddp.cmodified+32−12View file
drivers/net/ethernet/intel/ice/ice_idc.cmodified+6−4View file
drivers/net/ethernet/intel/ice/ice_main.cmodified+11−5View file
drivers/net/ethernet/intel/ice/ice_txrx.cmodified+1−1View file
drivers/net/ethernet/intel/idpf/idpf_singleq_txrx.cmodified+57−4View file
drivers/net/ethernet/intel/idpf/idpf_txrx.cmodified+266−457View file
drivers/net/ethernet/intel/idpf/idpf_txrx.hmodified+33−54View file
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.cmodified+1−1View file
drivers/net/ethernet/intel/ixgbe/ixgbe_type_e610.hmodified+1−1View file
drivers/net/ethernet/marvell/octeontx2/af/cgx.cmodified+7−0View file
drivers/net/ethernet/marvell/octeontx2/af/rvu.hmodified+14−0View file
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.cmodified+3−1View file
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.hmodified+1−0View file
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.cmodified+3−0View file
drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.cmodified+10−0View file
drivers/net/ethernet/marvell/octeontx2/nic/rep.cmodified+12−1View file
drivers/net/ethernet/marvell/octeontx2/nic/rep.hmodified+1−0View file
drivers/net/ethernet/mellanox/mlx5/core/devlink.cmodified+1−1View file
drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.cmodified+2−1View file
drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.hmodified+12−0View file
drivers/net/ethernet/mellanox/mlx5/core/en_main.cmodified+18−1View file
drivers/net/ethernet/mellanox/mlx5/core/fs_core.cmodified+7−8View file
drivers/net/ethernet/mellanox/mlx5/core/fw_reset.cmodified+73−53View file
drivers/net/ethernet/mellanox/mlx5/core/fw_reset.hmodified+1−0View file
drivers/net/ethernet/mellanox/mlx5/core/sf/devlink.cmodified+10−0View file
drivers/net/ethernet/mellanox/mlx5/core/sf/sf.hmodified+6−0View file
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action.cmodified+1−1View file
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/pat_arg.cmodified+4−2View file
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/pool.cmodified+1−0View file
drivers/net/ethernet/meta/fbnic/fbnic_netdev.cmodified+4−0View file
drivers/net/ethernet/meta/fbnic/fbnic_pci.cmodified+6−9View file
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.cmodified+11−2View file
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.cmodified+5−4View file
drivers/net/ethernet/stmicro/stmmac/stmmac_main.cmodified+4−2View file
drivers/net/hyperv/netvsc.cmodified+8−9View file
drivers/net/hyperv/rndis_filter.cmodified+16−7View file
drivers/net/phy/mscc/mscc.hmodified+4−0View file
drivers/net/phy/mscc/mscc_main.cmodified+1−3View file
drivers/net/phy/mscc/mscc_ptp.cmodified+21−13View file
drivers/net/usb/qmi_wwan.cmodified+3−0View file
include/linux/atmdev.hmodified+1−0View file
include/linux/skbuff.hmodified+2−0View file
include/net/bluetooth/hci_sync.hmodified+1−1View file
include/net/rose.hmodified+17−1View file
net/atm/common.cmodified+12−3View file
net/bluetooth/hci_conn.cmodified+41−17View file
net/bluetooth/hci_event.cmodified+23−2View file
net/bluetooth/hci_sync.cmodified+3−3View file
net/bluetooth/mgmt.cmodified+7−2View file
net/core/datagram.cmodified+14−0View file
net/core/page_pool.cmodified+4−2View file
net/ipv4/route.cmodified+7−3View file
net/l2tp/l2tp_ppp.cmodified+8−17View file
net/rose/af_rose.cmodified+7−6View file
net/rose/rose_in.cmodified+6−6View file
net/rose/rose_route.cmodified+38−24View file
net/rose/rose_timer.cmodified+1−1View file
net/sctp/ipv6.cmodified+2−0View file
net/vmw_vsock/virtio_transport_common.cmodified+5−3View file

Only the first 600 diff lines are shown. Download the complete patch.

CREDITS

View file
diff --git a/CREDITS b/CREDITS
index a357f9c..a687c3c 100644
--- a/CREDITS
+++ b/CREDITS
@@ -3222,6 +3222,10 @@ D: AIC5800 IEEE 1394, RAW I/O on 1394
D: Starter of Linux1394 effort
S: ask per mail for current address
+N: Boris Pismenny
+D: Kernel TLS implementation and offload support.
+
N: Nicolas Pitre
D: StrongARM SA1100 support integrator & hacker
@@ -4168,6 +4172,9 @@ S: 1513 Brewster Dr.
S: Carrollton, TX 75010
S: USA
+N: Dave Watson
+D: Kernel TLS implementation.
+
N: Tim Waugh
D: Co-architect of the parallel-port sharing system

MAINTAINERS

View file
diff --git a/MAINTAINERS b/MAINTAINERS
index adcbb09..09b34bb 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -937,7 +937,7 @@ S: Maintained
F: drivers/gpio/gpio-altera.c
ALTERA TRIPLE SPEED ETHERNET DRIVER
-M: Joyce Ooi <[email protected]>
+M: Boon Khai Ng <[email protected]>
S: Maintained
F: drivers/net/ethernet/altera/
@@ -17848,7 +17848,6 @@ F: net/ipv6/syncookies.c
F: net/ipv6/tcp*.c
NETWORKING [TLS]
-M: Boris Pismenny <[email protected]>
M: John Fastabend <[email protected]>
M: Jakub Kicinski <[email protected]>
@@ -20878,8 +20877,8 @@ S: Maintained
F: drivers/firmware/qcom/qcom_qseecom_uefisecapp.c
QUALCOMM RMNET DRIVER
-M: Subash Abhinov Kasiviswanathan <[email protected]>
-M: Sean Tranchetti <[email protected]>
+M: Subash Abhinov Kasiviswanathan <[email protected]>
+M: Sean Tranchetti <[email protected]>
S: Maintained
F: Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst

drivers/atm/atmtcp.c

View file
diff --git a/drivers/atm/atmtcp.c b/drivers/atm/atmtcp.c
index eeae160..fa3c76a 100644
--- a/drivers/atm/atmtcp.c
+++ b/drivers/atm/atmtcp.c
@@ -279,6 +279,19 @@ static struct atm_vcc *find_vcc(struct atm_dev *dev, short vpi, int vci)
return NULL;
}
+static int atmtcp_c_pre_send(struct atm_vcc *vcc, struct sk_buff *skb)
+{
+ struct atmtcp_hdr *hdr;
+
+ if (skb->len < sizeof(struct atmtcp_hdr))
+ return -EINVAL;
+
+ hdr = (struct atmtcp_hdr *)skb->data;
+ if (hdr->length == ATMTCP_HDR_MAGIC)
+ return -EINVAL;
+
+ return 0;
+}
static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb)
{
@@ -288,9 +301,6 @@ static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb)
struct sk_buff *new_skb;
int result = 0;
- if (skb->len < sizeof(struct atmtcp_hdr))
- goto done;
-
dev = vcc->dev_data;
hdr = (struct atmtcp_hdr *) skb->data;
if (hdr->length == ATMTCP_HDR_MAGIC) {
@@ -347,6 +357,7 @@ static const struct atmdev_ops atmtcp_v_dev_ops = {
static const struct atmdev_ops atmtcp_c_dev_ops = {
.close = atmtcp_c_close,
+ .pre_send = atmtcp_c_pre_send,
.send = atmtcp_c_send
};

drivers/isdn/hardware/mISDN/hfcpci.c

View file
diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c
index 2b05722..ea8a0ab 100644
--- a/drivers/isdn/hardware/mISDN/hfcpci.c
+++ b/drivers/isdn/hardware/mISDN/hfcpci.c
@@ -39,12 +39,13 @@
#include "hfc_pci.h"
+static void hfcpci_softirq(struct timer_list *unused);
static const char *hfcpci_revision = "2.0";
static int HFC_cnt;
static uint debug;
static uint poll, tics;
-static struct timer_list hfc_tl;
+static DEFINE_TIMER(hfc_tl, hfcpci_softirq);
static unsigned long hfc_jiffies;
MODULE_AUTHOR("Karsten Keil");
@@ -2305,8 +2306,7 @@ hfcpci_softirq(struct timer_list *unused)
hfc_jiffies = jiffies + 1;
else
hfc_jiffies += tics;
- hfc_tl.expires = hfc_jiffies;
- add_timer(&hfc_tl);
+ mod_timer(&hfc_tl, hfc_jiffies);
}
static int __init
@@ -2332,10 +2332,8 @@ HFC_init(void)
if (poll != HFCPCI_BTRANS_THRESHOLD) {
printk(KERN_INFO "%s: Using alternative poll value of %d\n",
__func__, poll);
- timer_setup(&hfc_tl, hfcpci_softirq, 0);
- hfc_tl.expires = jiffies + tics;
- hfc_jiffies = hfc_tl.expires;
- add_timer(&hfc_tl);
+ hfc_jiffies = jiffies + tics;
+ mod_timer(&hfc_tl, hfc_jiffies);
} else
tics = 0; /* indicate the use of controller's timer */

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

View file
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 207a8bb..31e3d82 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -8016,7 +8016,8 @@ static int __bnxt_reserve_rings(struct bnxt *bp)
}
rx_rings = min_t(int, rx_rings, hwr.grp);
hwr.cp = min_t(int, hwr.cp, bp->cp_nr_rings);
- if (hwr.stat > bnxt_get_ulp_stat_ctxs(bp))
+ if (bnxt_ulp_registered(bp->edev) &&
+ hwr.stat > bnxt_get_ulp_stat_ctxs(bp))
hwr.stat -= bnxt_get_ulp_stat_ctxs(bp);
hwr.cp = min_t(int, hwr.cp, hwr.stat);
rc = bnxt_trim_rings(bp, &rx_rings, &hwr.tx, hwr.cp, sh);
@@ -8024,6 +8025,11 @@ static int __bnxt_reserve_rings(struct bnxt *bp)
hwr.rx = rx_rings << 1;
tx_cp = bnxt_num_tx_to_cp(bp, hwr.tx);
hwr.cp = sh ? max_t(int, tx_cp, rx_rings) : tx_cp + rx_rings;
+ if (hwr.tx != bp->tx_nr_rings) {
+ netdev_warn(bp->dev,
+ "Able to reserve only %d out of %d requested TX rings\n",
+ hwr.tx, bp->tx_nr_rings);
+ }
bp->tx_nr_rings = hwr.tx;
/* 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)
return rc;
}
+static int bnxt_tx_nr_rings(struct bnxt *bp)
+{
+ return bp->num_tc ? bp->tx_nr_rings_per_tc * bp->num_tc :
+ bp->tx_nr_rings_per_tc;
+}
+
+static int bnxt_tx_nr_rings_per_tc(struct bnxt *bp)
+{
+ return bp->num_tc ? bp->tx_nr_rings / bp->num_tc : bp->tx_nr_rings;
+}
+
static int __bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init)
{
int rc = 0;
@@ -12868,6 +12885,13 @@ static int __bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init)
if (rc)
return rc;
+ /* Make adjustments if reserved TX rings are less than requested */
+ bp->tx_nr_rings -= bp->tx_nr_rings_xdp;
+ bp->tx_nr_rings_per_tc = bnxt_tx_nr_rings_per_tc(bp);
+ if (bp->tx_nr_rings_xdp) {
+ bp->tx_nr_rings_xdp = bp->tx_nr_rings_per_tc;
+ bp->tx_nr_rings += bp->tx_nr_rings_xdp;
+ }
rc = bnxt_alloc_mem(bp, irq_re_init);
if (rc) {
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)
bp->cp_nr_rings = min_t(int, bp->tx_nr_rings_per_tc, bp->rx_nr_rings);
bp->rx_nr_rings = bp->cp_nr_rings;
bp->tx_nr_rings_per_tc = bp->cp_nr_rings;
- bp->tx_nr_rings = bp->tx_nr_rings_per_tc;
+ bp->tx_nr_rings = bnxt_tx_nr_rings(bp);
}
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)
bnxt_trim_dflt_sh_rings(bp);
else
bp->cp_nr_rings = bp->tx_nr_rings_per_tc + bp->rx_nr_rings;
- bp->tx_nr_rings = bp->tx_nr_rings_per_tc;
+ bp->tx_nr_rings = bnxt_tx_nr_rings(bp);
avail_msix = bnxt_get_max_func_irqs(bp) - bp->cp_nr_rings;
if (avail_msix >= BNXT_MIN_ROCE_CP_RINGS) {
@@ -16370,7 +16394,7 @@ static int bnxt_set_dflt_rings(struct bnxt *bp, bool sh)
rc = __bnxt_reserve_rings(bp);
if (rc && rc != -ENODEV)
netdev_warn(bp->dev, "Unable to reserve tx rings\n");
- bp->tx_nr_rings_per_tc = bp->tx_nr_rings;
+ bp->tx_nr_rings_per_tc = bnxt_tx_nr_rings_per_tc(bp);
if (sh)
bnxt_trim_dflt_sh_rings(bp);
@@ -16379,7 +16403,7 @@ static int bnxt_set_dflt_rings(struct bnxt *bp, bool sh)
rc = __bnxt_reserve_rings(bp);
if (rc && rc != -ENODEV)
netdev_warn(bp->dev, "2nd rings reservation failed.\n");
- bp->tx_nr_rings_per_tc = bp->tx_nr_rings;
+ bp->tx_nr_rings_per_tc = bnxt_tx_nr_rings_per_tc(bp);
}
if (BNXT_CHIP_TYPE_NITRO_A0(bp)) {
bp->rx_nr_rings++;
@@ -16413,7 +16437,7 @@ static int bnxt_init_dflt_ring_mode(struct bnxt *bp)
if (rc)
goto init_dflt_ring_err;
- bp->tx_nr_rings_per_tc = bp->tx_nr_rings;
+ bp->tx_nr_rings_per_tc = bnxt_tx_nr_rings_per_tc(bp);
bnxt_set_dflt_rfs(bp);

drivers/net/ethernet/cadence/macb_main.c

View file
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 9693f02..16d28a8 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -3090,7 +3090,7 @@ static void gem_update_stats(struct macb *bp)
/* Add GEM_OCTTXH, GEM_OCTRXH */
val = bp->macb_reg_readl(bp, offset + 4);
bp->ethtool_stats[i] += ((u64)val) << 32;
- *(p++) += ((u64)val) << 32;
+ *p += ((u64)val) << 32;
}
}
@@ -5399,19 +5399,16 @@ static void macb_remove(struct platform_device *pdev)
if (dev) {
bp = netdev_priv(dev);
+ unregister_netdev(dev);
phy_exit(bp->sgmii_phy);
mdiobus_unregister(bp->mii_bus);
mdiobus_free(bp->mii_bus);
- unregister_netdev(dev);
+ device_set_wakeup_enable(&bp->pdev->dev, 0);
cancel_work_sync(&bp->hresp_err_bh_work);
pm_runtime_disable(&pdev->dev);
pm_runtime_dont_use_autosuspend(&pdev->dev);
- if (!pm_runtime_suspended(&pdev->dev)) {
- macb_clks_disable(bp->pclk, bp->hclk, bp->tx_clk,
- bp->rx_clk, bp->tsu_clk);
- pm_runtime_set_suspended(&pdev->dev);
- }
+ pm_runtime_set_suspended(&pdev->dev);
phylink_destroy(bp->phylink);
free_netdev(dev);
}

drivers/net/ethernet/dlink/dl2k.c

View file
diff --git a/drivers/net/ethernet/dlink/dl2k.c b/drivers/net/ethernet/dlink/dl2k.c
index cc60ee4..6bbf6e5 100644
--- a/drivers/net/ethernet/dlink/dl2k.c
+++ b/drivers/net/ethernet/dlink/dl2k.c
@@ -1099,7 +1099,7 @@ get_stats (struct net_device *dev)
dev->stats.rx_bytes += dr32(OctetRcvOk);
dev->stats.tx_bytes += dr32(OctetXmtOk);
- dev->stats.multicast = dr32(McstFramesRcvdOk);
+ dev->stats.multicast += dr32(McstFramesRcvdOk);
dev->stats.collisions += dr32(SingleColFrames)
+ dr32(MultiColFrames);

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

View file
diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
index 2098f00..8a8a01a 100644
--- a/drivers/net/ethernet/intel/ice/ice.h
+++ b/drivers/net/ethernet/intel/ice/ice.h
@@ -510,6 +510,7 @@ enum ice_pf_flags {
ICE_FLAG_LINK_LENIENT_MODE_ENA,
ICE_FLAG_PLUG_AUX_DEV,
ICE_FLAG_UNPLUG_AUX_DEV,
+ ICE_FLAG_AUX_DEV_CREATED,
ICE_FLAG_MTU_CHANGED,
ICE_FLAG_GNSS, /* GNSS successfully initialized */
ICE_FLAG_DPLL, /* SyncE/PTP dplls initialized */

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

View file
diff --git a/drivers/net/ethernet/intel/ice/ice_adapter.c b/drivers/net/ethernet/intel/ice/ice_adapter.c
index 9e4adc4..b53561c 100644
--- a/drivers/net/ethernet/intel/ice/ice_adapter.c
+++ b/drivers/net/ethernet/intel/ice/ice_adapter.c
@@ -13,16 +13,45 @@
static DEFINE_XARRAY(ice_adapters);
static DEFINE_MUTEX(ice_adapters_mutex);
-static unsigned long ice_adapter_index(u64 dsn)
+#define ICE_ADAPTER_FIXED_INDEX BIT_ULL(63)
+
+#define ICE_ADAPTER_INDEX_E825C \
+ (ICE_DEV_ID_E825C_BACKPLANE | ICE_ADAPTER_FIXED_INDEX)
+
+static u64 ice_adapter_index(struct pci_dev *pdev)
{
+ switch (pdev->device) {
+ case ICE_DEV_ID_E825C_BACKPLANE:
+ case ICE_DEV_ID_E825C_QSFP:
+ case ICE_DEV_ID_E825C_SFP:
+ case ICE_DEV_ID_E825C_SGMII:
+ /* E825C devices have multiple NACs which are connected to the
+ * same clock source, and which must share the same
+ * ice_adapter structure. We can't use the serial number since
+ * each NAC has its own NVM generated with its own unique
+ * Device Serial Number. Instead, rely on the embedded nature
+ * of the E825C devices, and use a fixed index. This relies on
+ * the fact that all E825C physical functions in a given
+ * system are part of the same overall device.
+ */
+ return ICE_ADAPTER_INDEX_E825C;
+ default:
+ return pci_get_dsn(pdev) & ~ICE_ADAPTER_FIXED_INDEX;
+ }
+}
+
+static unsigned long ice_adapter_xa_index(struct pci_dev *pdev)
+{
+ u64 index = ice_adapter_index(pdev);
+
#if BITS_PER_LONG == 64
- return dsn;
+ return index;
#else
- return (u32)dsn ^ (u32)(dsn >> 32);
+ return (u32)index ^ (u32)(index >> 32);
#endif
}
-static struct ice_adapter *ice_adapter_new(u64 dsn)
+static struct ice_adapter *ice_adapter_new(struct pci_dev *pdev)
{
struct ice_adapter *adapter;
@@ -30,7 +59,7 @@ static struct ice_adapter *ice_adapter_new(u64 dsn)
if (!adapter)
return NULL;
- adapter->device_serial_number = dsn;
+ adapter->index = ice_adapter_index(pdev);
spin_lock_init(&adapter->ptp_gltsyn_time_lock);
spin_lock_init(&adapter->txq_ctx_lock);
refcount_set(&adapter->refcount, 1);
@@ -64,24 +93,23 @@ static void ice_adapter_free(struct ice_adapter *adapter)
*/
struct ice_adapter *ice_adapter_get(struct pci_dev *pdev)
{
- u64 dsn = pci_get_dsn(pdev);
struct ice_adapter *adapter;
unsigned long index;
int err;
- index = ice_adapter_index(dsn);
+ index = ice_adapter_xa_index(pdev);
scoped_guard(mutex, &ice_adapters_mutex) {
err = xa_insert(&ice_adapters, index, NULL, GFP_KERNEL);
if (err == -EBUSY) {
adapter = xa_load(&ice_adapters, index);
refcount_inc(&adapter->refcount);
- WARN_ON_ONCE(adapter->device_serial_number != dsn);
+ WARN_ON_ONCE(adapter->index != ice_adapter_index(pdev));
return adapter;
}
if (err)
return ERR_PTR(err);
- adapter = ice_adapter_new(dsn);
+ adapter = ice_adapter_new(pdev);
if (!adapter)
return ERR_PTR(-ENOMEM);
xa_store(&ice_adapters, index, adapter, GFP_KERNEL);
@@ -100,11 +128,10 @@ struct ice_adapter *ice_adapter_get(struct pci_dev *pdev)
*/
void ice_adapter_put(struct pci_dev *pdev)
{
- u64 dsn = pci_get_dsn(pdev);
struct ice_adapter *adapter;
unsigned long index;
- index = ice_adapter_index(dsn);
+ index = ice_adapter_xa_index(pdev);
scoped_guard(mutex, &ice_adapters_mutex) {
adapter = xa_load(&ice_adapters, index);
if (WARN_ON(!adapter))

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

View file
diff --git a/drivers/net/ethernet/intel/ice/ice_adapter.h b/drivers/net/ethernet/intel/ice/ice_adapter.h
index db66d03..e95266c 100644
--- a/drivers/net/ethernet/intel/ice/ice_adapter.h
+++ b/drivers/net/ethernet/intel/ice/ice_adapter.h
@@ -33,7 +33,7 @@ struct ice_port_list {
* @txq_ctx_lock: Spinlock protecting access to the GLCOMM_QTX_CNTX_CTL register
* @ctrl_pf: Control PF of the adapter
* @ports: Ports list
- * @device_serial_number: DSN cached for collision detection on 32bit systems
+ * @index: 64-bit index cached for collision detection on 32bit systems
*/
struct ice_adapter {
refcount_t refcount;
@@ -44,7 +44,7 @@ struct ice_adapter {
struct ice_pf *ctrl_pf;
struct ice_port_list ports;
- u64 device_serial_number;
+ u64 index;
};
struct ice_adapter *ice_adapter_get(struct pci_dev *pdev);

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

View file
diff --git a/drivers/net/ethernet/intel/ice/ice_ddp.c b/drivers/net/ethernet/intel/ice/ice_ddp.c
index e2a036c..3b2d9c4 100644
--- a/drivers/net/ethernet/intel/ice/ice_ddp.c
+++ b/drivers/net/ethernet/intel/ice/ice_ddp.c
@@ -2377,7 +2377,13 @@ ice_get_set_tx_topo(struct ice_hw *hw, u8 *buf, u16 buf_size,
* The function will apply the new Tx topology from the package buffer
* if available.
*
- * Return: zero when update was successful, negative values otherwise.
+ * Return:
+ * * 0 - Successfully applied topology configuration.
+ * * -EBUSY - Failed to acquire global configuration lock.
+ * * -EEXIST - Topology configuration has already been applied.
+ * * -EIO - Unable to apply topology configuration.
+ * * -ENODEV - Failed to re-initialize device after applying configuration.
+ * * Other negative error codes indicate unexpected failures.
*/
int ice_cfg_tx_topo(struct ice_hw *hw, const void *buf, u32 len)
{
@@ -2410,7 +2416,7 @@ int ice_cfg_tx_topo(struct ice_hw *hw, const void *buf, u32 len)
if (status) {
ice_debug(hw, ICE_DBG_INIT, "Get current topology is failed\n");
- return status;
+ return -EIO;
}
/* Is default topology already applied ? */
@@ -2497,31 +2503,45 @@ update_topo:
ICE_GLOBAL_CFG_LOCK_TIMEOUT);
if (status) {
ice_debug(hw, ICE_DBG_INIT, "Failed to acquire global lock\n");
- return status;
+ return -EBUSY;
}
/* Check if reset was triggered already. */
reg = rd32(hw, GLGEN_RSTAT);
if (reg & GLGEN_RSTAT_DEVSTATE_M) {
- /* Reset is in progress, re-init the HW again */
ice_debug(hw, ICE_DBG_INIT, "Reset is in progress. Layer topology might be applied already\n");
ice_check_reset(hw);
- return 0;
+ /* Reset is in progress, re-init the HW again */
+ goto reinit_hw;
}
/* Set new topology */
status = ice_get_set_tx_topo(hw, new_topo, size, NULL, NULL, true);
if (status) {
- ice_debug(hw, ICE_DBG_INIT, "Failed setting Tx topology\n");
- return status;
+ ice_debug(hw, ICE_DBG_INIT, "Failed to set Tx topology, status %pe\n",
+ ERR_PTR(status));
+ /* only report -EIO here as the caller checks the error value
+ * and reports an informational error message informing that
+ * the driver failed to program Tx topology.
+ */
+ status = -EIO;
}
- /* New topology is updated, delay 1 second before issuing the CORER */
+ /* Even if Tx topology config failed, we need to CORE reset here to
+ * clear the global configuration lock. Delay 1 second to allow
+ * hardware to settle then issue a CORER
+ */
msleep(1000);
ice_reset(hw, ICE_RESET_CORER);
- /* CORER will clear the global lock, so no explicit call
- * required for release.
- */
+ ice_check_reset(hw);
+
+reinit_hw:
+ /* Since we triggered a CORER, re-initialize hardware */
+ ice_deinit_hw(hw);
+ if (ice_init_hw(hw)) {
+ ice_debug(hw, ICE_DBG_INIT, "Failed to re-init hardware after setting Tx topology\n");
+ return -ENODEV;
+ }
- return 0;
+ return status;
}

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

View file
diff --git a/drivers/net/ethernet/intel/ice/ice_idc.c b/drivers/net/ethernet/intel/ice/ice_idc.c
index 6ab53e4..420d45c 100644
--- a/drivers/net/ethernet/intel/ice/ice_idc.c
+++ b/drivers/net/ethernet/intel/ice/ice_idc.c
@@ -336,6 +336,7 @@ int ice_plug_aux_dev(struct ice_pf *pf)
mutex_lock(&pf->adev_mutex);
cdev->adev = adev;
mutex_unlock(&pf->adev_mutex);
+ set_bit(ICE_FLAG_AUX_DEV_CREATED, pf->flags);
return 0;
}
@@ -347,15 +348,16 @@ void ice_unplug_aux_dev(struct ice_pf *pf)
{
struct auxiliary_device *adev;
+ if (!test_and_clear_bit(ICE_FLAG_AUX_DEV_CREATED, pf->flags))
+ return;
+
mutex_lock(&pf->adev_mutex);
adev = pf->cdev_info->adev;
pf->cdev_info->adev = NULL;
mutex_unlock(&pf->adev_mutex);
- if (adev) {
- auxiliary_device_delete(adev);
- auxiliary_device_uninit(adev);
- }
+ auxiliary_device_delete(adev);
+ auxiliary_device_uninit(adev);
}
/**

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

View file
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 8e0b06c..cae992d 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -4536,17 +4536,23 @@ ice_init_tx_topology(struct ice_hw *hw, const struct firmware *firmware)
dev_info(dev, "Tx scheduling layers switching feature disabled\n");
else
dev_info(dev, "Tx scheduling layers switching feature enabled\n");
- /* if there was a change in topology ice_cfg_tx_topo triggered
- * a CORER and we need to re-init hw
+ return 0;
+ } else if (err == -ENODEV) {
+ /* If we failed to re-initialize the device, we can no longer
+ * continue loading.
*/
- ice_deinit_hw(hw);
- err = ice_init_hw(hw);
-
+ dev_warn(dev, "Failed to initialize hardware after applying Tx scheduling configuration.\n");
return err;
} else if (err == -EIO) {
dev_info(dev, "DDP package does not support Tx scheduling layers switching feature - please update to the latest DDP package and try again\n");
+ return 0;
+ } else if (err == -EEXIST) {
+ return 0;
}
+ /* Do not treat this as a fatal error. */
+ dev_info(dev, "Failed to apply Tx scheduling configuration, err %pe\n",
+ ERR_PTR(err));
return 0;
}

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

View file
diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c b/drivers/net/ethernet/intel/ice/ice_txrx.c
index 29e0088..d287175 100644
--- a/drivers/net/ethernet/intel/ice/ice_txrx.c
+++ b/drivers/net/ethernet/intel/ice/ice_txrx.c
@@ -1352,7 +1352,7 @@ construct_skb:
skb = ice_construct_skb(rx_ring, xdp);
/* exit if we failed to retrieve a buffer */
if (!skb) {
- rx_ring->ring_stats->rx_stats.alloc_page_failed++;
+ rx_ring->ring_stats->rx_stats.alloc_buf_failed++;
xdp_verdict = ICE_XDP_CONSUMED;
}
ice_put_rx_mbuf(rx_ring, xdp, &xdp_xmit, ntc, xdp_verdict);

drivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c

View file
diff --git a/drivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c
index 555879b..b19b462 100644
--- a/drivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c
@@ -180,6 +180,58 @@ static int idpf_tx_singleq_csum(struct sk_buff *skb,
}

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/idpf/idpf_txrx.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/idpf/idpf_txrx.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/ixgbe/ixgbe_type_e610.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/marvell/octeontx2/af/cgx.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/marvell/octeontx2/af/rvu.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/marvell/octeontx2/nic/rep.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/marvell/octeontx2/nic/rep.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/devlink.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/fs_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/fw_reset.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/sf/devlink.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/sf/sf.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/steering/hws/pat_arg.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/mellanox/mlx5/core/steering/hws/pool.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/meta/fbnic/fbnic_netdev.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/meta/fbnic/fbnic_pci.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/hyperv/netvsc.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/hyperv/rndis_filter.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/phy/mscc/mscc.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/phy/mscc/mscc_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/phy/mscc/mscc_ptp.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/usb/qmi_wwan.c

View file

This diff is incomplete. Download the complete patch.

include/linux/atmdev.h

View file

This diff is incomplete. Download the complete patch.

include/linux/skbuff.h

View file

This diff is incomplete. Download the complete patch.

include/net/bluetooth/hci_sync.h

View file

This diff is incomplete. Download the complete patch.

include/net/rose.h

View file

This diff is incomplete. Download the complete patch.

net/atm/common.c

View file

This diff is incomplete. Download the complete patch.

net/bluetooth/hci_conn.c

View file

This diff is incomplete. Download the complete patch.

net/bluetooth/hci_event.c

View file

This diff is incomplete. Download the complete patch.

net/bluetooth/hci_sync.c

View file

This diff is incomplete. Download the complete patch.

net/bluetooth/mgmt.c

View file

This diff is incomplete. Download the complete patch.

net/core/datagram.c

View file

This diff is incomplete. Download the complete patch.

net/core/page_pool.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/route.c

View file

This diff is incomplete. Download the complete patch.

net/l2tp/l2tp_ppp.c

View file

This diff is incomplete. Download the complete patch.

net/rose/af_rose.c

View file

This diff is incomplete. Download the complete patch.

net/rose/rose_in.c

View file

This diff is incomplete. Download the complete patch.

net/rose/rose_route.c

View file

This diff is incomplete. Download the complete patch.

net/rose/rose_timer.c

View file

This diff is incomplete. Download the complete patch.

net/sctp/ipv6.c

View file

This diff is incomplete. Download the complete patch.

net/vmw_vsock/virtio_transport_common.c

View file

This diff is incomplete. Download the complete patch.