Linux 5.10.127
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.10.127 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/ABI/testing/sysfs-bus-iio-vf610 | 2 Makefile | 4 arch/arm/boot/dts/imx6qdl.dtsi | 2 arch/arm/boot/dts/imx7s.dtsi | 2 arch/arm/mach-axxia/platsmp.c | 1 arch/arm/mach-cns3xxx/core.c | 2 arch/arm/mach-exynos/exynos.c | 1 arch/mips/vr41xx/common/icu.c | 2 arch/parisc/Kconfig | 1 arch/parisc/include/asm/fb.h | 2 arch/powerpc/kernel/process.c | 2 arch/powerpc/kernel/rtas.c | 11 + arch/powerpc/platforms/powernv/powernv.h | 2 arch/powerpc/platforms/powernv/rng.c | 52 ++++-- arch/powerpc/platforms/powernv/setup.c | 2 arch/powerpc/platforms/pseries/pseries.h | 2 arch/powerpc/platforms/pseries/rng.c | 11 - arch/powerpc/platforms/pseries/setup.c | 2 arch/s390/kernel/perf_cpum_cf.c | 22 ++ arch/x86/net/bpf_jit_comp.c | 3 arch/xtensa/kernel/time.c | 1 arch/xtensa/platforms/xtfpga/setup.c | 1 drivers/base/regmap/regmap-irq.c | 5 drivers/char/random.c | 6 drivers/dma-buf/udmabuf.c | 5 drivers/gpio/gpio-vr41xx.c | 2 drivers/gpio/gpio-winbond.c | 7 drivers/gpu/drm/msm/adreno/adreno_gpu.c | 3 drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 2 drivers/gpu/drm/msm/dp/dp_catalog.c | 2 drivers/gpu/drm/msm/dp/dp_catalog.h | 2 drivers/gpu/drm/msm/dp/dp_ctrl.c | 40 ++++ drivers/gpu/drm/msm/dp/dp_display.c | 149 +++++++++++------ drivers/gpu/drm/msm/dp/dp_panel.c | 5 drivers/gpu/drm/msm/msm_iommu.c | 2 drivers/gpu/drm/sun4i/sun4i_drv.c | 4 drivers/iio/accel/bma180.c | 3 drivers/iio/accel/mma8452.c | 22 +- drivers/iio/accel/mxc4005.c | 4 drivers/iio/adc/adi-axi-adc.c | 3 drivers/iio/adc/axp288_adc.c | 8 drivers/iio/adc/stm32-adc-core.c | 9 - drivers/iio/adc/stm32-adc.c | 10 - drivers/iio/chemical/ccs811.c | 4 drivers/iio/gyro/mpu3050-core.c | 1 drivers/iio/imu/inv_icm42600/inv_icm42600.h | 1 drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 2 drivers/iio/trigger/iio-trig-sysfs.c | 1 drivers/md/dm-era-target.c | 8 drivers/md/dm-log.c | 2 drivers/memory/samsung/exynos5422-dmc.c | 29 ++- drivers/mmc/host/sdhci-pci-o2micro.c | 2 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 2 drivers/net/bonding/bond_main.c | 4 drivers/net/ethernet/intel/ice/ice_ethtool.c | 39 ++++ drivers/net/ethernet/intel/igb/igb_main.c | 19 +- drivers/net/phy/aquantia_main.c | 15 + drivers/net/virtio_net.c | 25 -- drivers/nvme/host/core.c | 102 +++++++++--- drivers/nvme/host/lightnvm.c | 8 drivers/nvme/host/nvme.h | 2 drivers/nvme/host/pci.c | 21 -- drivers/nvme/target/passthru.c | 2 drivers/scsi/scsi_debug.c | 22 ++ drivers/soc/bcm/brcmstb/pm/pm-arm.c | 1 drivers/tty/vt/vt.c | 39 ---- drivers/tty/vt/vt_ioctl.c | 151 ------------------ drivers/usb/chipidea/udc.c | 3 drivers/usb/gadget/legacy/raw_gadget.c | 63 +++++-- drivers/usb/host/xhci-hub.c | 2 drivers/usb/host/xhci-pci.c | 6 drivers/usb/host/xhci.c | 15 + drivers/usb/host/xhci.h | 2 drivers/usb/serial/option.c | 6 drivers/usb/typec/tcpm/Kconfig | 1 drivers/video/console/sticore.c | 2 drivers/xen/features.c | 2 fs/afs/inode.c | 3 fs/btrfs/super.c | 39 +++- fs/f2fs/namei.c | 17 +- include/linux/kd.h | 8 include/linux/ratelimit_types.h | 12 - include/net/netfilter/nf_tables.h | 10 - include/net/netfilter/nf_tables_core.h | 12 - include/net/netfilter/nft_fib.h | 2 include/net/netfilter/nft_meta.h | 4 include/trace/events/libata.h | 1 net/bridge/netfilter/nft_meta_bridge.c | 5 net/core/filter.c | 34 +++- net/ipv4/ip_gre.c | 15 + net/ipv4/netfilter/nft_dup_ipv4.c | 18 +- net/ipv6/ip6_gre.c | 15 + net/ipv6/netfilter/nft_dup_ipv6.c | 18 +- net/netfilter/nf_tables_api.c | 52 +++++- net/netfilter/nft_bitwise.c | 23 +- net/netfilter/nft_byteorder.c | 14 - net/netfilter/nft_cmp.c | 8 net/netfilter/nft_ct.c | 12 - net/netfilter/nft_dup_netdev.c | 6 net/netfilter/nft_dynset.c | 12 - net/netfilter/nft_exthdr.c | 14 - net/netfilter/nft_fib.c | 5 net/netfilter/nft_fwd_netdev.c | 18 +- net/netfilter/nft_hash.c | 25 +- net/netfilter/nft_immediate.c | 6 net/netfilter/nft_lookup.c | 14 - net/netfilter/nft_masq.c | 18 -- net/netfilter/nft_meta.c | 21 -- net/netfilter/nft_nat.c | 35 +--- net/netfilter/nft_numgen.c | 27 +-- net/netfilter/nft_objref.c | 6 net/netfilter/nft_osf.c | 8 net/netfilter/nft_payload.c | 10 - net/netfilter/nft_queue.c | 12 - net/netfilter/nft_range.c | 6 net/netfilter/nft_redir.c | 18 -- net/netfilter/nft_rt.c | 7 net/netfilter/nft_socket.c | 7 net/netfilter/nft_tproxy.c | 14 - net/netfilter/nft_tunnel.c | 8 net/netfilter/nft_xfrm.c | 7 net/openvswitch/flow.c | 2 net/sched/sch_netem.c | 4 net/tipc/core.c | 7 net/tipc/core.h | 8 net/tipc/discover.c | 4 net/tipc/link.c | 5 net/tipc/link.h | 1 net/tipc/net.c | 15 - scripts/mod/modpost.c | 2 sound/pci/hda/hda_auto_parser.c | 7 sound/pci/hda/hda_local.h | 1 sound/pci/hda/patch_conexant.c | 4 sound/pci/hda/patch_realtek.c | 36 ++++ sound/pci/hda/patch_via.c | 4 tools/testing/selftests/netfilter/nft_concat_range.sh | 2 136 files changed, 999 insertions(+), 756 deletions(-)
Aidan MacDonald (1):
regmap-irq: Fix a bug in regmap_irq_enable() for type_in_mask chips
Alan Stern (2):
usb: gadget: Fix non-unique driver names in raw-gadget driver
USB: gadget: Fix double-free bug in raw_gadget driver
Alexander Stein (1):
ARM: dts: imx7: Move hsic_phy power domain to HSIC PHY node
Anatolii Gerasymenko (1):
ice: ethtool: advertise 1000M speeds properly
Andrew Donnellan (1):
powerpc/rtas: Allow ibm,platform-dump RTAS call with null buffer address
Andy Shevchenko (1):
usb: typec: wcove: Drop wrong dependency to INTEL_SOC_PMIC
Baruch Siach (1):
iio: adc: vf610: fix conversion mode sysfs node name
Carlo Lobrano (1):
USB: serial: option: add Telit LE910Cx 0x1250 composition
Chaitanya Kulkarni (4):
nvme: centralize setting the timeout in nvme_alloc_request
nvme: split nvme_alloc_request()
nvme: mark nvme_setup_passsthru() inline
nvme: don't check nvme_req flags for new req
Chevron Li (1):
mmc: sdhci-pci-o2micro: Fix card detect by dealing with debouncing
Christoph Hellwig (1):
nvme: move the Samsung X5 quirk entry to the core quirks
Claudiu Manoil (1):
phy: aquantia: Fix AN when higher speeds than 1G are not advertised
Damien Le Moal (1):
scsi: scsi_debug: Fix zone transition to full condition
Dan Carpenter (1):
gpio: winbond: Fix error code in winbond_gpio_get()
David Howells (1):
afs: Fix dynamic root getattr
David Sterba (1):
btrfs: add error messages to all unrecognized mount options
Dmitry Rokosov (3):
iio:chemical:ccs811: rearrange iio trigger get and register iio:accel:bma180: rearrange iio trigger get and register iio:accel:mxc4005: rearrange iio trigger get and register
Edward Wu (1):
ata: libata: add qc->flags in ata_qc_complete_template tracepoint
Enzo Matsumiya (1):
nvme-pci: add NO APST quirk for Kioxia device
Eric Dumazet (1):
erspan: do not assume transport header is always set
Florian Westphal (1):
netfilter: use get_random_u32 instead of prandom
Gerd Hoffmann (1):
udmabuf: add back sanity check
Greg Kroah-Hartman (1):
Linux 5.10.127
Haibo Chen (2):
iio: mma8452: fix probe fail when device tree compatible is used.
iio: accel: mma8452: ignore the return value of reset operation
Hans de Goede (1):
iio: adc: axp288: Override TS pin bias current for some models
Helge Deller (2):
parisc/stifb: Fix fb_is_primary_device() only available with CONFIG_FB_STI
parisc: Enable ARCH_HAS_STRICT_MODULE_RWX
Hoang Le (1):
tipc: fix use-after-free Read in tipc_named_reinit
Jaegeuk Kim (1):
f2fs: attach inline_data after setting compression
Jakub Kicinski (1):
Revert "net/tls: fix tls_sk_proto_close executed repeatedly"
Jakub Sitnicki (1):
bpf, x86: Fix tail call count offset calculation on bpf2bpf call
Jason A. Donenfeld (5):
random: schedule mix_interrupt_randomness() less often
random: quiet urandom warning ratelimit suppression message powerpc/powernv: wire up rng during setup_arch
random: update comment from copy_to_user() -> copy_to_iter() powerpc/pseries: wire up rng during setup_arch()
Jay Vosburgh (1):
bonding: ARP monitor spams NETDEV_NOTIFY_PEERS notifiers
Jean-Baptiste Maneyrol (1):
iio: imu: inv_icm42600: Fix broken icm42600 (chip id 0 value)
Jie2x Zhou (1):
selftests: netfilter: correct PKTGEN_SCRIPT_PATHS in nft_concat_range.sh
Jiri Slaby (1):
vt: drop old FONT ioctls
Jon Maxwell (1):
bpf: Fix request_sock leak in sk lookup helpers
Jonathan Marek (1):
drm/msm: use for_each_sgtable_sg to iterate over scatterlist
Julien Grall (1):
x86/xen: Remove undefined behavior in setup_features()
Kai-Heng Feng (1):
igb: Make DMA faster when CPU is active on the PCIe link
Kailang Yang (1):
ALSA: hda/realtek - ALC897 headset MIC no sound
Keith Busch (1):
nvme-pci: allocate nvme_command within driver pdu
Kuogee Hsieh (5):
drm/msm/dp: check core_initialized before disable interrupts at dp_display_unbind() drm/msm/dp: fixes wrong connection state caused by failure of link train drm/msm/dp: deinitialize mainlink if link training failed
drm/msm/dp: promote irq_hpd handle to handle link training correctly drm/msm/dp: fix connect/disconnect handled at irq_hpd
Liang He (2):
xtensa: xtfpga: Fix refcount leak bug in setup
xtensa: Fix refcount leak bug in time.c
Lorenzo Bianconi (1):
igb: fix a use-after-free issue in igb_clean_tx_ring
Lucas Stach (1):
ARM: dts: imx6qdl: correct PU regulator ramp delay
Macpaul Lin (1):
USB: serial: option: add Quectel RM500K module support
Masahiro Yamada (2):
modpost: fix section mismatch check for exported init/exit sections
kbuild: link vmlinux only once for CONFIG_TRIM_UNUSED_KSYMS (2nd attempt)
Mathias Nyman (1):
xhci: turn off port power in shutdown
Maximilian Luz (1):
drm/msm: Fix double pm_runtime_disable() call
Miaoqian Lin (7):
drm/msm/mdp4: Fix refcount leak in mdp4_modeset_init_intf
iio: adc: adi-axi-adc: Fix refcount leak in adi_axi_adc_attach_client
ARM: exynos: Fix refcount leak in exynos_map_pmu
soc: bcm: brcmstb: pm: pm-arm: Fix refcount leak in brcmstb_pm_probe
ARM: Fix refcount leak in axxia_boot_secondary
memory: samsung: exynos5422-dmc: Fix refcount leak in of_get_dram_timings
ARM: cns3xxx: Fix refcount leak in cns3xxx_init
Mikulas Patocka (1):
dm mirror log: clear log bits up to BITS_PER_LONG boundary
Naveen N. Rao (1):
powerpc: Enable execve syscall exit tracepoint
Nikos Tsironis (1):
dm era: commit metadata in postsuspend after worker stops
Olivier Moysan (1):
iio: adc: stm32: fix maximum clock rate for stm32mp15x
Pablo Neira Ayuso (2):
netfilter: nftables: add nft_parse_register_load() and use it
netfilter: nftables: add nft_parse_register_store() and use it
Peilin Ye (1):
net/sched: sch_netem: Fix arithmetic in netem_dump() for 32-bit platforms
Rosemarie O'Riorden (1):
net: openvswitch: fix parsing of nw_proto for IPv6 fragments
Samuel Holland (1):
drm/sun4i: Fix crash during suspend after component bind failure
Sascha Hauer (1):
mtd: rawnand: gpmi: Fix setting busy timeout setting
Soham Sen (1):
ALSA: hda/realtek: Add mute LED quirk for HP Omen laptop
Stephan Gerhold (1):
virtio_net: fix xdp_rxq_info bug after suspend/resume
Takashi Iwai (3):
ALSA: hda/via: Fix missing beep setup
ALSA: hda/conexant: Fix missing beep setup
ALSA: hda/realtek: Apply fixup for Lenovo Yoga Duet 7 properly
Tanveer Alam (1):
xhci-pci: Allow host runtime PM as default for Intel Raptor Lake xHCI
Thomas Richter (1):
s390/cpumf: Handle events cycles and instructions identical
Tim Crawford (2):
ALSA: hda/realtek: Add quirk for Clevo PD70PNT
ALSA: hda/realtek: Add quirk for Clevo NS50PU
Utkarsh Patel (1):
xhci-pci: Allow host runtime PM as default for Intel Meteor Lake xHCI
Vincent Whitchurch (1):
iio: trigger: sysfs: fix use-after-free on remove
Xin Long (1):
tipc: simplify the finalize work queue
Xu Yang (1):
usb: chipidea: udc: check request status before setting device address
Yannick Brosseau (2):
iio: adc: stm32: Fix ADCs iteration in irq handler
iio: adc: stm32: Fix IRQs on STM32F4 by removing custom spurious IRQs message
Yonglin Tan (1):
USB: serial: option: add Quectel EM05-G modem
Zheyu Ma (1):
iio: gyro: mpu3050: Fix the error handling in mpu3050_power_up()
Ziyang Xuan (1):
net/tls: fix tls_sk_proto_close executed repeatedly
huhai (1):
MIPS: Remove repetitive increase irq_err_count
Greg Kroah-Hartman
maintainerDocumentation/ABI/testing/sysfs-bus-iio-vf610 +1 -1
@@ -1,4 +1,4 @@ -What: /sys/bus/iio/devices/iio:deviceX/conversion_mode +What: /sys/bus/iio/devices/iio:deviceX/in_conversion_mode KernelVersion: 4.2 Contact: [email protected] Description:
Makefile +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 10 -SUBLEVEL = 126 +SUBLEVEL = 127 EXTRAVERSION = NAME = Dare mighty things
@@ -1156,7 +1156,7 @@ KBUILD_MODULES := 1 autoksyms_recursive: descend modules.order $(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh \ - "$(MAKE) -f $(srctree)/Makefile vmlinux" + "$(MAKE) -f $(srctree)/Makefile autoksyms_recursive" endif autoksyms_h := $(if $(CONFIG_TRIM_UNUSED_KSYMS), include/generated/autoksyms.h)
arch/arm/boot/dts/imx6qdl.dtsi +1 -1
@@ -756,7 +756,7 @@ reg_pu: regulator-vddpu { regulator-name = "vddpu"; regulator-min-microvolt = <725000>; regulator-max-microvolt = <1450000>; - regulator-enable-ramp-delay = <150>; + regulator-enable-ramp-delay = <380>; anatop-reg-offset = <0x140>; anatop-vol-bit-shift = <9>; anatop-vol-bit-width = <5>;
arch/arm/boot/dts/imx7s.dtsi +1 -1
@@ -102,6 +102,7 @@ usbphynop3: usbphynop3 { compatible = "usb-nop-xceiv"; clocks = <&clks IMX7D_USB_HSIC_ROOT_CLK>; clock-names = "main_clk"; + power-domains = <&pgc_hsic_phy>; #phy-cells = <0>; };
@@ -1104,7 +1105,6 @@ usbh: usb@30b30000 { compatible = "fsl,imx7d-usb", "fsl,imx27-usb"; reg = <0x30b30000 0x200>; interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; - power-domains = <&pgc_hsic_phy>; clocks = <&clks IMX7D_USB_CTRL_CLK>; fsl,usbphy = <&usbphynop3>; fsl,usbmisc = <&usbmisc3 0>;
arch/arm/mach-axxia/platsmp.c +1 -0
@@ -39,6 +39,7 @@ static int axxia_boot_secondary(unsigned int cpu, struct task_struct *idle)return -ENOENT ; syscon =of_iomap (syscon_np,0 ); +of_node_put (syscon_np);if (!syscon)return -ENOMEM ;
arch/arm/mach-cns3xxx/core.c +2 -0
@@ -372,6 +372,7 @@ static void __init cns3xxx_init(void)/* De-Asscer SATA Reset */ cns3xxx_pwr_soft_rst (CNS3XXX_PWR_SOFTWARE_RST (SATA )); } +of_node_put (dn); dn =of_find_compatible_node (NULL ,NULL ,"cavium,cns3420-sdhci" );if (of_device_is_available (dn)) {
@@ -385,6 +386,7 @@ static void __init cns3xxx_init(void)cns3xxx_pwr_clk_en (CNS3XXX_PWR_CLK_EN (SDIO ));cns3xxx_pwr_soft_rst (CNS3XXX_PWR_SOFTWARE_RST (SDIO )); } +of_node_put (dn); pm_power_off = cns3xxx_power_off;
arch/arm/mach-exynos/exynos.c +1 -0
@@ -149,6 +149,7 @@ static void exynos_map_pmu(void) np =of_find_matching_node (NULL , exynos_dt_pmu_match);if (np) pmu_base_addr =of_iomap (np,0 ); +of_node_put (np); }static void __init exynos_init_irq (void )
arch/mips/vr41xx/common/icu.c +0 -2
@@ -640,8 +640,6 @@ static int icu_get_irq(unsigned int irq)printk (KERN_ERR "spurious ICU interrupt: %04x,%04x\n" , pend1, pend2); -atomic_inc (&irq_err_count); -return -1 ; }
arch/parisc/Kconfig +1 -0
@@ -11,6 +11,7 @@ config PARISC select ARCH_WANT_FRAME_POINTERS select ARCH_HAS_ELF_RANDOMIZE select ARCH_HAS_STRICT_KERNEL_RWX + select ARCH_HAS_STRICT_MODULE_RWX select ARCH_HAS_UBSAN_SANITIZE_ALL select ARCH_NO_SG_CHAIN select ARCH_SUPPORTS_MEMORY_FAILURE
arch/parisc/include/asm/fb.h +1 -1
@@ -12,7 +12,7 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,pgprot_val (vma->vm_page_prot) |= _PAGE_NO_CACHE; } -#if defined(CONFIG_STI_CONSOLE ) || defined(CONFIG_FB_STI ) +#if defined(CONFIG_FB_STI )int fb_is_primary_device (struct fb_info *info);#else static inline int fb_is_primary_device (struct fb_info *info)
arch/powerpc/kernel/process.c +1 -1
@@ -1800,7 +1800,7 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)tm_reclaim_current (0 );#endif -memset (regs->gpr,0 ,sizeof (regs->gpr)); +memset (®s->gpr[1 ],0 ,sizeof (regs->gpr) -sizeof (regs->gpr[0 ])); regs->ctr =0 ; regs->link =0 ; regs->xer =0 ;
arch/powerpc/kernel/rtas.c +10 -1
@@ -1040,7 +1040,7 @@ static struct rtas_filter rtas_filters[] __ro_after_init = { { "get-time-of-day", -1, -1, -1, -1, -1 }, { "ibm,get-vpd", -1, 0, -1, 1, 2 }, { "ibm,lpar-perftools", -1, 2, 3, -1, -1 }, - { "ibm,platform-dump", -1, 4, 5, -1, -1 }, + { "ibm,platform-dump", -1, 4, 5, -1, -1 }, /* Special cased */ { "ibm,read-slot-reset-state", -1, -1, -1, -1, -1 }, { "ibm,scan-log-dump", -1, 0, 1, -1, -1 }, { "ibm,set-dynamic-indicator", -1, 2, -1, -1, -1 },
@@ -1087,6 +1087,15 @@ static bool block_rtas_call(int token, int nargs, size =1 ; end = base + size -1 ; + +/* +* Special case for ibm,platform-dump - NULL buffer +* address is used to indicate end of dump processing +*/ +if (!strcmp (f->name,"ibm,platform-dump" ) && + base ==0 ) +return false; +if (!in_rmo_buf (base, end)) goto err; }
arch/powerpc/platforms/powernv/powernv.h +2 -0
@@ -42,4 +42,6 @@ ssize_t memcons_copy(struct memcons *mc, char *to, loff_t pos, size_t count);u32 memcons_get_size (struct memcons *mc);struct memcons *memcons_init (struct device_node *node,const char *mc_prop_name); +void pnv_rng_init (void ); +#endif /* _POWERNV_H */
arch/powerpc/platforms/powernv/rng.c +36 -16
90 lines not on this page · raw message
arch/powerpc/platforms/powernv/setup.c +2 -0
@@ -193,6 +193,8 @@ static void __init pnv_setup_arch(void)pnv_check_guarded_cores ();/* XXX PMCS */ + +pnv_rng_init (); }static void __init pnv_init (void )
arch/powerpc/platforms/pseries/pseries.h +2 -0
@@ -114,4 +114,6 @@ int dlpar_workqueue_init(void);void pseries_setup_security_mitigations (void );void pseries_lpar_read_hblkrm_characteristics (void ); +void pseries_rng_init (void ); +#endif /* _PSERIES_PSERIES_H */
arch/powerpc/platforms/pseries/rng.c +3 -8
@@ -10,6 +10,7 @@#include <asm/archrandom.h> #include <asm/machdep.h> #include <asm/plpar_wrappers.h> +#include "pseries.h" static int pseries_get_random_long (unsigned long *v)
@@ -24,19 +25,13 @@ static int pseries_get_random_long(unsigned long *v)return 0 ; } -static __init int rng_init (void ) +void __init pseries_rng_init (void ) {struct device_node *dn; dn =of_find_compatible_node (NULL ,NULL ,"ibm,random" );if (!dn) -return -ENODEV ; - -pr_info ("Registering arch random hook.\n" ); - +return ; ppc_md.get_random_seed = pseries_get_random_long; -of_node_put (dn); -return 0 ; } -machine_subsys_initcall (pseries, rng_init);
arch/powerpc/platforms/pseries/setup.c +2 -0
@@ -824,6 +824,8 @@ static void __init pSeries_setup_arch(void)if (swiotlb_force ==SWIOTLB_FORCE ) ppc_swiotlb_enable =1 ; + +pseries_rng_init (); }static void pseries_panic (char *str)
arch/s390/kernel/perf_cpum_cf.c +21 -1
@@ -292,6 +292,26 @@ static int __hw_perf_event_init(struct perf_event *event, unsigned int type)return err; } +/* Events CPU_CYLCES and INSTRUCTIONS can be submitted with two different +* attribute::type values: +* - PERF_TYPE_HARDWARE: +* - pmu->type: +* Handle both type of invocations identical. They address the same hardware. +* The result is different when event modifiers exclude_kernel and/or +* exclude_user are also set. +*/ +static int cpumf_pmu_event_type (struct perf_event *event) +{ +u64 ev = event->attr.config; + +if (cpumf_generic_events_basic[PERF_COUNT_HW_CPU_CYCLES ] == ev || + cpumf_generic_events_basic[PERF_COUNT_HW_INSTRUCTIONS ] == ev || + cpumf_generic_events_user[PERF_COUNT_HW_CPU_CYCLES ] == ev || + cpumf_generic_events_user[PERF_COUNT_HW_INSTRUCTIONS ] == ev) +return PERF_TYPE_HARDWARE ; +return PERF_TYPE_RAW ; +} +static int cpumf_pmu_event_init (struct perf_event *event) {unsigned int type = event->attr.type;
@@ -301,7 +321,7 @@ static int cpumf_pmu_event_init(struct perf_event *event) err =__hw_perf_event_init (event, type); else if (event->pmu->type == type)/* Registered as unknown PMU */ - err =__hw_perf_event_init (event,PERF_TYPE_RAW ); + err =__hw_perf_event_init (event,cpumf_pmu_event_type (event)); else return -ENOENT;
arch/x86/net/bpf_jit_comp.c +2 -1
@@ -1261,8 +1261,9 @@ xadd: if (is_imm8(insn->off))case BPF_JMP |BPF_CALL : func = (u8 *) __bpf_call_base + imm32;if (tail_call_reachable) { +/* mov rax, qword ptr [rbp - rounded_stack_depth - 8] */ EMIT3_off32 (0x48 ,0x8B ,0x85 , - -(bpf_prog->aux->stack_depth +8 )); + -round_up (bpf_prog->aux->stack_depth,8 ) -8 );if (!imm32 ||emit_call (&prog, func, image + addrs[i -1 ] +7 ))return -EINVAL ; }else {
arch/xtensa/kernel/time.c +1 -0
@@ -154,6 +154,7 @@ static void __init calibrate_ccount(void) cpu =of_find_compatible_node (NULL ,NULL ,"cdns,xtensa-cpu" );if (cpu) { clk =of_clk_get (cpu,0 ); +of_node_put (cpu);if (!IS_ERR (clk)) { ccount_freq =clk_get_rate (clk);return ;
arch/xtensa/platforms/xtfpga/setup.c +1 -0
@@ -133,6 +133,7 @@ static int __init machine_setup(void)if ((eth =of_find_compatible_node (eth,NULL ,"opencores,ethoc" )))update_local_mac (eth); +of_node_put (eth);return 0 ; }arch_initcall (machine_setup);
drivers/base/regmap/regmap-irq.c +3 -2
@@ -220,6 +220,7 @@ static void regmap_irq_enable(struct irq_data *data)struct regmap_irq_chip_data *d =irq_data_get_irq_chip_data (data);struct regmap *map = d->map;const struct regmap_irq *irq_data =irq_to_regmap_irq (d, data->hwirq); +unsigned int reg = irq_data->reg_offset / map->reg_stride;unsigned int mask, type; type = irq_data->type.type_falling_val | irq_data->type.type_rising_val;
@@ -236,14 +237,14 @@ static void regmap_irq_enable(struct irq_data *data)* at the corresponding offset in regmap_irq_set_type(). */ if (d->chip->type_in_mask && type) - mask = d->type_buf[irq_data->reg_offset / map->reg_stride]; + mask = d->type_buf[reg] & irq_data->mask;else mask = irq_data->mask;if (d->chip->clear_on_unmask) d->clear_status = true; - d->mask_buf[irq_data->reg_offset / map->reg_stride] &= ~mask; + d->mask_buf[reg] &= ~mask; }static void regmap_irq_disable (struct irq_data *data)
drivers/char/random.c +3 -3
@@ -88,7 +88,7 @@ static RAW_NOTIFIER_HEAD(random_ready_chain);/* Control how we warn userspace. */ static struct ratelimit_state urandom_warning = -RATELIMIT_STATE_INIT ("warn_urandom_randomness" ,HZ ,3 ); +RATELIMIT_STATE_INIT_FLAGS ("urandom_warning" ,HZ ,3 ,RATELIMIT_MSG_ON_RELEASE );static int ratelimit_disable__read_mostly =IS_ENABLED (CONFIG_WARN_ALL_UNSEEDED_RANDOM );module_param_named (ratelimit_disable, ratelimit_disable, int,0644 );
@@ -452,7 +452,7 @@ static ssize_t get_random_bytes_user(struct iov_iter *iter)/* * Immediately overwrite the ChaCha key at index 4 with random -* bytes, in case userspace causes copy_to_user() below to sleep +* bytes, in case userspace causes copy_to_iter() below to sleep * forever, so that we still retain forward secrecy in that case. */ crng_make_state (chacha_state, (u8 *)&chacha_state[4 ],CHACHA_KEY_SIZE );
@@ -1001,7 +1001,7 @@ void add_interrupt_randomness(int irq)if (new_count &MIX_INFLIGHT )return ; -if (new_count <64 && !time_is_before_jiffies (fast_pool->last +HZ )) +if (new_count <1024 && !time_is_before_jiffies (fast_pool->last +HZ ))return ;if (unlikely (!fast_pool->mix.func))
drivers/dma-buf/udmabuf.c +4 -1
@@ -26,8 +26,11 @@ static vm_fault_t udmabuf_vm_fault(struct vm_fault *vmf) {struct vm_area_struct *vma = vmf->vma;struct udmabuf *ubuf = vma->vm_private_data; +pgoff_t pgoff = vmf->pgoff; - vmf->page = ubuf->pages[vmf->pgoff]; +if (pgoff >= ubuf->pagecount) +return VM_FAULT_SIGBUS ; + vmf->page = ubuf->pages[pgoff];get_page (vmf->page);return 0 ; }
drivers/gpio/gpio-vr41xx.c +0 -2
@@ -217,8 +217,6 @@ static int giu_get_irq(unsigned int irq)printk (KERN_ERR "spurious GIU interrupt: %04x(%04x),%04x(%04x)\n" , maskl, pendl, maskh, pendh); -atomic_inc (&irq_err_count); -return -EINVAL ; }
drivers/gpio/gpio-winbond.c +4 -3
@@ -385,12 +385,13 @@ static int winbond_gpio_get(struct gpio_chip *gc, unsigned int offset)unsigned long *base =gpiochip_get_data (gc);const struct winbond_gpio_info *info;bool val; +int ret;winbond_gpio_get_info (&offset, &info); - val =winbond_sio_enter (*base); -if (val) -return val; + ret =winbond_sio_enter (*base); +if (ret) +return ret;winbond_sio_select_logical (*base, info->dev);
drivers/gpu/drm/msm/adreno/adreno_gpu.c +2 -1
@@ -960,7 +960,8 @@ void adreno_gpu_cleanup(struct adreno_gpu *adreno_gpu)for (i =0 ; i <ARRAY_SIZE (adreno_gpu->info->fw); i++)release_firmware (adreno_gpu->fw[i]); -pm_runtime_disable (&priv->gpu_pdev->dev); +if (pm_runtime_enabled (&priv->gpu_pdev->dev)) +pm_runtime_disable (&priv->gpu_pdev->dev);msm_gpu_cleanup (&adreno_gpu->base);
drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c +2 -0
@@ -221,6 +221,7 @@ static int mdp4_modeset_init_intf(struct mdp4_kms *mdp4_kms, encoder =mdp4_lcdc_encoder_init (dev, panel_node);if (IS_ERR (encoder)) {DRM_DEV_ERROR (dev->dev,"failed to construct LCDC encoder\n" ); +of_node_put (panel_node);return PTR_ERR (encoder); }
@@ -230,6 +231,7 @@ static int mdp4_modeset_init_intf(struct mdp4_kms *mdp4_kms, connector =mdp4_lvds_connector_init (dev, panel_node, encoder);if (IS_ERR (connector)) {DRM_DEV_ERROR (dev->dev,"failed to initialize LVDS connector\n" ); +of_node_put (panel_node);return PTR_ERR (connector); }
drivers/gpu/drm/msm/dp/dp_catalog.c +1 -1
@@ -572,7 +572,7 @@ void dp_catalog_ctrl_hpd_config(struct dp_catalog *dp_catalog)dp_write_aux (catalog,REG_DP_DP_HPD_CTRL ,DP_DP_HPD_CTRL_HPD_EN ); } -u32 dp_catalog_hpd_get_state_status (struct dp_catalog *dp_catalog) +u32 dp_catalog_link_is_connected (struct dp_catalog *dp_catalog) {struct dp_catalog_private *catalog =container_of (dp_catalog, struct dp_catalog_private, dp_catalog);
drivers/gpu/drm/msm/dp/dp_catalog.h +1 -1
@@ -97,7 +97,7 @@ void dp_catalog_ctrl_enable_irq(struct dp_catalog *dp_catalog, bool enable);void dp_catalog_hpd_config_intr (struct dp_catalog *dp_catalog,u32 intr_mask,bool en);void dp_catalog_ctrl_hpd_config (struct dp_catalog *dp_catalog); -u32 dp_catalog_hpd_get_state_status (struct dp_catalog *dp_catalog); +u32 dp_catalog_link_is_connected (struct dp_catalog *dp_catalog);u32 dp_catalog_hpd_get_intr_status (struct dp_catalog *dp_catalog);void dp_catalog_ctrl_phy_reset (struct dp_catalog *dp_catalog); int dp_catalog_ctrl_update_vx_px(struct dp_catalog *dp_catalog, u8 v_level,
drivers/gpu/drm/msm/dp/dp_ctrl.c +38 -2
@@ -1460,6 +1460,30 @@ static int dp_ctrl_reinitialize_mainlink(struct dp_ctrl_private *ctrl)return ret; } +static int dp_ctrl_deinitialize_mainlink (struct dp_ctrl_private *ctrl) +{ +struct dp_io *dp_io; +struct phy *phy; +int ret; + + dp_io = &ctrl->parser->io; + phy = dp_io->phy; + +dp_catalog_ctrl_mainlink_ctrl (ctrl->catalog, false); + +dp_catalog_ctrl_reset (ctrl->catalog); + + ret =dp_power_clk_enable (ctrl->power,DP_CTRL_PM , false); +if (ret) { +DRM_ERROR ("Failed to disable link clocks. ret=%d\n" , ret); + } + +phy_power_off (phy); +phy_exit (phy); + +return 0 ; +} +static int dp_ctrl_link_maintenance (struct dp_ctrl_private *ctrl) {int ret =0 ;
@@ -1640,8 +1664,7 @@ int dp_ctrl_on_link(struct dp_ctrl *dp_ctrl)if (rc)return rc; -while (--link_train_max_retries && - !atomic_read (&ctrl->dp_ctrl.aborted)) { +while (--link_train_max_retries) { rc =dp_ctrl_reinitialize_mainlink (ctrl);if (rc) { DRM_ERROR("Failed to reinitialize mainlink. rc=%d\n",
@@ -1656,6 +1679,10 @@ int dp_ctrl_on_link(struct dp_ctrl *dp_ctrl)break ; }else if (training_step ==DP_TRAINING_1 ) {/* link train_1 failed */ +if (!dp_catalog_link_is_connected (ctrl->catalog)) { +break ; + } + rc =dp_ctrl_link_rate_down_shift (ctrl);if (rc <0 ) {/* already in RBR = 1.6G */ if (cr.lane_0_1 &DP_LANE0_1_CR_DONE ) {
@@ -1675,6 +1702,10 @@ int dp_ctrl_on_link(struct dp_ctrl *dp_ctrl) } }else if (training_step ==DP_TRAINING_2 ) {/* link train_2 failed, lower lane rate */ +if (!dp_catalog_link_is_connected (ctrl->catalog)) { +break ; + } + rc =dp_ctrl_link_lane_down_shift (ctrl);if (rc <0 ) {/* end with failure */
@@ -1695,6 +1726,11 @@ int dp_ctrl_on_link(struct dp_ctrl *dp_ctrl)*/ if (rc ==0 )/* link train successfully */ dp_ctrl_push_idle (dp_ctrl); +else { +/* link training failed */ +dp_ctrl_deinitialize_mainlink (ctrl); + rc = -ECONNRESET ; + }return rc; }
drivers/gpu/drm/msm/dp/dp_display.c +98 -51
329 lines not on this page · raw message
drivers/gpu/drm/msm/dp/dp_panel.c +5 -0
@@ -196,6 +196,11 @@ int dp_panel_read_sink_caps(struct dp_panel *dp_panel, &panel->aux->ddc);if (!dp_panel->edid) {DRM_ERROR ("panel edid read failed\n" ); +/* check edid read fail is due to unplug */ +if (!dp_catalog_link_is_connected (panel->catalog)) { + rc = -ETIMEDOUT ; + goto end; + }/* fail safe edid */ mutex_lock (&connector->dev->mode_config.mutex);
drivers/gpu/drm/msm/msm_iommu.c +1 -1
@@ -58,7 +58,7 @@ static int msm_iommu_pagetable_map(struct msm_mmu *mmu, u64 iova,u64 addr = iova;unsigned int i; -for_each_sg (sgt->sgl, sg, sgt->nents, i) { +for_each_sgtable_sg (sgt, sg, i) {size_t size = sg->length;phys_addr_t phys =sg_phys (sg);
drivers/gpu/drm/sun4i/sun4i_drv.c +3 -1
@@ -71,7 +71,6 @@ static int sun4i_drv_bind(struct device *dev) goto free_drm; } -dev_set_drvdata (dev, drm); drm->dev_private = drv;INIT_LIST_HEAD (&drv->frontend_list);INIT_LIST_HEAD (&drv->engine_list);
@@ -112,6 +111,8 @@ static int sun4i_drv_bind(struct device *dev)drm_fbdev_generic_setup (drm,32 ); +dev_set_drvdata (dev, drm); +return 0 ; finish_poll:
@@ -128,6 +129,7 @@ static void sun4i_drv_unbind(struct device *dev) {struct drm_device *drm =dev_get_drvdata (dev); +dev_set_drvdata (dev,NULL );drm_dev_unregister (drm);drm_kms_helper_poll_fini (drm);drm_atomic_helper_shutdown (drm);
drivers/iio/accel/bma180.c +2 -1
@@ -1068,11 +1068,12 @@ static int bma180_probe(struct i2c_client *client, data->trig->dev.parent = dev; data->trig->ops = &bma180_trigger_ops;iio_trigger_set_drvdata (data->trig, indio_dev); - indio_dev->trig =iio_trigger_get (data->trig); ret =iio_trigger_register (data->trig);if (ret) goto err_trigger_free; + + indio_dev->trig =iio_trigger_get (data->trig); } ret = iio_triggered_buffer_setup(indio_dev, NULL,
drivers/iio/accel/mma8452.c +14 -8
@@ -1496,10 +1496,14 @@ static int mma8452_reset(struct i2c_client *client)int i;int ret; - ret =i2c_smbus_write_byte_data (client,MMA8452_CTRL_REG2 , +/* +* Find on fxls8471, after config reset bit, it reset immediately, +* and will not give ACK, so here do not check the return value. +* The following code will read the reset register, and check whether +* this reset works. +*/ +i2c_smbus_write_byte_data (client,MMA8452_CTRL_REG2 ,MMA8452_CTRL_REG2_RST ); -if (ret <0 ) -return ret;for (i =0 ; i <10 ; i++) {usleep_range (100 ,200 );
@@ -1542,11 +1546,13 @@ static int mma8452_probe(struct i2c_client *client,mutex_init (&data->lock); data->chip_info =device_get_match_data (&client->dev); -if (!data->chip_info && id) { - data->chip_info = &mma_chip_info_table[id->driver_data]; - }else { -dev_err (&client->dev,"unknown device model\n" ); -return -ENODEV ; +if (!data->chip_info) { +if (id) { + data->chip_info = &mma_chip_info_table[id->driver_data]; + }else { +dev_err (&client->dev,"unknown device model\n" ); +return -ENODEV ; + } } data->vdd_reg =devm_regulator_get (&client->dev,"vdd" );
drivers/iio/accel/mxc4005.c +2 -2
@@ -461,8 +461,6 @@ static int mxc4005_probe(struct i2c_client *client, data->dready_trig->dev.parent = &client->dev; data->dready_trig->ops = &mxc4005_trigger_ops;iio_trigger_set_drvdata (data->dready_trig, indio_dev); - indio_dev->trig = data->dready_trig; -iio_trigger_get (indio_dev->trig); ret =devm_iio_trigger_register (&client->dev, data->dready_trig);if (ret) {
@@ -470,6 +468,8 @@ static int mxc4005_probe(struct i2c_client *client, "failed to register trigger\n");return ret; } + + indio_dev->trig =iio_trigger_get (data->dready_trig); }return devm_iio_device_register (&client->dev, indio_dev);
drivers/iio/adc/adi-axi-adc.c +3 -0
@@ -334,16 +334,19 @@ static struct adi_axi_adc_client *adi_axi_adc_attach_client(struct device *dev)if (!try_module_get (cl->dev->driver->owner)) {mutex_unlock (®istered_clients_lock); +of_node_put (cln);return ERR_PTR (-ENODEV ); }get_device (cl->dev); cl->info = info;mutex_unlock (®istered_clients_lock); +of_node_put (cln);return cl; }mutex_unlock (®istered_clients_lock); +of_node_put (cln);return ERR_PTR (-EPROBE_DEFER ); }
drivers/iio/adc/axp288_adc.c +8 -0
@@ -196,6 +196,14 @@ static const struct dmi_system_id axp288_adc_ts_bias_override[] = { }, .driver_data = (void *)(uintptr_t)AXP288_ADC_TS_BIAS_80UA, }, + { + /* Nuvision Solo 10 Draw */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "TMAX"), + DMI_MATCH(DMI_PRODUCT_NAME, "TM101W610L"), + }, + .driver_data = (void *)(uintptr_t)AXP288_ADC_TS_BIAS_80UA, + }, {} };
drivers/iio/adc/stm32-adc-core.c +7 -2
@@ -64,6 +64,7 @@ struct stm32_adc_priv;* @max_clk_rate_hz: maximum analog clock rate (Hz, from datasheet) * @has_syscfg: SYSCFG capability flags * @num_irqs: number of interrupt lines +* @num_adcs: maximum number of ADC instances in the common registers */ struct stm32_adc_priv_cfg {const struct stm32_adc_common_regs *regs;
@@ -71,6 +72,7 @@ struct stm32_adc_priv_cfg {u32 max_clk_rate_hz;unsigned int has_syscfg;unsigned int num_irqs; +unsigned int num_adcs; };/**
@@ -333,7 +335,7 @@ static void stm32_adc_irq_handler(struct irq_desc *desc)* before invoking the interrupt handler (e.g. call ISR only for * IRQ-enabled ADCs). */ -for (i =0 ; i < priv->cfg->num_irqs; i++) { +for (i =0 ; i < priv->cfg->num_adcs; i++) {if ((status & priv->cfg->regs->eoc_msk[i] &&stm32_adc_eoc_enabled (priv, i)) || (status & priv->cfg->regs->ovr_msk[i]))
@@ -784,6 +786,7 @@ static const struct stm32_adc_priv_cfg stm32f4_adc_priv_cfg = { .clk_sel = stm32f4_adc_clk_sel, .max_clk_rate_hz = 36000000, .num_irqs = 1, + .num_adcs = 3, };static const struct stm32_adc_priv_cfg stm32h7_adc_priv_cfg = {
@@ -792,14 +795,16 @@ static const struct stm32_adc_priv_cfg stm32h7_adc_priv_cfg = { .max_clk_rate_hz = 36000000, .has_syscfg = HAS_VBOOSTER, .num_irqs = 1, + .num_adcs = 2, };static const struct stm32_adc_priv_cfg stm32mp1_adc_priv_cfg = { .regs = &stm32h7_adc_common_regs, .clk_sel = stm32h7_adc_clk_sel, - .max_clk_rate_hz =40000000 , + .max_clk_rate_hz =36000000 , .has_syscfg =HAS_VBOOSTER |HAS_ANASWVDD , .num_irqs =2 , + .num_adcs =2 , };static const struct of_device_id stm32_adc_of_match[] = {
drivers/iio/adc/stm32-adc.c +0 -10
@@ -1265,7 +1265,6 @@ static irqreturn_t stm32_adc_threaded_isr(int irq, void *data)struct stm32_adc *adc =iio_priv (indio_dev);const struct stm32_adc_regspec *regs = adc->cfg->regs;u32 status =stm32_adc_readl (adc, regs->isr_eoc.reg); -u32 mask =stm32_adc_readl (adc, regs->ier_eoc.reg);/* Check ovr status right now, as ovr mask should be already disabled */ if (status & regs->isr_ovr.mask) {
@@ -1280,11 +1279,6 @@ static irqreturn_t stm32_adc_threaded_isr(int irq, void *data)return IRQ_HANDLED ; } -if (!(status & mask)) -dev_err_ratelimited (&indio_dev->dev, -"Unexpected IRQ: IER=0x%08x, ISR=0x%08x\n" , - mask, status); -return IRQ_NONE ; }
@@ -1294,10 +1288,6 @@ static irqreturn_t stm32_adc_isr(int irq, void *data)struct stm32_adc *adc =iio_priv (indio_dev);const struct stm32_adc_regspec *regs = adc->cfg->regs;u32 status =stm32_adc_readl (adc, regs->isr_eoc.reg); -u32 mask =stm32_adc_readl (adc, regs->ier_eoc.reg); - -if (!(status & mask)) -return IRQ_WAKE_THREAD ;if (status & regs->isr_ovr.mask) {/*
drivers/iio/chemical/ccs811.c +2 -2
@@ -500,11 +500,11 @@ static int ccs811_probe(struct i2c_client *client, data->drdy_trig->dev.parent = &client->dev; data->drdy_trig->ops = &ccs811_trigger_ops;iio_trigger_set_drvdata (data->drdy_trig, indio_dev); - indio_dev->trig = data->drdy_trig; -iio_trigger_get (indio_dev->trig); ret =iio_trigger_register (data->drdy_trig);if (ret) goto err_poweroff; + + indio_dev->trig =iio_trigger_get (data->drdy_trig); } ret = iio_triggered_buffer_setup(indio_dev, NULL,
drivers/iio/gyro/mpu3050-core.c +1 -0
@@ -872,6 +872,7 @@ static int mpu3050_power_up(struct mpu3050 *mpu3050) ret =regmap_update_bits (mpu3050->map,MPU3050_PWR_MGM ,MPU3050_PWR_MGM_SLEEP ,0 );if (ret) { +regulator_bulk_disable (ARRAY_SIZE (mpu3050->regs), mpu3050->regs);dev_err (mpu3050->dev,"error setting power mode\n" );return ret; }
drivers/iio/imu/inv_icm42600/inv_icm42600.h +1 -0
@@ -17,6 +17,7 @@#include "inv_icm42600_buffer.h" enum inv_icm42600_chip { +INV_CHIP_INVALID ,INV_CHIP_ICM42600 ,INV_CHIP_ICM42602 ,INV_CHIP_ICM42605 ,
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c +1 -1
@@ -565,7 +565,7 @@ int inv_icm42600_core_probe(struct regmap *regmap, int chip, int irq,bool open_drain;int ret; -if (chip <0 || chip >=INV_CHIP_NB ) { +if (chip <=INV_CHIP_INVALID || chip >=INV_CHIP_NB ) {dev_err (dev,"invalid chip = %d\n" , chip);return -ENODEV ; }
drivers/iio/trigger/iio-trig-sysfs.c +1 -0
@@ -196,6 +196,7 @@ static int iio_sysfs_trigger_remove(int id) }iio_trigger_unregister (t->trig); +irq_work_sync (&t->work);iio_trigger_free (t->trig);list_del (&t->l);
drivers/md/dm-era-target.c +7 -1
@@ -1396,7 +1396,7 @@ static void start_worker(struct era *era)static void stop_worker (struct era *era) {atomic_set (&era->suspended,1 ); -flush_workqueue (era->wq); +drain_workqueue (era->wq); }/*----------------------------------------------------------------
@@ -1566,6 +1566,12 @@ static void era_postsuspend(struct dm_target *ti) }stop_worker (era); + + r =metadata_commit (era->md); +if (r) { +DMERR ("%s: metadata_commit failed" , __func__); +/* FIXME: fail mode */ + } }static int era_preresume (struct dm_target *ti)
drivers/md/dm-log.c +1 -1
@@ -615,7 +615,7 @@ static int disk_resume(struct dm_dirty_log *log)log_clear_bit (lc, lc->clean_bits, i);/* clear any old bits -- device has shrunk */ -for (i = lc->region_count; i % (sizeof (*lc->clean_bits) <<BYTE_SHIFT ); i++) +for (i = lc->region_count; i %BITS_PER_LONG ; i++)log_clear_bit (lc, lc->clean_bits, i);/* copy clean across to sync */
drivers/memory/samsung/exynos5422-dmc.c +18 -11
@@ -1192,33 +1192,39 @@ static int of_get_dram_timings(struct exynos5_dmc *dmc) dmc->timing_row =devm_kmalloc_array (dmc->dev,TIMING_COUNT ,sizeof (u32),GFP_KERNEL ); -if (!dmc->timing_row) -return -ENOMEM ; +if (!dmc->timing_row) { + ret = -ENOMEM ; + goto put_node; + } dmc->timing_data =devm_kmalloc_array (dmc->dev,TIMING_COUNT ,sizeof (u32),GFP_KERNEL ); -if (!dmc->timing_data) -return -ENOMEM ; +if (!dmc->timing_data) { + ret = -ENOMEM ; + goto put_node; + } dmc->timing_power =devm_kmalloc_array (dmc->dev,TIMING_COUNT ,sizeof (u32),GFP_KERNEL ); -if (!dmc->timing_power) -return -ENOMEM ; +if (!dmc->timing_power) { + ret = -ENOMEM ; + goto put_node; + } dmc->timings =of_lpddr3_get_ddr_timings (np_ddr, dmc->dev,DDR_TYPE_LPDDR3 , &dmc->timings_arr_size);if (!dmc->timings) { -of_node_put (np_ddr);dev_warn (dmc->dev,"could not get timings from DT\n" ); -return -EINVAL ; + ret = -EINVAL ; + goto put_node; } dmc->min_tck =of_lpddr3_get_min_tck (np_ddr, dmc->dev);if (!dmc->min_tck) { -of_node_put (np_ddr);dev_warn (dmc->dev,"could not get tck from DT\n" ); -return -EINVAL ; + ret = -EINVAL ; + goto put_node; }/* Sorted array of OPPs with frequency ascending */
@@ -1232,13 +1238,14 @@ static int of_get_dram_timings(struct exynos5_dmc *dmc) clk_period_ps); } -of_node_put (np_ddr);/* Take the highest frequency's timings as 'bypass' */ dmc->bypass_timing_row = dmc->timing_row[idx -1 ]; dmc->bypass_timing_data = dmc->timing_data[idx -1 ]; dmc->bypass_timing_power = dmc->timing_power[idx -1 ]; +put_node: +of_node_put (np_ddr);return ret; }
drivers/mmc/host/sdhci-pci-o2micro.c +2 -0
@@ -147,6 +147,8 @@ static int sdhci_o2_get_cd(struct mmc_host *mmc)if (!(sdhci_readw (host,O2_PLL_DLL_WDT_CONTROL1 ) &O2_PLL_LOCK_STATUS ))sdhci_o2_enable_internal_clock (host); +else +sdhci_o2_wait_card_detect_stable (host);return !!(sdhci_readl (host,SDHCI_PRESENT_STATE ) &SDHCI_CARD_PRESENT ); }
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +1 -1
@@ -683,7 +683,7 @@ static void gpmi_nfc_compute_timings(struct gpmi_nand_data *this, hw->timing0 =BF_GPMI_TIMING0_ADDRESS_SETUP (addr_setup_cycles) |BF_GPMI_TIMING0_DATA_HOLD (data_hold_cycles) |BF_GPMI_TIMING0_DATA_SETUP (data_setup_cycles); - hw->timing1 =BF_GPMI_TIMING1_BUSY_TIMEOUT (busy_timeout_cycles *4096 ); + hw->timing1 =BF_GPMI_TIMING1_BUSY_TIMEOUT (DIV_ROUND_UP (busy_timeout_cycles,4096 ));/* * Derive NFC ideal delay from {3}:
drivers/net/bonding/bond_main.c +3 -1
@@ -3368,9 +3368,11 @@ static void bond_activebackup_arp_mon(struct bonding *bond)if (!rtnl_trylock ())return ; -if (should_notify_peers) +if (should_notify_peers) { + bond->send_peer_notif--;call_netdevice_notifiers (NETDEV_NOTIFY_PEERS , bond->dev); + }if (should_notify_rtnl) {bond_slave_state_notify (bond);bond_slave_link_notify (bond);
drivers/net/ethernet/intel/ice/ice_ethtool.c +38 -1
@@ -2174,6 +2174,42 @@ ice_setup_autoneg(struct ice_port_info *p, struct ethtool_link_ksettings *ks,return err; } +/** +* ice_set_phy_type_from_speed - set phy_types based on speeds +* and advertised modes +* @ks: ethtool link ksettings struct +* @phy_type_low: pointer to the lower part of phy_type +* @phy_type_high: pointer to the higher part of phy_type +* @adv_link_speed: targeted link speeds bitmap +*/ +static void +ice_set_phy_type_from_speed (const struct ethtool_link_ksettings *ks, +u64 *phy_type_low,u64 *phy_type_high, +u16 adv_link_speed) +{ +/* Handle 1000M speed in a special way because ice_update_phy_type +* enables all link modes, but having mixed copper and optical +* standards is not supported. +*/ + adv_link_speed &= ~ICE_AQ_LINK_SPEED_1000MB ; + +if (ethtool_link_ksettings_test_link_mode (ks, advertising, + 1000baseT_Full)) + *phy_type_low |=ICE_PHY_TYPE_LOW_1000BASE_T | +ICE_PHY_TYPE_LOW_1G_SGMII ; + +if (ethtool_link_ksettings_test_link_mode (ks, advertising, + 1000baseKX_Full)) + *phy_type_low |=ICE_PHY_TYPE_LOW_1000BASE_KX ; + +if (ethtool_link_ksettings_test_link_mode (ks, advertising, + 1000baseX_Full)) + *phy_type_low |=ICE_PHY_TYPE_LOW_1000BASE_SX | +ICE_PHY_TYPE_LOW_1000BASE_LX ; + +ice_update_phy_type (phy_type_low, phy_type_high, adv_link_speed); +} +/** * ice_set_link_ksettings - Set Speed and Duplex * @netdev: network interface device structure
@@ -2310,7 +2346,8 @@ ice_set_link_ksettings(struct net_device *netdev, adv_link_speed = curr_link_speed;/* Convert the advertise link speeds to their corresponded PHY_TYPE */ -ice_update_phy_type (&phy_type_low, &phy_type_high, adv_link_speed); +ice_set_phy_type_from_speed (ks, &phy_type_low, &phy_type_high, + adv_link_speed);if (!autoneg_changed && adv_link_speed == curr_link_speed) {netdev_info (netdev,"Nothing changed, exiting without setting anything.\n" );
drivers/net/ethernet/intel/igb/igb_main.c +10 -9
@@ -4813,8 +4813,11 @@ static void igb_clean_tx_ring(struct igb_ring *tx_ring)while (i != tx_ring->next_to_use) {union e1000_adv_tx_desc *eop_desc, *tx_desc; -/* Free all the Tx ring sk_buffs */ -dev_kfree_skb_any (tx_buffer->skb); +/* Free all the Tx ring sk_buffs or xdp frames */ +if (tx_buffer->type ==IGB_TYPE_SKB ) +dev_kfree_skb_any (tx_buffer->skb); +else +xdp_return_frame (tx_buffer->xdpf);/* unmap skb header data */ dma_unmap_single(tx_ring->dev,
@@ -9826,11 +9829,10 @@ static void igb_init_dmac(struct igb_adapter *adapter, u32 pba)struct e1000_hw *hw = &adapter->hw;u32 dmac_thr;u16 hwm; +u32 reg;if (hw->mac.type > e1000_82580) {if (adapter->flags &IGB_FLAG_DMAC ) { -u32 reg; -/* force threshold to 0. */ wr32 (E1000_DMCTXTH ,0 );
@@ -9863,7 +9865,6 @@ static void igb_init_dmac(struct igb_adapter *adapter, u32 pba)/* Disable BMC-to-OS Watchdog Enable */ if (hw->mac.type != e1000_i354) reg &= ~E1000_DMACR_DC_BMC2OSW_EN ; -wr32 (E1000_DMACR , reg);/* no lower threshold to disable
@@ -9880,12 +9881,12 @@ static void igb_init_dmac(struct igb_adapter *adapter, u32 pba)*/ wr32 (E1000_DMCTXTH , (IGB_MIN_TXPBSIZE - (IGB_TX_BUF_4096 + adapter->max_frame_size)) >>6 ); + } -/* make low power state decision controlled -* by DMA coal -*/ +if (hw->mac.type >= e1000_i210 || + (adapter->flags &IGB_FLAG_DMAC )) { reg =rd32 (E1000_PCIEMISC ); - reg &= ~E1000_PCIEMISC_LX_DECISION ; + reg |=E1000_PCIEMISC_LX_DECISION ;wr32 (E1000_PCIEMISC , reg); }/* endif adapter->dmac is not disabled */ }else if (hw->mac.type == e1000_82580) {
drivers/net/phy/aquantia_main.c +14 -1
@@ -34,6 +34,8 @@#define MDIO_AN_VEND_PROV 0xc400#define MDIO_AN_VEND_PROV_1000BASET_FULL BIT(15)#define MDIO_AN_VEND_PROV_1000BASET_HALF BIT(14) +#define MDIO_AN_VEND_PROV_5000BASET_FULL BIT(11) +#define MDIO_AN_VEND_PROV_2500BASET_FULL BIT(10)#define MDIO_AN_VEND_PROV_DOWNSHIFT_EN BIT(4)#define MDIO_AN_VEND_PROV_DOWNSHIFT_MASK GENMASK(3, 0)#define MDIO_AN_VEND_PROV_DOWNSHIFT_DFLT 4
@@ -230,9 +232,20 @@ static int aqr_config_aneg(struct phy_device *phydev) phydev->advertising)) reg |=MDIO_AN_VEND_PROV_1000BASET_HALF ; +/* Handle the case when the 2.5G and 5G speeds are not advertised */ +if (linkmode_test_bit (ETHTOOL_LINK_MODE_2500baseT_Full_BIT, + phydev->advertising)) + reg |=MDIO_AN_VEND_PROV_2500BASET_FULL ; + +if (linkmode_test_bit (ETHTOOL_LINK_MODE_5000baseT_Full_BIT, + phydev->advertising)) + reg |=MDIO_AN_VEND_PROV_5000BASET_FULL ; + ret =phy_modify_mmd_changed (phydev,MDIO_MMD_AN ,MDIO_AN_VEND_PROV ,MDIO_AN_VEND_PROV_1000BASET_HALF | -MDIO_AN_VEND_PROV_1000BASET_FULL , reg); +MDIO_AN_VEND_PROV_1000BASET_FULL | +MDIO_AN_VEND_PROV_2500BASET_FULL | +MDIO_AN_VEND_PROV_5000BASET_FULL , reg);if (ret <0 )return ret;if (ret >0 )
drivers/net/virtio_net.c +6 -19
@@ -2366,7 +2366,6 @@ static const struct ethtool_ops virtnet_ethtool_ops = {static void virtnet_freeze_down (struct virtio_device *vdev) {struct virtnet_info *vi = vdev->priv; -int i;/* Make sure no work handler is accessing the device */ flush_work (&vi->config_work);
@@ -2374,14 +2373,8 @@ static void virtnet_freeze_down(struct virtio_device *vdev)netif_tx_lock_bh (vi->dev);netif_device_detach (vi->dev);netif_tx_unlock_bh (vi->dev); -cancel_delayed_work_sync (&vi->refill); - -if (netif_running (vi->dev)) { -for (i =0 ; i < vi->max_queue_pairs; i++) { -napi_disable (&vi->rq[i].napi); -virtnet_napi_tx_disable (&vi->sq[i].napi); - } - } +if (netif_running (vi->dev)) +virtnet_close (vi->dev); }static int init_vqs (struct virtnet_info *vi);
@@ -2389,7 +2382,7 @@ static int init_vqs(struct virtnet_info *vi);static int virtnet_restore_up (struct virtio_device *vdev) {struct virtnet_info *vi = vdev->priv; -int err, i; +int err; err =init_vqs (vi);if (err)
@@ -2398,15 +2391,9 @@ static int virtnet_restore_up(struct virtio_device *vdev)virtio_device_ready (vdev);if (netif_running (vi->dev)) { -for (i =0 ; i < vi->curr_queue_pairs; i++) -if (!try_fill_recv (vi, &vi->rq[i],GFP_KERNEL )) -schedule_delayed_work (&vi->refill,0 ); - -for (i =0 ; i < vi->max_queue_pairs; i++) { -virtnet_napi_enable (vi->rq[i].vq, &vi->rq[i].napi); -virtnet_napi_tx_enable (vi, vi->sq[i].vq, - &vi->sq[i].napi); - } + err =virtnet_open (vi->dev); +if (err) +return err; }netif_tx_lock_bh (vi->dev);
drivers/nvme/host/core.c +77 -25
163 lines not on this page · raw message
drivers/nvme/host/lightnvm.c +4 -4
@@ -653,7 +653,7 @@ static struct request *nvme_nvm_alloc_request(struct request_queue *q,nvme_nvm_rqtocmd (rqd, ns, cmd); - rq =nvme_alloc_request (q, (struct nvme_command *)cmd,0 ,NVME_QID_ANY ); + rq =nvme_alloc_request (q, (struct nvme_command *)cmd,0 );if (IS_ERR (rq))return rq;
@@ -767,14 +767,14 @@ static int nvme_nvm_submit_user_cmd(struct request_queue *q,DECLARE_COMPLETION_ONSTACK (wait);int ret =0 ; - rq =nvme_alloc_request (q, (struct nvme_command *)vcmd,0 , -NVME_QID_ANY ); + rq =nvme_alloc_request (q, (struct nvme_command *)vcmd,0 );if (IS_ERR (rq)) { ret = -ENOMEM ; goto err_cmd; } - rq->timeout = timeout ? timeout :ADMIN_TIMEOUT ; +if (timeout) + rq->timeout = timeout;if (ppa_buf && ppa_len) { ppa_list =dma_pool_alloc (dev->dma_pool,GFP_KERNEL , &ppa_dma);
drivers/nvme/host/nvme.h +2 -0
@@ -662,6 +662,8 @@ void nvme_start_freeze(struct nvme_ctrl *ctrl);#define NVME_QID_ANY -1struct request *nvme_alloc_request (struct request_queue *q, +struct nvme_command *cmd,blk_mq_req_flags_t flags); +struct request *nvme_alloc_request_qid (struct request_queue *q,struct nvme_command *cmd,blk_mq_req_flags_t flags,int qid);void nvme_cleanup_cmd (struct request *req); blk_status_t nvme_setup_cmd(struct nvme_ns *ns, struct request *req,
drivers/nvme/host/pci.c +8 -13
@@ -224,6 +224,7 @@ struct nvme_queue {*/ struct nvme_iod {struct nvme_request req; +struct nvme_command cmd;struct nvme_queue *nvmeq;bool use_sgl;int aborted;
@@ -917,7 +918,7 @@ static blk_status_t nvme_queue_rq(struct blk_mq_hw_ctx *hctx,struct nvme_dev *dev = nvmeq->dev;struct request *req = bd->rq;struct nvme_iod *iod =blk_mq_rq_to_pdu (req); -struct nvme_command cmnd; +struct nvme_command *cmnd = &iod->cmd;blk_status_t ret; iod->aborted =0 ;
@@ -931,24 +932,24 @@ static blk_status_t nvme_queue_rq(struct blk_mq_hw_ctx *hctx,if (unlikely (!test_bit (NVMEQ_ENABLED , &nvmeq->flags)))return BLK_STS_IOERR ; - ret =nvme_setup_cmd (ns, req, &cmnd); + ret =nvme_setup_cmd (ns, req, cmnd);if (ret)return ret;if (blk_rq_nr_phys_segments (req)) { - ret =nvme_map_data (dev, req, &cmnd); + ret =nvme_map_data (dev, req, cmnd);if (ret) goto out_free_cmd; }if (blk_integrity_rq (req)) { - ret =nvme_map_metadata (dev, req, &cmnd); + ret =nvme_map_metadata (dev, req, cmnd);if (ret) goto out_unmap_data; }blk_mq_start_request (req); -nvme_submit_cmd (nvmeq, &cmnd, bd->last); +nvme_submit_cmd (nvmeq, cmnd, bd->last);return BLK_STS_OK ; out_unmap_data:nvme_unmap_data (dev, req);
@@ -1350,13 +1351,12 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved) req->tag, nvmeq->qid); abort_req =nvme_alloc_request (dev->ctrl.admin_q, &cmd, -BLK_MQ_REQ_NOWAIT ,NVME_QID_ANY ); +BLK_MQ_REQ_NOWAIT );if (IS_ERR (abort_req)) {atomic_inc (&dev->ctrl.abort_limit);return BLK_EH_RESET_TIMER ; } - abort_req->timeout =ADMIN_TIMEOUT ; abort_req->end_io_data =NULL ;blk_execute_rq_nowait (abort_req->q,NULL , abort_req,0 , abort_endio);
@@ -2279,11 +2279,10 @@ static int nvme_delete_queue(struct nvme_queue *nvmeq, u8 opcode) cmd.delete_queue.opcode = opcode; cmd.delete_queue.qid =cpu_to_le16 (nvmeq->qid); - req =nvme_alloc_request (q, &cmd,BLK_MQ_REQ_NOWAIT ,NVME_QID_ANY ); + req =nvme_alloc_request (q, &cmd,BLK_MQ_REQ_NOWAIT );if (IS_ERR (req))return PTR_ERR (req); - req->timeout =ADMIN_TIMEOUT ; req->end_io_data = nvmeq;init_completion (&nvmeq->delete_done);
@@ -3266,10 +3265,6 @@ static const struct pci_device_id nvme_id_table[] = { NVME_QUIRK_128_BYTES_SQES | NVME_QUIRK_SHARED_TAGS | NVME_QUIRK_SKIP_CID_GEN }, - { PCI_DEVICE(0x144d, 0xa808), /* Samsung X5 */ - .driver_data =NVME_QUIRK_DELAY_BEFORE_CHK_RDY | -NVME_QUIRK_NO_DEEPEST_PS | - NVME_QUIRK_IGNORE_DEV_SUBNQN, }, { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) }, { 0, } };
drivers/nvme/target/passthru.c +1 -1
@@ -244,7 +244,7 @@ static void nvmet_passthru_execute_cmd(struct nvmet_req *req) q = ns->queue; } - rq =nvme_alloc_request (q, req->cmd,0 ,NVME_QID_ANY ); + rq =nvme_alloc_request (q, req->cmd,0 );if (IS_ERR (rq)) { status =NVME_SC_INTERNAL ; goto out_put_ns;
drivers/scsi/scsi_debug.c +20 -2
@@ -2746,6 +2746,24 @@ static void zbc_open_zone(struct sdebug_dev_info *devip, } } +static inline void zbc_set_zone_full (struct sdebug_dev_info *devip, +struct sdeb_zone_state *zsp) +{ +switch (zsp->z_cond) { +case ZC2_IMPLICIT_OPEN : + devip->nr_imp_open--; +break ; +case ZC3_EXPLICIT_OPEN : + devip->nr_exp_open--; +break ; +default : +WARN_ONCE (true,"Invalid zone %llu condition %x\n" , + zsp->z_start, zsp->z_cond); +break ; + } + zsp->z_cond =ZC5_FULL ; +} +static void zbc_inc_wp (struct sdebug_dev_info *devip,unsigned long long lba,unsigned int num) {
@@ -2758,7 +2776,7 @@ static void zbc_inc_wp(struct sdebug_dev_info *devip,if (zsp->z_type ==ZBC_ZONE_TYPE_SWR ) { zsp->z_wp += num;if (zsp->z_wp >= zend) - zsp->z_cond =ZC5_FULL ; +zbc_set_zone_full (devip, zsp);return ; }
@@ -2777,7 +2795,7 @@ static void zbc_inc_wp(struct sdebug_dev_info *devip, n = num; }if (zsp->z_wp >= zend) - zsp->z_cond =ZC5_FULL ; +zbc_set_zone_full (devip, zsp); num -= n; lba += n;
drivers/soc/bcm/brcmstb/pm/pm-arm.c +1 -0
@@ -780,6 +780,7 @@ static int brcmstb_pm_probe(struct platform_device *pdev) } ret =brcmstb_init_sram (dn); +of_node_put (dn);if (ret) {pr_err ("error setting up SRAM for PM\n" );return ret;
drivers/tty/vt/vt.c +3 -36
@@ -4625,16 +4625,8 @@ static int con_font_get(struct vc_data *vc, struct console_font_op *op)if (op->data && font.charcount > op->charcount) rc = -ENOSPC ; -if (!(op->flags &KD_FONT_FLAG_OLD )) { -if (font.width > op->width || font.height > op->height) - rc = -ENOSPC ; - }else { -if (font.width !=8 ) - rc = -EIO ; -else if ((op->height && font.height > op->height) || - font.height >32 ) - rc = -ENOSPC ; - } +if (font.width > op->width || font.height > op->height) + rc = -ENOSPC ;if (rc) goto out;
@@ -4662,7 +4654,7 @@ static int con_font_set(struct vc_data *vc, struct console_font_op *op)return -EINVAL ;if (op->charcount >512 )return -EINVAL ; -if (op->width <=0 || op->width >32 || op->height >32 ) +if (op->width <=0 || op->width >32 || !op->height || op->height >32 )return -EINVAL ; size = (op->width+7 )/8 *32 * op->charcount;if (size > max_font_size)
@@ -4672,31 +4664,6 @@ static int con_font_set(struct vc_data *vc, struct console_font_op *op)if (IS_ERR (font.data))return PTR_ERR (font.data); -if (!op->height) {/* Need to guess font height [compat] */ -int h, i; -u8 *charmap = font.data; - -/* -* If from KDFONTOP ioctl, don't allow things which can be done -* in userland,so that we can get rid of this soon -*/ -if (!(op->flags &KD_FONT_FLAG_OLD )) { -kfree (font.data); -return -EINVAL ; - } - -for (h =32 ; h >0 ; h--) -for (i =0 ; i < op->charcount; i++) -if (charmap[32 *i+h-1 ]) - goto nonzero; - -kfree (font.data); -return -EINVAL ; - - nonzero: - op->height = h; - } - font.charcount = op->charcount; font.width = op->width; font.height = op->height;
drivers/tty/vt/vt_ioctl.c +0 -151
182 lines not on this page · raw message
drivers/usb/chipidea/udc.c +3 -0
@@ -1034,6 +1034,9 @@ isr_setup_status_complete(struct usb_ep *ep, struct usb_request *req)struct ci_hdrc *ci = req->context;unsigned long flags; +if (req->status <0 ) +return ; +if (ci->setaddr) {hw_usb_set_address (ci, ci->address); ci->setaddr = false;
drivers/usb/gadget/legacy/raw_gadget.c +47 -16
136 lines not on this page · raw message
drivers/usb/host/xhci-hub.c +1 -1
@@ -566,7 +566,7 @@ struct xhci_hub *xhci_get_rhub(struct usb_hcd *hcd)* It will release and re-aquire the lock while calling ACPI * method. */ -static void xhci_set_port_power (struct xhci_hcd *xhci,struct usb_hcd *hcd, +void xhci_set_port_power (struct xhci_hcd *xhci,struct usb_hcd *hcd,u16 index,bool on,unsigned long *flags) __must_hold(&xhci->lock) {
drivers/usb/host/xhci-pci.c +5 -1
@@ -61,6 +61,8 @@#define PCI_DEVICE_ID_INTEL_ALDER_LAKE_XHCI 0x461e#define PCI_DEVICE_ID_INTEL_ALDER_LAKE_N_XHCI 0x464e#define PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI 0x51ed +#define PCI_DEVICE_ID_INTEL_RAPTOR_LAKE_XHCI 0xa71e +#define PCI_DEVICE_ID_INTEL_METEOR_LAKE_XHCI 0x7ec0#define PCI_DEVICE_ID_AMD_PROMONTORYA_4 0x43b9#define PCI_DEVICE_ID_AMD_PROMONTORYA_3 0x43ba
@@ -265,7 +267,9 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) pdev->device ==PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI || pdev->device ==PCI_DEVICE_ID_INTEL_ALDER_LAKE_XHCI || pdev->device ==PCI_DEVICE_ID_INTEL_ALDER_LAKE_N_XHCI || - pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI)) + pdev->device ==PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI || + pdev->device ==PCI_DEVICE_ID_INTEL_RAPTOR_LAKE_XHCI || + pdev->device == PCI_DEVICE_ID_INTEL_METEOR_LAKE_XHCI)) xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW; if (pdev->vendor == PCI_VENDOR_ID_ETRON &&
drivers/usb/host/xhci.c +13 -2
@@ -775,6 +775,8 @@ static void xhci_stop(struct usb_hcd *hcd)void xhci_shutdown (struct usb_hcd *hcd) {struct xhci_hcd *xhci =hcd_to_xhci (hcd); +unsigned long flags; +int i;if (xhci->quirks &XHCI_SPURIOUS_REBOOT )usb_disable_xhci_ports (to_pci_dev (hcd->self.sysdev));
@@ -790,12 +792,21 @@ void xhci_shutdown(struct usb_hcd *hcd)del_timer_sync (&xhci->shared_hcd->rh_timer); } -spin_lock_irq (&xhci->lock); +spin_lock_irqsave (&xhci->lock, flags);xhci_halt (xhci); + +/* Power off USB2 ports*/ +for (i =0 ; i < xhci->usb2_rhub.num_ports; i++) +xhci_set_port_power (xhci, xhci->main_hcd, i, false, &flags); + +/* Power off USB3 ports*/ +for (i =0 ; i < xhci->usb3_rhub.num_ports; i++) +xhci_set_port_power (xhci, xhci->shared_hcd, i, false, &flags); +/* Workaround for spurious wakeups at shutdown with HSW */ if (xhci->quirks &XHCI_SPURIOUS_WAKEUP )xhci_reset (xhci,XHCI_RESET_SHORT_USEC ); -spin_unlock_irq (&xhci->lock); +spin_unlock_irqrestore (&xhci->lock, flags);xhci_cleanup_msix (xhci);
drivers/usb/host/xhci.h +2 -0
@@ -2162,6 +2162,8 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex,int xhci_hub_status_data (struct usb_hcd *hcd,char *buf);int xhci_find_raw_port_number (struct usb_hcd *hcd,int port1);struct xhci_hub *xhci_get_rhub (struct usb_hcd *hcd); +void xhci_set_port_power (struct xhci_hcd *xhci,struct usb_hcd *hcd,u16 index, +bool on,unsigned long *flags);void xhci_hc_died (struct xhci_hcd *xhci);
drivers/usb/serial/option.c +6 -0
@@ -252,10 +252,12 @@ static void option_instat_callback(struct urb *urb);#define QUECTEL_PRODUCT_EG95 0x0195#define QUECTEL_PRODUCT_BG96 0x0296#define QUECTEL_PRODUCT_EP06 0x0306 +#define QUECTEL_PRODUCT_EM05G 0x030a#define QUECTEL_PRODUCT_EM12 0x0512#define QUECTEL_PRODUCT_RM500Q 0x0800#define QUECTEL_PRODUCT_EC200S_CN 0x6002#define QUECTEL_PRODUCT_EC200T 0x6026 +#define QUECTEL_PRODUCT_RM500K 0x7001#define CMOTECH_VENDOR_ID 0x16d8#define CMOTECH_PRODUCT_6001 0x6001
@@ -1134,6 +1136,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0xff, 0xff), .driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0, 0) }, + { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM05G, 0xff), + .driver_info = RSVD(6) | ZLP }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0xff, 0xff), .driver_info = RSVD(1) | RSVD(2) | RSVD(3) | RSVD(4) | NUMEP2 }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EM12, 0xff, 0, 0) },
@@ -1147,6 +1151,7 @@ static const struct usb_device_id option_ids[] = { .driver_info = ZLP }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S_CN, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) }, + { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500K, 0xff, 0x00, 0x00) }, { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) }, { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) },
@@ -1279,6 +1284,7 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1231, 0xff), /* Telit LE910Cx (RNDIS) */ .driver_info = NCTRL(2) | RSVD(3) }, + { USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x1250, 0xff, 0x00, 0x00) }, /* Telit LE910Cx (rmnet) */ { USB_DEVICE(TELIT_VENDOR_ID, 0x1260), .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, { USB_DEVICE(TELIT_VENDOR_ID, 0x1261),
drivers/usb/typec/tcpm/Kconfig +0 -1
@@ -56,7 +56,6 @@ config TYPEC_WCOVE tristate "Intel WhiskeyCove PMIC USB Type-C PHY driver" depends on ACPI depends on MFD_INTEL_PMC_BXT - depends on INTEL_SOC_PMIC depends on BXT_WC_PMIC_OPREGION help This driver adds support for USB Type-C on Intel Broxton platforms
drivers/video/console/sticore.c +2 -0
@@ -1127,6 +1127,7 @@ int sti_call(const struct sti_struct *sti, unsigned long func,return ret; } +#if defined(CONFIG_FB_STI )/* check if given fb_info is the primary device */ int fb_is_primary_device (struct fb_info *info) {
@@ -1142,6 +1143,7 @@ int fb_is_primary_device(struct fb_info *info) return (sti->info == info); }EXPORT_SYMBOL (fb_is_primary_device); +#endif MODULE_AUTHOR ("Philipp Rumpf, Helge Deller, Thomas Bogendoerfer" );MODULE_DESCRIPTION ("Core STI driver for HP's NGLE series graphics cards in HP PARISC machines" );
drivers/xen/features.c +1 -1
@@ -29,6 +29,6 @@ void xen_setup_features(void)if (HYPERVISOR_xen_version (XENVER_get_features, &fi) <0 )break ;for (j =0 ; j <32 ; j++) - xen_features[i *32 + j] = !!(fi.submap &1 <<j); + xen_features[i *32 + j] = !!(fi.submap &1U << j); } }
fs/afs/inode.c +2 -1
@@ -734,7 +734,8 @@ int afs_getattr(const struct path *path, struct kstat *stat,_enter ("{ ino=%lu v=%u }" , inode->i_ino, inode->i_generation); -if (!(query_flags &AT_STATX_DONT_SYNC ) && +if (vnode->volume && + !(query_flags &AT_STATX_DONT_SYNC ) && !test_bit (AFS_VNODE_CB_PROMISED , &vnode->flags)) { key =afs_request_key (vnode->volume->cell);if (IS_ERR (key))
fs/btrfs/super.c +32 -7
@@ -652,6 +652,8 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options, compress_force = false; no_compress++; }else { +btrfs_err (info,"unrecognized compression value %s" , + args[0 ].from); ret = -EINVAL ; goto out; }
@@ -710,8 +712,11 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,case Opt_thread_pool: ret =match_int (&args[0 ], &intarg);if (ret) { +btrfs_err (info,"unrecognized thread_pool value %s" , + args[0 ].from); goto out; }else if (intarg ==0 ) { +btrfs_err (info,"invalid value 0 for thread_pool" ); ret = -EINVAL ; goto out; }
@@ -772,8 +777,11 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,break ;case Opt_ratio: ret =match_int (&args[0 ], &intarg); -if (ret) +if (ret) { +btrfs_err (info,"unrecognized metadata_ratio value %s" , + args[0 ].from); goto out; + } info->metadata_ratio = intarg;btrfs_info (info,"metadata ratio %u" , info->metadata_ratio);
@@ -790,6 +798,8 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,btrfs_set_and_info (info,DISCARD_ASYNC ,"turning on async discard" ); }else { +btrfs_err (info,"unrecognized discard mode value %s" , + args[0 ].from); ret = -EINVAL ; goto out; }
@@ -814,6 +824,8 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,btrfs_set_and_info (info,FREE_SPACE_TREE ,"enabling free space tree" ); }else { +btrfs_err (info,"unrecognized space_cache value %s" , + args[0 ].from); ret = -EINVAL ; goto out; }
@@ -889,8 +901,12 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,break ;case Opt_check_integrity_print_mask: ret =match_int (&args[0 ], &intarg); -if (ret) +if (ret) { +btrfs_err (info, +"unrecognized check_integrity_print_mask value %s" , + args[0 ].from); goto out; + } info->check_integrity_print_mask = intarg;btrfs_info (info,"check_integrity_print_mask 0x%x" , info->check_integrity_print_mask);
@@ -905,13 +921,15 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options, goto out;#endif case Opt_fatal_errors: -if (strcmp (args[0 ].from,"panic" ) ==0 ) +if (strcmp (args[0 ].from,"panic" ) ==0 ) {btrfs_set_opt (info->mount_opt,PANIC_ON_FATAL_ERROR ); -else if (strcmp (args[0 ].from,"bug" ) ==0 ) + }else if (strcmp (args[0 ].from,"bug" ) ==0 ) {btrfs_clear_opt (info->mount_opt,PANIC_ON_FATAL_ERROR ); -else { + }else { +btrfs_err (info,"unrecognized fatal_errors value %s" , + args[0 ].from); ret = -EINVAL ; goto out; }
@@ -919,8 +937,12 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,case Opt_commit_interval: intarg =0 ; ret =match_int (&args[0 ], &intarg); -if (ret) +if (ret) { +btrfs_err (info,"unrecognized commit_interval value %s" , + args[0 ].from); + ret = -EINVAL ; goto out; + }if (intarg ==0 ) { btrfs_info(info, "using default commit interval %us",
@@ -934,8 +956,11 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,break ;case Opt_rescue: ret =parse_rescue_options (info, args[0 ].from); -if (ret <0 ) +if (ret <0 ) { +btrfs_err (info,"unrecognized rescue value %s" , + args[0 ].from); goto out; + }break ;#ifdef CONFIG_BTRFS_DEBUG case Opt_fragment_all:
fs/f2fs/namei.c +11 -6
@@ -91,8 +91,6 @@ static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode)if (test_opt (sbi,INLINE_XATTR ))set_inode_flag (inode,FI_INLINE_XATTR ); -if (test_opt (sbi,INLINE_DATA ) &&f2fs_may_inline_data (inode)) -set_inode_flag (inode,FI_INLINE_DATA );if (f2fs_may_inline_dentry (inode))set_inode_flag (inode,FI_INLINE_DENTRY );
@@ -109,10 +107,6 @@ static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode)f2fs_init_extent_tree (inode,NULL ); -stat_inc_inline_xattr (inode); -stat_inc_inline_inode (inode); -stat_inc_inline_dir (inode); -F2FS_I (inode)->i_flags =f2fs_mask_flags (mode,F2FS_I (dir)->i_flags &F2FS_FL_INHERITED );
@@ -129,6 +123,14 @@ static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode)set_compress_context (inode); } +/* Should enable inline_data after compression set */ +if (test_opt (sbi,INLINE_DATA ) &&f2fs_may_inline_data (inode)) +set_inode_flag (inode,FI_INLINE_DATA ); + +stat_inc_inline_xattr (inode); +stat_inc_inline_inode (inode); +stat_inc_inline_dir (inode); +f2fs_set_inode_flags (inode);trace_f2fs_new_inode (inode,0 );
@@ -317,6 +319,9 @@ static void set_compress_inode(struct f2fs_sb_info *sbi, struct inode *inode,if (!is_extension_exist (name, ext[i], false))continue ; +/* Do not use inline_data with compression */ +stat_dec_inline_inode (inode); +clear_inode_flag (inode,FI_INLINE_DATA );set_compress_context (inode);return ; }
include/linux/kd.h deleted +0 -8
@@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef _LINUX_KD_H -#define _LINUX_KD_H - -#include <uapi/linux/kd.h> - -#define KD_FONT_FLAG_OLD 0x80000000/* Invoked via old interface [compat] */ -#endif /* _LINUX_KD_H */
include/linux/ratelimit_types.h +8 -4
@@ -23,12 +23,16 @@ struct ratelimit_state {unsigned long flags; }; -#define RATELIMIT_STATE_INIT (name, interval_init, burst_init) { \ - .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ - .interval = interval_init, \ - .burst = burst_init, \ +#define RATELIMIT_STATE_INIT_FLAGS (name, interval_init, burst_init, flags_init) { \ + .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ + .interval = interval_init, \ + .burst = burst_init, \ + .flags = flags_init, \ } +#define RATELIMIT_STATE_INIT (name, interval_init, burst_init) \ + RATELIMIT_STATE_INIT_FLAGS(name, interval_init, burst_init, 0) +#define RATELIMIT_STATE_INIT_DISABLED \ RATELIMIT_STATE_INIT(ratelimit_state, 0, DEFAULT_RATELIMIT_BURST)
include/net/netfilter/nf_tables.h +5 -5
@@ -203,11 +203,11 @@ int nft_parse_u32_check(const struct nlattr *attr, int max, u32 *dest);unsigned int nft_parse_register (const struct nlattr *attr);int nft_dump_register (struct sk_buff *skb,unsigned int attr,unsigned int reg); -int nft_validate_register_load (enum nft_registers reg,unsigned int len); -int nft_validate_register_store (const struct nft_ctx *ctx, -enum nft_registers reg, -const struct nft_data *data, -enum nft_data_types type,unsigned int len); +int nft_parse_register_load (const struct nlattr *attr,u8 *sreg,u32 len); +int nft_parse_register_store (const struct nft_ctx *ctx, +const struct nlattr *attr,u8 *dreg, +const struct nft_data *data, +enum nft_data_types type,unsigned int len);/** * struct nft_userdata - user defined data associated with an object
include/net/netfilter/nf_tables_core.h +6 -6
@@ -26,21 +26,21 @@ void nf_tables_core_module_exit(void);struct nft_bitwise_fast_expr {u32 mask;u32 xor; -enum nft_registers sreg:8 ; -enum nft_registers dreg:8 ; +u8 sreg; +u8 dreg; };struct nft_cmp_fast_expr {u32 data;u32 mask; -enum nft_registers sreg:8 ; +u8 sreg;u8 len;bool inv; };struct nft_immediate_expr {struct nft_data data; -enum nft_registers dreg:8 ; +u8 dreg;u8 dlen; };
@@ -60,14 +60,14 @@ struct nft_payload { enum nft_payload_bases base:8;u8 offset;u8 len; - enum nft_registers dreg:8; +u8 dreg; };struct nft_payload_set {enum nft_payload_bases base:8 ;u8 offset;u8 len; -enum nft_registers sreg:8 ; +u8 sreg;u8 csum_type;u8 csum_offset;u8 csum_flags;
include/net/netfilter/nft_fib.h +1 -1
@@ -5,7 +5,7 @@#include <net/netfilter/nf_tables.h> struct nft_fib { -enum nft_registers dreg:8 ; +u8 dreg;u8 result;u32 flags; };
include/net/netfilter/nft_meta.h +2 -2
@@ -7,8 +7,8 @@struct nft_meta {enum nft_meta_keys key:8 ;union { -enum nft_registers dreg:8 ; -enum nft_registers sreg:8 ; +u8 dreg; +u8 sreg; }; };
include/trace/events/libata.h +1 -0
@@ -249,6 +249,7 @@ DECLARE_EVENT_CLASS(ata_qc_complete_template, __entry->hob_feature = qc->result_tf.hob_feature; __entry->nsect = qc->result_tf.nsect; __entry->hob_nsect = qc->result_tf.hob_nsect; + __entry->flags = qc->flags; ), TP_printk("ata_port=%u ata_dev=%u tag=%d flags=%s status=%s " \
net/bridge/netfilter/nft_meta_bridge.c +2 -3
@@ -87,9 +87,8 @@ static int nft_meta_bridge_get_init(const struct nft_ctx *ctx,return nft_meta_get_init (ctx, expr, tb); } - priv->dreg =nft_parse_register (tb[NFTA_META_DREG ]); -return nft_validate_register_store (ctx, priv->dreg,NULL , -NFT_DATA_VALUE , len); +return nft_parse_register_store (ctx, tb[NFTA_META_DREG ], &priv->dreg, +NULL ,NFT_DATA_VALUE , len); }static struct nft_expr_type nft_meta_bridge_type;
net/core/filter.c +28 -6
@@ -5982,10 +5982,21 @@ __bpf_sk_lookup(struct sk_buff *skb, struct bpf_sock_tuple *tuple, u32 len, ifindex, proto, netns_id, flags);if (sk) { - sk =sk_to_full_sk (sk); -if (!sk_fullsock (sk)) { +struct sock *sk2 =sk_to_full_sk (sk); + +/* sk_to_full_sk() may return (sk)->rsk_listener, so make sure the original sk +* sock refcnt is decremented to prevent a request_sock leak. +*/ +if (!sk_fullsock (sk2)) + sk2 =NULL ; +if (sk2 != sk) {sock_gen_put (sk); -return NULL ; +/* Ensure there is no need to bump sk2 refcnt */ +if (unlikely (sk2 && !sock_flag (sk2,SOCK_RCU_FREE ))) { +WARN_ONCE (1 ,"Found non-RCU, unreferenced socket!" ); +return NULL ; + } + sk = sk2; } }
@@ -6019,10 +6030,21 @@ bpf_sk_lookup(struct sk_buff *skb, struct bpf_sock_tuple *tuple, u32 len, flags);if (sk) { - sk =sk_to_full_sk (sk); -if (!sk_fullsock (sk)) { +struct sock *sk2 =sk_to_full_sk (sk); + +/* sk_to_full_sk() may return (sk)->rsk_listener, so make sure the original sk +* sock refcnt is decremented to prevent a request_sock leak. +*/ +if (!sk_fullsock (sk2)) + sk2 =NULL ; +if (sk2 != sk) {sock_gen_put (sk); -return NULL ; +/* Ensure there is no need to bump sk2 refcnt */ +if (unlikely (sk2 && !sock_flag (sk2,SOCK_RCU_FREE ))) { +WARN_ONCE (1 ,"Found non-RCU, unreferenced socket!" ); +return NULL ; + } + sk = sk2; } }
net/ipv4/ip_gre.c +10 -5
@@ -519,7 +519,6 @@ static void erspan_fb_xmit(struct sk_buff *skb, struct net_device *dev)int tunnel_hlen;int version;int nhoff; -int thoff; tun_info =skb_tunnel_info (skb); if (unlikely(!tun_info || !(tun_info->mode & IP_TUNNEL_INFO_TX) ||
@@ -553,10 +552,16 @@ static void erspan_fb_xmit(struct sk_buff *skb, struct net_device *dev) (ntohs(ip_hdr(skb)->tot_len) > skb->len - nhoff)) truncate = true; - thoff =skb_transport_header (skb) -skb_mac_header (skb); -if (skb->protocol ==htons (ETH_P_IPV6 ) && - (ntohs (ipv6_hdr (skb)->payload_len) > skb->len - thoff)) - truncate = true; +if (skb->protocol ==htons (ETH_P_IPV6 )) { +int thoff; + +if (skb_transport_header_was_set (skb)) + thoff =skb_transport_header (skb) -skb_mac_header (skb); +else + thoff = nhoff +sizeof (struct ipv6hdr ); +if (ntohs (ipv6_hdr (skb)->payload_len) > skb->len - thoff) + truncate = true; + }if (version ==1 ) { erspan_build_header(skb, ntohl(tunnel_id_to_key32(key->tun_id)),
net/ipv4/netfilter/nft_dup_ipv4.c +9 -9
@@ -13,8 +13,8 @@#include <net/netfilter/ipv4/nf_dup_ipv4.h> struct nft_dup_ipv4 { -enum nft_registers sreg_addr:8 ; -enum nft_registers sreg_dev:8 ; +u8 sreg_addr; +u8 sreg_dev; }; static void nft_dup_ipv4_eval(const struct nft_expr *expr,
@@ -40,16 +40,16 @@ static int nft_dup_ipv4_init(const struct nft_ctx *ctx,if (tb[NFTA_DUP_SREG_ADDR ] ==NULL )return -EINVAL ; - priv->sreg_addr =nft_parse_register (tb[NFTA_DUP_SREG_ADDR ]); - err =nft_validate_register_load (priv->sreg_addr,sizeof (struct in_addr )); + err =nft_parse_register_load (tb[NFTA_DUP_SREG_ADDR ], &priv->sreg_addr, +sizeof (struct in_addr ));if (err <0 )return err; -if (tb[NFTA_DUP_SREG_DEV ] !=NULL ) { - priv->sreg_dev =nft_parse_register (tb[NFTA_DUP_SREG_DEV ]); -return nft_validate_register_load (priv->sreg_dev,sizeof (int )); - } -return 0 ; +if (tb[NFTA_DUP_SREG_DEV ]) + err =nft_parse_register_load (tb[NFTA_DUP_SREG_DEV ], + &priv->sreg_dev,sizeof (int )); + +return err; }static int nft_dup_ipv4_dump (struct sk_buff *skb,const struct nft_expr *expr)
net/ipv6/ip6_gre.c +10 -5
@@ -944,7 +944,6 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb,__be16 proto;__u32 mtu;int nhoff; -int thoff;if (!pskb_inet_may_pull (skb)) goto tx_err;
@@ -965,10 +964,16 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb, (ntohs(ip_hdr(skb)->tot_len) > skb->len - nhoff)) truncate = true; - thoff =skb_transport_header (skb) -skb_mac_header (skb); -if (skb->protocol ==htons (ETH_P_IPV6 ) && - (ntohs (ipv6_hdr (skb)->payload_len) > skb->len - thoff)) - truncate = true; +if (skb->protocol ==htons (ETH_P_IPV6 )) { +int thoff; + +if (skb_transport_header_was_set (skb)) + thoff =skb_transport_header (skb) -skb_mac_header (skb); +else + thoff = nhoff +sizeof (struct ipv6hdr ); +if (ntohs (ipv6_hdr (skb)->payload_len) > skb->len - thoff) + truncate = true; + }if (skb_cow_head (skb, dev->needed_headroom ?: t->hlen)) goto tx_err;
net/ipv6/netfilter/nft_dup_ipv6.c +9 -9
@@ -13,8 +13,8 @@#include <net/netfilter/ipv6/nf_dup_ipv6.h> struct nft_dup_ipv6 { -enum nft_registers sreg_addr:8 ; -enum nft_registers sreg_dev:8 ; +u8 sreg_addr; +u8 sreg_dev; }; static void nft_dup_ipv6_eval(const struct nft_expr *expr,
@@ -38,16 +38,16 @@ static int nft_dup_ipv6_init(const struct nft_ctx *ctx,if (tb[NFTA_DUP_SREG_ADDR ] ==NULL )return -EINVAL ; - priv->sreg_addr =nft_parse_register (tb[NFTA_DUP_SREG_ADDR ]); - err =nft_validate_register_load (priv->sreg_addr,sizeof (struct in6_addr )); + err =nft_parse_register_load (tb[NFTA_DUP_SREG_ADDR ], &priv->sreg_addr, +sizeof (struct in6_addr ));if (err <0 )return err; -if (tb[NFTA_DUP_SREG_DEV ] !=NULL ) { - priv->sreg_dev =nft_parse_register (tb[NFTA_DUP_SREG_DEV ]); -return nft_validate_register_load (priv->sreg_dev,sizeof (int )); - } -return 0 ; +if (tb[NFTA_DUP_SREG_DEV ]) + err =nft_parse_register_load (tb[NFTA_DUP_SREG_DEV ], + &priv->sreg_dev,sizeof (int )); + +return err; }static int nft_dup_ipv6_dump (struct sk_buff *skb,const struct nft_expr *expr)
net/netfilter/nf_tables_api.c +45 -7
82 lines not on this page · raw message
net/netfilter/nft_bitwise.c +11 -12
@@ -16,8 +16,8 @@#include <net/netfilter/nf_tables_offload.h> struct nft_bitwise { -enum nft_registers sreg:8 ; -enum nft_registers dreg:8 ; +u8 sreg; +u8 dreg;enum nft_bitwise_ops op:8 ;u8 len;struct nft_data mask;
@@ -169,14 +169,14 @@ static int nft_bitwise_init(const struct nft_ctx *ctx, priv->len = len; - priv->sreg =nft_parse_register (tb[NFTA_BITWISE_SREG ]); - err =nft_validate_register_load (priv->sreg, priv->len); + err =nft_parse_register_load (tb[NFTA_BITWISE_SREG ], &priv->sreg, + priv->len);if (err <0 )return err; - priv->dreg =nft_parse_register (tb[NFTA_BITWISE_DREG ]); - err =nft_validate_register_store (ctx, priv->dreg,NULL , -NFT_DATA_VALUE , priv->len); + err =nft_parse_register_store (ctx, tb[NFTA_BITWISE_DREG ], + &priv->dreg,NULL ,NFT_DATA_VALUE , + priv->len);if (err <0 )return err;
@@ -315,14 +315,13 @@ static int nft_bitwise_fast_init(const struct nft_ctx *ctx,struct nft_bitwise_fast_expr *priv =nft_expr_priv (expr);int err; - priv->sreg =nft_parse_register (tb[NFTA_BITWISE_SREG ]); - err =nft_validate_register_load (priv->sreg,sizeof (u32)); + err =nft_parse_register_load (tb[NFTA_BITWISE_SREG ], &priv->sreg, +sizeof (u32));if (err <0 )return err; - priv->dreg =nft_parse_register (tb[NFTA_BITWISE_DREG ]); - err =nft_validate_register_store (ctx, priv->dreg,NULL , -NFT_DATA_VALUE ,sizeof (u32)); + err =nft_parse_register_store (ctx, tb[NFTA_BITWISE_DREG ], &priv->dreg, +NULL ,NFT_DATA_VALUE ,sizeof (u32));if (err <0 )return err;
net/netfilter/nft_byteorder.c +7 -7
@@ -16,8 +16,8 @@#include <net/netfilter/nf_tables.h> struct nft_byteorder { -enum nft_registers sreg:8 ; -enum nft_registers dreg:8 ; +u8 sreg; +u8 dreg;enum nft_byteorder_ops op:8 ;u8 len;u8 size;
@@ -131,20 +131,20 @@ static int nft_byteorder_init(const struct nft_ctx *ctx,return -EINVAL ; } - priv->sreg =nft_parse_register (tb[NFTA_BYTEORDER_SREG ]); err =nft_parse_u32_check (tb[NFTA_BYTEORDER_LEN ],U8_MAX , &len);if (err <0 )return err; priv->len = len; - err =nft_validate_register_load (priv->sreg, priv->len); + err =nft_parse_register_load (tb[NFTA_BYTEORDER_SREG ], &priv->sreg, + priv->len);if (err <0 )return err; - priv->dreg =nft_parse_register (tb[NFTA_BYTEORDER_DREG ]); -return nft_validate_register_store (ctx, priv->dreg,NULL , -NFT_DATA_VALUE , priv->len); +return nft_parse_register_store (ctx, tb[NFTA_BYTEORDER_DREG ], + &priv->dreg,NULL ,NFT_DATA_VALUE , + priv->len); }static int nft_byteorder_dump (struct sk_buff *skb,const struct nft_expr *expr)
net/netfilter/nft_cmp.c +3 -5
@@ -18,7 +18,7 @@struct nft_cmp_expr {struct nft_data data; -enum nft_registers sreg:8 ; +u8 sreg;u8 len;enum nft_cmp_ops op:8 ; };
@@ -87,8 +87,7 @@ static int nft_cmp_init(const struct nft_ctx *ctx, const struct nft_expr *expr,return err; } - priv->sreg =nft_parse_register (tb[NFTA_CMP_SREG ]); - err =nft_validate_register_load (priv->sreg, desc.len); + err =nft_parse_register_load (tb[NFTA_CMP_SREG ], &priv->sreg, desc.len);if (err <0 )return err;
@@ -211,8 +210,7 @@ static int nft_cmp_fast_init(const struct nft_ctx *ctx,if (err <0 )return err; - priv->sreg =nft_parse_register (tb[NFTA_CMP_SREG ]); - err =nft_validate_register_load (priv->sreg, desc.len); + err =nft_parse_register_load (tb[NFTA_CMP_SREG ], &priv->sreg, desc.len);if (err <0 )return err;
net/netfilter/nft_ct.c +5 -7
@@ -27,8 +27,8 @@ struct nft_ct { enum nft_ct_keys key:8; enum ip_conntrack_dir dir:8;union { -enum nft_registers dreg:8 ; -enum nft_registers sreg:8 ; +u8 dreg; +u8 sreg; }; };
@@ -499,9 +499,8 @@ static int nft_ct_get_init(const struct nft_ctx *ctx, } } - priv->dreg =nft_parse_register (tb[NFTA_CT_DREG ]); - err =nft_validate_register_store (ctx, priv->dreg,NULL , -NFT_DATA_VALUE , len); + err =nft_parse_register_store (ctx, tb[NFTA_CT_DREG ], &priv->dreg,NULL , +NFT_DATA_VALUE , len);if (err <0 )return err;
@@ -608,8 +607,7 @@ static int nft_ct_set_init(const struct nft_ctx *ctx, } } - priv->sreg =nft_parse_register (tb[NFTA_CT_SREG ]); - err =nft_validate_register_load (priv->sreg, len); + err =nft_parse_register_load (tb[NFTA_CT_SREG ], &priv->sreg, len);if (err <0 ) goto err1;
net/netfilter/nft_dup_netdev.c +3 -3
@@ -14,7 +14,7 @@#include <net/netfilter/nf_dup_netdev.h> struct nft_dup_netdev { -enum nft_registers sreg_dev:8 ; +u8 sreg_dev; }; static void nft_dup_netdev_eval(const struct nft_expr *expr,
@@ -40,8 +40,8 @@ static int nft_dup_netdev_init(const struct nft_ctx *ctx,if (tb[NFTA_DUP_SREG_DEV ] ==NULL )return -EINVAL ; - priv->sreg_dev =nft_parse_register (tb[NFTA_DUP_SREG_DEV ]); -return nft_validate_register_load (priv->sreg_dev,sizeof (int )); +return nft_parse_register_load (tb[NFTA_DUP_SREG_DEV ], &priv->sreg_dev, +sizeof (int )); }static int nft_dup_netdev_dump (struct sk_buff *skb,const struct nft_expr *expr)
net/netfilter/nft_dynset.c +6 -6
@@ -16,8 +16,8 @@ struct nft_dynset {struct nft_set *set;struct nft_set_ext_tmpl tmpl; enum nft_dynset_ops op:8; - enum nft_registers sreg_key:8; - enum nft_registers sreg_data:8; +u8 sreg_key; +u8 sreg_data;bool invert;u64 timeout;struct nft_expr *expr;
@@ -154,8 +154,8 @@ static int nft_dynset_init(const struct nft_ctx *ctx,return err; } - priv->sreg_key =nft_parse_register (tb[NFTA_DYNSET_SREG_KEY ]); - err =nft_validate_register_load (priv->sreg_key, set->klen); + err =nft_parse_register_load (tb[NFTA_DYNSET_SREG_KEY ], &priv->sreg_key, + set->klen);if (err <0 )return err;
@@ -165,8 +165,8 @@ static int nft_dynset_init(const struct nft_ctx *ctx,if (set->dtype ==NFT_DATA_VERDICT )return -EOPNOTSUPP ; - priv->sreg_data =nft_parse_register (tb[NFTA_DYNSET_SREG_DATA ]); - err =nft_validate_register_load (priv->sreg_data, set->dlen); + err =nft_parse_register_load (tb[NFTA_DYNSET_SREG_DATA ], + &priv->sreg_data, set->dlen);if (err <0 )return err; }else if (set->flags &NFT_SET_MAP )
net/netfilter/nft_exthdr.c +7 -7
@@ -19,8 +19,8 @@ struct nft_exthdr {u8 offset;u8 len;u8 op; - enum nft_registers dreg:8; - enum nft_registers sreg:8; +u8 dreg; +u8 sreg;u8 flags; };
@@ -353,12 +353,12 @@ static int nft_exthdr_init(const struct nft_ctx *ctx, priv->type =nla_get_u8 (tb[NFTA_EXTHDR_TYPE ]); priv->offset = offset; priv->len = len; - priv->dreg =nft_parse_register (tb[NFTA_EXTHDR_DREG ]); priv->flags = flags; priv->op = op; -return nft_validate_register_store (ctx, priv->dreg,NULL , -NFT_DATA_VALUE , priv->len); +return nft_parse_register_store (ctx, tb[NFTA_EXTHDR_DREG ], + &priv->dreg,NULL ,NFT_DATA_VALUE , + priv->len); } static int nft_exthdr_tcp_set_init(const struct nft_ctx *ctx,
@@ -403,11 +403,11 @@ static int nft_exthdr_tcp_set_init(const struct nft_ctx *ctx, priv->type =nla_get_u8 (tb[NFTA_EXTHDR_TYPE ]); priv->offset = offset; priv->len = len; - priv->sreg =nft_parse_register (tb[NFTA_EXTHDR_SREG ]); priv->flags = flags; priv->op = op; -return nft_validate_register_load (priv->sreg, priv->len); +return nft_parse_register_load (tb[NFTA_EXTHDR_SREG ], &priv->sreg, + priv->len); } static int nft_exthdr_ipv4_init(const struct nft_ctx *ctx,
net/netfilter/nft_fib.c +2 -3
@@ -86,7 +86,6 @@ int nft_fib_init(const struct nft_ctx *ctx, const struct nft_expr *expr,return -EINVAL ; priv->result =ntohl (nla_get_be32 (tb[NFTA_FIB_RESULT ])); - priv->dreg =nft_parse_register (tb[NFTA_FIB_DREG ]);switch (priv->result) {case NFT_FIB_RESULT_OIF :
@@ -106,8 +105,8 @@ int nft_fib_init(const struct nft_ctx *ctx, const struct nft_expr *expr,return -EINVAL ; }
Lines of this file are not shown. View the raw message.
tools/testing/selftests/netfilter/nft_concat_range.sh +1 -1
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.