projects/linux·commit ded746bf

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

ded746bf · Linus Torvalds <[email protected]> · 2021-12-09 11:26:44 -08:00

Pull networking fixes from Jakub Kicinski:
 "Including fixes from bpf, can and netfilter.

  Current release - regressions:

   - bpf, sockmap: re-evaluate proto ops when psock is removed from
     sockmap

  Current release - new code bugs:

   - bpf: fix bpf_check_mod_kfunc_call for built-in modules

   - ice: fixes for TC classifier offloads

   - vrf: don't run conntrack on vrf with !dflt qdisc

  Previous releases - regressions:

   - bpf: fix the off-by-two error in range markings

   - seg6: fix the iif in the IPv6 socket control block

   - devlink: fix netns refcount leak in devlink_nl_cmd_reload()

   - dsa: mv88e6xxx: fix "don't use PHY_DETECT on internal PHY's"

   - dsa: mv88e6xxx: allow use of PHYs on CPU and DSA ports

  Previous releases - always broken:

   - ethtool: do not perform operations on net devices being
     unregistered

   - udp: use datalen to cap max gso segments

   - ice: fix races in stats collection

   - fec: only clear interrupt of handling queue in fec_enet_rx_queue()

   - m_can: pci: fix incorrect reference clock rate

   - m_can: disable and ignore ELO interrupt

   - mvpp2: fix XDP rx queues registering

  Misc:

   - treewide: add missing includes masked by cgroup -> bpf.h
     dependency"

* tag 'net-5.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (82 commits)
  net: dsa: mv88e6xxx: allow use of PHYs on CPU and DSA ports
  net: wwan: iosm: fixes unable to send AT command during mbim tx
  net: wwan: iosm: fixes net interface nonfunctional after fw flash
  net: wwan: iosm: fixes unnecessary doorbell send
  net: dsa: felix: Fix memory leak in felix_setup_mmio_filtering
  MAINTAINERS: s390/net: remove myself as maintainer
  net/sched: fq_pie: prevent dismantle issue
  net: mana: Fix memory leak in mana_hwc_create_wq
  seg6: fix the iif in the IPv6 socket control block
  nfp: Fix memory leak in nfp_cpp_area_cache_add()
  nfc: fix potential NULL pointer deref in nfc_genl_dump_ses_done
  nfc: fix segfault in nfc_genl_dump_devices_done
  udp: using datalen to cap max gso segments
  net: dsa: mv88e6xxx: error handling for serdes_power functions
  can: kvaser_usb: get CAN clock frequency from device
  can: kvaser_pciefd: kvaser_pciefd_rx_error_frame(): increase correct stats->{rx,tx}_errors counter
  net: mvpp2: fix XDP rx queues registering
  vmxnet3: fix minimum vectors alloc issue
  net, neigh: clear whole pneigh_entry at alloc time
  net: dsa: mv88e6xxx: fix "don't use PHY_DETECT on internal PHY's"
  ...
Commit
ded746bfc94398d2ee9de315a187677b207b2004
Parents
27698cd2 · 04ec4e62

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

Changes

100 files changed · +1370 −383

