Linux 5.4.93
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.93 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.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/admin-guide/kernel-parameters.txt | 4 Makefile | 2 arch/arm/xen/enlighten.c | 2 arch/arm64/include/asm/atomic.h | 10 +- arch/powerpc/kernel/vmlinux.lds.S | 25 +---- arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts | 1 arch/riscv/configs/defconfig | 2 arch/riscv/kernel/time.c | 3 arch/sh/drivers/dma/Kconfig | 3 arch/x86/include/asm/fpu/api.h | 15 ++- arch/x86/include/asm/topology.h | 4 arch/x86/kernel/cpu/amd.c | 4 arch/x86/kernel/cpu/topology.c | 2 arch/x86/kernel/fpu/core.c | 9 +- arch/x86/lib/mmx_32.c | 20 +++- arch/x86/xen/enlighten_hvm.c | 11 ++ drivers/acpi/scan.c | 2 drivers/base/core.c | 17 +++ drivers/clk/tegra/clk-tegra30.c | 2 drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h | 2 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 2 drivers/gpu/drm/drm_atomic_helper.c | 2 drivers/gpu/drm/drm_syncobj.c | 8 + drivers/gpu/drm/i915/gt/intel_lrc.c | 3 drivers/gpu/drm/nouveau/dispnv50/disp.c | 4 drivers/gpu/drm/nouveau/dispnv50/disp.h | 2 drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c | 2 drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c | 2 drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c | 8 - drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c | 10 +- drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c | 10 +- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 6 - drivers/hid/hid-ids.h | 1 drivers/hid/hid-input.c | 2 drivers/hid/hid-logitech-dj.c | 4 drivers/hid/hid-multitouch.c | 4 drivers/hwtracing/intel_th/pci.c | 5 + drivers/hwtracing/stm/heartbeat.c | 6 - drivers/i2c/busses/i2c-octeon-core.c | 2 drivers/i2c/busses/i2c-tegra-bpmp.c | 2 drivers/iio/dac/ad5504.c | 4 drivers/irqchip/irq-mips-cpu.c | 7 + drivers/lightnvm/core.c | 3 drivers/md/Kconfig | 1 drivers/md/dm-integrity.c | 6 + drivers/md/dm-table.c | 15 ++- drivers/mmc/core/queue.c | 4 drivers/mmc/host/sdhci-xenon.c | 7 + drivers/net/can/dev.c | 4 drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 8 - drivers/net/can/vxcan.c | 6 - drivers/net/dsa/b53/b53_common.c | 2 drivers/net/dsa/mv88e6xxx/global1_vtu.c | 4 drivers/net/ethernet/mscc/ocelot.c | 4 drivers/net/ethernet/renesas/sh_eth.c | 4 drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c | 2 drivers/pinctrl/pinctrl-ingenic.c | 24 ++--- drivers/platform/x86/i2c-multi-instantiate.c | 31 +++++- drivers/platform/x86/ideapad-laptop.c | 15 +++ drivers/platform/x86/intel-vbtn.c | 6 - drivers/scsi/megaraid/megaraid_sas_base.c | 6 - drivers/scsi/qedi/qedi_main.c | 4 drivers/scsi/sd.c | 4 drivers/scsi/ufs/ufshcd.c | 11 -- drivers/tty/serial/mvebu-uart.c | 10 ++ drivers/tty/serial/sifive.c | 1 drivers/usb/gadget/udc/aspeed-vhub/epn.c | 5 - drivers/usb/gadget/udc/bdc/Kconfig | 2 drivers/usb/gadget/udc/core.c | 13 ++ drivers/usb/host/ehci-hcd.c | 12 ++ drivers/usb/host/ehci-hub.c | 3 drivers/usb/host/xhci-ring.c | 2 drivers/usb/host/xhci-tegra.c | 7 + drivers/xen/events/events_base.c | 10 -- drivers/xen/platform-pci.c | 1 drivers/xen/xenbus/xenbus.h | 1 drivers/xen/xenbus/xenbus_comms.c | 8 - drivers/xen/xenbus/xenbus_probe.c | 81 ++++++++++++++---- fs/btrfs/block-group.c | 3 fs/btrfs/extent-tree.c | 10 ++ fs/btrfs/send.c | 15 +++ fs/btrfs/volumes.c | 2 fs/cifs/transport.c | 4 include/asm-generic/bitops/atomic.h | 6 - include/net/inet_connection_sock.h | 3 include/xen/xenbus.h | 2 mm/kasan/init.c | 23 ++--- net/core/dev.c | 5 + net/core/skbuff.c | 6 + net/ipv4/inet_connection_sock.c | 1 net/ipv4/netfilter/ipt_rpfilter.c | 2 net/ipv4/tcp.c | 1 net/ipv4/tcp_input.c | 1 net/ipv4/tcp_ipv4.c | 25 ++--- net/ipv4/tcp_output.c | 1 net/ipv4/tcp_timer.c | 14 +-- net/ipv4/udp.c | 3 net/ipv6/addrconf.c | 3 net/sched/cls_tcindex.c | 8 + net/sched/sch_api.c | 3 sound/core/seq/oss/seq_oss_synth.c | 3 sound/pci/hda/patch_via.c | 1 sound/soc/intel/boards/haswell.c | 1 tools/testing/selftests/net/fib_tests.sh | 1 104 files changed, 488 insertions(+), 222 deletions(-)
Alex Leibovich (1):
mmc: sdhci-xenon: fix 1.8v regulator stabilization
Alexander Lobakin (1):
skbuff: back tiny skbs with kmalloc() in __netdev_alloc_skb() too
Alexander Shishkin (1):
intel_th: pci: Add Alder Lake-P support
Andy Lutomirski (2):
x86/fpu: Add kernel_fpu_begin_mask() to selectively initialize state x86/mmx: Use KFPU_387 for MMX string operations
Anthony Iliopoulos (1):
dm integrity: select CRYPTO_SKCIPHER
Ariel Marcovitch (1):
powerpc: Fix alignment bug within the init sections
Arnd Bergmann (2):
arm64: make atomic helpers __always_inline
scsi: megaraid_sas: Fix MEGASAS_IOC_FIRMWARE regression
Ben Skeggs (5):
drm/nouveau/bios: fix issue shadowing expansion ROMs drm/nouveau/privring: ack interrupts the same way as RM drm/nouveau/i2c/gm200: increase width of aux semaphore owner fields drm/nouveau/mmu: fix vram heap sizing drm/nouveau/kms/nv50-: fix case where notifier buffer is at offset 0
Billy Tsai (1):
pinctrl: aspeed: g6: Fix PWMG0 pinctrl setting
Borislav Petkov (1):
x86/topology: Make __max_die_per_package available unconditionally
Can Guo (1):
scsi: ufs: Correct the LUN used in eh_device_reset_handler() callback
Cezary Rojewski (1):
ASoC: Intel: haswell: Add missing pm_ops
Chris Wilson (1):
drm/i915/gt: Prevent use of engine->wa_ctx after error
Damien Le Moal (2):
riscv: Fix kernel time_init()
riscv: Fix sifive serial driver
Dan Carpenter (1):
net: dsa: b53: fix an off by one in checking "vlan->vid"
Daniel Vetter (1):
drm/syncobj: Fix use-after-free
David Woodhouse (2):
xen: Fix event channel callback via INTX/GSI
x86/xen: Add xen_no_vector_callback option to test PCI INTX delivery
Enke Chen (1):
tcp: fix TCP_USER_TIMEOUT with zero window
Eric Dumazet (3):
net_sched: avoid shift-out-of-bounds in tcindex_set_parms()
net_sched: reject silly cell_log in qdisc_get_rtab()
tcp: do not mess with cloned skbs in tcp_add_backlog()
Eugene Korenevsky (1):
ehci: fix EHCI host controller initialization sequence
Ewan D. Milne (1):
scsi: sd: Suppress spurious errors when WRITE SAME is being disabled
Filipe Laíns (1):
HID: logitech-dj: add the G602 receiver
Filipe Manana (1):
btrfs: send: fix invalid clone operations when cloning from the same file and root
Geert Uytterhoeven (1):
sh_eth: Fix power down vs. is_opened flag ordering
Greg Kroah-Hartman (1):
Linux 5.4.93
Guillaume Nault (2):
netfilter: rpfilter: mask ecn bits before fib lookup
udp: mask TOS bits in udp_v4_early_demux()
Hangbin Liu (1):
selftests: net: fib_tests: remove duplicate log test
Hannes Reinecke (1):
dm: avoid filesystem lookup in dm_get_dev_t()
Hans de Goede (2):
ACPI: scan: Make acpi_bus_get_device() clear return pointer on error platform/x86: intel-vbtn: Drop HP Stream x360 Convertible PC 11 from allow-list
Heikki Krogerus (1):
platform/x86: i2c-multi-instantiate: Don't create platform device for INT3515 ACPI nodes
JC Kuo (1):
xhci: tegra: Delay for disabling LFPS detector
Jiaxun Yang (1):
platform/x86: ideapad-laptop: Disable touchpad_switch for ELAN0634
Josef Bacik (3):
btrfs: don't get an EINTR during drop_snapshot for reloc
btrfs: fix lockdep splat in btrfs_recover_relocation
btrfs: don't clear ret in btrfs_start_dirty_block_groups
Kai-Heng Feng (1):
HID: multitouch: Enable multi-input for Synaptics pointstick/touchpad device
Lars-Peter Clausen (1):
iio: ad5504: Fix setting power-down state
Lecopzer Chen (2):
kasan: fix unaligned address is unhandled in kasan_remove_zero_shadow
kasan: fix incorrect arguments passing in kasan_add_zero_shadow
Longfang Liu (1):
USB: ehci: fix an interrupt calltrace error
Mathias Kresin (1):
irqchip/mips-cpu: Set IPI domain parent chip
Mathias Nyman (1):
xhci: make sure TRB is fully written before giving it to the controller
Matteo Croce (2):
ipv6: create multicast route with RTPROT_KERNEL
ipv6: set multicast flag on the multicast route
Mikko Perttunen (1):
i2c: bpmp-tegra: Ignore unknown I2C_M flags
Mikulas Patocka (1):
dm integrity: fix a crash if "recalculate" used without "internal_hash"
Necip Fazil Yildiran (1):
sh: dma: fix kconfig dependency for G2_DMA
Nilesh Javali (1):
scsi: qedi: Correct max length of CHAP secret
Pali Rohár (1):
serial: mvebu-uart: fix tx lost characters at power off
Pan Bian (2):
drm/atomic: put state on error path
lightnvm: fix memory leak when submit fails
Patrik Jakobsson (1):
usb: bdc: Make bdc pci driver depend on BROKEN
Paul Cercueil (1):
pinctrl: ingenic: Fix JZ4760 support
Peter Collingbourne (1):
mmc: core: don't initialize block size from ext_csd if not present
Peter Geis (1):
clk: tegra30: Add hda clock default rates to clock driver
Rafael J. Wysocki (1):
driver core: Extend device_is_dependent()
Rasmus Villemoes (1):
net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext
Ronnie Sahlberg (1):
cifs: do not fail __smb_send_rqst if non-fatal signals are pending
Ryan Chen (1):
usb: gadget: aspeed: fix stop dma register setting.
Sagar Shrikant Kadam (2):
dts: phy: fix missing mdio device and probe failure of vsc8541-01 device
riscv: defconfig: enable gpio support for HiFive Unleashed
Seth Miller (1):
HID: Ignore battery for Elan touchscreen on ASUS UX550
Takashi Iwai (2):
ALSA: seq: oss: Fix missing error check in snd_seq_oss_synth_make_info()
ALSA: hda/via: Add minimum mute flag
Tariq Toukan (1):
net: Disable NETIF_F_HW_TLS_RX when RXCSUM is disabled
Thinh Nguyen (1):
usb: udc: core: Use lock when write to soft_connect
Victor Zhao (1):
drm/amdgpu/psp: fix psp gfx ctrl cmds
Vincent Mailhol (3):
can: dev: can_restart: fix use after free bug
can: vxcan: vxcan_xmit: fix use after free bug
can: peak_usb: fix use after free bugs
Vladimir Oltean (1):
net: mscc: ocelot: allow offloading of bridge on top of LAG
Wang Hui (1):
stm class: Fix module init return on allocation failure
Wayne Lin (1):
drm/amd/display: Fix to be able to stop crc calculation
Wolfram Sang (1):
i2c: octeon: check correct size of maximum RECV_LEN packet
Yazen Ghannam (1):
x86/cpu/amd: Set __max_die_per_package on AMD
Youling Tang (1):
powerpc: Use the common INIT_DATA_SECTION macro in vmlinux.lds.S
Greg Kroah-Hartman
maintainerDocumentation/admin-guide/kernel-parameters.txt +4 -0
@@ -5452,6 +5452,10 @@ This option is obsoleted by the "nopv" option, which has equivalent effect for XEN platform. + xen_no_vector_callback + [KNL,X86,XEN] Disable the vector callback for Xen + event channel interrupts. + xen_scrub_pages= [XEN] Boolean option to control scrubbing pages before giving them back to Xen, for use by other domains. Can be also changed at runtime
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 92 +SUBLEVEL = 93 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/arm/xen/enlighten.c +1 -1
@@ -371,7 +371,7 @@ static int __init xen_guest_init(void) }gnttab_init ();if (!xen_initial_domain ()) -xenbus_probe (NULL ); +xenbus_probe ();/* * Making sure board specific code will not set up ops for
arch/arm64/include/asm/atomic.h +5 -5
@@ -17,7 +17,7 @@#include <asm/lse.h> #define ATOMIC_OP (op) \ -static inline void arch_##op(int i, atomic_t *v) \ +static __always_inline void arch_##op(int i, atomic_t *v) \ { \ __lse_ll_sc_body(op, i, v); \ }
@@ -32,7 +32,7 @@ ATOMIC_OP(atomic_sub)#undef ATOMIC_OP#define ATOMIC_FETCH_OP (name, op) \ -static inline int arch_##op##name(int i, atomic_t *v) \ +static __always_inline int arch_##op##name(int i, atomic_t *v) \ { \ return __lse_ll_sc_body(op##name, i, v); \ }
@@ -56,7 +56,7 @@ ATOMIC_FETCH_OPS(atomic_sub_return)#undef ATOMIC_FETCH_OPS#define ATOMIC64_OP (op) \ -static inline void arch_##op(long i, atomic64_t *v) \ +static __always_inline void arch_##op(long i, atomic64_t *v) \ { \ __lse_ll_sc_body(op, i, v); \ }
@@ -71,7 +71,7 @@ ATOMIC64_OP(atomic64_sub)#undef ATOMIC64_OP#define ATOMIC64_FETCH_OP (name, op) \ -static inline long arch_##op##name(long i, atomic64_t *v) \ +static __always_inline long arch_##op##name(long i, atomic64_t *v) \ { \ return __lse_ll_sc_body(op##name, i, v); \ }
@@ -94,7 +94,7 @@ ATOMIC64_FETCH_OPS(atomic64_sub_return)#undef ATOMIC64_FETCH_OP#undef ATOMIC64_FETCH_OPS -static inline long arch_atomic64_dec_if_positive (atomic64_t *v) +static __always_inline long arch_atomic64_dec_if_positive (atomic64_t *v) {return __lse_ll_sc_body (atomic64_dec_if_positive, v); }
arch/powerpc/kernel/vmlinux.lds.S +8 -17
@@ -210,6 +210,12 @@ SECTIONS .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { _sinittext = .; INIT_TEXT + + /* + *.init.text might be RO so we must ensure this section ends on + * a page boundary. + */ + . = ALIGN(PAGE_SIZE); _einittext = .; #ifdef CONFIG_PPC64 *(.tramp.ftrace.init);
@@ -223,21 +229,9 @@ SECTIONS EXIT_TEXT } - .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { - INIT_DATA - } - - .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { - INIT_SETUP(16) - } + . = ALIGN(PAGE_SIZE); - .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) { - INIT_CALLS - } - - .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) { - CON_INITCALL - } + INIT_DATA_SECTION(16) . = ALIGN(8); __ftr_fixup : AT(ADDR(__ftr_fixup) - LOAD_OFFSET) {
@@ -265,9 +259,6 @@ SECTIONS __stop___fw_ftr_fixup = .; } #endif - .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { - INIT_RAM_FS - } PERCPU_SECTION(L1_CACHE_BYTES)
arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts +1 -0
@@ -83,6 +83,7 @@ phy-mode = "gmii"; phy-handle = <&phy0>; phy0: ethernet-phy@0 { + compatible = "ethernet-phy-id0007.0771"; reg = <0>; }; };
arch/riscv/configs/defconfig +2 -0
@@ -62,6 +62,8 @@ CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_VIRTIO=y CONFIG_SPI=y CONFIG_SPI_SIFIVE=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_SIFIVE=y # CONFIG_PTP_1588_CLOCK is not set CONFIG_DRM=y CONFIG_DRM_RADEON=y
arch/riscv/kernel/time.c +3 -0
@@ -4,6 +4,7 @@* Copyright (C) 2017 SiFive */ +#include <linux/of_clk.h> #include <linux/clocksource.h> #include <linux/delay.h> #include <asm/sbi.h>
@@ -24,5 +25,7 @@ void __init time_init(void) riscv_timebase = prop; lpj_fine = riscv_timebase /HZ ; + +of_clk_init (NULL );timer_probe (); }
arch/sh/drivers/dma/Kconfig +1 -2
@@ -63,8 +63,7 @@ config PVR2_DMA config G2_DMA tristate "G2 Bus DMA support" - depends on SH_DREAMCAST - select SH_DMA_API + depends on SH_DREAMCAST && SH_DMA_API help This enables support for the DMA controller for the Dreamcast's G2 bus. Drivers that want this will generally enable this on
arch/x86/include/asm/fpu/api.h +13 -2
@@ -16,14 +16,25 @@* Use kernel_fpu_begin/end() if you intend to use FPU in kernel context. It * disables preemption so be careful if you intend to use it for long periods * of time. -* If you intend to use the FPU in softirq you need to check first with +* If you intend to use the FPU in irq/softirq you need to check first with * irq_fpu_usable() if it is possible. */ -extern void kernel_fpu_begin (void ); + +/* Kernel FPU states to initialize in kernel_fpu_begin_mask() */ +#define KFPU_387 _BITUL(0)/* 387 state will be initialized */ +#define KFPU_MXCSR _BITUL(1)/* MXCSR will be initialized */ + +extern void kernel_fpu_begin_mask (unsigned int kfpu_mask);extern void kernel_fpu_end (void );extern bool irq_fpu_usable (void );extern void fpregs_mark_activate (void ); +/* Code that is unaware of kernel_fpu_begin_mask() can use this */ +static inline void kernel_fpu_begin (void ) +{ +kernel_fpu_begin_mask (KFPU_387 |KFPU_MXCSR ); +} +/* * Use fpregs_lock() while editing CPU's FPU registers or fpu->state. * A context switch will (and softirq might) save CPU's FPU registers to
arch/x86/include/asm/topology.h +2 -2
@@ -110,6 +110,8 @@ extern const struct cpumask *cpu_coregroup_mask(int cpu);#define topology_die_id (cpu) (cpu_data(cpu).cpu_die_id)#define topology_core_id (cpu) (cpu_data(cpu).cpu_core_id) +extern unsigned int __max_die_per_package; +#ifdef CONFIG_SMP #define topology_die_cpumask (cpu) (per_cpu(cpu_die_map, cpu))#define topology_core_cpumask (cpu) (per_cpu(cpu_core_map, cpu))
@@ -118,8 +120,6 @@ extern const struct cpumask *cpu_coregroup_mask(int cpu);extern unsigned int __max_logical_packages;#define topology_max_packages () (__max_logical_packages) -extern unsigned int __max_die_per_package; -static inline int topology_max_die_per_package (void ) {return __max_die_per_package;
arch/x86/kernel/cpu/amd.c +2 -2
@@ -545,12 +545,12 @@ static void bsp_init_amd(struct cpuinfo_x86 *c)u32 ecx; ecx =cpuid_ecx (0x8000001e ); - nodes_per_socket = ((ecx >>8 ) &7 ) +1 ; + __max_die_per_package = nodes_per_socket = ((ecx >>8 ) &7 ) +1 ; }else if (boot_cpu_has (X86_FEATURE_NODEID_MSR )) {u64 value;rdmsrl (MSR_FAM10H_NODE_ID , value); - nodes_per_socket = ((value >>3 ) &7 ) +1 ; + __max_die_per_package = nodes_per_socket = ((value >>3 ) &7 ) +1 ; } if (!boot_cpu_has(X86_FEATURE_AMD_SSBD) &&
arch/x86/kernel/cpu/topology.c +1 -1
@@ -25,10 +25,10 @@#define BITS_SHIFT_NEXT_LEVEL (eax) ((eax) & 0x1f)#define LEVEL_MAX_SIBLINGS (ebx) ((ebx) & 0xffff) -#ifdef CONFIG_SMP unsigned int __max_die_per_package__read_mostly =1 ;EXPORT_SYMBOL (__max_die_per_package); +#ifdef CONFIG_SMP /* * Check if given CPUID extended toplogy "leaf" is implemented */
arch/x86/kernel/fpu/core.c +5 -4
@@ -82,7 +82,7 @@ bool irq_fpu_usable(void) }EXPORT_SYMBOL (irq_fpu_usable); -void kernel_fpu_begin (void ) +void kernel_fpu_begin_mask (unsigned int kfpu_mask) {preempt_disable ();
@@ -102,13 +102,14 @@ void kernel_fpu_begin(void) }__cpu_invalidate_fpregs_state (); -if (boot_cpu_has (X86_FEATURE_XMM )) +/* Put sane initial values into the control registers. */ +if (likely (kfpu_mask &KFPU_MXCSR ) &&boot_cpu_has (X86_FEATURE_XMM ))ldmxcsr (MXCSR_DEFAULT ); -if (boot_cpu_has (X86_FEATURE_FPU )) +if (unlikely (kfpu_mask &KFPU_387 ) &&boot_cpu_has (X86_FEATURE_FPU )) asmvolatile ("fninit" ); } -EXPORT_SYMBOL_GPL (kernel_fpu_begin); +EXPORT_SYMBOL_GPL (kernel_fpu_begin_mask);void kernel_fpu_end (void ) {
arch/x86/lib/mmx_32.c +15 -5
@@ -26,6 +26,16 @@#include <asm/fpu/api.h> #include <asm/asm.h> +/* +* Use KFPU_387. MMX instructions are not affected by MXCSR, +* but both AMD and Intel documentation states that even integer MMX +* operations will result in #MF if an exception is pending in FCW. +* +* EMMS is not needed afterwards because, after calling kernel_fpu_end(), +* any subsequent user of the 387 stack will reinitialize it using +* KFPU_387. +*/ +void *_mmx_memcpy (void *to,const void *from,size_t len) {void *p;
@@ -37,7 +47,7 @@ void *_mmx_memcpy(void *to, const void *from, size_t len) p = to; i = len >>6 ;/* len/64 */ -kernel_fpu_begin (); +kernel_fpu_begin_mask (KFPU_387 ); __asm__ __volatile__ ( "1: prefetch (%0)\n" /* This set is 28 bytes */
@@ -127,7 +137,7 @@ static void fast_clear_page(void *page) {int i; -kernel_fpu_begin (); +kernel_fpu_begin_mask (KFPU_387 ); __asm__ __volatile__ ( " pxor %%mm0, %%mm0\n" : :
@@ -160,7 +170,7 @@ static void fast_copy_page(void *to, void *from) {int i; -kernel_fpu_begin (); +kernel_fpu_begin_mask (KFPU_387 );/* * maybe the prefetch stuff can go before the expensive fnsave...
@@ -247,7 +257,7 @@ static void fast_clear_page(void *page) {int i; -kernel_fpu_begin (); +kernel_fpu_begin_mask (KFPU_387 ); __asm__ __volatile__ ( " pxor %%mm0, %%mm0\n" : :
@@ -282,7 +292,7 @@ static void fast_copy_page(void *to, void *from) {int i; -kernel_fpu_begin (); +kernel_fpu_begin_mask (KFPU_387 ); __asm__ __volatile__ ( "1: prefetch (%0)\n"
arch/x86/xen/enlighten_hvm.c +10 -1
@@ -175,6 +175,8 @@ static int xen_cpu_dead_hvm(unsigned int cpu)return 0 ; } +static bool no_vector_callback__initdata ; +static void __init xen_hvm_guest_init (void ) {if (xen_pv_domain ())
@@ -194,7 +196,7 @@ static void __init xen_hvm_guest_init(void)xen_panic_handler_init (); -if (xen_feature (XENFEAT_hvm_callback_vector)) +if (!no_vector_callback &&xen_feature (XENFEAT_hvm_callback_vector)) xen_have_vector_callback =1 ;xen_hvm_smp_init ();
@@ -220,6 +222,13 @@ static __init int xen_parse_nopv(char *arg) }early_param ("xen_nopv" , xen_parse_nopv); +static __init int xen_parse_no_vector_callback (char *arg) +{ + no_vector_callback = true; +return 0 ; +} +early_param ("xen_no_vector_callback" , xen_parse_no_vector_callback); +bool __init xen_hvm_need_lapic (void ) {if (xen_pv_domain ())
drivers/acpi/scan.c +2 -0
@@ -587,6 +587,8 @@ static int acpi_get_device_data(acpi_handle handle, struct acpi_device **device,if (!device)return -EINVAL ; + *device =NULL ; + status =acpi_get_data_full (handle, acpi_scan_drop_device, (void **)device, callback);if (ACPI_FAILURE (status) || !*device) {
drivers/base/core.c +16 -1
@@ -106,6 +106,16 @@ int device_links_read_lock_held(void)#endif #endif /* !CONFIG_SRCU */ +static bool device_is_ancestor (struct device *dev,struct device *target) +{ +while (target->parent) { + target = target->parent; +if (dev == target) +return true; + } +return false; +} +/** * device_is_dependent - Check if one device depends on another one * @dev: Device to check dependencies for.
@@ -119,7 +129,12 @@ static int device_is_dependent(struct device *dev, void *target)struct device_link *link;int ret; -if (dev == target) +/* +* The "ancestors" check is needed to catch the case when the target +* device has not been completely initialized yet and it is still +* missing from the list of children of its parent device. +*/ +if (dev == target ||device_is_ancestor (dev, target))return 1 ; ret =device_for_each_child (dev, target, device_is_dependent);
drivers/clk/tegra/clk-tegra30.c +2 -0
@@ -1263,6 +1263,8 @@ static struct tegra_clk_init_table init_table[] __initdata = { { TEGRA30_CLK_I2S3_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 }, { TEGRA30_CLK_I2S4_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 }, { TEGRA30_CLK_VIMCLK_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 }, + { TEGRA30_CLK_HDA, TEGRA30_CLK_PLL_P, 102000000, 0 }, + { TEGRA30_CLK_HDA2CODEC_2X, TEGRA30_CLK_PLL_P, 48000000, 0 },/* must be the last entry */ { TEGRA30_CLK_CLK_MAX, TEGRA30_CLK_CLK_MAX, 0, 0 }, };
drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h +1 -1
@@ -44,7 +44,7 @@ enum psp_gfx_crtl_cmd_idGFX_CTRL_CMD_ID_DISABLE_INT =0x00060000 ,/* disable PSP-to-Gfx interrupt */ GFX_CTRL_CMD_ID_MODE1_RST =0x00070000 ,/* trigger the Mode 1 reset */ GFX_CTRL_CMD_ID_GBR_IH_SET =0x00080000 ,/* set Gbr IH_RB_CNTL registers */ -GFX_CTRL_CMD_ID_CONSUME_CMD =0x000A0000 ,/* send interrupt to psp for updating write pointer of vf */ +GFX_CTRL_CMD_ID_CONSUME_CMD =0x00090000 ,/* send interrupt to psp for updating write pointer of vf */ GFX_CTRL_CMD_ID_DESTROY_GPCOM_RING =0x000C0000 ,/* destroy GPCOM ring */ GFX_CTRL_CMD_ID_MAX = 0x000F0000, /* max command ID */
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c +1 -1
@@ -113,7 +113,7 @@ int amdgpu_dm_crtc_configure_crc_source(struct drm_crtc *crtc,mutex_lock (&adev->dm.dc_lock);/* Enable CRTC CRC generation if necessary. */ -if (dm_is_crc_source_crtc (source)) { +if (dm_is_crc_source_crtc (source) || source ==AMDGPU_DM_PIPE_CRC_SOURCE_NONE ) {if (!dc_stream_configure_crc (stream_state->ctx->dc, stream_state, enable, enable)) { ret = -EINVAL ;
drivers/gpu/drm/drm_atomic_helper.c +1 -1
@@ -2948,7 +2948,7 @@ int drm_atomic_helper_set_config(struct drm_mode_set *set, ret =handle_conflicting_encoders (state, true);if (ret) -return ret; + goto fail; ret =drm_atomic_commit (state);
drivers/gpu/drm/drm_syncobj.c +5 -3
@@ -326,19 +326,18 @@ int drm_syncobj_find_fence(struct drm_file *file_private,return -ENOENT ; *fence =drm_syncobj_fence_get (syncobj); -drm_syncobj_put (syncobj);if (*fence) { ret =dma_fence_chain_find_seqno (fence, point);if (!ret) -return 0 ; + goto out;dma_fence_put (*fence); }else { ret = -EINVAL ; }if (!(flags &DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT )) -return ret; + goto out;memset (&wait,0 ,sizeof (wait)); wait.task = current;
@@ -370,6 +369,9 @@ int drm_syncobj_find_fence(struct drm_file *file_private,if (wait.node.next)drm_syncobj_remove_wait (syncobj, &wait); +out: +drm_syncobj_put (syncobj); +return ret; }EXPORT_SYMBOL (drm_syncobj_find_fence);
drivers/gpu/drm/i915/gt/intel_lrc.c +3 -0
@@ -2245,6 +2245,9 @@ static int lrc_setup_wa_ctx(struct intel_engine_cs *engine)static void lrc_destroy_wa_ctx (struct intel_engine_cs *engine) {i915_vma_unpin_and_release (&engine->wa_ctx.vma,0 ); + +/* Called on error unwind, clear all flags to prevent further use */ +memset (&engine->wa_ctx,0 ,sizeof (engine->wa_ctx)); }typedef u32 *(*wa_bb_func_t )(struct intel_engine_cs *engine,u32 *batch);
drivers/gpu/drm/nouveau/dispnv50/disp.c +2 -2
@@ -132,7 +132,7 @@ nv50_dmac_destroy(struct nv50_dmac *dmac)int nv50_dmac_create (struct nvif_device *device,struct nvif_object *disp, -const s32 *oclass,u8 head,void *data,u32 size,u64 syncbuf, +const s32 *oclass,u8 head,void *data,u32 size,s64 syncbuf,struct nv50_dmac *dmac) {struct nouveau_cli *cli = (void *)device->object.client;
@@ -167,7 +167,7 @@ nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp,if (ret)return ret; -if (!syncbuf) +if (syncbuf <0 )return 0 ; ret = nvif_object_init(&dmac->base.user, 0xf0000000, NV_DMA_IN_MEMORY,
drivers/gpu/drm/nouveau/dispnv50/disp.h +1 -1
@@ -70,7 +70,7 @@ struct nv50_dmac {int nv50_dmac_create (struct nvif_device *device,struct nvif_object *disp,const s32 *oclass,u8 head,void *data,u32 size, -u64 syncbuf,struct nv50_dmac *dmac); +s64 syncbuf,struct nv50_dmac *dmac);void nv50_dmac_destroy (struct nv50_dmac *);u32 *evo_wait (struct nv50_dmac *,int nr);
drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c +1 -1
@@ -68,7 +68,7 @@ wimmc37b_init_(const struct nv50_wimm_func *func, struct nouveau_drm *drm,int ret; ret =nv50_dmac_create (&drm->client.device, &disp->disp->object, - &oclass,0 , &args,sizeof (args),0 , + &oclass,0 , &args,sizeof (args),-1 , &wndw->wimm);if (ret) {NV_ERROR (drm,"wimm%04x allocation failed: %d\n" , oclass, ret);
drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c +1 -1
@@ -75,7 +75,7 @@ shadow_image(struct nvkm_bios *bios, int idx, u32 offset, struct shadow *mthd)nvkm_debug (subdev,"%08x: type %02x, %d bytes\n" , image.base, image.type, image.size); -if (!shadow_fetch (bios, mthd, image.size)) { +if (!shadow_fetch (bios, mthd, image.base + image.size)) {nvkm_debug (subdev,"%08x: fetch failed\n" , image.base);return 0 ; }
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c +4 -4
@@ -33,7 +33,7 @@ static void gm200_i2c_aux_fini(struct gm200_i2c_aux *aux) {struct nvkm_device *device = aux->base.pad->i2c->subdev.device; -nvkm_mask (device,0x00d954 + (aux->ch *0x50 ),0x00310000 ,0x00000000 ); +nvkm_mask (device,0x00d954 + (aux->ch *0x50 ),0x00710000 ,0x00000000 ); } static int
@@ -54,10 +54,10 @@ gm200_i2c_aux_init(struct gm200_i2c_aux *aux)AUX_ERR (&aux->base,"begin idle timeout %08x" , ctrl);return -EBUSY ; } - }while (ctrl &0x03010000 ); + }while (ctrl &0x07010000 );/* set some magic, and wait up to 1ms for it to appear */ -nvkm_mask (device,0x00d954 + (aux->ch *0x50 ),0x00300000 , ureq); +nvkm_mask (device,0x00d954 + (aux->ch *0x50 ),0x00700000 , ureq); timeout =1000 ; do { ctrl = nvkm_rd32(device, 0x00d954 + (aux->ch * 0x50));
@@ -67,7 +67,7 @@ gm200_i2c_aux_init(struct gm200_i2c_aux *aux)gm200_i2c_aux_fini (aux);return -EBUSY ; } - }while ((ctrl &0x03000000 ) != urep); + }while ((ctrl &0x07000000 ) != urep);return 0 ; }
drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c +7 -3
@@ -22,6 +22,7 @@* Authors: Ben Skeggs */ #include "priv.h" +#include <subdev/timer.h> static void gf100_ibus_intr_hub (struct nvkm_subdev *ibus,int i)
@@ -31,7 +32,6 @@ gf100_ibus_intr_hub(struct nvkm_subdev *ibus, int i)u32 data =nvkm_rd32 (device,0x122124 + (i *0x0400 ));u32 stat =nvkm_rd32 (device,0x122128 + (i *0x0400 ));nvkm_debug (ibus,"HUB%d: %06x %08x (%08x)\n" , i, addr, data, stat); -nvkm_mask (device,0x122128 + (i *0x0400 ),0x00000200 ,0x00000000 ); } static void
@@ -42,7 +42,6 @@ gf100_ibus_intr_rop(struct nvkm_subdev *ibus, int i)u32 data =nvkm_rd32 (device,0x124124 + (i *0x0400 ));u32 stat =nvkm_rd32 (device,0x124128 + (i *0x0400 ));nvkm_debug (ibus,"ROP%d: %06x %08x (%08x)\n" , i, addr, data, stat); -nvkm_mask (device,0x124128 + (i *0x0400 ),0x00000200 ,0x00000000 ); } static void
@@ -53,7 +52,6 @@ gf100_ibus_intr_gpc(struct nvkm_subdev *ibus, int i)u32 data =nvkm_rd32 (device,0x128124 + (i *0x0400 ));u32 stat =nvkm_rd32 (device,0x128128 + (i *0x0400 ));nvkm_debug (ibus,"GPC%d: %06x %08x (%08x)\n" , i, addr, data, stat); -nvkm_mask (device,0x128128 + (i *0x0400 ),0x00000200 ,0x00000000 ); }void
@@ -90,6 +88,12 @@ gf100_ibus_intr(struct nvkm_subdev *ibus) intr1 &= ~stat; } } + +nvkm_mask (device,0x121c4c ,0x0000003f ,0x00000002 ); +nvkm_msec (device,2000 , + if (!(nvkm_rd32(device, 0x121c4c) & 0x0000003f)) + break; + ); } static int
drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c +7 -3
@@ -22,6 +22,7 @@* Authors: Ben Skeggs */ #include "priv.h" +#include <subdev/timer.h> static void gk104_ibus_intr_hub (struct nvkm_subdev *ibus,int i)
@@ -31,7 +32,6 @@ gk104_ibus_intr_hub(struct nvkm_subdev *ibus, int i)u32 data =nvkm_rd32 (device,0x122124 + (i *0x0800 ));u32 stat =nvkm_rd32 (device,0x122128 + (i *0x0800 ));nvkm_debug (ibus,"HUB%d: %06x %08x (%08x)\n" , i, addr, data, stat); -nvkm_mask (device,0x122128 + (i *0x0800 ),0x00000200 ,0x00000000 ); } static void
@@ -42,7 +42,6 @@ gk104_ibus_intr_rop(struct nvkm_subdev *ibus, int i)u32 data =nvkm_rd32 (device,0x124124 + (i *0x0800 ));u32 stat =nvkm_rd32 (device,0x124128 + (i *0x0800 ));nvkm_debug (ibus,"ROP%d: %06x %08x (%08x)\n" , i, addr, data, stat); -nvkm_mask (device,0x124128 + (i *0x0800 ),0x00000200 ,0x00000000 ); } static void
@@ -53,7 +52,6 @@ gk104_ibus_intr_gpc(struct nvkm_subdev *ibus, int i)u32 data =nvkm_rd32 (device,0x128124 + (i *0x0800 ));u32 stat =nvkm_rd32 (device,0x128128 + (i *0x0800 ));nvkm_debug (ibus,"GPC%d: %06x %08x (%08x)\n" , i, addr, data, stat); -nvkm_mask (device,0x128128 + (i *0x0800 ),0x00000200 ,0x00000000 ); }void
@@ -90,6 +88,12 @@ gk104_ibus_intr(struct nvkm_subdev *ibus) intr1 &= ~stat; } } + +nvkm_mask (device,0x12004c ,0x0000003f ,0x00000002 ); +nvkm_msec (device,2000 , + if (!(nvkm_rd32(device, 0x12004c) & 0x0000003f)) + break; + ); } static int
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c +3 -3
@@ -316,9 +316,9 @@ nvkm_mmu_vram(struct nvkm_mmu *mmu) {struct nvkm_device *device = mmu->subdev.device;struct nvkm_mm *mm = &device->fb->ram->vram; -const u32 sizeN =nvkm_mm_heap_size (mm,NVKM_RAM_MM_NORMAL ); -const u32 sizeU =nvkm_mm_heap_size (mm,NVKM_RAM_MM_NOMAP ); -const u32 sizeM =nvkm_mm_heap_size (mm,NVKM_RAM_MM_MIXED ); +const u64 sizeN =nvkm_mm_heap_size (mm,NVKM_RAM_MM_NORMAL ); +const u64 sizeU =nvkm_mm_heap_size (mm,NVKM_RAM_MM_NOMAP ); +const u64 sizeM =nvkm_mm_heap_size (mm,NVKM_RAM_MM_MIXED );u8 type =NVKM_MEM_KIND * !!mmu->func->kind;u8 heap =NVKM_MEM_VRAM ;int heapM, heapN, heapU;
drivers/hid/hid-ids.h +1 -0
@@ -393,6 +393,7 @@#define USB_DEVICE_ID_TOSHIBA_CLICK_L9W 0x0401#define USB_DEVICE_ID_HP_X2 0x074d#define USB_DEVICE_ID_HP_X2_10_COVER 0x0755 +#define USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN 0x2706#define USB_VENDOR_ID_ELECOM 0x056e#define USB_DEVICE_ID_ELECOM_BM084 0x0061
drivers/hid/hid-input.c +2 -0
@@ -322,6 +322,8 @@ static const struct hid_device_id hid_battery_quirks[] = { {HID_BLUETOOTH_DEVICE (USB_VENDOR_ID_LOGITECH ,USB_DEVICE_ID_LOGITECH_DINOVO_EDGE_KBD ), HID_BATTERY_QUIRK_IGNORE }, + { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN), + HID_BATTERY_QUIRK_IGNORE }, {} };
drivers/hid/hid-logitech-dj.c +4 -0
@@ -1862,6 +1862,10 @@ static const struct hid_device_id logi_dj_receivers[] = { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xc531), .driver_data = recvr_type_gaming_hidpp}, + {/* Logitech G602 receiver (0xc537) */ +HID_USB_DEVICE (USB_VENDOR_ID_LOGITECH , + 0xc537), + .driver_data = recvr_type_gaming_hidpp}, { /* Logitech lightspeed receiver (0xc539) */HID_USB_DEVICE (USB_VENDOR_ID_LOGITECH , USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1),
drivers/hid/hid-multitouch.c +4 -0
@@ -2084,6 +2084,10 @@ static const struct hid_device_id mt_devices[] = {HID_DEVICE (BUS_I2C ,HID_GROUP_MULTITOUCH_WIN_8 , USB_VENDOR_ID_SYNAPTICS, 0xce08) }, + { .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT, +HID_DEVICE (BUS_I2C ,HID_GROUP_MULTITOUCH_WIN_8 , + USB_VENDOR_ID_SYNAPTICS, 0xce09) }, + /* TopSeed panels */ { .driver_data = MT_CLS_TOPSEED, MT_USB_DEVICE(USB_VENDOR_ID_TOPSEED2,
drivers/hwtracing/intel_th/pci.c +5 -0
@@ -258,6 +258,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4b26), .driver_data = (kernel_ulong_t)&intel_th_2x, }, + { +/* Alder Lake-P */ +PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x51a6 ), + .driver_data = (kernel_ulong_t)&intel_th_2x, + }, {/* Emmitsburg PCH */ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x1bcc),
drivers/hwtracing/stm/heartbeat.c +4 -2
@@ -64,7 +64,7 @@ static void stm_heartbeat_unlink(struct stm_source_data *data)static int stm_heartbeat_init (void ) { -int i, ret = -ENOMEM ; +int i, ret;if (nr_devs <0 || nr_devs >STM_HEARTBEAT_MAX )return -EINVAL ;
@@ -72,8 +72,10 @@ static int stm_heartbeat_init(void)for (i =0 ; i < nr_devs; i++) { stm_heartbeat[i].data.name =kasprintf (GFP_KERNEL ,"heartbeat.%d" , i); -if (!stm_heartbeat[i].data.name) +if (!stm_heartbeat[i].data.name) { + ret = -ENOMEM ; goto fail_unregister; + } stm_heartbeat[i].data.nr_chans =1 ; stm_heartbeat[i].data.link = stm_heartbeat_link;
drivers/i2c/busses/i2c-octeon-core.c +1 -1
@@ -347,7 +347,7 @@ static int octeon_i2c_read(struct octeon_i2c *i2c, int target,if (result)return result;if (recv_len && i ==0 ) { -if (data[i] >I2C_SMBUS_BLOCK_MAX +1 ) +if (data[i] >I2C_SMBUS_BLOCK_MAX )return -EPROTO ; length += data[i]; }
drivers/i2c/busses/i2c-tegra-bpmp.c +1 -1
@@ -80,7 +80,7 @@ static int tegra_bpmp_xlate_flags(u16 flags, u16 *out) flags &= ~I2C_M_RECV_LEN ; } -return (flags !=0 ) ? -EINVAL :0 ; +return 0 ; }/**
drivers/iio/dac/ad5504.c +2 -2
@@ -188,9 +188,9 @@ static ssize_t ad5504_write_dac_powerdown(struct iio_dev *indio_dev,return ret;if (pwr_down) - st->pwr_down_mask |= (1 << chan->channel); -else st->pwr_down_mask &= ~(1 << chan->channel); +else + st->pwr_down_mask |= (1 << chan->channel); ret = ad5504_spi_write(st, AD5504_ADDR_CTRL, AD5504_DAC_PWRDWN_MODE(st->pwr_down_mode) |
drivers/irqchip/irq-mips-cpu.c +7 -0
@@ -197,6 +197,13 @@ static int mips_cpu_ipi_alloc(struct irq_domain *domain, unsigned int virq,if (ret)return ret; + ret =irq_domain_set_hwirq_and_chip (domain->parent, virq + i, hwirq, + &mips_mt_cpu_irq_controller, +NULL ); + +if (ret) +return ret; + ret =irq_set_irq_type (virq + i,IRQ_TYPE_LEVEL_HIGH );if (ret)return ret;
drivers/lightnvm/core.c +1 -2
@@ -849,11 +849,10 @@ static int nvm_bb_chunk_sense(struct nvm_dev *dev, struct ppa_addr ppa) rqd.ppa_addr =generic_to_dev_addr (dev, ppa); ret =nvm_submit_io_sync_raw (dev, &rqd); +__free_page (page);if (ret)return ret; -__free_page (page); -return rqd.error; }
drivers/md/Kconfig +1 -0
@@ -565,6 +565,7 @@ config DM_INTEGRITY select BLK_DEV_INTEGRITY select DM_BUFIO select CRYPTO + select CRYPTO_SKCIPHER select ASYNC_XOR ---help--- This device-mapper target emulates a block device that has
drivers/md/dm-integrity.c +6 -0
@@ -4059,6 +4059,12 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv) r = -ENOMEM ; goto bad; } + }else { +if (ic->sb->flags &cpu_to_le32 (SB_FLAG_RECALCULATING )) { + ti->error ="Recalculate can only be specified with internal_hash" ; + r = -EINVAL ; + goto bad; + } } ic->bufio = dm_bufio_client_create(ic->meta_dev ? ic->meta_dev->bdev : ic->dev->bdev,
drivers/md/dm-table.c +12 -3
@@ -428,14 +428,23 @@ int dm_get_device(struct dm_target *ti, const char *path, fmode_t mode, {int r;dev_t dev; +unsigned int major, minor; +char dummy;struct dm_dev_internal *dd;struct dm_table *t = ti->table;BUG_ON (!t); - dev =dm_get_dev_t (path); -if (!dev) -return -ENODEV ; +if (sscanf (path,"%u:%u%c" , &major, &minor, &dummy) ==2 ) { +/* Extract the major/minor numbers */ + dev =MKDEV (major, minor); +if (MAJOR (dev) != major ||MINOR (dev) != minor) +return -EOVERFLOW ; + }else { + dev =dm_get_dev_t (path); +if (!dev) +return -ENODEV ; + } dd =find_device (&t->devices, dev);if (!dd) {
drivers/mmc/core/queue.c +3 -1
@@ -370,8 +370,10 @@ static void mmc_setup_queue(struct mmc_queue *mq, struct mmc_card *card) "merging was advertised but not possible");blk_queue_max_segments (mq->queue,mmc_get_max_segments (host)); -if (mmc_card_mmc (card)) +if (mmc_card_mmc (card) && card->ext_csd.data_sector_size) { block_size = card->ext_csd.data_sector_size; +WARN_ON (block_size !=512 && block_size !=4096 ); + }blk_queue_logical_block_size (mq->queue, block_size);/*
drivers/mmc/host/sdhci-xenon.c +6 -1
@@ -167,7 +167,12 @@ static void xenon_reset_exit(struct sdhci_host *host,/* Disable tuning request and auto-retuning again */ xenon_retune_setup (host); -xenon_set_acg (host, true); +/* +* The ACG should be turned off at the early init time, in order +* to solve a possible issues with the 1.8V regulator stabilization. +* The feature is enabled in later stage. +*/ +xenon_set_acg (host, false);xenon_set_sdclk_off_idle (host, sdhc_id, false);
drivers/net/can/dev.c +2 -2
@@ -567,11 +567,11 @@ static void can_restart(struct net_device *dev) } cf->can_id |=CAN_ERR_RESTARTED ; -netif_rx_ni (skb); - stats->rx_packets++; stats->rx_bytes += cf->can_dlc; +netif_rx_ni (skb); + restart:netdev_dbg (dev,"restarted\n" ); priv->can_stats.restarts++;
drivers/net/can/usb/peak_usb/pcan_usb_fd.c +4 -4
@@ -512,11 +512,11 @@ static int pcan_usb_fd_decode_canmsg(struct pcan_usb_fd_if *usb_if,else memcpy (cfd->data, rm->d, cfd->len); -peak_usb_netif_rx (skb, &usb_if->time_ref,le32_to_cpu (rm->ts_low)); - netdev->stats.rx_packets++; netdev->stats.rx_bytes += cfd->len; +peak_usb_netif_rx (skb, &usb_if->time_ref,le32_to_cpu (rm->ts_low)); +return 0 ; }
@@ -578,11 +578,11 @@ static int pcan_usb_fd_decode_status(struct pcan_usb_fd_if *usb_if,if (!skb)return -ENOMEM ; -peak_usb_netif_rx (skb, &usb_if->time_ref,le32_to_cpu (sm->ts_low)); - netdev->stats.rx_packets++; netdev->stats.rx_bytes += cf->can_dlc; +peak_usb_netif_rx (skb, &usb_if->time_ref,le32_to_cpu (sm->ts_low)); +return 0 ; }
drivers/net/can/vxcan.c +4 -2
@@ -39,6 +39,7 @@ static netdev_tx_t vxcan_xmit(struct sk_buff *skb, struct net_device *dev)struct net_device *peer;struct canfd_frame *cfd = (struct canfd_frame *)skb->data;struct net_device_stats *peerstats, *srcstats = &dev->stats; +u8 len;if (can_dropped_invalid_skb (dev, skb))return NETDEV_TX_OK ;
@@ -61,12 +62,13 @@ static netdev_tx_t vxcan_xmit(struct sk_buff *skb, struct net_device *dev) skb->dev = peer; skb->ip_summed =CHECKSUM_UNNECESSARY ; + len = cfd->len;if (netif_rx_ni (skb) ==NET_RX_SUCCESS ) { srcstats->tx_packets++; - srcstats->tx_bytes += cfd->len; + srcstats->tx_bytes += len; peerstats = &peer->stats; peerstats->rx_packets++; - peerstats->rx_bytes += cfd->len; + peerstats->rx_bytes += len; } out_unlock:
drivers/net/dsa/b53/b53_common.c +1 -1
@@ -1330,7 +1330,7 @@ int b53_vlan_prepare(struct dsa_switch *ds, int port,if ((is5325 (dev) ||is5365 (dev)) && vlan->vid_begin ==0 )return -EOPNOTSUPP ; -if (vlan->vid_end > dev->num_vlans) +if (vlan->vid_end >= dev->num_vlans)return -ERANGE ;b53_enable_vlan (dev, true, ds->vlan_filtering);
drivers/net/dsa/mv88e6xxx/global1_vtu.c +4 -0
@@ -351,6 +351,10 @@ int mv88e6250_g1_vtu_getnext(struct mv88e6xxx_chip *chip,if (err)return err; + err =mv88e6185_g1_stu_data_read (chip, entry); +if (err) +return err; +/* VTU DBNum[3:0] are located in VTU Operation 3:0 * VTU DBNum[5:4] are located in VTU Operation 9:8 */
drivers/net/ethernet/mscc/ocelot.c +1 -3
@@ -1716,10 +1716,8 @@ static int ocelot_netdevice_event(struct notifier_block *unused,struct net_device *dev =netdev_notifier_info_to_dev (ptr);int ret =0 ; -if (!ocelot_netdevice_dev_check (dev)) -return 0 ; -if (event ==NETDEV_PRECHANGEUPPER && +ocelot_netdevice_dev_check (dev) &&netif_is_lag_master (info->upper_dev)) {struct netdev_lag_upper_info *lag_upper_info = info->upper_info;struct netlink_ext_ack *extack;
drivers/net/ethernet/renesas/sh_eth.c +2 -2
@@ -2640,10 +2640,10 @@ static int sh_eth_close(struct net_device *ndev)/* Free all the skbuffs in the Rx queue and the DMA buffer. */ sh_eth_ring_free (ndev); -pm_runtime_put_sync (&mdp->pdev->dev); - mdp->is_opened =0 ; +pm_runtime_put (&mdp->pdev->dev); +return 0 ; }
drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c +1 -1
@@ -334,7 +334,7 @@ FUNC_GROUP_DECL(RMII4, F24, E23, E24, E25, C25, C24, B26, B25, B24);#define D22 40SIG_EXPR_LIST_DECL_SESG (D22 ,SD1CLK ,SD1 ,SIG_DESC_SET (SCU414 ,8 )); -SIG_EXPR_LIST_DECL_SEMG (D22 ,PWM8 ,PWM8G0 ,PWM8 ,SIG_DESC_SET (SCU414 ,8 )); +SIG_EXPR_LIST_DECL_SEMG (D22 ,PWM8 ,PWM8G0 ,PWM8 ,SIG_DESC_SET (SCU4B4 ,8 ));PIN_DECL_2 (D22 ,GPIOF0 ,SD1CLK ,PWM8 );GROUP_DECL (PWM8G0 ,D22 );
drivers/pinctrl/pinctrl-ingenic.c +12 -12
@@ -1378,7 +1378,7 @@ static inline bool ingenic_gpio_get_value(struct ingenic_gpio_chip *jzgc,static void ingenic_gpio_set_value (struct ingenic_gpio_chip *jzgc,u8 offset,int value) { -if (jzgc->jzpc->version >=ID_JZ4760 ) +if (jzgc->jzpc->version >=ID_JZ4770 )ingenic_gpio_set_bit (jzgc,JZ4760_GPIO_PAT0 , offset, !!value);else ingenic_gpio_set_bit (jzgc,JZ4740_GPIO_DATA , offset, !!value);
@@ -1389,7 +1389,7 @@ static void irq_set_type(struct ingenic_gpio_chip *jzgc, {u8 reg1, reg2; -if (jzgc->jzpc->version >=ID_JZ4760 ) { +if (jzgc->jzpc->version >=ID_JZ4770 ) { reg1 =JZ4760_GPIO_PAT1 ; reg2 =JZ4760_GPIO_PAT0 ; }else {
@@ -1464,7 +1464,7 @@ static void ingenic_gpio_irq_enable(struct irq_data *irqd)struct ingenic_gpio_chip *jzgc =gpiochip_get_data (gc);int irq = irqd->hwirq; -if (jzgc->jzpc->version >=ID_JZ4760 ) +if (jzgc->jzpc->version >=ID_JZ4770 )ingenic_gpio_set_bit (jzgc,JZ4760_GPIO_INT , irq, true);else ingenic_gpio_set_bit (jzgc,JZ4740_GPIO_SELECT , irq, true);
@@ -1480,7 +1480,7 @@ static void ingenic_gpio_irq_disable(struct irq_data *irqd)ingenic_gpio_irq_mask (irqd); -if (jzgc->jzpc->version >=ID_JZ4760 ) +if (jzgc->jzpc->version >=ID_JZ4770 )ingenic_gpio_set_bit (jzgc,JZ4760_GPIO_INT , irq, false);else ingenic_gpio_set_bit (jzgc,JZ4740_GPIO_SELECT , irq, false);
@@ -1505,7 +1505,7 @@ static void ingenic_gpio_irq_ack(struct irq_data *irqd)irq_set_type (jzgc, irq,IRQ_TYPE_LEVEL_HIGH ); } -if (jzgc->jzpc->version >=ID_JZ4760 ) +if (jzgc->jzpc->version >=ID_JZ4770 )ingenic_gpio_set_bit (jzgc,JZ4760_GPIO_FLAG , irq, false);else ingenic_gpio_set_bit (jzgc,JZ4740_GPIO_DATA , irq, true);
@@ -1562,7 +1562,7 @@ static void ingenic_gpio_irq_handler(struct irq_desc *desc)chained_irq_enter (irq_chip, desc); -if (jzgc->jzpc->version >=ID_JZ4760 ) +if (jzgc->jzpc->version >=ID_JZ4770 ) flag =ingenic_gpio_read_reg (jzgc,JZ4760_GPIO_FLAG );else flag =ingenic_gpio_read_reg (jzgc,JZ4740_GPIO_FLAG );
@@ -1643,7 +1643,7 @@ static int ingenic_gpio_get_direction(struct gpio_chip *gc, unsigned int offset)struct ingenic_pinctrl *jzpc = jzgc->jzpc;unsigned int pin = gc->base + offset; -if (jzpc->version >=ID_JZ4760 ) +if (jzpc->version >=ID_JZ4770 )return ingenic_get_pin_config (jzpc, pin,JZ4760_GPIO_INT ) ||ingenic_get_pin_config (jzpc, pin,JZ4760_GPIO_PAT1 );
@@ -1676,7 +1676,7 @@ static int ingenic_pinmux_set_pin_fn(struct ingenic_pinctrl *jzpc,ingenic_shadow_config_pin (jzpc, pin,JZ4760_GPIO_PAT1 , func &0x2 );ingenic_shadow_config_pin (jzpc, pin,JZ4760_GPIO_PAT0 , func &0x1 );ingenic_shadow_config_pin_load (jzpc, pin); - }else if (jzpc->version >=ID_JZ4760 ) { + }else if (jzpc->version >=ID_JZ4770 ) {ingenic_config_pin (jzpc, pin,JZ4760_GPIO_INT , false);ingenic_config_pin (jzpc, pin,GPIO_MSK , false);ingenic_config_pin (jzpc, pin,JZ4760_GPIO_PAT1 , func &0x2 );
@@ -1684,7 +1684,7 @@ static int ingenic_pinmux_set_pin_fn(struct ingenic_pinctrl *jzpc, }else {ingenic_config_pin (jzpc, pin,JZ4740_GPIO_FUNC , true);ingenic_config_pin (jzpc, pin,JZ4740_GPIO_TRIG , func &0x2 ); -ingenic_config_pin (jzpc, pin,JZ4740_GPIO_SELECT , func >0 ); +ingenic_config_pin (jzpc, pin,JZ4740_GPIO_SELECT , func &0x1 ); }return 0 ;
@@ -1734,7 +1734,7 @@ static int ingenic_pinmux_gpio_set_direction(struct pinctrl_dev *pctldev,ingenic_shadow_config_pin (jzpc, pin,GPIO_MSK , true);ingenic_shadow_config_pin (jzpc, pin,JZ4760_GPIO_PAT1 , input);ingenic_shadow_config_pin_load (jzpc, pin); - }else if (jzpc->version >=ID_JZ4760 ) { + }else if (jzpc->version >=ID_JZ4770 ) {ingenic_config_pin (jzpc, pin,JZ4760_GPIO_INT , false);ingenic_config_pin (jzpc, pin,GPIO_MSK , true);ingenic_config_pin (jzpc, pin,JZ4760_GPIO_PAT1 , input);
@@ -1764,7 +1764,7 @@ static int ingenic_pinconf_get(struct pinctrl_dev *pctldev,unsigned int offt = pin /PINS_PER_GPIO_CHIP ;bool pull; -if (jzpc->version >=ID_JZ4760 ) +if (jzpc->version >=ID_JZ4770 ) pull = !ingenic_get_pin_config (jzpc, pin,JZ4760_GPIO_PEN );else pull = !ingenic_get_pin_config (jzpc, pin,JZ4740_GPIO_PULL_DIS );
@@ -1796,7 +1796,7 @@ static int ingenic_pinconf_get(struct pinctrl_dev *pctldev,static void ingenic_set_bias (struct ingenic_pinctrl *jzpc,unsigned int pin,bool enabled) { -if (jzpc->version >=ID_JZ4760 ) +if (jzpc->version >=ID_JZ4770 )ingenic_config_pin (jzpc, pin,JZ4760_GPIO_PEN , !enabled);else ingenic_config_pin (jzpc, pin,JZ4740_GPIO_PULL_DIS , !enabled);
drivers/platform/x86/i2c-multi-instantiate.c +23 -8
@@ -166,13 +166,29 @@ static const struct i2c_inst_data bsg2150_data[] = { {} }; -static const struct i2c_inst_data int3515_data[] = { - {"tps6598x" ,IRQ_RESOURCE_APIC ,0 }, - {"tps6598x" ,IRQ_RESOURCE_APIC ,1 }, - {"tps6598x" ,IRQ_RESOURCE_APIC ,2 }, - {"tps6598x" ,IRQ_RESOURCE_APIC ,3 }, - {} -}; +/* +* Device with _HID INT3515 (TI PD controllers) has some unresolved interrupt +* issues. The most common problem seen is interrupt flood. +* +* There are at least two known causes. Firstly, on some boards, the +* I2CSerialBus resource index does not match the Interrupt resource, i.e. they +* are not one-to-one mapped like in the array below. Secondly, on some boards +* the IRQ line from the PD controller is not actually connected at all. But the +* interrupt flood is also seen on some boards where those are not a problem, so +* there are some other problems as well. +* +* Because of the issues with the interrupt, the device is disabled for now. If +* you wish to debug the issues, uncomment the below, and add an entry for the +* INT3515 device to the i2c_multi_instance_ids table. +* +* static const struct i2c_inst_data int3515_data[] = { +* { "tps6598x", IRQ_RESOURCE_APIC, 0 }, +* { "tps6598x", IRQ_RESOURCE_APIC, 1 }, +* { "tps6598x", IRQ_RESOURCE_APIC, 2 }, +* { "tps6598x", IRQ_RESOURCE_APIC, 3 }, +* { } +* }; +*/ /* * Note new device-ids must also be added to i2c_multi_instantiate_ids in
@@ -181,7 +197,6 @@ static const struct i2c_inst_data int3515_data[] = {static const struct acpi_device_id i2c_multi_inst_acpi_ids[] = { {"BSG1160" , (unsigned long )bsg1160_data }, {"BSG2150" , (unsigned long )bsg2150_data }, - {"INT3515" , (unsigned long )int3515_data }, { } };MODULE_DEVICE_TABLE (acpi, i2c_multi_inst_acpi_ids);
drivers/platform/x86/ideapad-laptop.c +14 -1
@@ -92,6 +92,7 @@ struct ideapad_private {struct dentry *debug;unsigned long cfg;bool has_hw_rfkill_switch; +bool has_touchpad_switch;const char *fnesc_guid; };
@@ -535,7 +536,9 @@ static umode_t ideapad_is_visible(struct kobject *kobj, }else if (attr == &dev_attr_fn_lock.attr) { supported =acpi_has_method (priv->adev->handle,"HALS" ) &&acpi_has_method (priv->adev->handle,"SALS" ); - }else + }else if (attr == &dev_attr_touchpad.attr) + supported = priv->has_touchpad_switch; +else supported = true;return supported ? attr->mode :0 ;
@@ -867,6 +870,9 @@ static void ideapad_sync_touchpad_state(struct ideapad_private *priv) {unsigned long value; +if (!priv->has_touchpad_switch) +return ; +/* Without reading from EC touchpad LED doesn't switch state */ if (!read_ec_data (priv->adev->handle,VPCCMD_R_TOUCHPAD , &value)) {/* Some IdeaPads don't really turn off touchpad - they only
@@ -989,6 +995,9 @@ static int ideapad_acpi_add(struct platform_device *pdev) priv->platform_device = pdev; priv->has_hw_rfkill_switch =dmi_check_system (hw_rfkill_list); +/* Most ideapads with ELAN0634 touchpad don't use EC touchpad switch */ + priv->has_touchpad_switch = !acpi_dev_present ("ELAN0634" ,NULL ,-1 ); + ret =ideapad_sysfs_init (priv);if (ret)return ret;
@@ -1006,6 +1015,10 @@ static int ideapad_acpi_add(struct platform_device *pdev)if (!priv->has_hw_rfkill_switch)write_ec_cmd (priv->adev->handle,VPCCMD_W_RF ,1 ); +/* The same for Touchpad */ +if (!priv->has_touchpad_switch) +write_ec_cmd (priv->adev->handle,VPCCMD_W_TOUCHPAD ,1 ); +for (i =0 ; i <IDEAPAD_RFKILL_DEV_NUM ; i++)if (test_bit (ideapad_rfk_data[i].cfgbit, &priv->cfg))ideapad_register_rfkill (priv, i);
drivers/platform/x86/intel-vbtn.c +0 -6
@@ -191,12 +191,6 @@ static const struct dmi_system_id dmi_switches_allow_list[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Venue 11 Pro 7130"), }, }, - { - .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"Hewlett-Packard" ), - DMI_MATCH(DMI_PRODUCT_NAME, "HP Stream x360 Convertible PC 11"), - }, - }, { .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
drivers/scsi/megaraid/megaraid_sas_base.c +2 -4
@@ -8174,11 +8174,9 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance, goto out; } +/* always store 64 bits regardless of addressing */ sense_ptr = (void *)cmd->frame + ioc->sense_off; -if (instance->consistent_mask_64bit) -put_unaligned_le64 (sense_handle, sense_ptr); -else -put_unaligned_le32 (sense_handle, sense_ptr); +put_unaligned_le64 (sense_handle, sense_ptr); }/*
drivers/scsi/qedi/qedi_main.c +2 -2
@@ -2175,7 +2175,7 @@ qedi_show_boot_tgt_info(struct qedi_ctx *qedi, int type, chap_name);break ;case ISCSI_BOOT_TGT_CHAP_SECRET : - rc =sprintf (buf,"%.*s\n" ,NVM_ISCSI_CFG_CHAP_NAME_MAX_LEN , + rc =sprintf (buf,"%.*s\n" ,NVM_ISCSI_CFG_CHAP_PWD_MAX_LEN , chap_secret);break ;case ISCSI_BOOT_TGT_REV_CHAP_NAME :
@@ -2183,7 +2183,7 @@ qedi_show_boot_tgt_info(struct qedi_ctx *qedi, int type, mchap_name);break ;case ISCSI_BOOT_TGT_REV_CHAP_SECRET : - rc =sprintf (buf,"%.*s\n" ,NVM_ISCSI_CFG_CHAP_NAME_MAX_LEN , + rc =sprintf (buf,"%.*s\n" ,NVM_ISCSI_CFG_CHAP_PWD_MAX_LEN , mchap_secret);break ;case ISCSI_BOOT_TGT_FLAGS :
drivers/scsi/sd.c +3 -1
@@ -934,8 +934,10 @@ static blk_status_t sd_setup_write_zeroes_cmnd(struct scsi_cmnd *cmd) } } -if (sdp->no_write_same) +if (sdp->no_write_same) { + rq->rq_flags |=RQF_QUIET ;return BLK_STS_TARGET ; + }if (sdkp->ws16 || lba >0xffffffff || nr_blocks >0xffff )return sd_setup_write_same16_cmnd (cmd, false);
drivers/scsi/ufs/ufshcd.c +4 -7
@@ -5980,19 +5980,16 @@ static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd) {struct Scsi_Host *host;struct ufs_hba *hba; -unsigned int tag;u32 pos;int err; -u8 resp =0xF ; -struct ufshcd_lrb *lrbp; +u8 resp =0xF , lun;unsigned long flags; host = cmd->device->host; hba =shost_priv (host); - tag = cmd->request->tag; - lrbp = &hba->lrb[tag]; - err =ufshcd_issue_tm_cmd (hba, lrbp->lun,0 ,UFS_LOGICAL_RESET , &resp); + lun =ufshcd_scsi_to_upiu_lun (cmd->device->lun); + err =ufshcd_issue_tm_cmd (hba, lun,0 ,UFS_LOGICAL_RESET , &resp);if (err || resp !=UPIU_TASK_MANAGEMENT_FUNC_COMPL ) {if (!err) err = resp;
@@ -6001,7 +5998,7 @@ static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd)/* clear the commands that were pending for corresponding LUN */ for_each_set_bit (pos, &hba->outstanding_reqs, hba->nutrs) { -if (hba->lrb[pos].lun == lrbp->lun) { +if (hba->lrb[pos].lun == lun) { err =ufshcd_clear_cmd (hba, pos);if (err)break ;
drivers/tty/serial/mvebu-uart.c +9 -1
@@ -648,6 +648,14 @@ static void wait_for_xmitr(struct uart_port *port) (val & STAT_TX_RDY(port)), 1, 10000); } +static void wait_for_xmite (struct uart_port *port) +{ +u32 val; + +readl_poll_timeout_atomic (port->membase +UART_STAT , val, + (val &STAT_TX_EMP ),1 ,10000 ); +} +static void mvebu_uart_console_putchar (struct uart_port *port,int ch) {wait_for_xmitr (port);
@@ -675,7 +683,7 @@ static void mvebu_uart_console_write(struct console *co, const char *s,uart_console_write (port, s, count, mvebu_uart_console_putchar); -wait_for_xmitr (port); +wait_for_xmite (port);if (ier)writel (ier, port->membase +UART_CTRL (port));
drivers/tty/serial/sifive.c +1 -0
@@ -973,6 +973,7 @@ static int sifive_serial_probe(struct platform_device *pdev)/* Set up clock divider */ ssp->clkin_rate =clk_get_rate (ssp->clk); ssp->baud_rate =SIFIVE_DEFAULT_BAUD_RATE ; + ssp->port.uartclk = ssp->baud_rate *16 ;__ssp_update_div (ssp);platform_set_drvdata (pdev, ssp);
drivers/usb/gadget/udc/aspeed-vhub/epn.c +4 -1
@@ -420,7 +420,10 @@ static void ast_vhub_stop_active_req(struct ast_vhub_ep *ep,u32 state, reg, loops;/* Stop DMA activity */ -writel (0 , ep->epn.regs +AST_VHUB_EP_DMA_CTLSTAT ); +if (ep->epn.desc_mode) +writel (VHUB_EP_DMA_CTRL_RESET , ep->epn.regs +AST_VHUB_EP_DMA_CTLSTAT ); +else +writel (0 , ep->epn.regs +AST_VHUB_EP_DMA_CTLSTAT );/* Wait for it to complete */ for (loops =0 ; loops <1000 ; loops++) {
drivers/usb/gadget/udc/bdc/Kconfig +1 -1
@@ -17,7 +17,7 @@ if USB_BDC_UDC comment "Platform Support" config USB_BDC_PCI tristate "BDC support for PCIe based platforms" - depends on USB_PCI + depends on USB_PCI && BROKEN default USB_BDC_UDC help Enable support for platforms which have BDC connected through PCIe, such as Lego3 FPGA platform.
drivers/usb/gadget/udc/core.c +10 -3
@@ -1477,10 +1477,13 @@ static ssize_t soft_connect_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t n) { struct usb_udc *udc = container_of(dev, struct usb_udc, dev); +ssize_t ret; +mutex_lock (&udc_lock);if (!udc->driver) {dev_err (dev,"soft-connect without a gadget driver\n" ); -return -EOPNOTSUPP ; + ret = -EOPNOTSUPP ; + goto out; }if (sysfs_streq (buf,"connect" )) {
@@ -1491,10 +1494,14 @@ static ssize_t soft_connect_store(struct device *dev,usb_gadget_udc_stop (udc); }else {dev_err (dev,"unsupported command '%s'\n" , buf); -return -EINVAL ; + ret = -EINVAL ; + goto out; } -return n; + ret = n; +out: +mutex_unlock (&udc_lock); +return ret; }static DEVICE_ATTR_WO (soft_connect);
drivers/usb/host/ehci-hcd.c +12 -0
@@ -574,6 +574,7 @@ static int ehci_run (struct usb_hcd *hcd)struct ehci_hcd *ehci =hcd_to_ehci (hcd);u32 temp;u32 hcc_params; +int rc; hcd->uses_new_polling =1 ;
@@ -629,9 +630,20 @@ static int ehci_run (struct usb_hcd *hcd)down_write (&ehci_cf_port_reset_rwsem); ehci->rh_state =EHCI_RH_RUNNING ;ehci_writel (ehci,FLAG_CF , &ehci->regs->configured_flag); + +/* Wait until HC become operational */ ehci_readl (ehci, &ehci->regs->command);/* unblock posted writes */ msleep (5 ); + rc =ehci_handshake (ehci, &ehci->regs->status,STS_HALT ,0 ,100 *1000 ); +up_write (&ehci_cf_port_reset_rwsem); + +if (rc) { +ehci_err (ehci,"USB %x.%x, controller refused to start: %d\n" , + ((ehci->sbrn &0xf0 )>>4 ), (ehci->sbrn &0x0f ), rc); +return rc; + } + ehci->last_periodic_enable =ktime_get_real (); temp =HC_VERSION (ehci,ehci_readl (ehci, &ehci->caps->hc_capbase));
drivers/usb/host/ehci-hub.c +3 -0
@@ -345,6 +345,9 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)unlink_empty_async_suspended (ehci); +/* Some Synopsys controllers mistakenly leave IAA turned on */ +ehci_writel (ehci,STS_IAA , &ehci->regs->status); +/* Any IAA cycle that started before the suspend is now invalid */ end_iaa_cycle (ehci);ehci_handle_start_intr_unlinks (ehci);
drivers/usb/host/xhci-ring.c +2 -0
@@ -2918,6 +2918,8 @@ static void queue_trb(struct xhci_hcd *xhci, struct xhci_ring *ring, trb->field[0 ] =cpu_to_le32 (field1); trb->field[1 ] =cpu_to_le32 (field2); trb->field[2 ] =cpu_to_le32 (field3); +/* make sure TRB is fully written before giving it to the controller */ +wmb (); trb->field[3 ] =cpu_to_le32 (field4);trace_xhci_queue_trb (ring, trb);
drivers/usb/host/xhci-tegra.c +7 -0
@@ -562,6 +562,13 @@ static void tegra_xusb_mbox_handle(struct tegra_xusb *tegra, enable);if (err <0 )break ; + +/* +* wait 500us for LFPS detector to be disabled before +* sending ACK +*/ +if (!enable) +usleep_range (500 ,1000 ); }if (err <0 ) {
drivers/xen/events/events_base.c +0 -10
@@ -1988,16 +1988,6 @@ static struct irq_chip xen_percpu_chip __read_mostly = { .irq_ack = ack_dynirq, }; -int xen_set_callback_via (uint64_t via) -{ -struct xen_hvm_param a; - a.domid =DOMID_SELF ; - a.index =HVM_PARAM_CALLBACK_IRQ ; - a.value = via; -return HYPERVISOR_hvm_op (HVMOP_set_param, &a); -} -EXPORT_SYMBOL_GPL (xen_set_callback_via); -#ifdef CONFIG_XEN_PVHVM /* Vector callbacks are better than PCI interrupts to receive event * channel notifications because we can receive vector callbacks on any
drivers/xen/platform-pci.c +0 -1
@@ -149,7 +149,6 @@ static int platform_pci_probe(struct pci_dev *pdev, ret =gnttab_init ();if (ret) goto grant_out; -xenbus_probe (NULL );return 0 ; grant_out:gnttab_free_auto_xlat_frames ();
drivers/xen/xenbus/xenbus.h +1 -0
@@ -115,6 +115,7 @@ int xenbus_probe_node(struct xen_bus_type *bus,const char *type, const char *nodename);int xenbus_probe_devices (struct xen_bus_type *bus); +void xenbus_probe (void );void xenbus_dev_changed (const char *node,struct xen_bus_type *bus);
drivers/xen/xenbus/xenbus_comms.c +0 -8
@@ -57,16 +57,8 @@ DEFINE_MUTEX(xs_response_mutex);static int xenbus_irq;static struct task_struct *xenbus_task; -static DECLARE_WORK(probe_work, xenbus_probe); - -static irqreturn_t wake_waiting (int irq,void *unused) { -if (unlikely (xenstored_ready ==0 )) { - xenstored_ready =1 ; -schedule_work (&probe_work); - } -wake_up (&xb_waitq);return IRQ_HANDLED ; }
drivers/xen/xenbus/xenbus_probe.c +67 -14
107 lines not on this page · raw message
fs/btrfs/block-group.c +2 -1
@@ -2497,7 +2497,8 @@ int btrfs_start_dirty_block_groups(struct btrfs_trans_handle *trans)* Go through delayed refs for all the stuff we've just kicked off * and then loop back (just once) */ - ret =btrfs_run_delayed_refs (trans,0 ); +if (!ret) + ret =btrfs_run_delayed_refs (trans,0 );if (!ret && loops ==0 ) { loops++;spin_lock (&cur_trans->dirty_bgs_lock);
fs/btrfs/extent-tree.c +9 -1
@@ -5390,7 +5390,15 @@ int btrfs_drop_snapshot(struct btrfs_root *root, goto out_free; } - trans =btrfs_start_transaction (tree_root,0 ); +/* +* Use join to avoid potential EINTR from transaction +* start. See wait_reserve_ticket and the whole +* reservation callchain. +*/ +if (for_reloc) + trans =btrfs_join_transaction (tree_root); +else + trans =btrfs_start_transaction (tree_root,0 );if (IS_ERR (trans)) { err =PTR_ERR (trans); goto out_free;
fs/btrfs/send.c +15 -0
@@ -5519,6 +5519,21 @@ static int clone_range(struct send_ctx *sctx,break ; offset += clone_len; clone_root->offset += clone_len; + +/* +* If we are cloning from the file we are currently processing, +* and using the send root as the clone root, we must stop once +* the current clone offset reaches the current eof of the file +* at the receiver, otherwise we would issue an invalid clone +* operation (source range going beyond eof) and cause the +* receiver to fail. So if we reach the current eof, bail out +* and fallback to a regular write. +*/ +if (clone_root->root == sctx->send_root && + clone_root->ino == sctx->cur_ino && + clone_root->offset >= sctx->cur_inode_next_write_offset) +break ; + data_offset += clone_len; next: path->slots[0 ]++;
fs/btrfs/volumes.c +2 -0
@@ -4409,6 +4409,8 @@ int btrfs_recover_balance(struct btrfs_fs_info *fs_info)btrfs_warn (fs_info,"balance: cannot set exclusive op status, resume manually" ); +btrfs_release_path (path); +mutex_lock (&fs_info->balance_mutex);BUG_ON (fs_info->balance_ctl);spin_lock (&fs_info->balance_lock);
fs/cifs/transport.c +2 -2
@@ -339,7 +339,7 @@ __smb_send_rqst(struct TCP_Server_Info *server, int num_rqst,if (ssocket ==NULL )return -EAGAIN ; -if (signal_pending (current)) { +if (fatal_signal_pending (current)) {cifs_dbg (FYI ,"signal pending before send request\n" );return -ERESTARTSYS ; }
@@ -431,7 +431,7 @@ __smb_send_rqst(struct TCP_Server_Info *server, int num_rqst,if (signal_pending (current) && (total_len != send_length)) {cifs_dbg (FYI ,"signal is pending after attempt to send\n" ); - rc = -EINTR ; + rc = -ERESTARTSYS ; }/* uncork it */
include/asm-generic/bitops/atomic.h +3 -3
@@ -11,19 +11,19 @@* See Documentation/atomic_bitops.txt for details. */ -static inline void set_bit (unsigned int nr,volatile unsigned long *p) +static __always_inline void set_bit(unsigned int nr, volatile unsigned long *p) { p +=BIT_WORD (nr);atomic_long_or (BIT_MASK (nr), (atomic_long_t *)p); } -static inline void clear_bit (unsigned int nr,volatile unsigned long *p) +static __always_inline void clear_bit(unsigned int nr, volatile unsigned long *p) { p +=BIT_WORD (nr);atomic_long_andnot (BIT_MASK (nr), (atomic_long_t *)p); } -static inline void change_bit (unsigned int nr,volatile unsigned long *p) +static __always_inline void change_bit(unsigned int nr, volatile unsigned long *p) { p +=BIT_WORD (nr);atomic_long_xor (BIT_MASK (nr), (atomic_long_t *)p);
include/net/inet_connection_sock.h +3 -0
@@ -83,6 +83,8 @@ struct inet_connection_sock_af_ops {* @icsk_ext_hdr_len: Network protocol overhead (IP/IPv6 options) * @icsk_ack: Delayed ACK control data * @icsk_mtup; MTU probing control data +* @icsk_probes_tstamp: Probe timestamp (cleared by non-zero window ack) +* @icsk_user_timeout: TCP_USER_TIMEOUT value */ struct inet_connection_sock {/* inet_sock has to be the first member! */
@@ -133,6 +135,7 @@ struct inet_connection_sock {u32 probe_timestamp; } icsk_mtup; +u32 icsk_probes_tstamp;u32 icsk_user_timeout;u64 icsk_ca_priv[104 /sizeof (u64)];
include/xen/xenbus.h +1 -1
@@ -187,7 +187,7 @@ void xs_suspend_cancel(void);struct work_struct ; -void xenbus_probe (struct work_struct *); +void xenbus_probe (void );#define XENBUS_IS_ERR_READ (str) ({ \ if (!IS_ERR(str) && strlen(str) == 0) { \
mm/kasan/init.c +13 -10
@@ -388,9 +388,10 @@ static void kasan_remove_pmd_table(pmd_t *pmd, unsigned long addr,if (kasan_pte_table (*pmd)) {if (IS_ALIGNED (addr,PMD_SIZE ) && -IS_ALIGNED (next,PMD_SIZE )) +IS_ALIGNED (next,PMD_SIZE )) {pmd_clear (pmd); -continue ; +continue ; + } } pte =pte_offset_kernel (pmd, addr);kasan_remove_pte_table (pte, addr, next);
@@ -413,9 +414,10 @@ static void kasan_remove_pud_table(pud_t *pud, unsigned long addr,if (kasan_pmd_table (*pud)) {if (IS_ALIGNED (addr,PUD_SIZE ) && -IS_ALIGNED (next,PUD_SIZE )) +IS_ALIGNED (next,PUD_SIZE )) {pud_clear (pud); -continue ; +continue ; + } } pmd =pmd_offset (pud, addr); pmd_base =pmd_offset (pud,0 );
@@ -439,9 +441,10 @@ static void kasan_remove_p4d_table(p4d_t *p4d, unsigned long addr,if (kasan_pud_table (*p4d)) {if (IS_ALIGNED (addr,P4D_SIZE ) && -IS_ALIGNED (next,P4D_SIZE )) +IS_ALIGNED (next,P4D_SIZE )) {p4d_clear (p4d); -continue ; +continue ; + } } pud =pud_offset (p4d, addr);kasan_remove_pud_table (pud, addr, next);
@@ -473,9 +476,10 @@ void kasan_remove_zero_shadow(void *start, unsigned long size)if (kasan_p4d_table (*pgd)) {if (IS_ALIGNED (addr,PGDIR_SIZE ) && -IS_ALIGNED (next,PGDIR_SIZE )) +IS_ALIGNED (next,PGDIR_SIZE )) {pgd_clear (pgd); -continue ; +continue ; + } } p4d =p4d_offset (pgd, addr);
@@ -499,7 +503,6 @@ int kasan_add_zero_shadow(void *start, unsigned long size) ret =kasan_populate_early_shadow (shadow_start, shadow_end);if (ret) -kasan_remove_zero_shadow (shadow_start, - size >>KASAN_SHADOW_SCALE_SHIFT ); +kasan_remove_zero_shadow (start, size);return ret; }
net/core/dev.c +5 -0
@@ -8692,6 +8692,11 @@ static netdev_features_t netdev_fix_features(struct net_device *dev, } } +if ((features &NETIF_F_HW_TLS_RX ) && !(features &NETIF_F_RXCSUM )) { +netdev_dbg (dev,"Dropping TLS RX HW offload feature since no RXCSUM feature.\n" ); + features &= ~NETIF_F_HW_TLS_RX ; + } +return features; }
net/core/skbuff.c +5 -1
@@ -431,7 +431,11 @@ struct sk_buff *__netdev_alloc_skb(struct net_device *dev, unsigned int len, len +=NET_SKB_PAD ; -if ((len >SKB_WITH_OVERHEAD (PAGE_SIZE )) || +/* If requested length is either too small or too big, +* we use kmalloc() for skb->head allocation. +*/ +if (len <=SKB_WITH_OVERHEAD (1024 ) || + len >SKB_WITH_OVERHEAD (PAGE_SIZE ) || (gfp_mask & (__GFP_DIRECT_RECLAIM |GFP_DMA ))) { skb =__alloc_skb (len, gfp_mask,SKB_ALLOC_RX ,NUMA_NO_NODE );if (!skb)
net/ipv4/inet_connection_sock.c +1 -0
@@ -840,6 +840,7 @@ struct sock *inet_csk_clone_lock(const struct sock *sk, newicsk->icsk_retransmits =0 ; newicsk->icsk_backoff =0 ; newicsk->icsk_probes_out =0 ; + newicsk->icsk_probes_tstamp =0 ;/* Deinitialize accept_queue to trap illegal accesses. */ memset (&newicsk->icsk_accept_queue,0 ,sizeof (newicsk->icsk_accept_queue));
net/ipv4/netfilter/ipt_rpfilter.c +1 -1
@@ -76,7 +76,7 @@ static bool rpfilter_mt(const struct sk_buff *skb, struct xt_action_param *par) flow.daddr = iph->saddr; flow.saddr =rpfilter_get_saddr (iph->daddr); flow.flowi4_mark = info->flags &XT_RPFILTER_VALID_MARK ? skb->mark :0 ; - flow.flowi4_tos =RT_TOS (iph->tos); + flow.flowi4_tos = iph->tos &IPTOS_RT_MASK ; flow.flowi4_scope =RT_SCOPE_UNIVERSE ; flow.flowi4_oif =l3mdev_master_ifindex_rcu (xt_in (par));
net/ipv4/tcp.c +1 -0
@@ -2627,6 +2627,7 @@ int tcp_disconnect(struct sock *sk, int flags) icsk->icsk_backoff =0 ; tp->snd_cwnd =2 ; icsk->icsk_probes_out =0 ; + icsk->icsk_probes_tstamp =0 ; icsk->icsk_rto =TCP_TIMEOUT_INIT ; tp->snd_ssthresh =TCP_INFINITE_SSTHRESH ; tp->snd_cwnd =TCP_INIT_CWND ;
net/ipv4/tcp_input.c +1 -0
@@ -3286,6 +3286,7 @@ static void tcp_ack_probe(struct sock *sk)return ;if (!after (TCP_SKB_CB (head)->end_seq,tcp_wnd_end (tp))) { icsk->icsk_backoff =0 ; + icsk->icsk_probes_tstamp =0 ;inet_csk_clear_xmit_timer (sk,ICSK_TIME_PROBE0 );/* Socket must be waked up by subsequent tcp_data_snd_check(). * This function is not for random using!
net/ipv4/tcp_ipv4.c +13 -12
@@ -1657,6 +1657,7 @@ int tcp_v4_early_demux(struct sk_buff *skb)bool tcp_add_backlog (struct sock *sk,struct sk_buff *skb) {u32 limit =READ_ONCE (sk->sk_rcvbuf) +READ_ONCE (sk->sk_sndbuf); +u32 tail_gso_size, tail_gso_segs;struct skb_shared_info *shinfo;const struct tcphdr *th;struct tcphdr *thtail;
@@ -1664,6 +1665,7 @@ bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb)unsigned int hdrlen;bool fragstolen;u32 gso_segs; +u32 gso_size;int delta;/* In case all data was pulled from skb frags (in __pskb_pull_tail()),
@@ -1689,13 +1691,6 @@ bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb)*/ th = (const struct tcphdr *)skb->data; hdrlen = th->doff *4 ; - shinfo =skb_shinfo (skb); - -if (!shinfo->gso_size) - shinfo->gso_size = skb->len - hdrlen; - -if (!shinfo->gso_segs) - shinfo->gso_segs =1 ; tail = sk->sk_backlog.tail;if (!tail)
@@ -1718,6 +1713,15 @@ bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb) goto no_coalesce;__skb_pull (skb, hdrlen); + + shinfo =skb_shinfo (skb); + gso_size = shinfo->gso_size ?: skb->len; + gso_segs = shinfo->gso_segs ?:1 ; + + shinfo =skb_shinfo (tail); + tail_gso_size = shinfo->gso_size ?: (tail->len - hdrlen); + tail_gso_segs = shinfo->gso_segs ?:1 ; +if (skb_try_coalesce (tail, skb, &fragstolen, &delta)) {TCP_SKB_CB (tail)->end_seq =TCP_SKB_CB (skb)->end_seq;
@@ -1744,11 +1748,8 @@ bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb) }/* Not as strict as GRO. We only need to carry mss max value */ -skb_shinfo (tail)->gso_size =max (shinfo->gso_size, -skb_shinfo (tail)->gso_size); - - gso_segs =skb_shinfo (tail)->gso_segs + shinfo->gso_segs; -skb_shinfo (tail)->gso_segs =min_t (u32, gso_segs,0xFFFF ); + shinfo->gso_size =max (gso_size, tail_gso_size); + shinfo->gso_segs =min_t (u32, gso_segs + tail_gso_segs,0xFFFF ); sk->sk_backlog.len += delta; __NET_INC_STATS(sock_net(sk),
net/ipv4/tcp_output.c +1 -0
@@ -3835,6 +3835,7 @@ void tcp_send_probe0(struct sock *sk)/* Cancel probe timer, if it is not required. */ icsk->icsk_probes_out =0 ; icsk->icsk_backoff =0 ; + icsk->icsk_probes_tstamp =0 ;return ; }
net/ipv4/tcp_timer.c +7 -7
@@ -344,6 +344,7 @@ static void tcp_probe_timer(struct sock *sk)if (tp->packets_out || !skb) { icsk->icsk_probes_out =0 ; + icsk->icsk_probes_tstamp =0 ;return ; }
@@ -355,13 +356,12 @@ static void tcp_probe_timer(struct sock *sk)* corresponding system limit. We also implement similar policy when * we use RTO to probe window in tcp_retransmit_timer(). */ -if (icsk->icsk_user_timeout) { -u32 elapsed =tcp_model_timeout (sk, icsk->icsk_probes_out, -tcp_probe0_base (sk)); - -if (elapsed >= icsk->icsk_user_timeout) - goto abort; - } +if (!icsk->icsk_probes_tstamp) + icsk->icsk_probes_tstamp = tcp_jiffies32; +else if (icsk->icsk_user_timeout && + (s32)(tcp_jiffies32 - icsk->icsk_probes_tstamp) >= +msecs_to_jiffies (icsk->icsk_user_timeout)) + goto abort; max_probes =sock_net (sk)->ipv4.sysctl_tcp_retries2;if (sock_flag (sk,SOCK_DEAD )) {
net/ipv4/udp.c +2 -1
@@ -2495,7 +2495,8 @@ int udp_v4_early_demux(struct sk_buff *skb)*/ if (!inet_sk (sk)->inet_daddr && in_dev)return ip_mc_validate_source (skb, iph->daddr, - iph->saddr, iph->tos, + iph->saddr, + iph->tos &IPTOS_RT_MASK , skb->dev, in_dev, &itag); }return 0 ;
net/ipv6/addrconf.c +2 -1
@@ -2452,8 +2452,9 @@ static void addrconf_add_mroute(struct net_device *dev) .fc_ifindex = dev->ifindex, .fc_dst_len = 8, .fc_flags = RTF_UP, - .fc_type = RTN_UNICAST, + .fc_type = RTN_MULTICAST, .fc_nlinfo.nl_net = dev_net(dev), + .fc_protocol = RTPROT_KERNEL, };ipv6_addr_set (&cfg.fc_dst,htonl (0xFF000000 ),0 ,0 ,0 );
net/sched/cls_tcindex.c +6 -2
@@ -366,9 +366,13 @@ tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base,if (tb[TCA_TCINDEX_MASK ]) cp->mask =nla_get_u16 (tb[TCA_TCINDEX_MASK ]); -if (tb[TCA_TCINDEX_SHIFT ]) +if (tb[TCA_TCINDEX_SHIFT ]) { cp->shift =nla_get_u32 (tb[TCA_TCINDEX_SHIFT ]); - +if (cp->shift >16 ) { + err = -EINVAL ; + goto errout; + } + }if (!cp->hash) {/* Hash not specified, use perfect hash if the upper limit * of the hashing index is below the threshold.
net/sched/sch_api.c +2 -1
@@ -409,7 +409,8 @@ struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r, {struct qdisc_rate_table *rtab; -if (tab ==NULL || r->rate ==0 || r->cell_log ==0 || +if (tab ==NULL || r->rate ==0 || + r->cell_log ==0 || r->cell_log >=32 ||nla_len (tab) !=TC_RTAB_SIZE ) {NL_SET_ERR_MSG (extack,"Invalid rate table parameters for searching" );return NULL ;
sound/core/seq/oss/seq_oss_synth.c +2 -1
@@ -611,7 +611,8 @@ snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_inif (info->is_midi) {struct midi_info minf; -snd_seq_oss_midi_make_info (dp, info->midi_mapped, &minf); +if (snd_seq_oss_midi_make_info (dp, info->midi_mapped, &minf)) +return -ENXIO ; inf->synth_type =SYNTH_TYPE_MIDI ; inf->synth_subtype =0 ; inf->nr_voices =16 ;
sound/pci/hda/patch_via.c +1 -0
@@ -113,6 +113,7 @@ static struct via_spec *via_new_spec(struct hda_codec *codec) spec->codec_type =VT1708S ; spec->gen.indep_hp =1 ; spec->gen.keep_eapd_on =1 ; + spec->gen.dac_min_mute =1 ; spec->gen.pcm_playback_hook = via_playback_pcm_hook; spec->gen.add_stereo_mix_input =HDA_HINT_STEREO_MIX_AUTO ; codec->power_save_node =1 ;
sound/soc/intel/boards/haswell.c +1 -0
@@ -206,6 +206,7 @@ static struct platform_driver haswell_audio = { .probe = haswell_audio_probe, .driver = { .name = "haswell-audio", + .pm = &snd_soc_pm_ops, }, };
tools/testing/selftests/net/fib_tests.sh +0 -1
@@ -1055,7 +1055,6 @@ ipv6_addr_metric_test() check_route6 "2001:db8:104::1 dev dummy2 proto kernel metric 260" log_test $? 0 "Set metric with peer route on local side" - log_test $? 0 "User specified metric on local address" check_route6 "2001:db8:104::2 dev dummy2 proto kernel metric 260" log_test $? 0 "Set metric with peer route on peer side"