Linux 5.10.46
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.10.46 kernel.
All users of the 5.10 kernel series must upgrade.
The updated 5.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/vm/slub.rst | 10 - Makefile | 2 arch/arc/include/uapi/asm/sigcontext.h | 1 arch/arc/kernel/signal.c | 43 +++++ arch/s390/kernel/entry.S | 2 arch/x86/include/asm/fpu/internal.h | 13 + arch/x86/kernel/fpu/signal.c | 54 ++++-- arch/x86/kvm/lapic.c | 3 arch/x86/kvm/mmu/mmu.c | 26 +++ arch/x86/kvm/x86.c | 6 arch/x86/mm/ioremap.c | 4 arch/x86/mm/numa.c | 8 drivers/dma/Kconfig | 1 drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c | 3 drivers/dma/idxd/init.c | 1 drivers/dma/pl330.c | 6 drivers/dma/qcom/Kconfig | 1 drivers/dma/sf-pdma/Kconfig | 1 drivers/dma/ste_dma40.c | 3 drivers/dma/xilinx/xilinx_dpdma.c | 24 ++ drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 6 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 6 drivers/gpu/drm/radeon/radeon_uvd.c | 4 drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c | 31 +++ drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h | 5 drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 41 ++++- drivers/hwmon/scpi-hwmon.c | 9 + drivers/irqchip/irq-gic-v3.c | 36 ++++ drivers/net/can/usb/mcba_usb.c | 17 +- drivers/net/ethernet/atheros/alx/main.c | 1 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c | 48 ++++- drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 2 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 46 +++-- drivers/net/ethernet/ec_bhf.c | 4 drivers/net/ethernet/emulex/benet/be_main.c | 1 drivers/net/ethernet/freescale/fec_ptp.c | 8 drivers/net/ethernet/intel/ice/ice_lib.c | 18 +- drivers/net/ethernet/intel/ice/ice_main.c | 15 + drivers/net/ethernet/lantiq_xrx200.c | 5 drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 3 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 - drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 6 drivers/net/ethernet/mellanox/mlx5/core/mr.c | 2 drivers/net/ethernet/mellanox/mlx5/core/rdma.c | 3 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_cmd.c | 17 +- drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c | 17 +- drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h | 6 drivers/net/ethernet/mellanox/mlx5/core/steering/mlx5dr.h | 6 drivers/net/ethernet/mellanox/mlx5/core/transobj.c | 30 ++- drivers/net/ethernet/mellanox/mlx5/core/vport.c | 2 drivers/net/ethernet/mellanox/mlxsw/core_thermal.c | 6 drivers/net/ethernet/mellanox/mlxsw/reg.h | 2 drivers/net/ethernet/mscc/ocelot.c | 5 drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 2 drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 1 drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 15 + drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h | 2 drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 89 +++++++++-- drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.h | 3 drivers/net/ethernet/stmicro/stmmac/dwmac1000.h | 8 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 drivers/net/ethernet/xilinx/ll_temac_main.c | 8 drivers/net/hamradio/mkiss.c | 1 drivers/net/usb/cdc_eem.c | 2 drivers/net/usb/cdc_ncm.c | 2 drivers/net/usb/smsc75xx.c | 10 - drivers/net/vrf.c | 6 drivers/pci/controller/pci-aardvark.c | 49 ++++-- drivers/pci/quirks.c | 89 +++++++++++ drivers/phy/mediatek/phy-mtk-tphy.c | 2 drivers/platform/x86/thinkpad_acpi.c | 1 drivers/ptp/ptp_clock.c | 6 drivers/regulator/cros-ec-regulator.c | 3 drivers/regulator/rt4801-regulator.c | 4 drivers/regulator/rtmv20-regulator.c | 2 drivers/s390/crypto/ap_queue.c | 11 + drivers/spi/spi-stm32-qspi.c | 5 drivers/spi/spi-zynq-qspi.c | 7 drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 2 drivers/usb/chipidea/usbmisc_imx.c | 16 + drivers/usb/core/hub.c | 7 drivers/usb/dwc3/core.c | 2 drivers/usb/dwc3/debug.h | 3 drivers/usb/dwc3/debugfs.c | 21 -- drivers/usb/dwc3/gadget.c | 3 fs/afs/main.c | 4 fs/notify/fanotify/fanotify_user.c | 4 include/linux/mfd/rohm-bd70528.h | 4 include/linux/mlx5/transobj.h | 1 include/linux/mm_types.h | 27 ++- include/linux/ptp_clock_kernel.h | 2 include/linux/socket.h | 2 include/linux/swapops.h | 15 + include/net/mac80211.h | 7 include/net/net_namespace.h | 7 include/uapi/linux/in.h | 3 kernel/bpf/verifier.c | 68 +++++++- kernel/crash_core.c | 1 kernel/sched/fair.c | 10 - kernel/trace/trace.c | 11 - kernel/trace/trace_clock.c | 6 mm/memory-failure.c | 7 mm/slab_common.c | 3 mm/slub.c | 37 +--- mm/swapfile.c | 2 net/batman-adv/bat_iv_ogm.c | 4 net/bridge/br_private.h | 4 net/bridge/br_vlan_tunnel.c | 38 ++-- net/can/bcm.c | 62 ++++++- net/can/isotp.c | 61 +++++-- net/can/j1939/transport.c | 54 ++++-- net/can/raw.c | 62 +++++-- net/core/net_namespace.c | 12 + net/core/rtnetlink.c | 8 net/ethtool/strset.c | 2 net/ipv4/cipso_ipv4.c | 1 net/ipv4/icmp.c | 7 net/ipv4/igmp.c | 1 net/ipv4/route.c | 15 + net/ipv4/udp.c | 10 + net/ipv6/netfilter/nft_fib_ipv6.c | 22 ++ net/ipv6/udp.c | 3 net/mac80211/scan.c | 21 +- net/mac80211/tx.c | 52 ++++-- net/mptcp/options.c | 2 net/mptcp/protocol.c | 10 - net/mptcp/subflow.c | 10 - net/netfilter/nf_synproxy_core.c | 5 net/qrtr/qrtr.c | 2 net/rds/recv.c | 2 net/sched/act_ct.c | 21 +- net/sched/sch_cake.c | 6 net/socket.c | 13 - net/unix/af_unix.c | 7 net/wireless/Makefile | 2 net/wireless/pmsr.c | 16 + sound/soc/codecs/rt5659.c | 26 ++- sound/soc/codecs/rt5682-sdw.c | 3 sound/soc/codecs/tas2562.h | 14 - sound/soc/fsl/fsl-asoc-card.c | 1 sound/soc/qcom/lpass-cpu.c | 79 +++++++++ sound/soc/qcom/lpass.h | 4 tools/include/uapi/linux/in.h | 3 tools/lib/bpf/xsk.c | 2 tools/perf/trace/beauty/include/linux/socket.h | 2 tools/testing/selftests/net/fib_tests.sh | 25 +++ tools/testing/selftests/net/mptcp/mptcp_connect.sh | 11 - 150 files changed, 1512 insertions(+), 440 deletions(-)
Aleksander Jan Bajkowski (2):
net: lantiq: disable interrupt before sheduling NAPI
lantiq: net: fix duplicated skb in rx descriptor ring
Alex Elder (1):
net: qualcomm: rmnet: don't over-count statistics
Alexander Gordeev (1):
s390/mcck: fix calculation of SIE critical section size
Andrew Lunn (1):
usb: core: hub: Disable autosuspend for Cypress CY7C65632
Andrew Morton (1):
mm/slub.c: include swab.h
Andy Lutomirski (1):
x86/fpu: Invalidate FPU state after a failed XRSTOR from a user buffer
Antti Järvinen (1):
PCI: Mark TI C667X to avoid bus reset
Arnaldo Carvalho de Melo (2):
tools headers UAPI: Sync linux/in.h copy with the kernel sources perf beauty: Update copy of linux/socket.h with the kernel sources
Avraham Stern (1):
cfg80211: avoid double free of PMSR request
Axel Lin (3):
regulator: cros-ec: Fix error code in dev_err message
regulator: bd70528: Fix off-by-one for buck123 .n_voltages setting
regulator: rt4801: Fix NULL pointer dereference if priv->enable_gpios is NULL
Aya Levin (2):
net/mlx5e: Block offload of outer header csum for UDP tunnels net/mlx5: Reset mkey index on creation
Breno Lima (1):
usb: chipidea: imx: Fix Battery Charger 1.2 CDP detection
Bumyong Lee (1):
dmaengine: pl330: fix wrong usage of spinlock flags in dma_cyclc
Changbin Du (1):
net: make get_net_ns return error if NET_NS is disabled
Chen Li (1):
radeon: use memcpy_to/fromio for UVD fw upload
Chengyang Fan (1):
net: ipv4: fix memory leak in ip_mc_add1_src
ChiYuan Huang (1):
regulator: rtmv20: Fix to make regcache value first reading back from HW
Chiqijun (1):
PCI: Work around Huawei Intelligent NIC VF FLR erratum
Christophe JAILLET (4):
alx: Fix an error handling path in 'alx_probe()'
qlcnic: Fix an error handling path in 'qlcnic_probe()'
netxen_nic: Fix an error handling path in 'netxen_nic_probe()'
be2net: Fix an error handling path in 'be_probe()'
Dan Carpenter (1):
afs: Fix an IS_ERR() vs NULL check
Daniel Borkmann (3):
bpf: Fix leakage under speculation on mispredicted branches
bpf: Inherit expanded/patched seen count from old aux data
bpf: Do not mark insn as seen under speculative path verification
Dave Jiang (1):
dmaengine: idxd: add missing dsa driver unregister
David Ahern (1):
ipv4: Fix device used for dst_alloc with local routes
Dima Chumak (1):
net/mlx5e: Fix page reclaim for dead peer hairpin
Dongliang Mu (1):
net: usb: fix possible use-after-free in smsc75xx_bind
Du Cheng (1):
mac80211: fix skb length check in ieee80211_scan_rx()
Eric Dumazet (1):
net/af_unix: fix a data-race in unix_dgram_sendmsg / unix_release_sock
Esben Haabendal (2):
net: ll_temac: Make sure to free skb when it is completely used
net: ll_temac: Fix TX BD buffer overwrite
Fan Du (1):
x86/mm: Avoid truncating memblocks for SGX memory
Feng Tang (1):
mm: relocate 'write_protect_seq' in struct mm_struct
Florian Westphal (1):
netfilter: nft_fib_ipv6: skip ipv6 packets from any to link-local
Fugang Duan (1):
net: fec_ptp: add clock rate zero check
Greg Kroah-Hartman (1):
Linux 5.10.46
Harald Freudenberger (1):
s390/ap: Fix hanging ioctl caused by wrong msg counter
Huy Nguyen (1):
net/mlx5e: Remove dependency in IPsec initialization flows
Ido Schimmel (1):
rtnetlink: Fix regression in bridge VLAN configuration
Jack Pham (1):
usb: dwc3: debugfs: Add and remove endpoint dirs dynamically
Jack Yu (1):
ASoC: rt5659: Fix the lost powers for the HDA header
Jakub Kicinski (2):
ethtool: strset: fix message length calculation
ptp: improve max_adj check against unreasonable values
Jim Mattson (1):
kvm: LAPIC: Restore guard to prevent illegal APIC register access
Jisheng Zhang (1):
net: stmmac: dwmac1000: Fix extended MAC address registers definition
Joakim Zhang (2):
net: fec_ptp: fix issue caused by refactor the fec_devtype
net: stmmac: disable clocks in stmmac_remove_config_dt()
Johannes Berg (1):
cfg80211: make certificate generation more robust
Kees Cook (3):
mm/slub: clarify verification reporting mm/slub: fix redzoning for small allocations mm/slub: actually fix freelist pointer vs redzoning
Kev Jackson (1):
libbpf: Fixes incorrect rx_ring_setup_done
Linyu Yuan (1):
net: cdc_eem: fix tx fixup skb leak
Maciej Fijalkowski (2):
ice: add ndo_bpf callback for safe mode netdev ops
ice: parameterize functions responsible for Tx ring management
Maciej Żenczykowski (1):
net: cdc_ncm: switch to eth%d interface naming
Maor Gottlieb (2):
net/mlx5: Consider RoCE cap before init RDMA resources net/mlx5: DR, Don't use SW steering when RoCE is not supported
Marc Zyngier (1):
irqchip/gic-v3: Workaround inconsistent PMR setting on NMI entry
Marcelo Ricardo Leitner (1):
net/sched: act_ct: handle DNAT tuple collision
Mathy Vanhoef (1):
mac80211: Fix NULL ptr deref for injected rate info
Matthew Bobrowski (1):
fanotify: fix copy_event_to_user() fid error clean up
Maxim Mikityanskiy (3):
netfilter: synproxy: Fix out of bounds when parsing TCP options
mptcp: Fix out of bounds when parsing TCP options
sch_cake: Fix out of bounds when parsing TCP options and header
Michael Chan (1):
bnxt_en: Rediscover PHY capabilities after firmware reset
Mykola Kostenok (1):
mlxsw: core: Set thermal zone polling delay argument to real value at init
Nanyong Sun (1):
net: ipv4: fix memory leak in netlbl_cipsov4_add_std
Nicolas Cavallari (1):
ASoC: fsl-asoc-card: Set .owner attribute when registering card.
Nicolas Dichtel (1):
vrf: fix maximum MTU
Nikolay Aleksandrov (2):
net: bridge: fix vlan tunnel dst null pointer dereference
net: bridge: fix vlan tunnel dst refcnt when egressing
Norbert Slusarek (1):
can: bcm: fix infoleak in struct bcm_msg_head
Oder Chiou (1):
ASoC: rt5682: Fix the fast discharge for headset unplugging in soundwire mode
Oleksij Rempel (1):
can: j1939: fix Use-after-Free, hold skb ref while in use
Pali Rohár (1):
PCI: aardvark: Fix kernel panic during PIO transfer
Paolo Abeni (4):
udp: fix race between close() and udp_abort()
mptcp: try harder to borrow memory from subflow under pressure
mptcp: do not warn on bad input from the network
selftests: mptcp: enable syncookie only in absence of reorders
Parav Pandit (2):
net/mlx5: E-Switch, Read PF mac address net/mlx5: E-Switch, Allow setting GUID for host PF vport
Patrice Chotard (1):
spi: stm32-qspi: Always wait BUSY bit to be cleared in stm32_qspi_wait_cmd()
Pavel Machek (1):
cxgb4: fix wrong shift.
Pavel Skripkin (5):
net: rds: fix memory leak in rds_recvmsg
net: qrtr: fix OOB Read in qrtr_endpoint_post
net: hamradio: fix memory leak in mkiss_close
net: ethernet: fix potential use-after-free in ec_bhf_remove
can: mcba_usb: fix memory leak in mcba_usb
Peter Chen (1):
usb: dwc3: core: fix kernel panic when do reboot
Peter Xu (1):
mm/swap: fix pte_same_as_swp() not removing uffd-wp bit when compare
Petr Machata (1):
mlxsw: reg: Spectrum-3: Enforce lowest max-shaper burst size of 11
Pingfan Liu (1):
crash_core, vmcoreinfo: append 'SECTION_SIZE_BITS' to vmcoreinfo
Quanyang Wang (1):
dmaengine: xilinx: dpdma: initialize registers before request_irq
Rahul Lakkireddy (4):
cxgb4: fix endianness when flashing boot image
cxgb4: fix sleep in atomic when flashing PHY firmware
cxgb4: halt chip before flashing PHY firmware image
cxgb4: fix wrong ethtool n-tuple rule lookup
Randy Dunlap (3):
dmaengine: ALTERA_MSGDMA depends on HAS_IOMEM
dmaengine: QCOM_HIDMA_MGMT depends on HAS_IOMEM
dmaengine: SF_PDMA depends on HAS_IOMEM
Richard Weinberger (1):
ASoC: tas2562: Fix TDM_CFG0_SAMPRATE values
Riwen Lu (1):
hwmon: (scpi-hwmon) shows the negative temperature properly
Rukhsana Ansari (1):
bnxt_en: Fix TQM fastpath ring backing store computation
Saravana Kannan (1):
drm/sun4i: dw-hdmi: Make HDMI PHY into a platform device
Sean Christopherson (2):
KVM: x86: Immediately reset the MMU context when the SMM flag is cleared
KVM: x86/mmu: Calculate and check "full" mmu_role for nested MMU
Sergio Paracuellos (1):
pinctrl: ralink: rt2880: avoid to error in calls is pin is already enabled
Shanker Donthineni (1):
PCI: Mark some NVIDIA GPUs to avoid bus reset
Somnath Kotur (1):
bnxt_en: Call bnxt_ethtool_free() in bnxt_init_one() error path
Sriharsha Basavapatna (1):
PCI: Add ACS quirk for Broadcom BCM57414 NIC
Srinivasa Rao Mandadapu (1):
ASoC: qcom: lpass-cpu: Fix pop noise during audio capture begin
Steven Rostedt (VMware) (3):
tracing: Do not stop recording cmdlines when tracing is off
tracing: Do not stop recording comms if the trace file is being read
tracing: Do no increment trace_clock_global() by one
Subash Abhinov Kasiviswanathan (1):
net: qualcomm: rmnet: Update rmnet device MTU based on real device
Sven Eckelmann (1):
batman-adv: Avoid WARN_ON timing related checks
Tetsuo Handa (1):
can: bcm/raw/isotp: use per module netdevice notifier
Thomas Gleixner (4):
x86/process: Check PF_KTHREAD and not current->mm for kernel threads x86/pkru: Write hardware init value to PKRU when xstate is init x86/fpu: Prevent state corruption in __fpu__restore_sig() x86/fpu: Reset state for all signal restore failures
Tiezhu Yang (1):
phy: phy-mtk-tphy: Fix some resource leaks in mtk_phy_init()
Til Jasper Ullrich (1):
platform/x86: thinkpad_acpi: Add X1 Carbon Gen 9 second fan support
Toke Høiland-Jørgensen (1):
icmp: don't send out ICMP messages with a source address of 0.0.0.0
Tom Lendacky (1):
x86/ioremap: Map EFI-reserved memory as encrypted for SEV
Vincent Guittot (1):
sched/pelt: Ensure that *_sum is always synced with *_avg
Vineet Gupta (1):
ARCv2: save ABI registers across signal handling
Vladimir Oltean (1):
net: dsa: felix: re-enable TX flow control in ocelot_port_flush()
Wanpeng Li (1):
KVM: X86: Fix x86_emulator slab cache leak
Yang Yingliang (1):
dmaengine: stedma40: add missing iounmap() on error in d40_probe()
Yevgeny Kliteynik (1):
net/mlx5: DR, Allow SW steering for sw_owner_v2 devices
Yifan Zhang (2):
drm/amdgpu/gfx10: enlarge CP_MEC_DOORBELL_RANGE_UPPER to cover full doorbell. drm/amdgpu/gfx9: fix the doorbell missing when in CGPG issue.
Zhen Lei (1):
dmaengine: fsl-dpaa2-qdma: Fix error return code in two functions
yangerkun (1):
mm/memory-failure: make sure wait for page writeback in memory_failure
zpershuai (1):
spi: spi-zynq-qspi: Fix some wrong goto jumps & missing error code
Greg Kroah-Hartman
maintainerDocumentation/vm/slub.rst +5 -5
@@ -181,7 +181,7 @@ SLUB Debug output Here is a sample of slub debug output:: ==================================================================== - BUG kmalloc-8: Redzone overwritten + BUG kmalloc-8: Right Redzone overwritten -------------------------------------------------------------------- INFO: 0xc90f6d28-0xc90f6d2b. First byte 0x00 instead of 0xcc
@@ -189,10 +189,10 @@ Here is a sample of slub debug output:: INFO: Object 0xc90f6d20 @offset=3360 fp=0xc90f6d58 INFO: Allocated in get_modalias+0x61/0xf5 age=53 cpu=1 pid=554 - Bytes b4 0xc90f6d10: 00 00 00 00 00 00 00 00 5a 5a 5a 5a 5a 5a 5a 5a ........ZZZZZZZZ - Object 0xc90f6d20: 31 30 31 39 2e 30 30 35 1019.005 - Redzone 0xc90f6d28: 00 cc cc cc . - Padding 0xc90f6d50: 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZ + Bytes b4 (0xc90f6d10): 00 00 00 00 00 00 00 00 5a 5a 5a 5a 5a 5a 5a 5a ........ZZZZZZZZ + Object (0xc90f6d20): 31 30 31 39 2e 30 30 35 1019.005 + Redzone (0xc90f6d28): 00 cc cc cc . + Padding (0xc90f6d50): 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZ [<c010523d>] dump_trace+0x63/0x1eb [<c01053df>] show_trace_log_lvl+0x1a/0x2f
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 10 -SUBLEVEL = 45 +SUBLEVEL = 46 EXTRAVERSION = NAME = Dare mighty things
arch/arc/include/uapi/asm/sigcontext.h +1 -0
@@ -18,6 +18,7 @@*/ struct sigcontext {struct user_regs_struct regs; +struct user_regs_arcv2 v2abi; };#endif /* _ASM_ARC_SIGCONTEXT_H */
arch/arc/kernel/signal.c +43 -0
61 lines not on this page · raw message
arch/s390/kernel/entry.S +1 -1
@@ -1284,7 +1284,7 @@ ENDPROC(stack_overflow) je 1f larl %r13,.Lsie_entry slgr %r9,%r13 - larl %r13,.Lsie_skip + lghi %r13,.Lsie_skip - .Lsie_entry clgr %r9,%r13 jh 1f oi __LC_CPU_FLAGS+7, _CIF_MCCK_GUEST
arch/x86/include/asm/fpu/internal.h +10 -3
@@ -578,10 +578,17 @@ static inline void switch_fpu_finish(struct fpu *new_fpu)* PKRU state is switched eagerly because it needs to be valid before we * return to userland e.g. for a copy_to_user() operation. */ -if (current->mm) { +if (!(current->flags &PF_KTHREAD )) { +/* +* If the PKRU bit in xsave.header.xfeatures is not set, +* then the PKRU component was in init state, which means +* XRSTOR will set PKRU to 0. If the bit is not set then +* get_xsave_addr() will return NULL because the PKRU value +* in memory is not valid. This means pkru_val has to be +* set to 0 and not to init_pkru_value. +*/ pk =get_xsave_addr (&new_fpu->state.xsave,XFEATURE_PKRU ); -if (pk) - pkru_val = pk->pkru; + pkru_val = pk ? pk->pkru :0 ; }__write_pkru (pkru_val); }
arch/x86/kernel/fpu/signal.c +35 -19
98 lines not on this page · raw message
arch/x86/kvm/lapic.c +3 -0
@@ -1405,6 +1405,9 @@ int kvm_lapic_reg_read(struct kvm_lapic *apic, u32 offset, int len,if (!apic_x2apic_mode (apic)) valid_reg_mask |=APIC_REG_MASK (APIC_ARBPRI ); +if (alignment + len >4 ) +return 1 ; +if (offset >0x3f0 || !(valid_reg_mask &APIC_REG_MASK (offset)))return 1 ;
arch/x86/kvm/mmu/mmu.c +25 -1
@@ -4705,9 +4705,33 @@ static void init_kvm_softmmu(struct kvm_vcpu *vcpu) context->inject_page_fault = kvm_inject_page_fault; } +static union kvm_mmu_role kvm_calc_nested_mmu_role (struct kvm_vcpu *vcpu) +{ +union kvm_mmu_role role =kvm_calc_shadow_root_page_role_common (vcpu, false); + +/* +* Nested MMUs are used only for walking L2's gva->gpa, they never have +* shadow pages of their own and so "direct" has no meaning. Set it +* to "true" to try to detect bogus usage of the nested MMU. +*/ + role.base.direct = true; + +if (!is_paging (vcpu)) + role.base.level =0 ; +else if (is_long_mode (vcpu)) + role.base.level =is_la57_mode (vcpu) ?PT64_ROOT_5LEVEL : +PT64_ROOT_4LEVEL ; +else if (is_pae (vcpu)) + role.base.level =PT32E_ROOT_LEVEL ; +else + role.base.level =PT32_ROOT_LEVEL ; + +return role; +} +static void init_kvm_nested_mmu (struct kvm_vcpu *vcpu) { -union kvm_mmu_role new_role =kvm_calc_mmu_role_common (vcpu, false); +union kvm_mmu_role new_role =kvm_calc_nested_mmu_role (vcpu);struct kvm_mmu *g_context = &vcpu->arch.nested_mmu;if (new_role.as_u64 == g_context->mmu_role.as_u64)
arch/x86/kvm/x86.c +5 -1
@@ -6876,7 +6876,10 @@ static unsigned emulator_get_hflags(struct x86_emulate_ctxt *ctxt)static void emulator_set_hflags (struct x86_emulate_ctxt *ctxt,unsigned emul_flags) { -emul_to_vcpu (ctxt)->arch.hflags = emul_flags; +struct kvm_vcpu *vcpu =emul_to_vcpu (ctxt); + + vcpu->arch.hflags = emul_flags; +kvm_mmu_reset_context (vcpu); } static int emulator_pre_leave_smm(struct x86_emulate_ctxt *ctxt,
@@ -8018,6 +8021,7 @@ void kvm_arch_exit(void) kvm_x86_ops.hardware_enable =NULL ;kvm_mmu_module_exit ();free_percpu (user_return_msrs); +kmem_cache_destroy (x86_emulator_cache);kmem_cache_destroy (x86_fpu_cache); }
arch/x86/mm/ioremap.c +3 -1
@@ -118,7 +118,9 @@ static void __ioremap_check_other(resource_size_t addr, struct ioremap_desc *desif (!IS_ENABLED (CONFIG_EFI ))return ; -if (efi_mem_type (addr) ==EFI_RUNTIME_SERVICES_DATA ) +if (efi_mem_type (addr) ==EFI_RUNTIME_SERVICES_DATA || + (efi_mem_type (addr) ==EFI_BOOT_SERVICES_DATA && +efi_mem_attributes (addr) &EFI_MEMORY_RUNTIME )) desc->flags |=IORES_MAP_ENCRYPTED ; }
arch/x86/mm/numa.c +7 -1
@@ -254,7 +254,13 @@ int __init numa_cleanup_meminfo(struct numa_meminfo *mi)/* make sure all non-reserved blocks are inside the limits */ bi->start =max (bi->start, low); - bi->end =min (bi->end, high); + +/* preserve info for non-RAM areas above 'max_pfn': */ +if (bi->end > high) { +numa_add_memblk_to (bi->nid, high, bi->end, + &numa_reserved_meminfo); + bi->end = high; + }/* and there's no empty block */ if (bi->start >= bi->end)
drivers/dma/Kconfig +1 -0
@@ -59,6 +59,7 @@ config DMA_OF #devices config ALTERA_MSGDMA tristate "Altera / Intel mSGDMA Engine" + depends on HAS_IOMEM select DMA_ENGINE help Enable support for Altera / Intel mSGDMA controller.
drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c +3 -0
@@ -332,6 +332,7 @@ static int __cold dpaa2_qdma_setup(struct fsl_mc_device *ls_dev) }if (priv->dpdmai_attr.version.major >DPDMAI_VER_MAJOR ) { + err = -EINVAL ; dev_err(dev, "DPDMAI major version mismatch\n" "Found %u.%u, supported version is %u.%u\n", priv->dpdmai_attr.version.major,
@@ -341,6 +342,7 @@ static int __cold dpaa2_qdma_setup(struct fsl_mc_device *ls_dev) }if (priv->dpdmai_attr.version.minor >DPDMAI_VER_MINOR ) { + err = -EINVAL ; dev_err(dev, "DPDMAI minor version mismatch\n" "Found %u.%u, supported version is %u.%u\n", priv->dpdmai_attr.version.major,
@@ -475,6 +477,7 @@ static int __cold dpaa2_qdma_dpio_setup(struct dpaa2_qdma_priv *priv) ppriv->store =dpaa2_io_store_create (DPAA2_QDMA_STORE_SIZE , dev);if (!ppriv->store) { + err = -ENOMEM ;dev_err (dev,"dpaa2_io_store_create() failed\n" ); goto err_store; }
drivers/dma/idxd/init.c +1 -0
@@ -518,6 +518,7 @@ module_init(idxd_init_module); static void __exit idxd_exit_module(void) { +idxd_unregister_driver ();pci_unregister_driver (&idxd_pci_driver);idxd_cdev_remove ();idxd_unregister_bus_type ();
drivers/dma/pl330.c +4 -2
@@ -2696,13 +2696,15 @@ static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic(for (i =0 ; i < len / period_len; i++) { desc =pl330_get_desc (pch);if (!desc) { +unsigned long iflags; +dev_err (pch->dmac->ddma.dev,"%s:%d Unable to fetch desc\n" , __func__, __LINE__);if (!first)return NULL ; -spin_lock_irqsave (&pl330->pool_lock, flags); +spin_lock_irqsave (&pl330->pool_lock, iflags);while (!list_empty (&first->node)) { desc = list_entry(first->node.next,
@@ -2712,7 +2714,7 @@ static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic(list_move_tail (&first->node, &pl330->desc_pool); -spin_unlock_irqrestore (&pl330->pool_lock, flags); +spin_unlock_irqrestore (&pl330->pool_lock, iflags);return NULL ; }
drivers/dma/qcom/Kconfig +1 -0
@@ -10,6 +10,7 @@ config QCOM_BAM_DMA config QCOM_HIDMA_MGMT tristate "Qualcomm Technologies HIDMA Management support" + depends on HAS_IOMEM select DMA_ENGINE help Enable support for the Qualcomm Technologies HIDMA Management.
drivers/dma/sf-pdma/Kconfig +1 -0
@@ -1,5 +1,6 @@ config SF_PDMA tristate "Sifive PDMA controller driver" + depends on HAS_IOMEM select DMA_ENGINE select DMA_VIRTUAL_CHANNELS help
drivers/dma/ste_dma40.c +3 -0
@@ -3676,6 +3676,9 @@ static int __init d40_probe(struct platform_device *pdev)kfree (base->lcla_pool.base_unaligned); +if (base->lcpa_base) +iounmap (base->lcpa_base); +if (base->phy_lcpa)release_mem_region (base->phy_lcpa, base->lcpa_size);
drivers/dma/xilinx/xilinx_dpdma.c +23 -1
@@ -1459,7 +1459,7 @@ static void xilinx_dpdma_enable_irq(struct xilinx_dpdma_device *xdev)*/ static void xilinx_dpdma_disable_irq (struct xilinx_dpdma_device *xdev) { -dpdma_write (xdev->reg,XILINX_DPDMA_IDS ,XILINX_DPDMA_INTR_ERR_ALL ); +dpdma_write (xdev->reg,XILINX_DPDMA_IDS ,XILINX_DPDMA_INTR_ALL );dpdma_write (xdev->reg,XILINX_DPDMA_EIDS ,XILINX_DPDMA_EINTR_ALL ); }
@@ -1596,6 +1596,26 @@ static struct dma_chan *of_dma_xilinx_xlate(struct of_phandle_args *dma_spec,return dma_get_slave_channel (&xdev->chan[chan_id]->vchan.chan); } +static void dpdma_hw_init (struct xilinx_dpdma_device *xdev) +{ +unsigned int i; +void __iomem *reg; + +/* Disable all interrupts */ +xilinx_dpdma_disable_irq (xdev); + +/* Stop all channels */ +for (i =0 ; i <ARRAY_SIZE (xdev->chan); i++) { + reg = xdev->reg +XILINX_DPDMA_CH_BASE + +XILINX_DPDMA_CH_OFFSET * i; +dpdma_clr (reg,XILINX_DPDMA_CH_CNTL ,XILINX_DPDMA_CH_CNTL_ENABLE ); + } + +/* Clear the interrupt status registers */ +dpdma_write (xdev->reg,XILINX_DPDMA_ISR ,XILINX_DPDMA_INTR_ALL ); +dpdma_write (xdev->reg,XILINX_DPDMA_EISR ,XILINX_DPDMA_EINTR_ALL ); +} +static int xilinx_dpdma_probe (struct platform_device *pdev) {struct xilinx_dpdma_device *xdev;
@@ -1622,6 +1642,8 @@ static int xilinx_dpdma_probe(struct platform_device *pdev)if (IS_ERR (xdev->reg))return PTR_ERR (xdev->reg); +dpdma_hw_init (xdev); + xdev->irq =platform_get_irq (pdev,0 );if (xdev->irq <0 ) {dev_err (xdev->dev,"failed to get platform irq\n" );
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +5 -1
@@ -6590,8 +6590,12 @@ static int gfx_v10_0_kiq_init_register(struct amdgpu_ring *ring)if (ring->use_doorbell) {WREG32_SOC15 (GC ,0 , mmCP_MEC_DOORBELL_RANGE_LOWER, (adev->doorbell_index.kiq *2 ) <<2 ); +/* If GC has entered CGPG, ringing doorbell > first page doesn't +* wakeup GC. Enlarge CP_MEC_DOORBELL_RANGE_UPPER to workaround +* this issue. +*/ WREG32_SOC15 (GC ,0 , mmCP_MEC_DOORBELL_RANGE_UPPER, - (adev->doorbell_index.userqueue_end *2 ) <<2 ); + (adev->doorbell.size -4 )); } WREG32_SOC15(GC, 0, mmCP_HQD_PQ_DOORBELL_CONTROL,
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +5 -1
@@ -3619,8 +3619,12 @@ static int gfx_v9_0_kiq_init_register(struct amdgpu_ring *ring)if (ring->use_doorbell) {WREG32_SOC15 (GC ,0 , mmCP_MEC_DOORBELL_RANGE_LOWER, (adev->doorbell_index.kiq *2 ) <<2 ); +/* If GC has entered CGPG, ringing doorbell > first page doesn't +* wakeup GC. Enlarge CP_MEC_DOORBELL_RANGE_UPPER to workaround +* this issue. +*/ WREG32_SOC15 (GC ,0 , mmCP_MEC_DOORBELL_RANGE_UPPER, - (adev->doorbell_index.userqueue_end *2 ) <<2 ); + (adev->doorbell.size -4 )); } WREG32_SOC15_RLC(GC, 0, mmCP_HQD_PQ_DOORBELL_CONTROL,
drivers/gpu/drm/radeon/radeon_uvd.c +2 -2
@@ -286,7 +286,7 @@ int radeon_uvd_resume(struct radeon_device *rdev)if (rdev->uvd.vcpu_bo ==NULL )return -EINVAL ; -memcpy (rdev->uvd.cpu_addr, rdev->uvd_fw->data, rdev->uvd_fw->size); +memcpy_toio ((void __iomem *)rdev->uvd.cpu_addr, rdev->uvd_fw->data, rdev->uvd_fw->size); size =radeon_bo_size (rdev->uvd.vcpu_bo); size -= rdev->uvd_fw->size;
@@ -294,7 +294,7 @@ int radeon_uvd_resume(struct radeon_device *rdev) ptr = rdev->uvd.cpu_addr; ptr += rdev->uvd_fw->size; -memset (ptr,0 , size); +memset_io ((void __iomem *)ptr,0 , size);return 0 ; }
drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c +27 -4
@@ -209,7 +209,7 @@ static int sun8i_dw_hdmi_bind(struct device *dev, struct device *master, goto err_disable_clk_tmds; } - ret =sun8i_hdmi_phy_probe (hdmi, phy_node); + ret =sun8i_hdmi_phy_get (hdmi, phy_node);of_node_put (phy_node);if (ret) {dev_err (dev,"Couldn't get the HDMI PHY\n" );
@@ -242,7 +242,6 @@ static int sun8i_dw_hdmi_bind(struct device *dev, struct device *master, cleanup_encoder:drm_encoder_cleanup (encoder); -sun8i_hdmi_phy_remove (hdmi); err_disable_clk_tmds:clk_disable_unprepare (hdmi->clk_tmds); err_assert_ctrl_reset:
@@ -263,7 +262,6 @@ static void sun8i_dw_hdmi_unbind(struct device *dev, struct device *master,struct sun8i_dw_hdmi *hdmi =dev_get_drvdata (dev);dw_hdmi_unbind (hdmi->hdmi); -sun8i_hdmi_phy_remove (hdmi);clk_disable_unprepare (hdmi->clk_tmds);reset_control_assert (hdmi->rst_ctrl);gpiod_set_value (hdmi->ddc_en,0 );
@@ -320,7 +318,32 @@ static struct platform_driver sun8i_dw_hdmi_pltfm_driver = { .of_match_table = sun8i_dw_hdmi_dt_ids, }, }; -module_platform_driver (sun8i_dw_hdmi_pltfm_driver); + +static int __init sun8i_dw_hdmi_init (void ) +{ +int ret; + + ret =platform_driver_register (&sun8i_dw_hdmi_pltfm_driver); +if (ret) +return ret; + + ret =platform_driver_register (&sun8i_hdmi_phy_driver); +if (ret) { +platform_driver_unregister (&sun8i_dw_hdmi_pltfm_driver); +return ret; + } + +return ret; +} + +static void __exit sun8i_dw_hdmi_exit(void) +{ +platform_driver_unregister (&sun8i_dw_hdmi_pltfm_driver); +platform_driver_unregister (&sun8i_hdmi_phy_driver); +} + +module_init (sun8i_dw_hdmi_init); +module_exit (sun8i_dw_hdmi_exit);MODULE_AUTHOR ("Jernej Skrabec <[email protected]>" );MODULE_DESCRIPTION ("Allwinner DW HDMI bridge" );
drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h +3 -2
@@ -195,14 +195,15 @@ struct sun8i_dw_hdmi {struct gpio_desc *ddc_en; }; +extern struct platform_driver sun8i_hdmi_phy_driver; +static inline struct sun8i_dw_hdmi *encoder_to_sun8i_dw_hdmi (struct drm_encoder *encoder) { return container_of(encoder, struct sun8i_dw_hdmi, encoder); } -int sun8i_hdmi_phy_probe (struct sun8i_dw_hdmi *hdmi,struct device_node *node); -void sun8i_hdmi_phy_remove (struct sun8i_dw_hdmi *hdmi); +int sun8i_hdmi_phy_get (struct sun8i_dw_hdmi *hdmi,struct device_node *node);void sun8i_hdmi_phy_init (struct sun8i_hdmi_phy *phy); void sun8i_hdmi_phy_set_ops(struct sun8i_hdmi_phy *phy,
drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c +36 -5
72 lines not on this page · raw message
drivers/hwmon/scpi-hwmon.c +9 -0
@@ -99,6 +99,15 @@ scpi_show_sensor(struct device *dev, struct device_attribute *attr, char *buf)scpi_scale_reading (&value, sensor); +/* +* Temperature sensor values are treated as signed values based on +* observation even though that is not explicitly specified, and +* because an unsigned u64 temperature does not really make practical +* sense especially when the temperature is below zero degrees Celsius. +*/ +if (sensor->info.class ==TEMPERATURE ) +return sprintf (buf,"%lld\n" , (s64 )value); +return sprintf (buf,"%llu\n" , value); }
drivers/irqchip/irq-gic-v3.c +35 -1
@@ -642,11 +642,45 @@ static inline void gic_handle_nmi(u32 irqnr, struct pt_regs *regs)nmi_exit (); } +static u32 do_read_iar (struct pt_regs *regs) +{ +u32 iar; + +if (gic_supports_nmi () &&unlikely (!interrupts_enabled (regs))) { +u64 pmr; + +/* +* We were in a context with IRQs disabled. However, the +* entry code has set PMR to a value that allows any +* interrupt to be acknowledged, and not just NMIs. This can +* lead to surprising effects if the NMI has been retired in +* the meantime, and that there is an IRQ pending. The IRQ +* would then be taken in NMI context, something that nobody +* wants to debug twice. +* +* Until we sort this, drop PMR again to a level that will +* actually only allow NMIs before reading IAR, and then +* restore it to what it was. +*/ + pmr =gic_read_pmr (); +gic_pmr_mask_irqs (); +isb (); + + iar =gic_read_iar (); + +gic_write_pmr (pmr); + }else { + iar =gic_read_iar (); + } + +return iar; +} + static asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs) {u32 irqnr; - irqnr =gic_read_iar (); + irqnr =do_read_iar (regs);/* Check for special IDs first */ if ((irqnr >=1020 && irqnr <=1023 ))
drivers/net/can/usb/mcba_usb.c +15 -2
@@ -82,6 +82,8 @@ struct mcba_priv {bool can_ka_first_pass;bool can_speed_check;atomic_t free_ctx_cnt; +void *rxbuf[MCBA_MAX_RX_URBS ]; +dma_addr_t rxbuf_dma[MCBA_MAX_RX_URBS ]; };/* CAN frame */
@@ -633,6 +635,7 @@ static int mcba_usb_start(struct mcba_priv *priv)for (i =0 ; i <MCBA_MAX_RX_URBS ; i++) {struct urb *urb =NULL ;u8 *buf; +dma_addr_t buf_dma;/* create a URB, and a buffer for it */ urb =usb_alloc_urb (0 ,GFP_KERNEL );
@@ -642,7 +645,7 @@ static int mcba_usb_start(struct mcba_priv *priv) } buf =usb_alloc_coherent (priv->udev,MCBA_USB_RX_BUFF_SIZE , -GFP_KERNEL , &urb->transfer_dma); +GFP_KERNEL , &buf_dma);if (!buf) {netdev_err (netdev,"No memory left for USB buffer\n" );usb_free_urb (urb);
@@ -661,11 +664,14 @@ static int mcba_usb_start(struct mcba_priv *priv)if (err) {usb_unanchor_urb (urb);usb_free_coherent (priv->udev,MCBA_USB_RX_BUFF_SIZE , - buf, urb->transfer_dma); + buf, buf_dma);usb_free_urb (urb);break ; } + priv->rxbuf[i] = buf; + priv->rxbuf_dma[i] = buf_dma; +/* Drop reference, USB core will take care of freeing it */ usb_free_urb (urb); }
@@ -708,7 +714,14 @@ static int mcba_usb_open(struct net_device *netdev)static void mcba_urb_unlink (struct mcba_priv *priv) { +int i; +usb_kill_anchored_urbs (&priv->rx_submitted); + +for (i =0 ; i <MCBA_MAX_RX_URBS ; ++i) +usb_free_coherent (priv->udev,MCBA_USB_RX_BUFF_SIZE , + priv->rxbuf[i], priv->rxbuf_dma[i]); +usb_kill_anchored_urbs (&priv->tx_submitted); }
drivers/net/ethernet/atheros/alx/main.c +1 -0
@@ -1849,6 +1849,7 @@ static int alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)free_netdev (netdev); out_pci_release:pci_release_mem_regions (pdev); +pci_disable_pcie_error_reporting (pdev); out_pci_disable:pci_disable_device (pdev);return err;
drivers/net/ethernet/broadcom/bnxt/bnxt.c +7 -1
@@ -7184,7 +7184,7 @@ static int bnxt_alloc_ctx_mem(struct bnxt *bp) entries_sp = ctx->vnic_max_vnic_entries + ctx->qp_max_l2_entries +2 * (extra_qps + ctx->qp_min_qp1_entries) + min; entries_sp =roundup (entries_sp, ctx->tqm_entries_multiple); - entries = ctx->qp_max_l2_entries + extra_qps + ctx->qp_min_qp1_entries; + entries = ctx->qp_max_l2_entries +2 * (extra_qps + ctx->qp_min_qp1_entries); entries =roundup (entries, ctx->tqm_entries_multiple); entries =clamp_t (u32, entries, min, ctx->tqm_max_entries_per_ring);for (i =0 ; i < ctx->tqm_fp_rings_count +1 ; i++) {
@@ -11353,6 +11353,8 @@ static void bnxt_fw_init_one_p3(struct bnxt *bp)bnxt_hwrm_coal_params_qcaps (bp); } +static int bnxt_probe_phy (struct bnxt *bp,bool fw_dflt); +static int bnxt_fw_init_one (struct bnxt *bp) {int rc;
@@ -11367,6 +11369,9 @@ static int bnxt_fw_init_one(struct bnxt *bp)netdev_err (bp->dev,"Firmware init phase 2 failed\n" );return rc; } + rc =bnxt_probe_phy (bp, false); +if (rc) +return rc; rc =bnxt_approve_mac (bp, bp->dev->dev_addr, false);if (rc)return rc;
@@ -12741,6 +12746,7 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)bnxt_hwrm_func_drv_unrgtr (bp);bnxt_free_hwrm_short_cmd_req (bp);bnxt_free_hwrm_resources (bp); +bnxt_ethtool_free (bp);kfree (bp->fw_health); bp->fw_health =NULL ;bnxt_cleanup_pci (bp);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c +35 -13
76 lines not on this page · raw message
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c +1 -1
@@ -198,7 +198,7 @@ static void set_nat_params(struct adapter *adap, struct filter_entry *f,WORD_MASK , f->fs.nat_lip[3 ] | f->fs.nat_lip[2 ] <<8 | f->fs.nat_lip[1 ] <<16 | - (u64)f->fs.nat_lip[0] << 25, 1); + (u64)f->fs.nat_lip[0] << 24, 1); } }
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +0 -2
@@ -4428,10 +4428,8 @@ static int adap_init0_phy(struct adapter *adap)/* Load PHY Firmware onto adapter. */ -spin_lock_bh (&adap->win0_lock); ret =t4_load_phy_fw (adap,MEMWIN_NIC , phy_info->phy_fw_version, (u8 *)phyf->data, phyf->size); -spin_unlock_bh (&adap->win0_lock);if (ret <0 )dev_err (adap->pdev_dev,"PHY Firmware transfer error %d\n" , -ret);
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +29 -17
126 lines not on this page · raw message
drivers/net/ethernet/ec_bhf.c +3 -1
@@ -576,10 +576,12 @@ static void ec_bhf_remove(struct pci_dev *dev)struct ec_bhf_priv *priv =netdev_priv (net_dev);unregister_netdev (net_dev); -free_netdev (net_dev);pci_iounmap (dev, priv->dma_io);pci_iounmap (dev, priv->io); + +free_netdev (net_dev); +pci_release_regions (dev);pci_clear_master (dev);pci_disable_device (dev);
drivers/net/ethernet/emulex/benet/be_main.c +1 -0
@@ -5905,6 +5905,7 @@ static int be_probe(struct pci_dev *pdev, const struct pci_device_id *pdev_id) unmap_bars:be_unmap_pci_bars (adapter); free_netdev: +pci_disable_pcie_error_reporting (pdev);free_netdev (netdev); rel_reg:pci_release_regions (pdev);
drivers/net/ethernet/freescale/fec_ptp.c +5 -3
@@ -215,15 +215,13 @@ static u64 fec_ptp_read(const struct cyclecounter *cc) {struct fec_enet_private *fep = container_of(cc, struct fec_enet_private, cc); -const struct platform_device_id *id_entry = -platform_get_device_id (fep->pdev);u32 tempval; tempval =readl (fep->hwp +FEC_ATIME_CTRL ); tempval |=FEC_T_CTRL_CAPTURE ;writel (tempval, fep->hwp +FEC_ATIME_CTRL ); -if (id_entry->driver_data &FEC_QUIRK_BUG_CAPTURE ) +if (fep->quirks &FEC_QUIRK_BUG_CAPTURE )udelay (1 );return readl (fep->hwp +FEC_ATIME );
@@ -604,6 +602,10 @@ void fec_ptp_init(struct platform_device *pdev, int irq_idx) fep->ptp_caps.enable = fec_ptp_enable; fep->cycle_speed =clk_get_rate (fep->clk_ptp); +if (!fep->cycle_speed) { + fep->cycle_speed =NSEC_PER_SEC ; +dev_err (&fep->pdev->dev,"clk_ptp clock rate is zero\n" ); + } fep->ptp_inc =NSEC_PER_SEC / fep->cycle_speed;spin_lock_init (&fep->tmreg_lock);
drivers/net/ethernet/intel/ice/ice_lib.c +10 -8
@@ -1705,12 +1705,13 @@ int ice_vsi_cfg_rxqs(struct ice_vsi *vsi)* ice_vsi_cfg_txqs - Configure the VSI for Tx * @vsi: the VSI being configured * @rings: Tx ring array to be configured +* @count: number of Tx ring array elements * * Return 0 on success and a negative value on error * Configure the Tx VSI for operation. */ static int -ice_vsi_cfg_txqs (struct ice_vsi *vsi,struct ice_ring **rings) +ice_vsi_cfg_txqs (struct ice_vsi *vsi,struct ice_ring **rings,u16 count) {struct ice_aqc_add_tx_qgrp *qg_buf;u16 q_idx =0 ;
@@ -1722,7 +1723,7 @@ ice_vsi_cfg_txqs(struct ice_vsi *vsi, struct ice_ring **rings) qg_buf->num_txqs =1 ; -for (q_idx =0 ; q_idx < vsi->num_txq; q_idx++) { +for (q_idx =0 ; q_idx < count; q_idx++) { err =ice_vsi_cfg_txq (vsi, rings[q_idx], qg_buf);if (err) goto err_cfg_txqs;
@@ -1742,7 +1743,7 @@ ice_vsi_cfg_txqs(struct ice_vsi *vsi, struct ice_ring **rings)*/ int ice_vsi_cfg_lan_txqs (struct ice_vsi *vsi) { -return ice_vsi_cfg_txqs (vsi, vsi->tx_rings); +return ice_vsi_cfg_txqs (vsi, vsi->tx_rings, vsi->num_txq); }/**
@@ -1757,7 +1758,7 @@ int ice_vsi_cfg_xdp_txqs(struct ice_vsi *vsi)int ret;int i; - ret =ice_vsi_cfg_txqs (vsi, vsi->xdp_rings); + ret =ice_vsi_cfg_txqs (vsi, vsi->xdp_rings, vsi->num_xdp_txq);if (ret)return ret;
@@ -1955,17 +1956,18 @@ int ice_vsi_stop_all_rx_rings(struct ice_vsi *vsi)* @rst_src: reset source * @rel_vmvf_num: Relative ID of VF/VM * @rings: Tx ring array to be stopped +* @count: number of Tx ring array elements */ static int ice_vsi_stop_tx_rings (struct ice_vsi *vsi,enum ice_disq_rst_src rst_src, -u16 rel_vmvf_num,struct ice_ring **rings) +u16 rel_vmvf_num,struct ice_ring **rings,u16 count) {u16 q_idx;if (vsi->num_txq >ICE_LAN_TXQ_MAX_QDIS )return -EINVAL ; -for (q_idx =0 ; q_idx < vsi->num_txq; q_idx++) { +for (q_idx =0 ; q_idx < count; q_idx++) {struct ice_txq_meta txq_meta = { };int status;
@@ -1993,7 +1995,7 @@ int ice_vsi_stop_lan_tx_rings(struct ice_vsi *vsi, enum ice_disq_rst_src rst_src, u16 rel_vmvf_num) { - return ice_vsi_stop_tx_rings(vsi, rst_src, rel_vmvf_num, vsi->tx_rings); + return ice_vsi_stop_tx_rings(vsi, rst_src, rel_vmvf_num, vsi->tx_rings, vsi->num_txq); }/**
@@ -2002,7 +2004,7 @@ ice_vsi_stop_lan_tx_rings(struct ice_vsi *vsi, enum ice_disq_rst_src rst_src,*/ int ice_vsi_stop_xdp_tx_rings (struct ice_vsi *vsi) { -return ice_vsi_stop_tx_rings (vsi,ICE_NO_RESET ,0 , vsi->xdp_rings); +return ice_vsi_stop_tx_rings (vsi,ICE_NO_RESET ,0 , vsi->xdp_rings, vsi->num_xdp_txq); }/**
drivers/net/ethernet/intel/ice/ice_main.c +15 -0
@@ -2539,6 +2539,20 @@ ice_xdp_setup_prog(struct ice_vsi *vsi, struct bpf_prog *prog,return (ret || xdp_ring_err) ? -ENOMEM :0 ; } +/** +* ice_xdp_safe_mode - XDP handler for safe mode +* @dev: netdevice +* @xdp: XDP command +*/ +static int ice_xdp_safe_mode (struct net_device __always_unused *dev, +struct netdev_bpf *xdp) +{ +NL_SET_ERR_MSG_MOD (xdp->extack, +"Please provide working DDP firmware package in order to use XDP\n" +"Refer to Documentation/networking/device_drivers/ethernet/intel/ice.rst" ); +return -EOPNOTSUPP ; +} +/** * ice_xdp - implements XDP handler * @dev: netdevice
@@ -6786,6 +6800,7 @@ static const struct net_device_ops ice_netdev_safe_mode_ops = { .ndo_change_mtu = ice_change_mtu, .ndo_get_stats64 = ice_get_stats64, .ndo_tx_timeout = ice_tx_timeout, + .ndo_bpf = ice_xdp_safe_mode, };static const struct net_device_ops ice_netdev_ops = {
drivers/net/ethernet/lantiq_xrx200.c +3 -2
@@ -154,6 +154,7 @@ static int xrx200_close(struct net_device *net_dev)static int xrx200_alloc_skb (struct xrx200_chan *ch) { +struct sk_buff *skb = ch->skb[ch->dma.desc];dma_addr_t mapping;int ret =0 ;
@@ -168,6 +169,7 @@ static int xrx200_alloc_skb(struct xrx200_chan *ch) XRX200_DMA_DATA_LEN, DMA_FROM_DEVICE);if (unlikely (dma_mapping_error (ch->priv->dev, mapping))) {dev_kfree_skb_any (ch->skb[ch->dma.desc]); + ch->skb[ch->dma.desc] = skb; ret = -ENOMEM ; goto skip; }
@@ -198,7 +200,6 @@ static int xrx200_hw_receive(struct xrx200_chan *ch) ch->dma.desc %=LTQ_DESC_NUM ;if (ret) { - ch->skb[ch->dma.desc] = skb; net_dev->stats.rx_dropped++;netdev_err (net_dev,"failed to allocate new rx buffer\n" );return ret;
@@ -352,8 +353,8 @@ static irqreturn_t xrx200_dma_irq(int irq, void *ptr)struct xrx200_chan *ch = ptr;if (napi_schedule_prep (&ch->napi)) { -__napi_schedule (&ch->napi);ltq_dma_disable_irq (&ch->dma); +__napi_schedule (&ch->napi); }ltq_dma_ack_irq (&ch->dma);
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c +0 -3
@@ -532,9 +532,6 @@ void mlx5e_ipsec_build_netdev(struct mlx5e_priv *priv)struct mlx5_core_dev *mdev = priv->mdev;struct net_device *netdev = priv->netdev; -if (!priv->ipsec) -return ; -if (!(mlx5_accel_ipsec_device_caps (mdev) &MLX5_ACCEL_IPSEC_CAP_ESP ) || !MLX5_CAP_ETH (mdev, swp)) {mlx5_core_dbg (mdev,"mlx5e: ESP and SWP offload not supported\n" );
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +3 -7
@@ -4958,13 +4958,9 @@ static void mlx5e_build_nic_netdev(struct net_device *netdev) }if (mlx5_vxlan_allowed (mdev->vxlan) ||mlx5_geneve_tx_allowed (mdev)) { - netdev->hw_features |=NETIF_F_GSO_UDP_TUNNEL | -NETIF_F_GSO_UDP_TUNNEL_CSUM ; - netdev->hw_enc_features |=NETIF_F_GSO_UDP_TUNNEL | -NETIF_F_GSO_UDP_TUNNEL_CSUM ; - netdev->gso_partial_features =NETIF_F_GSO_UDP_TUNNEL_CSUM ; - netdev->vlan_features |=NETIF_F_GSO_UDP_TUNNEL | -NETIF_F_GSO_UDP_TUNNEL_CSUM ; + netdev->hw_features |=NETIF_F_GSO_UDP_TUNNEL ; + netdev->hw_enc_features |=NETIF_F_GSO_UDP_TUNNEL ; + netdev->vlan_features |=NETIF_F_GSO_UDP_TUNNEL ; }if (mlx5e_tunnel_proto_supported (mdev,IPPROTO_GRE )) {
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +1 -1
@@ -5206,7 +5206,7 @@ static void mlx5e_tc_hairpin_update_dead_peer(struct mlx5e_priv *priv,list_for_each_entry_safe (hpe, tmp, &init_wait_list, dead_peer_wait_list) {wait_for_completion (&hpe->res_ready);if (!IS_ERR_OR_NULL (hpe->hp) && hpe->peer_vhca_id == peer_vhca_id) - hpe->hp->pair->peer_gone = true; +mlx5_core_hairpin_clear_dead_peer (hpe->hp->pair);mlx5e_hairpin_put (priv, hpe); }
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +6 -0
@@ -1302,6 +1302,12 @@ static int esw_enable_vport(struct mlx5_eswitch *esw, u16 vport_num, (!vport_num && mlx5_core_is_ecpf(esw->dev))) vport->info.trusted = true; +/* External controller host PF has factory programmed MAC. +* Read it from the device. +*/ +if (mlx5_core_is_ecpf (esw->dev) && vport_num ==MLX5_VPORT_PF ) +mlx5_query_nic_vport_mac_address (esw->dev, vport_num, true, vport->info.mac); +esw_vport_change_handle_locked (vport); esw->enabled_vports++;
drivers/net/ethernet/mellanox/mlx5/core/mr.c +1 -1
@@ -54,7 +54,7 @@ int mlx5_core_create_mkey(struct mlx5_core_dev *dev, mkey_index =MLX5_GET (create_mkey_out, lout, mkey_index); mkey->iova =MLX5_GET64 (mkc, mkc, start_addr); mkey->size =MLX5_GET64 (mkc, mkc, len); - mkey->key |=mlx5_idx_to_mkey (mkey_index); + mkey->key = (u32 )mlx5_mkey_variant (mkey->key) |mlx5_idx_to_mkey (mkey_index); mkey->pd =MLX5_GET (mkc, mkc, pd);mlx5_core_dbg (dev,"out 0x%x, mkey 0x%x\n" , mkey_index, mkey->key);
drivers/net/ethernet/mellanox/mlx5/core/rdma.c +3 -0
@@ -156,6 +156,9 @@ void mlx5_rdma_enable_roce(struct mlx5_core_dev *dev) {int err; +if (!MLX5_CAP_GEN (dev, roce)) +return ; + err =mlx5_nic_vport_enable_roce (dev);if (err) {mlx5_core_err (dev,"Failed to enable RoCE: %d\n" , err);
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_cmd.c +11 -6
@@ -78,9 +78,9 @@ int mlx5dr_cmd_query_esw_caps(struct mlx5_core_dev *mdev, caps->uplink_icm_address_tx =MLX5_CAP64_ESW_FLOWTABLE (mdev, sw_steering_uplink_icm_address_tx); - caps->sw_owner = -MLX5_CAP_ESW_FLOWTABLE_FDB (mdev, - sw_owner); + caps->sw_owner_v2 =MLX5_CAP_ESW_FLOWTABLE_FDB (mdev, sw_owner_v2); +if (!caps->sw_owner_v2) + caps->sw_owner =MLX5_CAP_ESW_FLOWTABLE_FDB (mdev, sw_owner);return 0 ; }
@@ -113,10 +113,15 @@ int mlx5dr_cmd_query_device(struct mlx5_core_dev *mdev, caps->nic_tx_allow_address =MLX5_CAP64_FLOWTABLE (mdev, sw_steering_nic_tx_action_allow_icm_address); - caps->rx_sw_owner =MLX5_CAP_FLOWTABLE_NIC_RX (mdev, sw_owner); - caps->max_ft_level =MLX5_CAP_FLOWTABLE_NIC_RX (mdev, max_ft_level); + caps->rx_sw_owner_v2 =MLX5_CAP_FLOWTABLE_NIC_RX (mdev, sw_owner_v2); + caps->tx_sw_owner_v2 =MLX5_CAP_FLOWTABLE_NIC_TX (mdev, sw_owner_v2); + +if (!caps->rx_sw_owner_v2) + caps->rx_sw_owner =MLX5_CAP_FLOWTABLE_NIC_RX (mdev, sw_owner); +if (!caps->tx_sw_owner_v2) + caps->tx_sw_owner =MLX5_CAP_FLOWTABLE_NIC_TX (mdev, sw_owner); - caps->tx_sw_owner =MLX5_CAP_FLOWTABLE_NIC_TX (mdev, sw_owner); + caps->max_ft_level =MLX5_CAP_FLOWTABLE_NIC_RX (mdev, max_ft_level); caps->log_icm_size =MLX5_CAP_DEV_MEM (mdev, log_steering_sw_icm_size); caps->hdr_modify_icm_addr =
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c +9 -8
@@ -4,6 +4,11 @@#include <linux/mlx5/eswitch.h> #include "dr_types.h" +#define DR_DOMAIN_SW_STEERING_SUPPORTED (dmn, dmn_type) \ + ((dmn)->info.caps.dmn_type##_sw_owner || \ + ((dmn)->info.caps.dmn_type##_sw_owner_v2 && \ + (dmn)->info.caps.sw_format_ver <= MLX5_STEERING_FORMAT_CONNECTX_6DX)) +static int dr_domain_init_cache (struct mlx5dr_domain *dmn) {/* Per vport cached FW FT for checksum recalculation, this
@@ -181,6 +186,7 @@ static int dr_domain_query_fdb_caps(struct mlx5_core_dev *mdev,return ret; dmn->info.caps.fdb_sw_owner = dmn->info.caps.esw_caps.sw_owner; + dmn->info.caps.fdb_sw_owner_v2 = dmn->info.caps.esw_caps.sw_owner_v2; dmn->info.caps.esw_rx_drop_address = dmn->info.caps.esw_caps.drop_icm_address_rx; dmn->info.caps.esw_tx_drop_address = dmn->info.caps.esw_caps.drop_icm_address_tx;
@@ -223,18 +229,13 @@ static int dr_domain_caps_init(struct mlx5_core_dev *mdev,if (ret)return ret; -if (dmn->info.caps.sw_format_ver !=MLX5_STEERING_FORMAT_CONNECTX_5 ) { -mlx5dr_err (dmn,"SW steering is not supported on this device\n" ); -return -EOPNOTSUPP ; - } - ret =dr_domain_query_fdb_caps (mdev, dmn);if (ret)return ret;switch (dmn->type) {case MLX5DR_DOMAIN_TYPE_NIC_RX : -if (!dmn->info.caps.rx_sw_owner) +if (!DR_DOMAIN_SW_STEERING_SUPPORTED (dmn, rx))return -ENOTSUPP ; dmn->info.supp_sw_steering = true;
@@ -243,7 +244,7 @@ static int dr_domain_caps_init(struct mlx5_core_dev *mdev, dmn->info.rx.drop_icm_addr = dmn->info.caps.nic_rx_drop_address;break ;case MLX5DR_DOMAIN_TYPE_NIC_TX : -if (!dmn->info.caps.tx_sw_owner) +if (!DR_DOMAIN_SW_STEERING_SUPPORTED (dmn, tx))return -ENOTSUPP ; dmn->info.supp_sw_steering = true;
@@ -255,7 +256,7 @@ static int dr_domain_caps_init(struct mlx5_core_dev *mdev,if (!dmn->info.caps.eswitch_manager)return -ENOTSUPP ; -if (!dmn->info.caps.fdb_sw_owner) +if (!DR_DOMAIN_SW_STEERING_SUPPORTED (dmn, fdb))return -ENOTSUPP ; dmn->info.rx.ste_type =MLX5DR_STE_TYPE_RX ;
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h +5 -1
@@ -597,7 +597,8 @@ struct mlx5dr_esw_caps {u64 drop_icm_address_tx;u64 uplink_icm_address_rx;u64 uplink_icm_address_tx; -bool sw_owner; + u8 sw_owner:1; + u8 sw_owner_v2:1; };struct mlx5dr_cmd_vport_cap {
@@ -630,6 +631,9 @@ struct mlx5dr_cmd_caps {bool rx_sw_owner;bool tx_sw_owner;bool fdb_sw_owner; + u8 rx_sw_owner_v2:1; + u8 tx_sw_owner_v2:1; + u8 fdb_sw_owner_v2:1;u32 num_vports;struct mlx5dr_esw_caps esw_caps;struct mlx5dr_cmd_vport_cap *vports_caps;
drivers/net/ethernet/mellanox/mlx5/core/steering/mlx5dr.h +5 -1
@@ -124,7 +124,11 @@ int mlx5dr_action_destroy(struct mlx5dr_action *action);static inline bool mlx5dr_is_supported (struct mlx5_core_dev *dev) { -return MLX5_CAP_ESW_FLOWTABLE_FDB (dev, sw_owner); +return MLX5_CAP_GEN (dev, roce) && + (MLX5_CAP_ESW_FLOWTABLE_FDB (dev, sw_owner) || + (MLX5_CAP_ESW_FLOWTABLE_FDB (dev, sw_owner_v2) && + (MLX5_CAP_GEN (dev, steering_format_version) <= +MLX5_STEERING_FORMAT_CONNECTX_6DX ))); }#endif /* _MLX5DR_H_ */
drivers/net/ethernet/mellanox/mlx5/core/transobj.c +24 -6
@@ -424,6 +424,15 @@ static int mlx5_hairpin_pair_queues(struct mlx5_hairpin *hp)return err; } +static void mlx5_hairpin_unpair_peer_sq (struct mlx5_hairpin *hp) +{ +int i; + +for (i =0 ; i < hp->num_channels; i++) +mlx5_hairpin_modify_sq (hp->peer_mdev, hp->sqn[i],MLX5_SQC_STATE_RDY , +MLX5_SQC_STATE_RST ,0 ,0 ); +} +static void mlx5_hairpin_unpair_queues (struct mlx5_hairpin *hp) {int i;
@@ -432,13 +441,9 @@ static void mlx5_hairpin_unpair_queues(struct mlx5_hairpin *hp)for (i =0 ; i < hp->num_channels; i++)mlx5_hairpin_modify_rq (hp->func_mdev, hp->rqn[i],MLX5_RQC_STATE_RDY ,MLX5_RQC_STATE_RST ,0 ,0 ); -/* unset peer SQs */ -if (hp->peer_gone) -return ; -for (i =0 ; i < hp->num_channels; i++) -mlx5_hairpin_modify_sq (hp->peer_mdev, hp->sqn[i],MLX5_SQC_STATE_RDY , -MLX5_SQC_STATE_RST ,0 ,0 ); +if (!hp->peer_gone) +mlx5_hairpin_unpair_peer_sq (hp); } struct mlx5_hairpin *
@@ -485,3 +490,16 @@ void mlx5_core_hairpin_destroy(struct mlx5_hairpin *hp)mlx5_hairpin_destroy_queues (hp);kfree (hp); } + +void mlx5_core_hairpin_clear_dead_peer (struct mlx5_hairpin *hp) +{ +int i; + +mlx5_hairpin_unpair_peer_sq (hp); + +/* destroy peer SQ */ +for (i =0 ; i < hp->num_channels; i++) +mlx5_core_destroy_sq (hp->peer_mdev, hp->sqn[i]); + + hp->peer_gone = true; +}
drivers/net/ethernet/mellanox/mlx5/core/vport.c +0 -2
@@ -464,8 +464,6 @@ int mlx5_modify_nic_vport_node_guid(struct mlx5_core_dev *mdev,void *in;int err; -if (!vport) -return -EINVAL ;if (!MLX5_CAP_GEN (mdev, vport_group_manager))return -EACCES ;
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c +4 -2
@@ -708,7 +708,8 @@ mlxsw_thermal_module_tz_init(struct mlxsw_thermal_module *module_tz)MLXSW_THERMAL_TRIP_MASK , module_tz, &mlxsw_thermal_module_ops, - NULL, 0, 0); +NULL ,0 , + module_tz->parent->polling_delay);if (IS_ERR (module_tz->tzdev)) { err =PTR_ERR (module_tz->tzdev);return err;
@@ -830,7 +831,8 @@ mlxsw_thermal_gearbox_tz_init(struct mlxsw_thermal_module *gearbox_tz)MLXSW_THERMAL_TRIP_MASK , gearbox_tz, &mlxsw_thermal_gearbox_ops, - NULL, 0, 0); +NULL ,0 , + gearbox_tz->parent->polling_delay);if (IS_ERR (gearbox_tz->tzdev))return PTR_ERR (gearbox_tz->tzdev);
drivers/net/ethernet/mellanox/mlxsw/reg.h +1 -1
@@ -3641,7 +3641,7 @@ MLXSW_ITEM32(reg, qeec, max_shaper_bs, 0x1C, 0, 6);#define MLXSW_REG_QEEC_HIGHEST_SHAPER_BS 25#define MLXSW_REG_QEEC_LOWEST_SHAPER_BS_SP1 5#define MLXSW_REG_QEEC_LOWEST_SHAPER_BS_SP2 11 -#define MLXSW_REG_QEEC_LOWEST_SHAPER_BS_SP3 5 +#define MLXSW_REG_QEEC_LOWEST_SHAPER_BS_SP3 11 static inline void mlxsw_reg_qeec_pack(char *payload, u8 local_port, enum mlxsw_reg_qeec_hr hr, u8 index,
drivers/net/ethernet/mscc/ocelot.c +5 -0
@@ -355,6 +355,7 @@ static u32 ocelot_read_eq_avail(struct ocelot *ocelot, int port)int ocelot_port_flush (struct ocelot *ocelot,int port) { +unsigned int pause_ena;int err, val;/* Disable dequeuing from the egress queues */
@@ -363,6 +364,7 @@ int ocelot_port_flush(struct ocelot *ocelot, int port) QSYS_PORT_MODE, port);/* Disable flow control */ +ocelot_fields_read (ocelot, port,SYS_PAUSE_CFG_PAUSE_ENA , &pause_ena);ocelot_fields_write (ocelot, port,SYS_PAUSE_CFG_PAUSE_ENA ,0 );/* Disable priority flow control */
@@ -398,6 +400,9 @@ int ocelot_port_flush(struct ocelot *ocelot, int port)/* Clear flushing again. */ ocelot_rmw_gix (ocelot,0 ,REW_PORT_CFG_FLUSH_ENA ,REW_PORT_CFG , port); +/* Re-enable flow control */ +ocelot_fields_write (ocelot, port,SYS_PAUSE_CFG_PAUSE_ENA , pause_ena); +return err; }EXPORT_SYMBOL (ocelot_port_flush);
drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c +2 -0
@@ -1602,6 +1602,8 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)free_netdev (netdev); err_out_free_res: +if (NX_IS_REVISION_P3 (pdev->revision)) +pci_disable_pcie_error_reporting (pdev);pci_release_regions (pdev); err_out_disable_pdev:
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +1 -0
@@ -2692,6 +2692,7 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)kfree (ahw); err_out_free_res: +pci_disable_pcie_error_reporting (pdev);pci_release_regions (pdev); err_out_disable_pdev:
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c +13 -2
@@ -26,7 +26,7 @@ static int rmnet_is_real_dev_registered(const struct net_device *real_dev) }/* Needs rtnl lock */ -static struct rmnet_port * +struct rmnet_port *rmnet_get_port_rtnl (const struct net_device *real_dev) {return rtnl_dereference (real_dev->rx_handler_data);
@@ -253,7 +253,10 @@ static int rmnet_config_notify_cb(struct notifier_block *nb,netdev_dbg (real_dev,"Kernel unregister\n" );rmnet_force_unassociate_device (real_dev);break ; - +case NETDEV_CHANGEMTU : +if (rmnet_vnd_validate_real_dev_mtu (real_dev)) +return NOTIFY_BAD ; +break ;default :break ; }
@@ -329,9 +332,17 @@ static int rmnet_changelink(struct net_device *dev, struct nlattr *tb[],if (data[IFLA_RMNET_FLAGS ]) {struct ifla_rmnet_flags *flags; +u32 old_data_format; + old_data_format = port->data_format; flags =nla_data (data[IFLA_RMNET_FLAGS ]); port->data_format = flags->flags & flags->mask; + +if (rmnet_vnd_update_dev_mtu (port, real_dev)) { + port->data_format = old_data_format; +NL_SET_ERR_MSG_MOD (extack,"Invalid MTU on real dev" ); +return -EINVAL ; + } }return 0 ;
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.h +2 -0
@@ -73,4 +73,6 @@ int rmnet_add_bridge(struct net_device *rmnet_dev, struct netlink_ext_ack *extack);int rmnet_del_bridge (struct net_device *rmnet_dev,struct net_device *slave_dev); +struct rmnet_port * +rmnet_get_port_rtnl (const struct net_device *real_dev);#endif /* _RMNET_CONFIG_H_ */
drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c +80 -9
128 lines not on this page · raw message
drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.h +3 -0
@@ -18,4 +18,7 @@ int rmnet_vnd_dellink(u8 id, struct rmnet_port *port,void rmnet_vnd_rx_fixup (struct sk_buff *skb,struct net_device *dev);void rmnet_vnd_tx_fixup (struct sk_buff *skb,struct net_device *dev);void rmnet_vnd_setup (struct net_device *dev); +int rmnet_vnd_validate_real_dev_mtu (struct net_device *real_dev); +int rmnet_vnd_update_dev_mtu (struct rmnet_port *port, +struct net_device *real_dev);#endif /* _RMNET_VND_H_ */
drivers/net/ethernet/stmicro/stmmac/dwmac1000.h +4 -4
@@ -76,10 +76,10 @@ enum power_event {#define LPI_CTRL_STATUS_TLPIEN 0x00000001/* Transmit LPI Entry */ /* GMAC HW ADDR regs */ -#define GMAC_ADDR_HIGH (reg) (((reg > 15) ? 0x00000800 : 0x00000040) + \ - (reg * 8)) -#define GMAC_ADDR_LOW (reg) (((reg > 15) ? 0x00000804 : 0x00000044) + \ - (reg * 8)) +#define GMAC_ADDR_HIGH (reg) ((reg > 15) ? 0x00000800 + (reg - 16) * 8 : \ + 0x00000040 + (reg * 8)) +#define GMAC_ADDR_LOW (reg) ((reg > 15) ? 0x00000804 + (reg - 16) * 8 : \ + 0x00000044 + (reg * 8))#define GMAC_MAX_PERFECT_ADDRESSES 1#define GMAC_PCS_BASE 0x000000c0/* PCS register base */
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +2 -0
@@ -626,6 +626,8 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)void stmmac_remove_config_dt (struct platform_device *pdev,struct plat_stmmacenet_data *plat) { +clk_disable_unprepare (plat->stmmac_clk); +clk_disable_unprepare (plat->pclk);of_node_put (plat->phy_node);of_node_put (plat->mdio_node); }
drivers/net/ethernet/xilinx/ll_temac_main.c +6 -2
@@ -849,7 +849,7 @@ temac_start_xmit(struct sk_buff *skb, struct net_device *ndev)smp_mb ();/* Space might have just been freed - check again */ -if (temac_check_tx_bd_space (lp, num_frag)) +if (temac_check_tx_bd_space (lp, num_frag +1 ))return NETDEV_TX_BUSY ;netif_wake_queue (ndev);
@@ -876,7 +876,6 @@ temac_start_xmit(struct sk_buff *skb, struct net_device *ndev)return NETDEV_TX_OK ; } cur_p->phys =cpu_to_be32 (skb_dma_addr); -ptr_to_txbd ((void *)skb, cur_p);for (ii =0 ; ii < num_frag; ii++) {if (++lp->tx_bd_tail >= lp->tx_bd_num)
@@ -915,6 +914,11 @@ temac_start_xmit(struct sk_buff *skb, struct net_device *ndev) } cur_p->app0 |=cpu_to_be32 (STS_CTRL_APP0_EOP ); +/* Mark last fragment with skb address, so it can be consumed +* in temac_start_xmit_done() +*/ +ptr_to_txbd ((void *)skb, cur_p); + tail_p = lp->tx_bd_p +sizeof (*lp->tx_bd_v) * lp->tx_bd_tail; lp->tx_bd_tail++;if (lp->tx_bd_tail >= lp->tx_bd_num)
drivers/net/hamradio/mkiss.c +1 -0
@@ -799,6 +799,7 @@ static void mkiss_close(struct tty_struct *tty) ax->tty =NULL ;unregister_netdev (ax->dev); +free_netdev (ax->dev); }/* Perform I/O control on an active ax25 channel. */
drivers/net/usb/cdc_eem.c +1 -1
@@ -123,10 +123,10 @@ static struct sk_buff *eem_tx_fixup(struct usbnet *dev, struct sk_buff *skb, } skb2 =skb_copy_expand (skb,EEM_HEAD ,ETH_FCS_LEN + padlen, flags); +dev_kfree_skb_any (skb);if (!skb2)return NULL ; -dev_kfree_skb_any (skb); skb = skb2; done:
drivers/net/usb/cdc_ncm.c +1 -1
@@ -1900,7 +1900,7 @@ static void cdc_ncm_status(struct usbnet *dev, struct urb *urb)static const struct driver_info cdc_ncm_info = { .description ="CDC NCM" , .flags =FLAG_POINTTOPOINT |FLAG_NO_SETINT |FLAG_MULTI_PACKET - |FLAG_LINK_INTR , + |FLAG_LINK_INTR |FLAG_ETHER , .bind = cdc_ncm_bind, .unbind = cdc_ncm_unbind, .manage_power = usbnet_manage_power,
drivers/net/usb/smsc75xx.c +6 -4
@@ -1483,7 +1483,7 @@ static int smsc75xx_bind(struct usbnet *dev, struct usb_interface *intf) ret =smsc75xx_wait_ready (dev,0 );if (ret <0 ) {netdev_warn (dev->net,"device not ready in smsc75xx_bind\n" ); - goto err; + goto free_pdata; }smsc75xx_init_mac_address (dev);
@@ -1492,7 +1492,7 @@ static int smsc75xx_bind(struct usbnet *dev, struct usb_interface *intf) ret =smsc75xx_reset (dev);if (ret <0 ) {netdev_warn (dev->net,"smsc75xx_reset error %d\n" , ret); - goto err; + goto cancel_work; } dev->net->netdev_ops = &smsc75xx_netdev_ops;
@@ -1503,8 +1503,11 @@ static int smsc75xx_bind(struct usbnet *dev, struct usb_interface *intf) dev->net->max_mtu =MAX_SINGLE_PACKET_SIZE ;return 0 ; -err: +cancel_work: +cancel_work_sync (&pdata->set_multicast); +free_pdata:kfree (pdata); + dev->data[0 ] =0 ;return ret; }
@@ -1515,7 +1518,6 @@ static void smsc75xx_unbind(struct usbnet *dev, struct usb_interface *intf)cancel_work_sync (&pdata->set_multicast);netif_dbg (dev, ifdown, dev->net,"free pdata\n" );kfree (pdata); - pdata =NULL ; dev->data[0 ] =0 ; } }
drivers/net/vrf.c +2 -4
@@ -1184,9 +1184,6 @@ static int vrf_dev_init(struct net_device *dev) dev->flags =IFF_MASTER |IFF_NOARP ; -/* MTU is irrelevant for VRF device; set to 64k similar to lo */ - dev->mtu =64 *1024 ; -/* similarly, oper state is irrelevant; set to up to avoid confusion */ dev->operstate =IF_OPER_UP ;netdev_lockdep_set_classes (dev);
@@ -1620,7 +1617,8 @@ static void vrf_setup(struct net_device *dev)* which breaks networking. */ dev->min_mtu =IPV6_MIN_MTU ; - dev->max_mtu =ETH_MAX_MTU ; + dev->max_mtu =IP6_MAX_MTU ; + dev->mtu = dev->max_mtu; } static int vrf_validate(struct nlattr *tb[], struct nlattr *data[],
drivers/pci/controller/pci-aardvark.c +40 -9
85 lines not on this page · raw message
drivers/pci/quirks.c +89 -0
119 lines not on this page · raw message
drivers/phy/mediatek/phy-mtk-tphy.c +2 -0
@@ -949,6 +949,8 @@ static int mtk_phy_init(struct phy *phy)break ;default :dev_err (tphy->dev,"incompatible PHY type\n" ); +clk_disable_unprepare (instance->ref_clk); +clk_disable_unprepare (instance->da_ref_clk);return -EINVAL ; }
drivers/platform/x86/thinkpad_acpi.c +1 -0
@@ -8806,6 +8806,7 @@ static const struct tpacpi_quirk fan_quirk_table[] __initconst = {TPACPI_Q_LNV3 ('N' ,'2' ,'O' ,TPACPI_FAN_2CTL ),/* P1 / X1 Extreme (2nd gen) */ TPACPI_Q_LNV3 ('N' ,'2' ,'V' ,TPACPI_FAN_2CTL ),/* P1 / X1 Extreme (3nd gen) */ TPACPI_Q_LNV3 ('N' ,'3' ,'0' ,TPACPI_FAN_2CTL ),/* P15 (1st gen) / P15v (1st gen) */ + TPACPI_Q_LNV3('N', '3', '2', TPACPI_FAN_2CTL), /* X1 Carbon (9th gen) */ };static int __init fan_init (struct ibm_init_struct *iibm)
drivers/ptp/ptp_clock.c +3 -3
@@ -63,7 +63,7 @@ static void enqueue_external_timestamp(struct timestamp_event_queue *queue,spin_unlock_irqrestore (&queue->lock, flags); } -s32 scaled_ppm_to_ppb (long ppm) +long scaled_ppm_to_ppb (long ppm) {/* * The 'freq' field in the 'struct timex' is in parts per
@@ -80,7 +80,7 @@ s32 scaled_ppm_to_ppb(long ppm)s64 ppb =1 + ppm; ppb *=125 ; ppb >>=13 ; -return (s32 ) ppb; +return (long ) ppb; }EXPORT_SYMBOL (scaled_ppm_to_ppb);
@@ -138,7 +138,7 @@ static int ptp_clock_adjtime(struct posix_clock *pc, struct __kernel_timex *tx) delta =ktime_to_ns (kt); err = ops->adjtime (ops, delta); }else if (tx->modes &ADJ_FREQUENCY ) { -s32 ppb =scaled_ppm_to_ppb (tx->freq); +long ppb =scaled_ppm_to_ppb (tx->freq);if (ppb > ops->max_adj || ppb < -ops->max_adj)return -ERANGE ;if (ops->adjfine)
drivers/regulator/cros-ec-regulator.c +2 -1
@@ -225,8 +225,9 @@ static int cros_ec_regulator_probe(struct platform_device *pdev) drvdata->dev =devm_regulator_register (dev, &drvdata->desc, &cfg);if (IS_ERR (drvdata->dev)) { + ret =PTR_ERR (drvdata->dev);dev_err (&pdev->dev,"Failed to register regulator: %d\n" , ret); -return PTR_ERR (drvdata->dev); +return ret; }platform_set_drvdata (pdev, drvdata);
drivers/regulator/rt4801-regulator.c +2 -2
@@ -66,7 +66,7 @@ static int rt4801_enable(struct regulator_dev *rdev)struct gpio_descs *gpios = priv->enable_gpios;int id =rdev_get_id (rdev), ret; -if (gpios->ndescs <= id) { +if (!gpios || gpios->ndescs <= id) {dev_warn (&rdev->dev,"no dedicated gpio can control\n" ); goto bypass_gpio; }
@@ -88,7 +88,7 @@ static int rt4801_disable(struct regulator_dev *rdev)struct gpio_descs *gpios = priv->enable_gpios;int id =rdev_get_id (rdev); -if (gpios->ndescs <= id) { +if (!gpios || gpios->ndescs <= id) {dev_warn (&rdev->dev,"no dedicated gpio can control\n" ); goto bypass_gpio; }
drivers/regulator/rtmv20-regulator.c +2 -0
@@ -27,6 +27,7 @@#define RTMV20_REG_LDIRQ 0x30#define RTMV20_REG_LDSTAT 0x40#define RTMV20_REG_LDMASK 0x50 +#define RTMV20_MAX_REGS (RTMV20_REG_LDMASK + 1)#define RTMV20_VID_MASK GENMASK(7, 4)#define RICHTEK_VID 0x80
@@ -313,6 +314,7 @@ static const struct regmap_config rtmv20_regmap_config = { .val_bits = 8, .cache_type = REGCACHE_RBTREE, .max_register = RTMV20_REG_LDMASK, + .num_reg_defaults_raw = RTMV20_MAX_REGS, .writeable_reg = rtmv20_is_accessible_reg, .readable_reg = rtmv20_is_accessible_reg,
drivers/s390/crypto/ap_queue.c +9 -2
@@ -135,12 +135,13 @@ static struct ap_queue_status ap_sm_recv(struct ap_queue *aq) {struct ap_queue_status status;struct ap_message *ap_msg; +bool found = false; status =ap_dqap (aq->qid, &aq->reply->psmid, aq->reply->msg, aq->reply->len);switch (status.response_code) {case AP_RESPONSE_NORMAL : - aq->queue_count--; + aq->queue_count =max_t (int,0 , aq->queue_count -1 );if (aq->queue_count >0 )mod_timer (&aq->timeout, jiffies + aq->request_timeout);
@@ -150,8 +151,14 @@ static struct ap_queue_status ap_sm_recv(struct ap_queue *aq)list_del_init (&ap_msg->list); aq->pendingq_count--; ap_msg->receive (aq, ap_msg, aq->reply); + found = true;break ; } +if (!found) { +AP_DBF_WARN ("%s unassociated reply psmid=0x%016llx on 0x%02x.%04x\n" , + __func__, aq->reply->psmid, +AP_QID_CARD (aq->qid),AP_QID_QUEUE (aq->qid)); + } fallthrough;case AP_RESPONSE_NO_PENDING_REPLY :if (!status.queue_empty || aq->queue_count <=0 )
@@ -232,7 +239,7 @@ static enum ap_sm_wait ap_sm_write(struct ap_queue *aq) ap_msg->flags & AP_MSG_FLAG_SPECIAL);switch (status.response_code) {case AP_RESPONSE_NORMAL : - aq->queue_count++; + aq->queue_count =max_t (int,1 , aq->queue_count +1 );if (aq->queue_count ==1 )mod_timer (&aq->timeout, jiffies + aq->request_timeout);list_move_tail (&ap_msg->list, &aq->pendingq);
drivers/spi/spi-stm32-qspi.c +4 -1
@@ -293,7 +293,7 @@ static int stm32_qspi_wait_cmd(struct stm32_qspi *qspi,int err =0 ;if (!op->data.nbytes) -return stm32_qspi_wait_nobusy (qspi); + goto wait_nobusy;if (readl_relaxed (qspi->io_base +QSPI_SR ) &SR_TCF ) goto out;
@@ -314,6 +314,9 @@ static int stm32_qspi_wait_cmd(struct stm32_qspi *qspi, out:/* clear flags */ writel_relaxed (FCR_CTCF |FCR_CTEF , qspi->io_base +QSPI_FCR ); +wait_nobusy: +if (!err) + err =stm32_qspi_wait_nobusy (qspi);return err; }
drivers/spi/spi-zynq-qspi.c +4 -3
@@ -678,14 +678,14 @@ static int zynq_qspi_probe(struct platform_device *pdev) xqspi->irq =platform_get_irq (pdev,0 );if (xqspi->irq <=0 ) { ret = -ENXIO ; - goto remove_master; + goto clk_dis_all; } ret =devm_request_irq (&pdev->dev, xqspi->irq, zynq_qspi_irq,0 , pdev->name, xqspi);if (ret !=0 ) { ret = -ENXIO ;dev_err (&pdev->dev,"request_irq failed\n" ); - goto remove_master; + goto clk_dis_all; } ret = of_property_read_u32(np, "num-cs",
@@ -693,8 +693,9 @@ static int zynq_qspi_probe(struct platform_device *pdev)if (ret <0 ) { ctlr->num_chipselect =1 ; }else if (num_cs >ZYNQ_QSPI_MAX_NUM_CS ) { + ret = -EINVAL ;dev_err (&pdev->dev,"only 2 chip selects are available\n" ); - goto remove_master; + goto clk_dis_all; }else { ctlr->num_chipselect = num_cs; }
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c +1 -1
@@ -127,7 +127,7 @@ static int rt2880_pmx_group_enable(struct pinctrl_dev *pctrldev,if (p->groups[group].enabled) {dev_err (p->dev,"%s is already enabled\n" , p->groups[group].name); -return -EBUSY ; +return 0 ; } p->groups[group].enabled =1 ;
drivers/usb/chipidea/usbmisc_imx.c +14 -2
@@ -686,6 +686,16 @@ static int imx7d_charger_secondary_detection(struct imx_usbmisc_data *data)int val;unsigned long flags; +/* Clear VDATSRCENB0 to disable VDP_SRC and IDM_SNK required by BC 1.2 spec */ +spin_lock_irqsave (&usbmisc->lock, flags); + val =readl (usbmisc->base +MX7D_USB_OTG_PHY_CFG2 ); + val &= ~MX7D_USB_OTG_PHY_CFG2_CHRG_VDATSRCENB0 ; +writel (val, usbmisc->base +MX7D_USB_OTG_PHY_CFG2 ); +spin_unlock_irqrestore (&usbmisc->lock, flags); + +/* TVDMSRC_DIS */ +msleep (20 ); +/* VDM_SRC is connected to D- and IDP_SINK is connected to D+ */ spin_lock_irqsave (&usbmisc->lock, flags); val =readl (usbmisc->base +MX7D_USB_OTG_PHY_CFG2 );
@@ -695,7 +705,8 @@ static int imx7d_charger_secondary_detection(struct imx_usbmisc_data *data) usbmisc->base + MX7D_USB_OTG_PHY_CFG2);spin_unlock_irqrestore (&usbmisc->lock, flags); -usleep_range (1000 ,2000 ); +/* TVDMSRC_ON */ +msleep (40 );/* * Per BC 1.2, check voltage of D+:
@@ -798,7 +809,8 @@ static int imx7d_charger_primary_detection(struct imx_usbmisc_data *data) usbmisc->base + MX7D_USB_OTG_PHY_CFG2);spin_unlock_irqrestore (&usbmisc->lock, flags); -usleep_range (1000 ,2000 ); +/* TVDPSRC_ON */ +msleep (40 );/* Check if D- is less than VDAT_REF to determine an SDP per BC 1.2 */ val =readl (usbmisc->base +MX7D_USB_OTG_PHY_STATUS );
drivers/usb/core/hub.c +7 -0
@@ -40,6 +40,8 @@#define USB_VENDOR_GENESYS_LOGIC 0x05e3#define USB_VENDOR_SMSC 0x0424#define USB_PRODUCT_USB5534B 0x5534 +#define USB_VENDOR_CYPRESS 0x04b4 +#define USB_PRODUCT_CY7C65632 0x6570#define HUB_QUIRK_CHECK_PORT_AUTOSUSPEND 0x01#define HUB_QUIRK_DISABLE_AUTOSUSPEND 0x02
@@ -5643,6 +5645,11 @@ static const struct usb_device_id hub_id_table[] = { .idProduct = USB_PRODUCT_USB5534B, .bInterfaceClass = USB_CLASS_HUB, .driver_info = HUB_QUIRK_DISABLE_AUTOSUSPEND}, + { .match_flags = USB_DEVICE_ID_MATCH_VENDOR + | USB_DEVICE_ID_MATCH_PRODUCT, + .idVendor = USB_VENDOR_CYPRESS, + .idProduct = USB_PRODUCT_CY7C65632, + .driver_info = HUB_QUIRK_DISABLE_AUTOSUSPEND}, { .match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_INT_CLASS, .idVendor = USB_VENDOR_GENESYS_LOGIC,
drivers/usb/dwc3/core.c +1 -1
@@ -1642,8 +1642,8 @@ static int dwc3_remove(struct platform_device *pdev)pm_runtime_get_sync (&pdev->dev); -dwc3_debugfs_exit (dwc);dwc3_core_exit_mode (dwc); +dwc3_debugfs_exit (dwc);dwc3_core_exit (dwc);dwc3_ulpi_exit (dwc);
drivers/usb/dwc3/debug.h +3 -0
@@ -413,9 +413,12 @@ static inline const char *dwc3_gadget_generic_cmd_status_string(int status)#ifdef CONFIG_DEBUG_FS +extern void dwc3_debugfs_create_endpoint_dir (struct dwc3_ep *dep);extern void dwc3_debugfs_init (struct dwc3 *d);extern void dwc3_debugfs_exit (struct dwc3 *d);#else +static inline void dwc3_debugfs_create_endpoint_dir (struct dwc3_ep *dep) +{ }static inline void dwc3_debugfs_init (struct dwc3 *d) { }static inline void dwc3_debugfs_exit (struct dwc3 *d)
drivers/usb/dwc3/debugfs.c +2 -19
@@ -890,30 +890,14 @@ static void dwc3_debugfs_create_endpoint_files(struct dwc3_ep *dep, } } -static void dwc3_debugfs_create_endpoint_dir (struct dwc3_ep *dep, -struct dentry *parent) +void dwc3_debugfs_create_endpoint_dir (struct dwc3_ep *dep) {struct dentry *dir; - dir =debugfs_create_dir (dep->name, parent); + dir =debugfs_create_dir (dep->name, dep->dwc->root);dwc3_debugfs_create_endpoint_files (dep, dir); } -static void dwc3_debugfs_create_endpoint_dirs (struct dwc3 *dwc, -struct dentry *parent) -{ -int i; - -for (i =0 ; i < dwc->num_eps; i++) { -struct dwc3_ep *dep = dwc->eps[i]; - -if (!dep) -continue ; - -dwc3_debugfs_create_endpoint_dir (dep, parent); - } -} -void dwc3_debugfs_init (struct dwc3 *dwc) {struct dentry *root;
@@ -944,7 +928,6 @@ void dwc3_debugfs_init(struct dwc3 *dwc) &dwc3_testmode_fops);debugfs_create_file ("link_state" ,0644 , root, dwc, &dwc3_link_state_fops); -dwc3_debugfs_create_endpoint_dirs (dwc, root); } }
drivers/usb/dwc3/gadget.c +3 -0
@@ -2664,6 +2664,8 @@ static int dwc3_gadget_init_endpoint(struct dwc3 *dwc, u8 epnum)INIT_LIST_HEAD (&dep->started_list);INIT_LIST_HEAD (&dep->cancelled_list); +dwc3_debugfs_create_endpoint_dir (dep); +return 0 ; }
@@ -2707,6 +2709,7 @@ static void dwc3_gadget_free_endpoints(struct dwc3 *dwc)list_del (&dep->endpoint.ep_list); } +debugfs_remove_recursive (debugfs_lookup (dep->name, dwc->root));kfree (dep); } }
fs/afs/main.c +2 -2
@@ -203,8 +203,8 @@ static int __init afs_init(void) goto error_fs; afs_proc_symlink =proc_symlink ("fs/afs" ,NULL ,"../self/net/afs" ); -if (IS_ERR (afs_proc_symlink)) { - ret =PTR_ERR (afs_proc_symlink); +if (!afs_proc_symlink) { + ret = -ENOMEM ; goto error_proc; }
fs/notify/fanotify/fanotify_user.c +2 -2
@@ -378,7 +378,7 @@ static ssize_t copy_event_to_user(struct fsnotify_group *group, info_type,fanotify_info_name (info), info->name_len, buf, count);if (ret <0 ) -return ret; + goto out_close_fd; buf += ret; count -= ret;
@@ -426,7 +426,7 @@ static ssize_t copy_event_to_user(struct fsnotify_group *group,fanotify_event_object_fh (event), info_type, dot, dot_len, buf, count);if (ret <0 ) -return ret; + goto out_close_fd; buf += ret; count -= ret;
include/linux/mfd/rohm-bd70528.h +1 -3
@@ -26,9 +26,7 @@ struct bd70528_data {struct mutex rtc_timer_lock; }; -#define BD70528_BUCK_VOLTS 17 -#define BD70528_BUCK_VOLTS 17 -#define BD70528_BUCK_VOLTS 17 +#define BD70528_BUCK_VOLTS 0x10#define BD70528_LDO_VOLTS 0x20#define BD70528_REG_BUCK1_EN 0x0F
include/linux/mlx5/transobj.h +1 -0
@@ -85,4 +85,5 @@ mlx5_core_hairpin_create(struct mlx5_core_dev *func_mdev, struct mlx5_hairpin_params *params);void mlx5_core_hairpin_destroy (struct mlx5_hairpin *pair); +void mlx5_core_hairpin_clear_dead_peer (struct mlx5_hairpin *hp);#endif /* __TRANSOBJ_H__ */
include/linux/mm_types.h +20 -7
@@ -448,13 +448,6 @@ struct mm_struct {*/ atomic_t has_pinned; -/** -* @write_protect_seq: Locked when any thread is write -* protecting pages mapped by this mm to enforce a later COW, -* for instance during page table copying for fork(). -*/ -seqcount_t write_protect_seq; -#ifdef CONFIG_MMU atomic_long_t pgtables_bytes;/* PTE page table pages */ #endif
@@ -463,6 +456,18 @@ struct mm_struct {spinlock_t page_table_lock;/* Protects page tables and some * counters */ +/* +* With some kernel config, the current mmap_lock's offset +* inside 'mm_struct' is at 0x120, which is very optimal, as +* its two hot fields 'count' and 'owner' sit in 2 different +* cachelines, and when mmap_lock is highly contended, both +* of the 2 fields will be accessed frequently, current layout +* will help to reduce cache bouncing. +* +* So please be careful with adding new fields before +* mmap_lock, which can easily push the 2 fields into one +* cacheline. +*/ struct rw_semaphore mmap_lock;struct list_head mmlist;/* List of maybe swapped mm's. These
@@ -483,7 +488,15 @@ struct mm_struct {unsigned long stack_vm;/* VM_STACK */ unsigned long def_flags; +/** +* @write_protect_seq: Locked when any thread is write +* protecting pages mapped by this mm to enforce a later COW, +* for instance during page table copying for fork(). +*/ +seqcount_t write_protect_seq; +spinlock_t arg_lock;/* protect the below fields */ +unsigned long start_code, end_code, start_data, end_data;unsigned long start_brk, brk, start_stack;unsigned long arg_start, arg_end, env_start, env_end;
include/linux/ptp_clock_kernel.h +1 -1
@@ -222,7 +222,7 @@ extern int ptp_clock_index(struct ptp_clock *ptp);* @ppm: Parts per million, but with a 16 bit binary fractional field */ -extern s32 scaled_ppm_to_ppb (long ppm); +extern long scaled_ppm_to_ppb (long ppm);/** * ptp_find_pin() - obtain the pin index of a given auxiliary function
include/linux/socket.h +0 -2
@@ -437,6 +437,4 @@ extern int __sys_getpeername(int fd, struct sockaddr __user *usockaddr,extern int __sys_socketpair (int family,int type,int protocol,int __user *usockvec);extern int __sys_shutdown (int fd,int how); - -extern struct ns_common *get_net_ns (struct ns_common *ns);#endif /* _LINUX_SOCKET_H */
include/linux/swapops.h +11 -4
@@ -23,6 +23,16 @@#define SWP_TYPE_SHIFT (BITS_PER_XA_VALUE - MAX_SWAPFILES_SHIFT)#define SWP_OFFSET_MASK ((1UL << SWP_TYPE_SHIFT) - 1) +/* Clear all flags but only keep swp_entry_t related information */ +static inline pte_t pte_swp_clear_flags (pte_t pte) +{ +if (pte_swp_soft_dirty (pte)) + pte =pte_swp_clear_soft_dirty (pte); +if (pte_swp_uffd_wp (pte)) + pte =pte_swp_clear_uffd_wp (pte); +return pte; +} +/* * Store a type+offset into a swp_entry_t in an arch-independent format */
@@ -66,10 +76,7 @@ static inline swp_entry_t pte_to_swp_entry(pte_t pte) {swp_entry_t arch_entry; -if (pte_swp_soft_dirty (pte)) - pte =pte_swp_clear_soft_dirty (pte); -if (pte_swp_uffd_wp (pte)) - pte =pte_swp_clear_uffd_wp (pte); + pte =pte_swp_clear_flags (pte); arch_entry =__pte_to_swp_entry (pte);return swp_entry (__swp_type (arch_entry),__swp_offset (arch_entry)); }
include/net/mac80211.h +6 -1
@@ -6335,7 +6335,12 @@ bool ieee80211_tx_prepare_skb(struct ieee80211_hw *hw,/** * ieee80211_parse_tx_radiotap - Sanity-check and parse the radiotap header -* of injected frames +* of injected frames. +* +* To accurately parse and take into account rate and retransmission fields, +* you must initialize the chandef field in the ieee80211_tx_info structure +* of the skb before calling this function. +* * @skb: packet injected by userspace * @dev: the &struct device of this 802.11 device */
include/net/net_namespace.h +7 -0
@@ -203,6 +203,8 @@ struct net *copy_net_ns(unsigned long flags, struct user_namespace *user_ns,void net_ns_get_ownership (const struct net *net,kuid_t *uid,kgid_t *gid);void net_ns_barrier (void ); + +struct ns_common *get_net_ns (struct ns_common *ns);#else /* CONFIG_NET_NS */ #include <linux/sched.h> #include <linux/nsproxy.h>
@@ -222,6 +224,11 @@ static inline void net_ns_get_ownership(const struct net *net, }static inline void net_ns_barrier (void ) {} + +static inline struct ns_common *get_net_ns (struct ns_common *ns) +{ +return ERR_PTR (-EINVAL ); +}#endif /* CONFIG_NET_NS */
include/uapi/linux/in.h +3 -0
@@ -289,6 +289,9 @@ struct sockaddr_in {/* Address indicating an error return. */ #define INADDR_NONE ((unsigned long int) 0xffffffff) +/* Dummy address for src of ICMP replies if no real address is set (RFC7600). */ +#define INADDR_DUMMY ((unsigned long int) 0xc0000008) +/* Network number for local host loopback. */ #define IN_LOOPBACKNET 127
kernel/bpf/verifier.c +61 -7
126 lines not on this page · raw message
kernel/crash_core.c +1 -0
@@ -463,6 +463,7 @@ static int __init crash_save_vmcoreinfo_init(void)VMCOREINFO_LENGTH (mem_section,NR_SECTION_ROOTS );VMCOREINFO_STRUCT_SIZE (mem_section);VMCOREINFO_OFFSET (mem_section, section_mem_map); +VMCOREINFO_NUMBER (SECTION_SIZE_BITS );VMCOREINFO_NUMBER (MAX_PHYSMEM_BITS );#endif VMCOREINFO_STRUCT_SIZE (page);
kernel/sched/fair.c +8 -2
@@ -3767,11 +3767,17 @@ static void attach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *s*/ static void detach_entity_load_avg (struct cfs_rq *cfs_rq,struct sched_entity *se) { +/* +* cfs_rq->avg.period_contrib can be used for both cfs_rq and se. +* See ___update_load_avg() for details. +*/ +u32 divider =get_pelt_divider (&cfs_rq->avg); +dequeue_load_avg (cfs_rq, se);sub_positive (&cfs_rq->avg.util_avg, se->avg.util_avg); -sub_positive (&cfs_rq->avg.util_sum, se->avg.util_sum); + cfs_rq->avg.util_sum = cfs_rq->avg.util_avg * divider;sub_positive (&cfs_rq->avg.runnable_avg, se->avg.runnable_avg); -sub_positive (&cfs_rq->avg.runnable_sum, se->avg.runnable_sum); + cfs_rq->avg.runnable_sum = cfs_rq->avg.runnable_avg * divider;add_tg_cfs_propagate (cfs_rq, -se->avg.load_sum);
kernel/trace/trace.c +0 -11
@@ -2195,9 +2195,6 @@ struct saved_cmdlines_buffer { };static struct saved_cmdlines_buffer *savedcmd; -/* temporary disable recording */ -static atomic_t trace_record_taskinfo_disabled__read_mostly ; -static inline char *get_saved_cmdlines (int idx) {return &savedcmd->saved_cmdlines[idx *TASK_COMM_LEN ];
@@ -2483,8 +2480,6 @@ static bool tracing_record_taskinfo_skip(int flags) {if (unlikely (!(flags & (TRACE_RECORD_CMDLINE |TRACE_RECORD_TGID ))))return true; -if (atomic_read (&trace_record_taskinfo_disabled) || !tracing_is_on ()) -return true;if (!__this_cpu_read (trace_taskinfo_save))return true;return false;
@@ -3685,9 +3680,6 @@ static void *s_start(struct seq_file *m, loff_t *pos)return ERR_PTR (-EBUSY );#endif -if (!iter->snapshot) -atomic_inc (&trace_record_taskinfo_disabled); -if (*pos != iter->pos) { iter->ent =NULL ; iter->cpu =0 ;
@@ -3730,9 +3722,6 @@ static void s_stop(struct seq_file *m, void *p)return ;#endif -if (!iter->snapshot) -atomic_dec (&trace_record_taskinfo_disabled); -trace_access_unlock (iter->cpu_file);trace_event_read_unlock (); }
kernel/trace/trace_clock.c +3 -3
@@ -115,9 +115,9 @@ u64 notrace trace_clock_global(void) prev_time =READ_ONCE (trace_clock_struct.prev_time); now =sched_clock_cpu (this_cpu); -/* Make sure that now is always greater than prev_time */ +/* Make sure that now is always greater than or equal to prev_time */ if ((s64)(now - prev_time) <0 ) - now = prev_time +1 ; + now = prev_time;/* * If in an NMI context then dont risk lockups and simply return
@@ -131,7 +131,7 @@ u64 notrace trace_clock_global(void)/* Reread prev_time in case it was already updated */ prev_time =READ_ONCE (trace_clock_struct.prev_time);if ((s64)(now - prev_time) <0 ) - now = prev_time +1 ; + now = prev_time; trace_clock_struct.prev_time = now;
mm/memory-failure.c +6 -1
@@ -1445,7 +1445,12 @@ int memory_failure(unsigned long pfn, int flags)return 0 ; } -if (!PageTransTail (p) && !PageLRU (p)) +/* +* __munlock_pagevec may clear a writeback page's LRU flag without +* page_lock. We need wait writeback completion for this page or it +* may trigger vfs BUG while evict inode. +*/ +if (!PageTransTail (p) && !PageLRU (p) && !PageWriteback (p)) goto identify_page_state;/*
mm/slab_common.c +1 -2
@@ -87,8 +87,7 @@ EXPORT_SYMBOL(kmem_cache_size);#ifdef CONFIG_DEBUG_VM static int kmem_cache_sanity_check (const char *name,unsigned int size) { -if (!name ||in_interrupt () || size <sizeof (void *) || - size >KMALLOC_MAX_SIZE ) { +if (!name ||in_interrupt () || size >KMALLOC_MAX_SIZE ) {pr_err ("kmem_cache_create(%s) integrity check failed\n" , name);return -EINVAL ; }
mm/slub.c +16 -21
@@ -15,6 +15,7 @@#include <linux/module.h> #include <linux/bit_spinlock.h> #include <linux/interrupt.h> +#include <linux/swab.h> #include <linux/bitops.h> #include <linux/slab.h> #include "slab.h"
@@ -698,15 +699,15 @@ static void print_trailer(struct kmem_cache *s, struct page *page, u8 *p) p, p - addr, get_freepointer(s, p));if (s->flags &SLAB_RED_ZONE ) -print_section (KERN_ERR ,"Redzone " , p - s->red_left_pad, +print_section (KERN_ERR ,"Redzone " , p - s->red_left_pad, s->red_left_pad);else if (p > addr +16 )print_section (KERN_ERR ,"Bytes b4 " , p -16 ,16 ); -print_section (KERN_ERR ,"Object " , p, +print_section (KERN_ERR ,"Object " , p, min_t(unsigned int, s->object_size, PAGE_SIZE));if (s->flags &SLAB_RED_ZONE ) -print_section (KERN_ERR ,"Redzone " , p + s->object_size, +print_section (KERN_ERR ,"Redzone " , p + s->object_size, s->inuse - s->object_size); off =get_info_end (s);
@@ -718,7 +719,7 @@ static void print_trailer(struct kmem_cache *s, struct page *page, u8 *p)if (off !=size_from_object (s))/* Beginning of the filler is the free pointer */ -print_section (KERN_ERR ,"Padding " , p + off, +print_section (KERN_ERR ,"Padding " , p + off,size_from_object (s) - off);dump_stack ();
@@ -895,11 +896,11 @@ static int check_object(struct kmem_cache *s, struct page *page,u8 *endobject = object + s->object_size;if (s->flags &SLAB_RED_ZONE ) { -if (!check_bytes_and_report (s, page, object,"Redzone" , +if (!check_bytes_and_report (s, page, object,"Left Redzone" , object - s->red_left_pad, val, s->red_left_pad))return 0 ; -if (!check_bytes_and_report (s, page, object,"Redzone" , +if (!check_bytes_and_report (s, page, object,"Right Redzone" , endobject, val, s->inuse - s->object_size))return 0 ; }else {
@@ -914,7 +915,7 @@ static int check_object(struct kmem_cache *s, struct page *page,if (val !=SLUB_RED_ACTIVE && (s->flags & __OBJECT_POISON) && (!check_bytes_and_report (s, page, p,"Poison" , p,POISON_FREE , s->object_size -1 ) || - !check_bytes_and_report (s, page, p,"Poison" , + !check_bytes_and_report (s, page, p,"End Poison" , p + s->object_size -1 ,POISON_END ,1 )))return 0 ;/*
@@ -3639,7 +3640,6 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order) {slab_flags_t flags = s->flags;unsigned int size = s->object_size; -unsigned int freepointer_area;unsigned int order;/*
@@ -3648,13 +3648,6 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order)* the possible location of the free pointer. */ size =ALIGN (size,sizeof (void *)); -/* -* This is the area of the object where a freepointer can be -* safely written. If redzoning adds more to the inuse size, we -* can't use that portion for writing the freepointer, so -* s->offset must be limited within this for the general case. -*/ - freepointer_area = size;#ifdef CONFIG_SLUB_DEBUG /*
@@ -3680,19 +3673,21 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order)/* * With that we have determined the number of bytes in actual use -* by the object. This is the potential offset to the free pointer. +* by the object and redzoning. */ s->inuse = size; -if (((flags & (SLAB_TYPESAFE_BY_RCU |SLAB_POISON )) || - s->ctor)) { +if ((flags & (SLAB_TYPESAFE_BY_RCU |SLAB_POISON )) || + ((flags &SLAB_RED_ZONE ) && s->object_size <sizeof (void *)) || + s->ctor) {/* * Relocate free pointer after the object if it is not * permitted to overwrite the first word of the object on * kmem_cache_free. * * This is the case if we do RCU, have a constructor or -* destructor or are poisoning the objects. +* destructor, are poisoning the objects, or are +* redzoning an object smaller than sizeof(void *). * * The assumption that s->offset >= s->inuse means free * pointer is outside of the object is used in the
@@ -3701,13 +3696,13 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order)*/ s->offset = size; size +=sizeof (void *); - }else if (freepointer_area >sizeof (void *)) { + }else {/* * Store freelist pointer near middle of object to keep * it away from the edges of the object to avoid small * sized over/underflows from neighboring allocations. */ - s->offset =ALIGN (freepointer_area /2 ,sizeof (void *)); + s->offset =ALIGN_DOWN (s->object_size /2 ,sizeof (void *)); }#ifdef CONFIG_SLUB_DEBUG
mm/swapfile.c +1 -1
@@ -1903,7 +1903,7 @@ unsigned int count_swap_pages(int type, int free)static inline int pte_same_as_swp (pte_t pte,pte_t swp_pte) { -return pte_same (pte_swp_clear_soft_dirty (pte), swp_pte); +return pte_same (pte_swp_clear_flags (pte), swp_pte); }/*
net/batman-adv/bat_iv_ogm.c +3 -1
@@ -410,8 +410,10 @@ static void batadv_iv_ogm_emit(struct batadv_forw_packet *forw_packet)if (WARN_ON (!forw_packet->if_outgoing))return ; -if (WARN_ON (forw_packet->if_outgoing->soft_iface != soft_iface)) +if (forw_packet->if_outgoing->soft_iface != soft_iface) { +pr_warn ("%s: soft interface switch for queued OGM\n" , __func__);return ; + }if (forw_packet->if_incoming->if_status !=BATADV_IF_ACTIVE )return ;
net/bridge/br_private.h +2 -2
@@ -98,8 +98,8 @@ struct br_vlan_stats { };struct br_tunnel_info { -__be64 tunnel_id; -struct metadata_dst *tunnel_dst; +__be64 tunnel_id; +struct metadata_dst __rcu *tunnel_dst; };/* private vlan flags */
net/bridge/br_vlan_tunnel.c +24 -14
@@ -41,26 +41,33 @@ static struct net_bridge_vlan *br_vlan_tunnel_lookup(struct rhashtable *tbl, br_vlan_tunnel_rht_params); } +static void vlan_tunnel_info_release (struct net_bridge_vlan *vlan) +{ +struct metadata_dst *tdst =rtnl_dereference (vlan->tinfo.tunnel_dst); + +WRITE_ONCE (vlan->tinfo.tunnel_id,0 ); +RCU_INIT_POINTER (vlan->tinfo.tunnel_dst,NULL ); +dst_release (&tdst->dst); +} +void vlan_tunnel_info_del (struct net_bridge_vlan_group *vg,struct net_bridge_vlan *vlan) { -if (!vlan->tinfo.tunnel_dst) +if (!rcu_access_pointer (vlan->tinfo.tunnel_dst))return ;rhashtable_remove_fast (&vg->tunnel_hash, &vlan->tnode, br_vlan_tunnel_rht_params); - vlan->tinfo.tunnel_id =0 ; -dst_release (&vlan->tinfo.tunnel_dst->dst); - vlan->tinfo.tunnel_dst =NULL ; +vlan_tunnel_info_release (vlan); }static int __vlan_tunnel_info_add (struct net_bridge_vlan_group *vg,struct net_bridge_vlan *vlan,u32 tun_id) { -struct metadata_dst *metadata =NULL ; +struct metadata_dst *metadata =rtnl_dereference (vlan->tinfo.tunnel_dst);__be64 key =key32_to_tunnel_id (cpu_to_be32 (tun_id));int err; -if (vlan->tinfo.tunnel_dst) +if (metadata)return -EEXIST ; metadata = __ip_tun_set_dst(0, 0, 0, 0, 0, TUNNEL_KEY,
@@ -69,8 +76,8 @@ static int __vlan_tunnel_info_add(struct net_bridge_vlan_group *vg,return -EINVAL ; metadata->u.tun_info.mode |=IP_TUNNEL_INFO_TX |IP_TUNNEL_INFO_BRIDGE ; - vlan->tinfo.tunnel_dst = metadata; - vlan->tinfo.tunnel_id = key; +rcu_assign_pointer (vlan->tinfo.tunnel_dst, metadata); +WRITE_ONCE (vlan->tinfo.tunnel_id, key); err =rhashtable_lookup_insert_fast (&vg->tunnel_hash, &vlan->tnode, br_vlan_tunnel_rht_params);
@@ -79,9 +86,7 @@ static int __vlan_tunnel_info_add(struct net_bridge_vlan_group *vg,return 0 ; out: -dst_release (&vlan->tinfo.tunnel_dst->dst); - vlan->tinfo.tunnel_dst =NULL ; - vlan->tinfo.tunnel_id =0 ; +vlan_tunnel_info_release (vlan);return err; }
@@ -182,12 +187,15 @@ int br_handle_ingress_vlan_tunnel(struct sk_buff *skb,int br_handle_egress_vlan_tunnel (struct sk_buff *skb,struct net_bridge_vlan *vlan) { +struct metadata_dst *tunnel_dst; +__be64 tunnel_id;int err; -if (!vlan || !vlan->tinfo.tunnel_id) +if (!vlan)return 0 ; -if (unlikely (!skb_vlan_tag_present (skb))) + tunnel_id =READ_ONCE (vlan->tinfo.tunnel_id); +if (!tunnel_id ||unlikely (!skb_vlan_tag_present (skb)))return 0 ;skb_dst_drop (skb);
@@ -195,7 +203,9 @@ int br_handle_egress_vlan_tunnel(struct sk_buff *skb,if (err)return err; -skb_dst_set (skb,dst_clone (&vlan->tinfo.tunnel_dst->dst)); + tunnel_dst =rcu_dereference (vlan->tinfo.tunnel_dst); +if (tunnel_dst &&dst_hold_safe (&tunnel_dst->dst)) +skb_dst_set (skb, &tunnel_dst->dst);return 0 ; }
net/can/bcm.c +49 -13
112 lines not on this page · raw message
net/can/isotp.c +48 -13
61 lines not on this page · raw message
net/can/j1939/transport.c +40 -14
54 lines not on this page · raw message
net/can/raw.c +48 -14
62 lines not on this page · raw message
net/mac80211/tx.c +36 -16
52 lines not on this page · raw message
sound/soc/qcom/lpass-cpu.c +79 -0
79 lines not on this page · raw message
tools/perf/trace/beauty/include/linux/socket.h +0 -2
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/fib_tests.sh +25 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/mptcp/mptcp_connect.sh +8 -3
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Samuel Zou
Tested-by Hulk RobotQuoted 4 lines · Greg Kroah-Hartman
I'm announcing the release of the 5.10.46 kernel.
All users of the 5.10 kernel series must upgrade.
Quoted 9 lines
The updated 5.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.gitlinux-5.10.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summarythanks,
greg k-h
Tested on arm64 and x86 for 5.10.46,
Kernel repo:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Branch: linux-5.10.y
Version: 5.10.46
Commit: 3de043c6851d7c604e0cabdf8e2aca7797952aa9
Compiler: gcc version 7.3.0 (GCC)
arm64:
--------------------------------------------------------------------
Testcase Result Summary:
total: 8906
passed: 8906
failed: 0
timeout: 0
--------------------------------------------------------------------
x86:
--------------------------------------------------------------------
Testcase Result Summary:
total: 8906
passed: 8906
failed: 0
timeout: 0
--------------------------------------------------------------------