FileStatusAddDelContent
Documentation/locking/locktypes.rstmodified+3−6View file
MAINTAINERSmodified+1−3View file
arch/mips/net/bpf_jit_comp.hmodified+1−1View file
block/fops.cmodified+1−0View file
drivers/gpu/drm/drm_gem_shmem_helper.cmodified+1−0View file
drivers/gpu/drm/i915/gt/intel_gtt.cmodified+1−0View file
drivers/gpu/drm/i915/i915_request.cmodified+1−0View file
drivers/gpu/drm/lima/lima_device.cmodified+1−0View file
drivers/gpu/drm/msm/msm_gem_shrinker.cmodified+1−0View file
drivers/gpu/drm/ttm/ttm_tt.cmodified+1−0View file
drivers/net/bonding/bond_alb.cmodified+8−6View file
drivers/net/can/kvaser_pciefd.cmodified+7−1View file
drivers/net/can/m_can/m_can.cmodified+27−15View file
drivers/net/can/m_can/m_can.hmodified+3−0View file
drivers/net/can/m_can/m_can_pci.cmodified+56−6View file
drivers/net/can/pch_can.cmodified+1−1View file
drivers/net/can/sja1000/ems_pcmcia.cmodified+6−1View file
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.cmodified+73−28View file
drivers/net/dsa/mv88e6xxx/chip.cmodified+47−38View file
drivers/net/dsa/mv88e6xxx/serdes.cmodified+7−1View file
drivers/net/dsa/ocelot/felix.cmodified+4−1View file
drivers/net/ethernet/altera/altera_tse_main.cmodified+6−3View file
drivers/net/ethernet/broadcom/bcm4908_enet.cmodified+3−1View file
drivers/net/ethernet/freescale/fec.hmodified+3−0View file
drivers/net/ethernet/freescale/fec_main.cmodified+1−1View file
drivers/net/ethernet/google/gve/gve_utils.cmodified+3−0View file
drivers/net/ethernet/huawei/hinic/hinic_sriov.cmodified+1−0View file
drivers/net/ethernet/intel/i40e/i40e_debugfs.cmodified+8−0View file
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.cmodified+48−27View file
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.hmodified+2−0View file
drivers/net/ethernet/intel/iavf/iavf_ethtool.cmodified+32−11View file
drivers/net/ethernet/intel/iavf/iavf_main.cmodified+1−0View file
drivers/net/ethernet/intel/ice/ice_dcb_nl.cmodified+12−6View file
drivers/net/ethernet/intel/ice/ice_ethtool_fdir.cmodified+2−2View file
drivers/net/ethernet/intel/ice/ice_fdir.cmodified+1−1View file
drivers/net/ethernet/intel/ice/ice_flex_pipe.cmodified+5−2View file
drivers/net/ethernet/intel/ice/ice_flex_pipe.hmodified+2−1View file
drivers/net/ethernet/intel/ice/ice_main.cmodified+21−11View file
drivers/net/ethernet/intel/ice/ice_switch.cmodified+13−6View file
drivers/net/ethernet/intel/ice/ice_tc_lib.cmodified+12−18View file
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.cmodified+6−0View file
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.cmodified+2−2View file
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.cmodified+2−0View file
drivers/net/ethernet/microsoft/mana/hw_channel.cmodified+5−5View file
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.cmodified+3−1View file
drivers/net/ethernet/qlogic/qede/qede_fp.cmodified+7−0View file
drivers/net/ethernet/qlogic/qla3xxx.cmodified+9−10View file
drivers/net/phy/phylink.cmodified+1−0View file
drivers/net/usb/cdc_ncm.cmodified+2−0View file
drivers/net/vmxnet3/vmxnet3_drv.cmodified+7−6View file
drivers/net/vrf.cmodified+4−4View file
drivers/net/wwan/iosm/iosm_ipc_imem.cmodified+17−9View file
drivers/net/wwan/iosm/iosm_ipc_imem.hmodified+1−3View file
drivers/net/wwan/iosm/iosm_ipc_imem_ops.cmodified+1−6View file
drivers/pci/controller/dwc/pci-exynos.cmodified+1−0View file
drivers/pci/controller/dwc/pcie-qcom-ep.cmodified+1−0View file
drivers/usb/cdns3/host.cmodified+1−0View file
include/linux/bpf.hmodified+3−14View file
include/linux/btf.hmodified+10−4View file
include/linux/cacheinfo.hmodified+0−1View file
include/linux/device/driver.hmodified+1−0View file
include/linux/filter.hmodified+1−4View file
include/linux/phy.hmodified+6−5View file
include/net/bond_alb.hmodified+1−1View file
include/net/busy_poll.hmodified+13−0View file
include/net/netfilter/nf_conntrack.hmodified+3−3View file
kernel/bpf/btf.cmodified+2−9View file
kernel/bpf/verifier.cmodified+1−1View file
lib/Kconfig.debugmodified+1−0View file
mm/damon/vaddr.cmodified+1−0View file
mm/memory_hotplug.cmodified+1−0View file
mm/swap_slots.cmodified+1−0View file
net/core/devlink.cmodified+8−8View file
net/core/neighbour.cmodified+1−2View file
net/core/skmsg.cmodified+5−0View file
net/core/sock_map.cmodified+10−5View file
net/ethtool/netlink.cmodified+2−1View file
net/ipv4/inet_connection_sock.cmodified+1−1View file
net/ipv4/tcp_minisocks.cmodified+2−2View file
net/ipv4/udp.cmodified+1−1View file
net/ipv6/seg6_iptunnel.cmodified+8−0View file
net/netfilter/nf_conntrack_core.cmodified+3−3View file
net/netfilter/nf_conntrack_netlink.cmodified+1−1View file
net/netfilter/nf_flow_table_core.cmodified+2−2View file
net/netfilter/nfnetlink_queue.cmodified+1−1View file
net/netfilter/nft_exthdr.cmodified+7−4View file
net/netfilter/nft_set_pipapo_avx2.cmodified+1−1View file
net/nfc/netlink.cmodified+8−4View file
net/sched/sch_fq_pie.cmodified+1−0View file
tools/bpf/resolve_btfids/main.cmodified+5−3View file
tools/testing/selftests/bpf/verifier/xdp_direct_packet_access.cmodified+600−32View file
tools/testing/selftests/net/fcnal-test.shmodified+8−0View file
tools/testing/selftests/net/fib_tests.shmodified+49−10View file
tools/testing/selftests/net/tls.cmodified+36−0View file
tools/testing/selftests/netfilter/conntrack_vrf.shmodified+26−4View file
tools/testing/selftests/netfilter/nft_concat_range.shmodified+21−3View file
tools/testing/selftests/netfilter/nft_zones_many.shmodified+13−6View file
tools/testing/selftests/tc-testing/configmodified+2−0View file
tools/testing/selftests/tc-testing/tdc.pymodified+5−3View file
tools/testing/selftests/tc-testing/tdc.shmodified+1−0View file

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

Documentation/locking/locktypes.rst

View file
diff --git a/Documentation/locking/locktypes.rst b/Documentation/locking/locktypes.rst
index ddada4a..4fd7b70 100644
--- a/Documentation/locking/locktypes.rst
+++ b/Documentation/locking/locktypes.rst
@@ -439,11 +439,9 @@ preemption. The following substitution works on both kernels::
spin_lock(&p->lock);
p->count += this_cpu_read(var2);
-On a non-PREEMPT_RT kernel migrate_disable() maps to preempt_disable()
-which makes the above code fully equivalent. On a PREEMPT_RT kernel
migrate_disable() ensures that the task is pinned on the current CPU which
in turn guarantees that the per-CPU access to var1 and var2 are staying on
-the same CPU.
+the same CPU while the task remains preemptible.
The migrate_disable() substitution is not valid for the following
scenario::
@@ -456,9 +454,8 @@ scenario::
p = this_cpu_ptr(&var1);
p->val = func2();
-While correct on a non-PREEMPT_RT kernel, this breaks on PREEMPT_RT because
-here migrate_disable() does not protect against reentrancy from a
-preempting task. A correct substitution for this case is::
+This breaks because migrate_disable() does not protect against reentrancy from
+a preempting task. A correct substitution for this case is::
func()
{

MAINTAINERS

View file
diff --git a/MAINTAINERS b/MAINTAINERS
index 43007f2..9eff634 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12180,8 +12180,8 @@ F: drivers/net/ethernet/mellanox/mlx5/core/fpga/*
F: include/linux/mlx5/mlx5_ifc_fpga.h
MELLANOX ETHERNET SWITCH DRIVERS
-M: Jiri Pirko <[email protected]>
M: Ido Schimmel <[email protected]>
+M: Petr Machata <[email protected]>
S: Supported
W: http://www.mellanox.com
@@ -16629,7 +16629,6 @@ W: http://www.ibm.com/developerworks/linux/linux390/
F: drivers/iommu/s390-iommu.c
S390 IUCV NETWORK LAYER
-M: Julian Wiedmann <[email protected]>
M: Alexandra Winter <[email protected]>
M: Wenjia Zhang <[email protected]>
@@ -16641,7 +16640,6 @@ F: include/net/iucv/
F: net/iucv/
S390 NETWORK DRIVERS
-M: Julian Wiedmann <[email protected]>
M: Alexandra Winter <[email protected]>
M: Wenjia Zhang <[email protected]>

arch/mips/net/bpf_jit_comp.h

View file
diff --git a/arch/mips/net/bpf_jit_comp.h b/arch/mips/net/bpf_jit_comp.h
index 6f3a7b0..a37fe20 100644
--- a/arch/mips/net/bpf_jit_comp.h
+++ b/arch/mips/net/bpf_jit_comp.h
@@ -98,7 +98,7 @@ do { \
#define emit(...) __emit(__VA_ARGS__)
/* Workaround for R10000 ll/sc errata */
-#ifdef CONFIG_WAR_R10000
+#ifdef CONFIG_WAR_R10000_LLSC
#define LLSC_beqz beqzl
#else
#define LLSC_beqz beqz

block/fops.c

View file
diff --git a/block/fops.c b/block/fops.c
index ad732a3..3cb1e81 100644
--- a/block/fops.c
+++ b/block/fops.c
@@ -15,6 +15,7 @@
#include <linux/falloc.h>
#include <linux/suspend.h>
#include <linux/fs.h>
+#include <linux/module.h>
#include "blk.h"
static inline struct inode *bdev_file_inode(struct file *file)

drivers/gpu/drm/drm_gem_shmem_helper.c

View file
diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c
index 7b9f69f..bca0de9 100644
--- a/drivers/gpu/drm/drm_gem_shmem_helper.c
+++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
@@ -9,6 +9,7 @@
#include <linux/shmem_fs.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
+#include <linux/module.h>
#ifdef CONFIG_X86
#include <asm/set_memory.h>

drivers/gpu/drm/i915/gt/intel_gtt.c

View file
diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.c b/drivers/gpu/drm/i915/gt/intel_gtt.c
index 67d14af..b67f620 100644
--- a/drivers/gpu/drm/i915/gt/intel_gtt.c
+++ b/drivers/gpu/drm/i915/gt/intel_gtt.c
@@ -6,6 +6,7 @@
#include <linux/slab.h> /* fault-inject.h is not standalone! */
#include <linux/fault-inject.h>
+#include <linux/sched/mm.h>
#include "gem/i915_gem_lmem.h"
#include "i915_trace.h"

drivers/gpu/drm/i915/i915_request.c

View file
diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
index 820a1f3..89cccef 100644
--- a/drivers/gpu/drm/i915/i915_request.c
+++ b/drivers/gpu/drm/i915/i915_request.c
@@ -29,6 +29,7 @@
#include <linux/sched.h>
#include <linux/sched/clock.h>
#include <linux/sched/signal.h>
+#include <linux/sched/mm.h>
#include "gem/i915_gem_context.h"
#include "gt/intel_breadcrumbs.h"

drivers/gpu/drm/lima/lima_device.c

View file
diff --git a/drivers/gpu/drm/lima/lima_device.c b/drivers/gpu/drm/lima/lima_device.c
index 65fdca3..f74f804 100644
--- a/drivers/gpu/drm/lima/lima_device.c
+++ b/drivers/gpu/drm/lima/lima_device.c
@@ -4,6 +4,7 @@
#include <linux/regulator/consumer.h>
#include <linux/reset.h>
#include <linux/clk.h>
+#include <linux/slab.h>
#include <linux/dma-mapping.h>
#include <linux/platform_device.h>

drivers/gpu/drm/msm/msm_gem_shrinker.c

View file
diff --git a/drivers/gpu/drm/msm/msm_gem_shrinker.c b/drivers/gpu/drm/msm/msm_gem_shrinker.c
index 4a1420b..086dacf 100644
--- a/drivers/gpu/drm/msm/msm_gem_shrinker.c
+++ b/drivers/gpu/drm/msm/msm_gem_shrinker.c
@@ -5,6 +5,7 @@
*/
#include <linux/vmalloc.h>
+#include <linux/sched/mm.h>
#include "msm_drv.h"
#include "msm_gem.h"

drivers/gpu/drm/ttm/ttm_tt.c

View file
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index 7e83c00..79c870a 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -34,6 +34,7 @@
#include <linux/sched.h>
#include <linux/shmem_fs.h>
#include <linux/file.h>
+#include <linux/module.h>
#include <drm/drm_cache.h>
#include <drm/ttm/ttm_bo_driver.h>

drivers/net/bonding/bond_alb.c

View file
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 2ec8e01..533e476 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -1501,14 +1501,14 @@ void bond_alb_monitor(struct work_struct *work)
struct slave *slave;
if (!bond_has_slaves(bond)) {
- bond_info->tx_rebalance_counter = 0;
+ atomic_set(&bond_info->tx_rebalance_counter, 0);
bond_info->lp_counter = 0;
goto re_arm;
}
rcu_read_lock();
- bond_info->tx_rebalance_counter++;
+ atomic_inc(&bond_info->tx_rebalance_counter);
bond_info->lp_counter++;
/* send learning packets */
@@ -1530,7 +1530,7 @@ void bond_alb_monitor(struct work_struct *work)
}
/* rebalance tx traffic */
- if (bond_info->tx_rebalance_counter >= BOND_TLB_REBALANCE_TICKS) {
+ if (atomic_read(&bond_info->tx_rebalance_counter) >= BOND_TLB_REBALANCE_TICKS) {
bond_for_each_slave_rcu(bond, slave, iter) {
tlb_clear_slave(bond, slave, 1);
if (slave == rcu_access_pointer(bond->curr_active_slave)) {
@@ -1540,7 +1540,7 @@ void bond_alb_monitor(struct work_struct *work)
bond_info->unbalanced_load = 0;
}
}
- bond_info->tx_rebalance_counter = 0;
+ atomic_set(&bond_info->tx_rebalance_counter, 0);
}
if (bond_info->rlb_enabled) {
@@ -1610,7 +1610,8 @@ int bond_alb_init_slave(struct bonding *bond, struct slave *slave)
tlb_init_slave(slave);
/* order a rebalance ASAP */
- bond->alb_info.tx_rebalance_counter = BOND_TLB_REBALANCE_TICKS;
+ atomic_set(&bond->alb_info.tx_rebalance_counter,
+ BOND_TLB_REBALANCE_TICKS);
if (bond->alb_info.rlb_enabled)
bond->alb_info.rlb_rebalance = 1;
@@ -1647,7 +1648,8 @@ void bond_alb_handle_link_change(struct bonding *bond, struct slave *slave, char
rlb_clear_slave(bond, slave);
} else if (link == BOND_LINK_UP) {
/* order a rebalance ASAP */
- bond_info->tx_rebalance_counter = BOND_TLB_REBALANCE_TICKS;
+ atomic_set(&bond_info->tx_rebalance_counter,
+ BOND_TLB_REBALANCE_TICKS);
if (bond->alb_info.rlb_enabled) {
bond->alb_info.rlb_rebalance = 1;
/* If the updelay module parameter is smaller than the

drivers/net/can/kvaser_pciefd.c

View file
diff --git a/drivers/net/can/kvaser_pciefd.c b/drivers/net/can/kvaser_pciefd.c
index 74d9899..eb74cdf 100644
--- a/drivers/net/can/kvaser_pciefd.c
+++ b/drivers/net/can/kvaser_pciefd.c
@@ -248,6 +248,9 @@ MODULE_DESCRIPTION("CAN driver for Kvaser CAN/PCIe devices");
#define KVASER_PCIEFD_SPACK_EWLR BIT(23)
#define KVASER_PCIEFD_SPACK_EPLR BIT(24)
+/* Kvaser KCAN_EPACK second word */
+#define KVASER_PCIEFD_EPACK_DIR_TX BIT(0)
+
struct kvaser_pciefd;
struct kvaser_pciefd_can {
@@ -1285,7 +1288,10 @@ static int kvaser_pciefd_rx_error_frame(struct kvaser_pciefd_can *can,
can->err_rep_cnt++;
can->can.can_stats.bus_error++;
- stats->rx_errors++;
+ if (p->header[1] & KVASER_PCIEFD_EPACK_DIR_TX)
+ stats->tx_errors++;
+ else
+ stats->rx_errors++;
can->bec.txerr = bec.txerr;
can->bec.rxerr = bec.rxerr;

drivers/net/can/m_can/m_can.c

View file
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index 2470c47..c2a8421 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -204,16 +204,16 @@ enum m_can_reg {
/* Interrupts for version 3.0.x */
#define IR_ERR_LEC_30X (IR_STE | IR_FOE | IR_ACKE | IR_BE | IR_CRCE)
-#define IR_ERR_BUS_30X (IR_ERR_LEC_30X | IR_WDI | IR_ELO | IR_BEU | \
- IR_BEC | IR_TOO | IR_MRAF | IR_TSW | IR_TEFL | \
- IR_RF1L | IR_RF0L)
+#define IR_ERR_BUS_30X (IR_ERR_LEC_30X | IR_WDI | IR_BEU | IR_BEC | \
+ IR_TOO | IR_MRAF | IR_TSW | IR_TEFL | IR_RF1L | \
+ IR_RF0L)
#define IR_ERR_ALL_30X (IR_ERR_STATE | IR_ERR_BUS_30X)
/* Interrupts for version >= 3.1.x */
#define IR_ERR_LEC_31X (IR_PED | IR_PEA)
-#define IR_ERR_BUS_31X (IR_ERR_LEC_31X | IR_WDI | IR_ELO | IR_BEU | \
- IR_BEC | IR_TOO | IR_MRAF | IR_TSW | IR_TEFL | \
- IR_RF1L | IR_RF0L)
+#define IR_ERR_BUS_31X (IR_ERR_LEC_31X | IR_WDI | IR_BEU | IR_BEC | \
+ IR_TOO | IR_MRAF | IR_TSW | IR_TEFL | IR_RF1L | \
+ IR_RF0L)
#define IR_ERR_ALL_31X (IR_ERR_STATE | IR_ERR_BUS_31X)
/* Interrupt Line Select (ILS) */
@@ -517,7 +517,7 @@ static int m_can_read_fifo(struct net_device *dev, u32 rxfs)
err = m_can_fifo_read(cdev, fgi, M_CAN_FIFO_DATA,
cf->data, DIV_ROUND_UP(cf->len, 4));
if (err)
- goto out_fail;
+ goto out_free_skb;
}
/* acknowledge rx fifo 0 */
@@ -532,6 +532,8 @@ static int m_can_read_fifo(struct net_device *dev, u32 rxfs)
return 0;
+out_free_skb:
+ kfree_skb(skb);
out_fail:
netdev_err(dev, "FIFO read returned %d\n", err);
return err;
@@ -810,8 +812,6 @@ static void m_can_handle_other_err(struct net_device *dev, u32 irqstatus)
{
if (irqstatus & IR_WDI)
netdev_err(dev, "Message RAM Watchdog event due to missing READY\n");
- if (irqstatus & IR_ELO)
- netdev_err(dev, "Error Logging Overflow\n");
if (irqstatus & IR_BEU)
netdev_err(dev, "Bit Error Uncorrected\n");
if (irqstatus & IR_BEC)
@@ -1494,20 +1494,32 @@ static int m_can_dev_setup(struct m_can_classdev *cdev)
case 30:
/* CAN_CTRLMODE_FD_NON_ISO is fixed with M_CAN IP v3.0.x */
can_set_static_ctrlmode(dev, CAN_CTRLMODE_FD_NON_ISO);
- cdev->can.bittiming_const = &m_can_bittiming_const_30X;
- cdev->can.data_bittiming_const = &m_can_data_bittiming_const_30X;
+ cdev->can.bittiming_const = cdev->bit_timing ?
+ cdev->bit_timing : &m_can_bittiming_const_30X;
+
+ cdev->can.data_bittiming_const = cdev->data_timing ?
+ cdev->data_timing :
+ &m_can_data_bittiming_const_30X;
break;
case 31:
/* CAN_CTRLMODE_FD_NON_ISO is fixed with M_CAN IP v3.1.x */
can_set_static_ctrlmode(dev, CAN_CTRLMODE_FD_NON_ISO);
- cdev->can.bittiming_const = &m_can_bittiming_const_31X;
- cdev->can.data_bittiming_const = &m_can_data_bittiming_const_31X;
+ cdev->can.bittiming_const = cdev->bit_timing ?
+ cdev->bit_timing : &m_can_bittiming_const_31X;
+
+ cdev->can.data_bittiming_const = cdev->data_timing ?
+ cdev->data_timing :
+ &m_can_data_bittiming_const_31X;
break;
case 32:
case 33:
/* Support both MCAN version v3.2.x and v3.3.0 */
- cdev->can.bittiming_const = &m_can_bittiming_const_31X;
- cdev->can.data_bittiming_const = &m_can_data_bittiming_const_31X;
+ cdev->can.bittiming_const = cdev->bit_timing ?
+ cdev->bit_timing : &m_can_bittiming_const_31X;
+
+ cdev->can.data_bittiming_const = cdev->data_timing ?
+ cdev->data_timing :
+ &m_can_data_bittiming_const_31X;
cdev->can.ctrlmode_supported |=
(m_can_niso_supported(cdev) ?

drivers/net/can/m_can/m_can.h

View file
diff --git a/drivers/net/can/m_can/m_can.h b/drivers/net/can/m_can/m_can.h
index d18b515..2c5d409 100644
--- a/drivers/net/can/m_can/m_can.h
+++ b/drivers/net/can/m_can/m_can.h
@@ -85,6 +85,9 @@ struct m_can_classdev {
struct sk_buff *tx_skb;
struct phy *transceiver;
+ const struct can_bittiming_const *bit_timing;
+ const struct can_bittiming_const *data_timing;
+
struct m_can_ops *ops;
int version;

drivers/net/can/m_can/m_can_pci.c

View file
diff --git a/drivers/net/can/m_can/m_can_pci.c b/drivers/net/can/m_can/m_can_pci.c
index 89cc3d4..b56a54d 100644
--- a/drivers/net/can/m_can/m_can_pci.c
+++ b/drivers/net/can/m_can/m_can_pci.c
@@ -18,9 +18,14 @@
#define M_CAN_PCI_MMIO_BAR 0
-#define M_CAN_CLOCK_FREQ_EHL 100000000
#define CTL_CSR_INT_CTL_OFFSET 0x508
+struct m_can_pci_config {
+ const struct can_bittiming_const *bit_timing;
+ const struct can_bittiming_const *data_timing;
+ unsigned int clock_freq;
+};
+
struct m_can_pci_priv {
struct m_can_classdev cdev;
@@ -42,8 +47,13 @@ static u32 iomap_read_reg(struct m_can_classdev *cdev, int reg)
static int iomap_read_fifo(struct m_can_classdev *cdev, int offset, void *val, size_t val_count)
{
struct m_can_pci_priv *priv = cdev_to_priv(cdev);
+ void __iomem *src = priv->base + offset;
- ioread32_rep(priv->base + offset, val, val_count);
+ while (val_count--) {
+ *(unsigned int *)val = ioread32(src);
+ val += 4;
+ src += 4;
+ }
return 0;
}
@@ -61,8 +71,13 @@ static int iomap_write_fifo(struct m_can_classdev *cdev, int offset,
const void *val, size_t val_count)
{
struct m_can_pci_priv *priv = cdev_to_priv(cdev);
+ void __iomem *dst = priv->base + offset;
- iowrite32_rep(priv->base + offset, val, val_count);
+ while (val_count--) {
+ iowrite32(*(unsigned int *)val, dst);
+ val += 4;
+ dst += 4;
+ }
return 0;
}
@@ -74,9 +89,40 @@ static struct m_can_ops m_can_pci_ops = {
.read_fifo = iomap_read_fifo,
};
+static const struct can_bittiming_const m_can_bittiming_const_ehl = {
+ .name = KBUILD_MODNAME,
+ .tseg1_min = 2, /* Time segment 1 = prop_seg + phase_seg1 */
+ .tseg1_max = 64,
+ .tseg2_min = 1, /* Time segment 2 = phase_seg2 */
+ .tseg2_max = 128,
+ .sjw_max = 128,
+ .brp_min = 1,
+ .brp_max = 512,
+ .brp_inc = 1,
+};
+
+static const struct can_bittiming_const m_can_data_bittiming_const_ehl = {
+ .name = KBUILD_MODNAME,
+ .tseg1_min = 2, /* Time segment 1 = prop_seg + phase_seg1 */
+ .tseg1_max = 16,
+ .tseg2_min = 1, /* Time segment 2 = phase_seg2 */
+ .tseg2_max = 8,
+ .sjw_max = 4,
+ .brp_min = 1,
+ .brp_max = 32,
+ .brp_inc = 1,
+};
+
+static const struct m_can_pci_config m_can_pci_ehl = {
+ .bit_timing = &m_can_bittiming_const_ehl,
+ .data_timing = &m_can_data_bittiming_const_ehl,
+ .clock_freq = 200000000,
+};
+
static int m_can_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
{
struct device *dev = &pci->dev;
+ const struct m_can_pci_config *cfg;
struct m_can_classdev *mcan_class;
struct m_can_pci_priv *priv;
void __iomem *base;
@@ -104,6 +150,8 @@ static int m_can_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
if (!mcan_class)
return -ENOMEM;
+ cfg = (const struct m_can_pci_config *)id->driver_data;
+
priv = cdev_to_priv(mcan_class);
priv->base = base;
@@ -115,7 +163,9 @@ static int m_can_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
mcan_class->dev = &pci->dev;
mcan_class->net->irq = pci_irq_vector(pci, 0);
mcan_class->pm_clock_support = 1;
- mcan_class->can.clock.freq = id->driver_data;
+ mcan_class->bit_timing = cfg->bit_timing;
+ mcan_class->data_timing = cfg->data_timing;
+ mcan_class->can.clock.freq = cfg->clock_freq;
mcan_class->ops = &m_can_pci_ops;
pci_set_drvdata(pci, mcan_class);
@@ -168,8 +218,8 @@ static SIMPLE_DEV_PM_OPS(m_can_pci_pm_ops,
m_can_pci_suspend, m_can_pci_resume);
static const struct pci_device_id m_can_pci_id_table[] = {
- { PCI_VDEVICE(INTEL, 0x4bc1), M_CAN_CLOCK_FREQ_EHL, },
- { PCI_VDEVICE(INTEL, 0x4bc2), M_CAN_CLOCK_FREQ_EHL, },
+ { PCI_VDEVICE(INTEL, 0x4bc1), (kernel_ulong_t)&m_can_pci_ehl, },
+ { PCI_VDEVICE(INTEL, 0x4bc2), (kernel_ulong_t)&m_can_pci_ehl, },
{ } /* Terminating Entry */
};
MODULE_DEVICE_TABLE(pci, m_can_pci_id_table);

drivers/net/can/pch_can.c

View file
diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c
index 92a54a5..964c8a0 100644
--- a/drivers/net/can/pch_can.c
+++ b/drivers/net/can/pch_can.c
@@ -692,11 +692,11 @@ static int pch_can_rx_normal(struct net_device *ndev, u32 obj_num, int quota)
cf->data[i + 1] = data_reg >> 8;
}
- netif_receive_skb(skb);
rcv_pkts++;
stats->rx_packets++;
quota--;
stats->rx_bytes += cf->len;
+ netif_receive_skb(skb);
pch_fifo_thresh(priv, obj_num);
obj_num++;

drivers/net/can/sja1000/ems_pcmcia.c

View file
diff --git a/drivers/net/can/sja1000/ems_pcmcia.c b/drivers/net/can/sja1000/ems_pcmcia.c
index e21b169..4642b6d 100644
--- a/drivers/net/can/sja1000/ems_pcmcia.c
+++ b/drivers/net/can/sja1000/ems_pcmcia.c
@@ -234,7 +234,12 @@ static int ems_pcmcia_add_card(struct pcmcia_device *pdev, unsigned long base)
free_sja1000dev(dev);
}
- err = request_irq(dev->irq, &ems_pcmcia_interrupt, IRQF_SHARED,
+ if (!card->channels) {
+ err = -ENODEV;
+ goto failure_cleanup;
+ }
+
+ err = request_irq(pdev->irq, &ems_pcmcia_interrupt, IRQF_SHARED,
DRV_NAME, card);
if (!err)
return 0;

drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c

View file
diff --git a/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c b/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c
index 59ba7c7..f7af1bf 100644
--- a/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c
+++ b/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c
@@ -28,10 +28,6 @@
#include "kvaser_usb.h"
-/* Forward declaration */
-static const struct kvaser_usb_dev_cfg kvaser_usb_leaf_dev_cfg;
-
-#define CAN_USB_CLOCK 8000000
#define MAX_USBCAN_NET_DEVICES 2
/* Command header size */
@@ -80,6 +76,12 @@ static const struct kvaser_usb_dev_cfg kvaser_usb_leaf_dev_cfg;
#define CMD_LEAF_LOG_MESSAGE 106
+/* Leaf frequency options */
+#define KVASER_USB_LEAF_SWOPTION_FREQ_MASK 0x60
+#define KVASER_USB_LEAF_SWOPTION_FREQ_16_MHZ_CLK 0
+#define KVASER_USB_LEAF_SWOPTION_FREQ_32_MHZ_CLK BIT(5)
+#define KVASER_USB_LEAF_SWOPTION_FREQ_24_MHZ_CLK BIT(6)
+
/* error factors */
#define M16C_EF_ACKE BIT(0)
#define M16C_EF_CRCE BIT(1)
@@ -340,6 +342,50 @@ struct kvaser_usb_err_summary {
};
};
+static const struct can_bittiming_const kvaser_usb_leaf_bittiming_const = {
+ .name = "kvaser_usb",
+ .tseg1_min = KVASER_USB_TSEG1_MIN,
+ .tseg1_max = KVASER_USB_TSEG1_MAX,
+ .tseg2_min = KVASER_USB_TSEG2_MIN,
+ .tseg2_max = KVASER_USB_TSEG2_MAX,
+ .sjw_max = KVASER_USB_SJW_MAX,
+ .brp_min = KVASER_USB_BRP_MIN,
+ .brp_max = KVASER_USB_BRP_MAX,
+ .brp_inc = KVASER_USB_BRP_INC,
+};
+
+static const struct kvaser_usb_dev_cfg kvaser_usb_leaf_dev_cfg_8mhz = {
+ .clock = {
+ .freq = 8000000,
+ },
+ .timestamp_freq = 1,
+ .bittiming_const = &kvaser_usb_leaf_bittiming_const,
+};
+
+static const struct kvaser_usb_dev_cfg kvaser_usb_leaf_dev_cfg_16mhz = {
+ .clock = {
+ .freq = 16000000,
+ },
+ .timestamp_freq = 1,
+ .bittiming_const = &kvaser_usb_leaf_bittiming_const,
+};
+
+static const struct kvaser_usb_dev_cfg kvaser_usb_leaf_dev_cfg_24mhz = {
+ .clock = {
+ .freq = 24000000,
+ },
+ .timestamp_freq = 1,
+ .bittiming_const = &kvaser_usb_leaf_bittiming_const,
+};
+
+static const struct kvaser_usb_dev_cfg kvaser_usb_leaf_dev_cfg_32mhz = {
+ .clock = {
+ .freq = 32000000,
+ },
+ .timestamp_freq = 1,
+ .bittiming_const = &kvaser_usb_leaf_bittiming_const,
+};
+
static void *
kvaser_usb_leaf_frame_to_cmd(const struct kvaser_usb_net_priv *priv,
const struct sk_buff *skb, int *frame_len,
@@ -471,6 +517,27 @@ static int kvaser_usb_leaf_send_simple_cmd(const struct kvaser_usb *dev,
return rc;
}
+static void kvaser_usb_leaf_get_software_info_leaf(struct kvaser_usb *dev,
+ const struct leaf_cmd_softinfo *softinfo)
+{
+ u32 sw_options = le32_to_cpu(softinfo->sw_options);
+
+ dev->fw_version = le32_to_cpu(softinfo->fw_version);
+ dev->max_tx_urbs = le16_to_cpu(softinfo->max_outstanding_tx);
+
+ switch (sw_options & KVASER_USB_LEAF_SWOPTION_FREQ_MASK) {
+ case KVASER_USB_LEAF_SWOPTION_FREQ_16_MHZ_CLK:
+ dev->cfg = &kvaser_usb_leaf_dev_cfg_16mhz;
+ break;

This diff is incomplete. Download the complete patch.

drivers/net/dsa/mv88e6xxx/chip.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/dsa/mv88e6xxx/serdes.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/dsa/ocelot/felix.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/altera/altera_tse_main.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/broadcom/bcm4908_enet.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/freescale/fec.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/freescale/fec_main.c

View file

This diff is incomplete. Download the complete patch.

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

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/huawei/hinic/hinic_sriov.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/i40e/i40e_debugfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/iavf/iavf_ethtool.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/intel/iavf/iavf_main.c

View file

This diff is incomplete. Download the complete patch.

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

View file

This diff is incomplete. Download the complete patch.

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

View file

This diff is incomplete. Download the complete patch.

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

View file

This diff is incomplete. Download the complete patch.

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

View file

This diff is incomplete. Download the complete patch.

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

View file

This diff is incomplete. Download the complete patch.

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

View file

This diff is incomplete. Download the complete patch.

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

View file

This diff is incomplete. Download the complete patch.

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

View file

This diff is incomplete. Download the complete patch.

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

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c

View file

This diff is incomplete. Download the complete patch.

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

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/microsoft/mana/hw_channel.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/qlogic/qede/qede_fp.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ethernet/qlogic/qla3xxx.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/phy/phylink.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/usb/cdc_ncm.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/vmxnet3/vmxnet3_drv.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/vrf.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wwan/iosm/iosm_ipc_imem.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/wwan/iosm/iosm_ipc_imem.h

View file

This diff is incomplete. Download the complete patch.

drivers/net/wwan/iosm/iosm_ipc_imem_ops.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pci-exynos.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/controller/dwc/pcie-qcom-ep.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/cdns3/host.c

View file

This diff is incomplete. Download the complete patch.

include/linux/bpf.h

View file

This diff is incomplete. Download the complete patch.

include/linux/btf.h

View file

This diff is incomplete. Download the complete patch.

include/linux/cacheinfo.h

View file

This diff is incomplete. Download the complete patch.

include/linux/device/driver.h

View file

This diff is incomplete. Download the complete patch.

include/linux/filter.h

View file

This diff is incomplete. Download the complete patch.

include/linux/phy.h

View file

This diff is incomplete. Download the complete patch.

include/net/bond_alb.h

View file

This diff is incomplete. Download the complete patch.

include/net/busy_poll.h

View file

This diff is incomplete. Download the complete patch.

include/net/netfilter/nf_conntrack.h

View file

This diff is incomplete. Download the complete patch.

kernel/bpf/btf.c

View file

This diff is incomplete. Download the complete patch.

kernel/bpf/verifier.c

View file

This diff is incomplete. Download the complete patch.

lib/Kconfig.debug

View file

This diff is incomplete. Download the complete patch.

mm/damon/vaddr.c

View file

This diff is incomplete. Download the complete patch.

mm/memory_hotplug.c

View file

This diff is incomplete. Download the complete patch.

mm/swap_slots.c

View file

This diff is incomplete. Download the complete patch.

net/core/devlink.c

View file

This diff is incomplete. Download the complete patch.

net/core/neighbour.c

View file

This diff is incomplete. Download the complete patch.

net/core/skmsg.c

View file

This diff is incomplete. Download the complete patch.

net/core/sock_map.c

View file

This diff is incomplete. Download the complete patch.

net/ethtool/netlink.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/inet_connection_sock.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/tcp_minisocks.c

View file

This diff is incomplete. Download the complete patch.

net/ipv4/udp.c

View file

This diff is incomplete. Download the complete patch.

net/ipv6/seg6_iptunnel.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nf_conntrack_core.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nf_conntrack_netlink.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nf_flow_table_core.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nfnetlink_queue.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nft_exthdr.c

View file

This diff is incomplete. Download the complete patch.

net/netfilter/nft_set_pipapo_avx2.c

View file

This diff is incomplete. Download the complete patch.

net/nfc/netlink.c

View file

This diff is incomplete. Download the complete patch.

net/sched/sch_fq_pie.c

View file

This diff is incomplete. Download the complete patch.

tools/bpf/resolve_btfids/main.c

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/bpf/verifier/xdp_direct_packet_access.c

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/net/fcnal-test.sh

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/net/fib_tests.sh

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/net/tls.c

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/netfilter/conntrack_vrf.sh

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/netfilter/nft_concat_range.sh

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/netfilter/nft_zones_many.sh

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/tc-testing/config

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/tc-testing/tdc.py

View file

This diff is incomplete. Download the complete patch.

tools/testing/selftests/tc-testing/tdc.sh

View file

This diff is incomplete. Download the complete patch.