1
0
Fork 0

This is the 5.4.93 stable release

-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmARRPQACgkQONu9yGCS
 aT7jAg//SFgHtf8wdnuWP7vANyU+MV8fGTs2No729MXuDEZLMwI9uwlkegcNRatI
 G9zCbuPpoXyQFo5wHVYmS1z97dt+SbAY8bO6qjGJBO6e3Pxbo+DEiGCl70Lm6qqu
 8Z3yuECpNID6A3rAgkE2jDBnMr6QolU4hjKnsf8VEVRwDYDjWxTaxZvtS0tGZJf9
 em/F7+1T1cFd2va6FLhyrin1Mu6J/YgZ9NcZTotx/wV5UUwsp/TCxkciUUa4MgkX
 Tv0rt2LSGx2DKw9pGoQi/oXLpyFbQFAM37KWSto7oS7cPzY1FJ7z1Yxcu18J+v5Y
 bsVpCrtDqmrjI8vkcO+8cGcGPXPTT0liUWpWzLX3wiXAZW876fuJrUPFg1LszZoN
 oztyaQTLSCgfYrS21aKOsP3DP2PPRl2TUCslOQwABJrGJ6nLhTyjiF3g+bV2GPlH
 N5f1vutsyp90YkNqywWdK9rito7JFgawqlw63oS65EYsFLmVFeBAdU+b/ecAw53O
 k09HqkZt7RZXVKRpNkLbGfBkGY3wrsiV33SCMpuSQ2lZWyUfwaFmANuaQWeJ5pvl
 nfv09NfzK0cTlMCkHDl5HIqhErvuTSDC6DowEitpQhv23JddgU9KVvWcS5xrJFpP
 9+9QfqkMk9uq0DIYKTSKC+tOrMl7xxsaSG7Xm5MOxr3GXPg1BPE=
 =Fkdf
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdQaENiSDAlGTDEbB7G51OISzHs0FAmASfSkACgkQ7G51OISz
 Hs2FIRAAkHxX7RhYxsEFknN7akxJ5yI661vpgvt+ZRFIkn+3zb9uC/rlP1r+PnuP
 G/YNkjnLpm0w42NqFXVmYl1wPRRfiKr0NAImFkmoSHrMQsYxXTozTTgIqsOhQdC7
 0mpRZ6JRatp5FHYPG4/oeGmvvnyCjB9uJAqBB/9VAfUziWNCVnxQK/VeVRJKrPSl
 zkmXwqx46vFkjQC4TGDjSPKKUGvwSpPjsF220wA+cZXjwZdiTurYAZEeNe6CT3yl
 IIzeHVF7kdvCW+7ZvjK0pHRuTipysgrRCnEqSDgIDe/XZJnY08ETcwiNWHCeGs6P
 e93m+Meb8ZMjmAHbctwoqrx3LP46Sq8hL/Pzk85lX5P/mXzp6O0+GQu39uO6uvqm
 R/brXylELjL2b4Qcozkjo4aC6fIi3KtJKqFP2nVRKJRTTBJDvIb+f1R0+iNUBun9
 3SFQTOdQgPjQfTQn+0YQ5nywanMFSVkKlsyQ+CtdBxUrR2B1GP8nFWSLaHzM36cr
 Yo9bOzjBAQMtNu1SYX0RDM1P5zuenKxdA3LK0zEBobHsiUT8YCGMCiyZFyFrXuN3
 pKXZGhVKHznVjIhn+VdEeXaKTR1DZlZcwSMGxC8Rrzx3JTJlCMYtI6CNdGR+8XM1
 GOsPolmu9KrDM6kpnZmy+4JT1l4cflPcMQ5R167Jfe5kVOCqSN8=
 =KDG9
 -----END PGP SIGNATURE-----

Merge tag 'v5.4.93' into 5.4-2.2.x-imx

This is the 5.4.93 stable release

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
5.4-rM2-2.2.x-imx-squashed
Andrey Zhizhikin 2021-01-28 09:00:22 +00:00
commit ec63282b52
104 changed files with 488 additions and 222 deletions

View File

@ -5452,6 +5452,10 @@
This option is obsoleted by the "nopv" option, which This option is obsoleted by the "nopv" option, which
has equivalent effect for XEN platform. 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] xen_scrub_pages= [XEN]
Boolean option to control scrubbing pages before giving them back Boolean option to control scrubbing pages before giving them back
to Xen, for use by other domains. Can be also changed at runtime to Xen, for use by other domains. Can be also changed at runtime

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
VERSION = 5 VERSION = 5
PATCHLEVEL = 4 PATCHLEVEL = 4
SUBLEVEL = 92 SUBLEVEL = 93
EXTRAVERSION = EXTRAVERSION =
NAME = Kleptomaniac Octopus NAME = Kleptomaniac Octopus

View File

@ -371,7 +371,7 @@ static int __init xen_guest_init(void)
} }
gnttab_init(); gnttab_init();
if (!xen_initial_domain()) if (!xen_initial_domain())
xenbus_probe(NULL); xenbus_probe();
/* /*
* Making sure board specific code will not set up ops for * Making sure board specific code will not set up ops for

View File

@ -17,7 +17,7 @@
#include <asm/lse.h> #include <asm/lse.h>
#define ATOMIC_OP(op) \ #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); \ __lse_ll_sc_body(op, i, v); \
} }
@ -32,7 +32,7 @@ ATOMIC_OP(atomic_sub)
#undef ATOMIC_OP #undef ATOMIC_OP
#define ATOMIC_FETCH_OP(name, 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); \ return __lse_ll_sc_body(op##name, i, v); \
} }
@ -56,7 +56,7 @@ ATOMIC_FETCH_OPS(atomic_sub_return)
#undef ATOMIC_FETCH_OPS #undef ATOMIC_FETCH_OPS
#define ATOMIC64_OP(op) \ #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); \ __lse_ll_sc_body(op, i, v); \
} }
@ -71,7 +71,7 @@ ATOMIC64_OP(atomic64_sub)
#undef ATOMIC64_OP #undef ATOMIC64_OP
#define ATOMIC64_FETCH_OP(name, 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); \ 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_OP
#undef ATOMIC64_FETCH_OPS #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); return __lse_ll_sc_body(atomic64_dec_if_positive, v);
} }

View File

@ -210,6 +210,12 @@ SECTIONS
.init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
_sinittext = .; _sinittext = .;
INIT_TEXT INIT_TEXT
/*
*.init.text might be RO so we must ensure this section ends on
* a page boundary.
*/
. = ALIGN(PAGE_SIZE);
_einittext = .; _einittext = .;
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
*(.tramp.ftrace.init); *(.tramp.ftrace.init);
@ -223,21 +229,9 @@ SECTIONS
EXIT_TEXT EXIT_TEXT
} }
.init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { . = ALIGN(PAGE_SIZE);
INIT_DATA
}
.init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { INIT_DATA_SECTION(16)
INIT_SETUP(16)
}
.initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
INIT_CALLS
}
.con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
CON_INITCALL
}
. = ALIGN(8); . = ALIGN(8);
__ftr_fixup : AT(ADDR(__ftr_fixup) - LOAD_OFFSET) { __ftr_fixup : AT(ADDR(__ftr_fixup) - LOAD_OFFSET) {
@ -265,9 +259,6 @@ SECTIONS
__stop___fw_ftr_fixup = .; __stop___fw_ftr_fixup = .;
} }
#endif #endif
.init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
INIT_RAM_FS
}
PERCPU_SECTION(L1_CACHE_BYTES) PERCPU_SECTION(L1_CACHE_BYTES)

View File

@ -83,6 +83,7 @@
phy-mode = "gmii"; phy-mode = "gmii";
phy-handle = <&phy0>; phy-handle = <&phy0>;
phy0: ethernet-phy@0 { phy0: ethernet-phy@0 {
compatible = "ethernet-phy-id0007.0771";
reg = <0>; reg = <0>;
}; };
}; };

View File

@ -62,6 +62,8 @@ CONFIG_HW_RANDOM=y
CONFIG_HW_RANDOM_VIRTIO=y CONFIG_HW_RANDOM_VIRTIO=y
CONFIG_SPI=y CONFIG_SPI=y
CONFIG_SPI_SIFIVE=y CONFIG_SPI_SIFIVE=y
CONFIG_GPIOLIB=y
CONFIG_GPIO_SIFIVE=y
# CONFIG_PTP_1588_CLOCK is not set # CONFIG_PTP_1588_CLOCK is not set
CONFIG_DRM=y CONFIG_DRM=y
CONFIG_DRM_RADEON=y CONFIG_DRM_RADEON=y

View File

@ -4,6 +4,7 @@
* Copyright (C) 2017 SiFive * Copyright (C) 2017 SiFive
*/ */
#include <linux/of_clk.h>
#include <linux/clocksource.h> #include <linux/clocksource.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <asm/sbi.h> #include <asm/sbi.h>
@ -24,5 +25,7 @@ void __init time_init(void)
riscv_timebase = prop; riscv_timebase = prop;
lpj_fine = riscv_timebase / HZ; lpj_fine = riscv_timebase / HZ;
of_clk_init(NULL);
timer_probe(); timer_probe();
} }

View File

@ -63,8 +63,7 @@ config PVR2_DMA
config G2_DMA config G2_DMA
tristate "G2 Bus DMA support" tristate "G2 Bus DMA support"
depends on SH_DREAMCAST depends on SH_DREAMCAST && SH_DMA_API
select SH_DMA_API
help help
This enables support for the DMA controller for the Dreamcast's This enables support for the DMA controller for the Dreamcast's
G2 bus. Drivers that want this will generally enable this on G2 bus. Drivers that want this will generally enable this on

View File

@ -16,14 +16,25 @@
* Use kernel_fpu_begin/end() if you intend to use FPU in kernel context. It * 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 * disables preemption so be careful if you intend to use it for long periods
* of time. * 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. * 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 void kernel_fpu_end(void);
extern bool irq_fpu_usable(void); extern bool irq_fpu_usable(void);
extern void fpregs_mark_activate(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. * 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 * A context switch will (and softirq might) save CPU's FPU registers to

View File

@ -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_die_id(cpu) (cpu_data(cpu).cpu_die_id)
#define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id) #define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id)
extern unsigned int __max_die_per_package;
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
#define topology_die_cpumask(cpu) (per_cpu(cpu_die_map, cpu)) #define topology_die_cpumask(cpu) (per_cpu(cpu_die_map, cpu))
#define topology_core_cpumask(cpu) (per_cpu(cpu_core_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; extern unsigned int __max_logical_packages;
#define topology_max_packages() (__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) static inline int topology_max_die_per_package(void)
{ {
return __max_die_per_package; return __max_die_per_package;

View File

@ -545,12 +545,12 @@ static void bsp_init_amd(struct cpuinfo_x86 *c)
u32 ecx; u32 ecx;
ecx = cpuid_ecx(0x8000001e); 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)) { } else if (boot_cpu_has(X86_FEATURE_NODEID_MSR)) {
u64 value; u64 value;
rdmsrl(MSR_FAM10H_NODE_ID, 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) && if (!boot_cpu_has(X86_FEATURE_AMD_SSBD) &&

View File

@ -25,10 +25,10 @@
#define BITS_SHIFT_NEXT_LEVEL(eax) ((eax) & 0x1f) #define BITS_SHIFT_NEXT_LEVEL(eax) ((eax) & 0x1f)
#define LEVEL_MAX_SIBLINGS(ebx) ((ebx) & 0xffff) #define LEVEL_MAX_SIBLINGS(ebx) ((ebx) & 0xffff)
#ifdef CONFIG_SMP
unsigned int __max_die_per_package __read_mostly = 1; unsigned int __max_die_per_package __read_mostly = 1;
EXPORT_SYMBOL(__max_die_per_package); EXPORT_SYMBOL(__max_die_per_package);
#ifdef CONFIG_SMP
/* /*
* Check if given CPUID extended toplogy "leaf" is implemented * Check if given CPUID extended toplogy "leaf" is implemented
*/ */

View File

@ -82,7 +82,7 @@ bool irq_fpu_usable(void)
} }
EXPORT_SYMBOL(irq_fpu_usable); EXPORT_SYMBOL(irq_fpu_usable);
void kernel_fpu_begin(void) void kernel_fpu_begin_mask(unsigned int kfpu_mask)
{ {
preempt_disable(); preempt_disable();
@ -102,13 +102,14 @@ void kernel_fpu_begin(void)
} }
__cpu_invalidate_fpregs_state(); __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); ldmxcsr(MXCSR_DEFAULT);
if (boot_cpu_has(X86_FEATURE_FPU)) if (unlikely(kfpu_mask & KFPU_387) && boot_cpu_has(X86_FEATURE_FPU))
asm volatile ("fninit"); asm volatile ("fninit");
} }
EXPORT_SYMBOL_GPL(kernel_fpu_begin); EXPORT_SYMBOL_GPL(kernel_fpu_begin_mask);
void kernel_fpu_end(void) void kernel_fpu_end(void)
{ {

View File

@ -26,6 +26,16 @@
#include <asm/fpu/api.h> #include <asm/fpu/api.h>
#include <asm/asm.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 *_mmx_memcpy(void *to, const void *from, size_t len)
{ {
void *p; void *p;
@ -37,7 +47,7 @@ void *_mmx_memcpy(void *to, const void *from, size_t len)
p = to; p = to;
i = len >> 6; /* len/64 */ i = len >> 6; /* len/64 */
kernel_fpu_begin(); kernel_fpu_begin_mask(KFPU_387);
__asm__ __volatile__ ( __asm__ __volatile__ (
"1: prefetch (%0)\n" /* This set is 28 bytes */ "1: prefetch (%0)\n" /* This set is 28 bytes */
@ -127,7 +137,7 @@ static void fast_clear_page(void *page)
{ {
int i; int i;
kernel_fpu_begin(); kernel_fpu_begin_mask(KFPU_387);
__asm__ __volatile__ ( __asm__ __volatile__ (
" pxor %%mm0, %%mm0\n" : : " pxor %%mm0, %%mm0\n" : :
@ -160,7 +170,7 @@ static void fast_copy_page(void *to, void *from)
{ {
int i; int i;
kernel_fpu_begin(); kernel_fpu_begin_mask(KFPU_387);
/* /*
* maybe the prefetch stuff can go before the expensive fnsave... * maybe the prefetch stuff can go before the expensive fnsave...
@ -247,7 +257,7 @@ static void fast_clear_page(void *page)
{ {
int i; int i;
kernel_fpu_begin(); kernel_fpu_begin_mask(KFPU_387);
__asm__ __volatile__ ( __asm__ __volatile__ (
" pxor %%mm0, %%mm0\n" : : " pxor %%mm0, %%mm0\n" : :
@ -282,7 +292,7 @@ static void fast_copy_page(void *to, void *from)
{ {
int i; int i;
kernel_fpu_begin(); kernel_fpu_begin_mask(KFPU_387);
__asm__ __volatile__ ( __asm__ __volatile__ (
"1: prefetch (%0)\n" "1: prefetch (%0)\n"

View File

@ -175,6 +175,8 @@ static int xen_cpu_dead_hvm(unsigned int cpu)
return 0; return 0;
} }
static bool no_vector_callback __initdata;
static void __init xen_hvm_guest_init(void) static void __init xen_hvm_guest_init(void)
{ {
if (xen_pv_domain()) if (xen_pv_domain())
@ -194,7 +196,7 @@ static void __init xen_hvm_guest_init(void)
xen_panic_handler_init(); 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_have_vector_callback = 1;
xen_hvm_smp_init(); xen_hvm_smp_init();
@ -220,6 +222,13 @@ static __init int xen_parse_nopv(char *arg)
} }
early_param("xen_nopv", xen_parse_nopv); 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) bool __init xen_hvm_need_lapic(void)
{ {
if (xen_pv_domain()) if (xen_pv_domain())

View File

@ -587,6 +587,8 @@ static int acpi_get_device_data(acpi_handle handle, struct acpi_device **device,
if (!device) if (!device)
return -EINVAL; return -EINVAL;
*device = NULL;
status = acpi_get_data_full(handle, acpi_scan_drop_device, status = acpi_get_data_full(handle, acpi_scan_drop_device,
(void **)device, callback); (void **)device, callback);
if (ACPI_FAILURE(status) || !*device) { if (ACPI_FAILURE(status) || !*device) {

View File

@ -106,6 +106,16 @@ int device_links_read_lock_held(void)
#endif #endif
#endif /* !CONFIG_SRCU */ #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 * device_is_dependent - Check if one device depends on another one
* @dev: Device to check dependencies for. * @dev: Device to check dependencies for.
@ -119,7 +129,12 @@ static int device_is_dependent(struct device *dev, void *target)
struct device_link *link; struct device_link *link;
int ret; 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; return 1;
ret = device_for_each_child(dev, target, device_is_dependent); ret = device_for_each_child(dev, target, device_is_dependent);

View File

@ -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_I2S3_SYNC, TEGRA30_CLK_CLK_MAX, 24000000, 0 },
{ TEGRA30_CLK_I2S4_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_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 */ /* must be the last entry */
{ TEGRA30_CLK_CLK_MAX, TEGRA30_CLK_CLK_MAX, 0, 0 }, { TEGRA30_CLK_CLK_MAX, TEGRA30_CLK_CLK_MAX, 0, 0 },
}; };

View File

@ -44,7 +44,7 @@ enum psp_gfx_crtl_cmd_id
GFX_CTRL_CMD_ID_DISABLE_INT = 0x00060000, /* disable PSP-to-Gfx interrupt */ GFX_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_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_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_DESTROY_GPCOM_RING = 0x000C0000, /* destroy GPCOM ring */
GFX_CTRL_CMD_ID_MAX = 0x000F0000, /* max command ID */ GFX_CTRL_CMD_ID_MAX = 0x000F0000, /* max command ID */

View File

@ -113,7 +113,7 @@ int amdgpu_dm_crtc_configure_crc_source(struct drm_crtc *crtc,
mutex_lock(&adev->dm.dc_lock); mutex_lock(&adev->dm.dc_lock);
/* Enable CRTC CRC generation if necessary. */ /* 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, if (!dc_stream_configure_crc(stream_state->ctx->dc,
stream_state, enable, enable)) { stream_state, enable, enable)) {
ret = -EINVAL; ret = -EINVAL;

View File

@ -2948,7 +2948,7 @@ int drm_atomic_helper_set_config(struct drm_mode_set *set,
ret = handle_conflicting_encoders(state, true); ret = handle_conflicting_encoders(state, true);
if (ret) if (ret)
return ret; goto fail;
ret = drm_atomic_commit(state); ret = drm_atomic_commit(state);

View File

@ -326,19 +326,18 @@ int drm_syncobj_find_fence(struct drm_file *file_private,
return -ENOENT; return -ENOENT;
*fence = drm_syncobj_fence_get(syncobj); *fence = drm_syncobj_fence_get(syncobj);
drm_syncobj_put(syncobj);
if (*fence) { if (*fence) {
ret = dma_fence_chain_find_seqno(fence, point); ret = dma_fence_chain_find_seqno(fence, point);
if (!ret) if (!ret)
return 0; goto out;
dma_fence_put(*fence); dma_fence_put(*fence);
} else { } else {
ret = -EINVAL; ret = -EINVAL;
} }
if (!(flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT)) if (!(flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT))
return ret; goto out;
memset(&wait, 0, sizeof(wait)); memset(&wait, 0, sizeof(wait));
wait.task = current; wait.task = current;
@ -370,6 +369,9 @@ int drm_syncobj_find_fence(struct drm_file *file_private,
if (wait.node.next) if (wait.node.next)
drm_syncobj_remove_wait(syncobj, &wait); drm_syncobj_remove_wait(syncobj, &wait);
out:
drm_syncobj_put(syncobj);
return ret; return ret;
} }
EXPORT_SYMBOL(drm_syncobj_find_fence); EXPORT_SYMBOL(drm_syncobj_find_fence);

View File

@ -2245,6 +2245,9 @@ err:
static void lrc_destroy_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); 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); typedef u32 *(*wa_bb_func_t)(struct intel_engine_cs *engine, u32 *batch);

View File

@ -132,7 +132,7 @@ nv50_dmac_destroy(struct nv50_dmac *dmac)
int int
nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp, 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 nv50_dmac *dmac)
{ {
struct nouveau_cli *cli = (void *)device->object.client; 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) if (ret)
return ret; return ret;
if (!syncbuf) if (syncbuf < 0)
return 0; return 0;
ret = nvif_object_init(&dmac->base.user, 0xf0000000, NV_DMA_IN_MEMORY, ret = nvif_object_init(&dmac->base.user, 0xf0000000, NV_DMA_IN_MEMORY,

View File

@ -70,7 +70,7 @@ struct nv50_dmac {
int nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp, int nv50_dmac_create(struct nvif_device *device, struct nvif_object *disp,
const s32 *oclass, u8 head, void *data, u32 size, 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 *); void nv50_dmac_destroy(struct nv50_dmac *);
u32 *evo_wait(struct nv50_dmac *, int nr); u32 *evo_wait(struct nv50_dmac *, int nr);

View File

@ -68,7 +68,7 @@ wimmc37b_init_(const struct nv50_wimm_func *func, struct nouveau_drm *drm,
int ret; int ret;
ret = nv50_dmac_create(&drm->client.device, &disp->disp->object, ret = nv50_dmac_create(&drm->client.device, &disp->disp->object,
&oclass, 0, &args, sizeof(args), 0, &oclass, 0, &args, sizeof(args), -1,
&wndw->wimm); &wndw->wimm);
if (ret) { if (ret) {
NV_ERROR(drm, "wimm%04x allocation failed: %d\n", oclass, ret); NV_ERROR(drm, "wimm%04x allocation failed: %d\n", oclass, ret);

View File

@ -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", nvkm_debug(subdev, "%08x: type %02x, %d bytes\n",
image.base, image.type, image.size); 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); nvkm_debug(subdev, "%08x: fetch failed\n", image.base);
return 0; return 0;
} }

View File

@ -33,7 +33,7 @@ static void
gm200_i2c_aux_fini(struct gm200_i2c_aux *aux) gm200_i2c_aux_fini(struct gm200_i2c_aux *aux)
{ {
struct nvkm_device *device = aux->base.pad->i2c->subdev.device; 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 static int
@ -54,10 +54,10 @@ gm200_i2c_aux_init(struct gm200_i2c_aux *aux)
AUX_ERR(&aux->base, "begin idle timeout %08x", ctrl); AUX_ERR(&aux->base, "begin idle timeout %08x", ctrl);
return -EBUSY; return -EBUSY;
} }
} while (ctrl & 0x03010000); } while (ctrl & 0x07010000);
/* set some magic, and wait up to 1ms for it to appear */ /* 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; timeout = 1000;
do { do {
ctrl = nvkm_rd32(device, 0x00d954 + (aux->ch * 0x50)); 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); gm200_i2c_aux_fini(aux);
return -EBUSY; return -EBUSY;
} }
} while ((ctrl & 0x03000000) != urep); } while ((ctrl & 0x07000000) != urep);
return 0; return 0;
} }

View File

@ -22,6 +22,7 @@
* Authors: Ben Skeggs * Authors: Ben Skeggs
*/ */
#include "priv.h" #include "priv.h"
#include <subdev/timer.h>
static void static void
gf100_ibus_intr_hub(struct nvkm_subdev *ibus, int i) 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 data = nvkm_rd32(device, 0x122124 + (i * 0x0400));
u32 stat = nvkm_rd32(device, 0x122128 + (i * 0x0400)); u32 stat = nvkm_rd32(device, 0x122128 + (i * 0x0400));
nvkm_debug(ibus, "HUB%d: %06x %08x (%08x)\n", i, addr, data, stat); nvkm_debug(ibus, "HUB%d: %06x %08x (%08x)\n", i, addr, data, stat);
nvkm_mask(device, 0x122128 + (i * 0x0400), 0x00000200, 0x00000000);
} }
static void 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 data = nvkm_rd32(device, 0x124124 + (i * 0x0400));
u32 stat = nvkm_rd32(device, 0x124128 + (i * 0x0400)); u32 stat = nvkm_rd32(device, 0x124128 + (i * 0x0400));
nvkm_debug(ibus, "ROP%d: %06x %08x (%08x)\n", i, addr, data, stat); nvkm_debug(ibus, "ROP%d: %06x %08x (%08x)\n", i, addr, data, stat);
nvkm_mask(device, 0x124128 + (i * 0x0400), 0x00000200, 0x00000000);
} }
static void 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 data = nvkm_rd32(device, 0x128124 + (i * 0x0400));
u32 stat = nvkm_rd32(device, 0x128128 + (i * 0x0400)); u32 stat = nvkm_rd32(device, 0x128128 + (i * 0x0400));
nvkm_debug(ibus, "GPC%d: %06x %08x (%08x)\n", i, addr, data, stat); nvkm_debug(ibus, "GPC%d: %06x %08x (%08x)\n", i, addr, data, stat);
nvkm_mask(device, 0x128128 + (i * 0x0400), 0x00000200, 0x00000000);
} }
void void
@ -90,6 +88,12 @@ gf100_ibus_intr(struct nvkm_subdev *ibus)
intr1 &= ~stat; intr1 &= ~stat;
} }
} }
nvkm_mask(device, 0x121c4c, 0x0000003f, 0x00000002);
nvkm_msec(device, 2000,
if (!(nvkm_rd32(device, 0x121c4c) & 0x0000003f))
break;
);
} }
static int static int

View File

@ -22,6 +22,7 @@
* Authors: Ben Skeggs * Authors: Ben Skeggs
*/ */
#include "priv.h" #include "priv.h"
#include <subdev/timer.h>
static void static void
gk104_ibus_intr_hub(struct nvkm_subdev *ibus, int i) 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 data = nvkm_rd32(device, 0x122124 + (i * 0x0800));
u32 stat = nvkm_rd32(device, 0x122128 + (i * 0x0800)); u32 stat = nvkm_rd32(device, 0x122128 + (i * 0x0800));
nvkm_debug(ibus, "HUB%d: %06x %08x (%08x)\n", i, addr, data, stat); nvkm_debug(ibus, "HUB%d: %06x %08x (%08x)\n", i, addr, data, stat);
nvkm_mask(device, 0x122128 + (i * 0x0800), 0x00000200, 0x00000000);
} }
static void 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 data = nvkm_rd32(device, 0x124124 + (i * 0x0800));
u32 stat = nvkm_rd32(device, 0x124128 + (i * 0x0800)); u32 stat = nvkm_rd32(device, 0x124128 + (i * 0x0800));
nvkm_debug(ibus, "ROP%d: %06x %08x (%08x)\n", i, addr, data, stat); nvkm_debug(ibus, "ROP%d: %06x %08x (%08x)\n", i, addr, data, stat);
nvkm_mask(device, 0x124128 + (i * 0x0800), 0x00000200, 0x00000000);
} }
static void 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 data = nvkm_rd32(device, 0x128124 + (i * 0x0800));
u32 stat = nvkm_rd32(device, 0x128128 + (i * 0x0800)); u32 stat = nvkm_rd32(device, 0x128128 + (i * 0x0800));
nvkm_debug(ibus, "GPC%d: %06x %08x (%08x)\n", i, addr, data, stat); nvkm_debug(ibus, "GPC%d: %06x %08x (%08x)\n", i, addr, data, stat);
nvkm_mask(device, 0x128128 + (i * 0x0800), 0x00000200, 0x00000000);
} }
void void
@ -90,6 +88,12 @@ gk104_ibus_intr(struct nvkm_subdev *ibus)
intr1 &= ~stat; intr1 &= ~stat;
} }
} }
nvkm_mask(device, 0x12004c, 0x0000003f, 0x00000002);
nvkm_msec(device, 2000,
if (!(nvkm_rd32(device, 0x12004c) & 0x0000003f))
break;
);
} }
static int static int

View File

@ -316,9 +316,9 @@ nvkm_mmu_vram(struct nvkm_mmu *mmu)
{ {
struct nvkm_device *device = mmu->subdev.device; struct nvkm_device *device = mmu->subdev.device;
struct nvkm_mm *mm = &device->fb->ram->vram; struct nvkm_mm *mm = &device->fb->ram->vram;
const u32 sizeN = nvkm_mm_heap_size(mm, NVKM_RAM_MM_NORMAL); const u64 sizeN = nvkm_mm_heap_size(mm, NVKM_RAM_MM_NORMAL);
const u32 sizeU = nvkm_mm_heap_size(mm, NVKM_RAM_MM_NOMAP); const u64 sizeU = nvkm_mm_heap_size(mm, NVKM_RAM_MM_NOMAP);
const u32 sizeM = nvkm_mm_heap_size(mm, NVKM_RAM_MM_MIXED); const u64 sizeM = nvkm_mm_heap_size(mm, NVKM_RAM_MM_MIXED);
u8 type = NVKM_MEM_KIND * !!mmu->func->kind; u8 type = NVKM_MEM_KIND * !!mmu->func->kind;
u8 heap = NVKM_MEM_VRAM; u8 heap = NVKM_MEM_VRAM;
int heapM, heapN, heapU; int heapM, heapN, heapU;

View File

@ -393,6 +393,7 @@
#define USB_DEVICE_ID_TOSHIBA_CLICK_L9W 0x0401 #define USB_DEVICE_ID_TOSHIBA_CLICK_L9W 0x0401
#define USB_DEVICE_ID_HP_X2 0x074d #define USB_DEVICE_ID_HP_X2 0x074d
#define USB_DEVICE_ID_HP_X2_10_COVER 0x0755 #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_VENDOR_ID_ELECOM 0x056e
#define USB_DEVICE_ID_ELECOM_BM084 0x0061 #define USB_DEVICE_ID_ELECOM_BM084 0x0061

View File

@ -322,6 +322,8 @@ static const struct hid_device_id hid_battery_quirks[] = {
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH,
USB_DEVICE_ID_LOGITECH_DINOVO_EDGE_KBD), USB_DEVICE_ID_LOGITECH_DINOVO_EDGE_KBD),
HID_BATTERY_QUIRK_IGNORE }, HID_BATTERY_QUIRK_IGNORE },
{ HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN),
HID_BATTERY_QUIRK_IGNORE },
{} {}
}; };

View File

@ -1862,6 +1862,10 @@ static const struct hid_device_id logi_dj_receivers[] = {
HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
0xc531), 0xc531),
.driver_data = recvr_type_gaming_hidpp}, .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) */ { /* Logitech lightspeed receiver (0xc539) */
HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1), USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1),

View File

@ -2084,6 +2084,10 @@ static const struct hid_device_id mt_devices[] = {
HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8, HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8,
USB_VENDOR_ID_SYNAPTICS, 0xce08) }, 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 */ /* TopSeed panels */
{ .driver_data = MT_CLS_TOPSEED, { .driver_data = MT_CLS_TOPSEED,
MT_USB_DEVICE(USB_VENDOR_ID_TOPSEED2, MT_USB_DEVICE(USB_VENDOR_ID_TOPSEED2,

View File

@ -258,6 +258,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = {
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4b26), PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4b26),
.driver_data = (kernel_ulong_t)&intel_th_2x, .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 */ /* Emmitsburg PCH */
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x1bcc), PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x1bcc),

View File

@ -64,7 +64,7 @@ static void stm_heartbeat_unlink(struct stm_source_data *data)
static int stm_heartbeat_init(void) static int stm_heartbeat_init(void)
{ {
int i, ret = -ENOMEM; int i, ret;
if (nr_devs < 0 || nr_devs > STM_HEARTBEAT_MAX) if (nr_devs < 0 || nr_devs > STM_HEARTBEAT_MAX)
return -EINVAL; return -EINVAL;
@ -72,8 +72,10 @@ static int stm_heartbeat_init(void)
for (i = 0; i < nr_devs; i++) { for (i = 0; i < nr_devs; i++) {
stm_heartbeat[i].data.name = stm_heartbeat[i].data.name =
kasprintf(GFP_KERNEL, "heartbeat.%d", i); kasprintf(GFP_KERNEL, "heartbeat.%d", i);
if (!stm_heartbeat[i].data.name) if (!stm_heartbeat[i].data.name) {
ret = -ENOMEM;
goto fail_unregister; goto fail_unregister;
}
stm_heartbeat[i].data.nr_chans = 1; stm_heartbeat[i].data.nr_chans = 1;
stm_heartbeat[i].data.link = stm_heartbeat_link; stm_heartbeat[i].data.link = stm_heartbeat_link;

View File

@ -347,7 +347,7 @@ static int octeon_i2c_read(struct octeon_i2c *i2c, int target,
if (result) if (result)
return result; return result;
if (recv_len && i == 0) { if (recv_len && i == 0) {
if (data[i] > I2C_SMBUS_BLOCK_MAX + 1) if (data[i] > I2C_SMBUS_BLOCK_MAX)
return -EPROTO; return -EPROTO;
length += data[i]; length += data[i];
} }

View File

@ -80,7 +80,7 @@ static int tegra_bpmp_xlate_flags(u16 flags, u16 *out)
flags &= ~I2C_M_RECV_LEN; flags &= ~I2C_M_RECV_LEN;
} }
return (flags != 0) ? -EINVAL : 0; return 0;
} }
/** /**

View File

@ -188,9 +188,9 @@ static ssize_t ad5504_write_dac_powerdown(struct iio_dev *indio_dev,
return ret; return ret;
if (pwr_down) if (pwr_down)
st->pwr_down_mask |= (1 << chan->channel);
else
st->pwr_down_mask &= ~(1 << chan->channel); st->pwr_down_mask &= ~(1 << chan->channel);
else
st->pwr_down_mask |= (1 << chan->channel);
ret = ad5504_spi_write(st, AD5504_ADDR_CTRL, ret = ad5504_spi_write(st, AD5504_ADDR_CTRL,
AD5504_DAC_PWRDWN_MODE(st->pwr_down_mode) | AD5504_DAC_PWRDWN_MODE(st->pwr_down_mode) |

View File

@ -197,6 +197,13 @@ static int mips_cpu_ipi_alloc(struct irq_domain *domain, unsigned int virq,
if (ret) if (ret)
return 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); ret = irq_set_irq_type(virq + i, IRQ_TYPE_LEVEL_HIGH);
if (ret) if (ret)
return ret; return ret;

View File

@ -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); rqd.ppa_addr = generic_to_dev_addr(dev, ppa);
ret = nvm_submit_io_sync_raw(dev, &rqd); ret = nvm_submit_io_sync_raw(dev, &rqd);
__free_page(page);
if (ret) if (ret)
return ret; return ret;
__free_page(page);
return rqd.error; return rqd.error;
} }

View File

@ -565,6 +565,7 @@ config DM_INTEGRITY
select BLK_DEV_INTEGRITY select BLK_DEV_INTEGRITY
select DM_BUFIO select DM_BUFIO
select CRYPTO select CRYPTO
select CRYPTO_SKCIPHER
select ASYNC_XOR select ASYNC_XOR
---help--- ---help---
This device-mapper target emulates a block device that has This device-mapper target emulates a block device that has

View File

@ -4059,6 +4059,12 @@ try_smaller_buffer:
r = -ENOMEM; r = -ENOMEM;
goto bad; 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, ic->bufio = dm_bufio_client_create(ic->meta_dev ? ic->meta_dev->bdev : ic->dev->bdev,

View File

@ -428,14 +428,23 @@ int dm_get_device(struct dm_target *ti, const char *path, fmode_t mode,
{ {
int r; int r;
dev_t dev; dev_t dev;
unsigned int major, minor;
char dummy;
struct dm_dev_internal *dd; struct dm_dev_internal *dd;
struct dm_table *t = ti->table; struct dm_table *t = ti->table;
BUG_ON(!t); BUG_ON(!t);
dev = dm_get_dev_t(path); if (sscanf(path, "%u:%u%c", &major, &minor, &dummy) == 2) {
if (!dev) /* Extract the major/minor numbers */
return -ENODEV; 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); dd = find_device(&t->devices, dev);
if (!dd) { if (!dd) {

View File

@ -370,8 +370,10 @@ static void mmc_setup_queue(struct mmc_queue *mq, struct mmc_card *card)
"merging was advertised but not possible"); "merging was advertised but not possible");
blk_queue_max_segments(mq->queue, mmc_get_max_segments(host)); 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; 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); blk_queue_logical_block_size(mq->queue, block_size);
/* /*

View File

@ -167,7 +167,12 @@ static void xenon_reset_exit(struct sdhci_host *host,
/* Disable tuning request and auto-retuning again */ /* Disable tuning request and auto-retuning again */
xenon_retune_setup(host); 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); xenon_set_sdclk_off_idle(host, sdhc_id, false);

View File

@ -567,11 +567,11 @@ static void can_restart(struct net_device *dev)
} }
cf->can_id |= CAN_ERR_RESTARTED; cf->can_id |= CAN_ERR_RESTARTED;
netif_rx_ni(skb);
stats->rx_packets++; stats->rx_packets++;
stats->rx_bytes += cf->can_dlc; stats->rx_bytes += cf->can_dlc;
netif_rx_ni(skb);
restart: restart:
netdev_dbg(dev, "restarted\n"); netdev_dbg(dev, "restarted\n");
priv->can_stats.restarts++; priv->can_stats.restarts++;

View File

@ -512,11 +512,11 @@ static int pcan_usb_fd_decode_canmsg(struct pcan_usb_fd_if *usb_if,
else else
memcpy(cfd->data, rm->d, cfd->len); 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_packets++;
netdev->stats.rx_bytes += cfd->len; netdev->stats.rx_bytes += cfd->len;
peak_usb_netif_rx(skb, &usb_if->time_ref, le32_to_cpu(rm->ts_low));
return 0; return 0;
} }
@ -578,11 +578,11 @@ static int pcan_usb_fd_decode_status(struct pcan_usb_fd_if *usb_if,
if (!skb) if (!skb)
return -ENOMEM; return -ENOMEM;
peak_usb_netif_rx(skb, &usb_if->time_ref, le32_to_cpu(sm->ts_low));
netdev->stats.rx_packets++; netdev->stats.rx_packets++;
netdev->stats.rx_bytes += cf->can_dlc; netdev->stats.rx_bytes += cf->can_dlc;
peak_usb_netif_rx(skb, &usb_if->time_ref, le32_to_cpu(sm->ts_low));
return 0; return 0;
} }

View File

@ -39,6 +39,7 @@ static netdev_tx_t vxcan_xmit(struct sk_buff *skb, struct net_device *dev)
struct net_device *peer; struct net_device *peer;
struct canfd_frame *cfd = (struct canfd_frame *)skb->data; struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
struct net_device_stats *peerstats, *srcstats = &dev->stats; struct net_device_stats *peerstats, *srcstats = &dev->stats;
u8 len;
if (can_dropped_invalid_skb(dev, skb)) if (can_dropped_invalid_skb(dev, skb))
return NETDEV_TX_OK; 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->dev = peer;
skb->ip_summed = CHECKSUM_UNNECESSARY; skb->ip_summed = CHECKSUM_UNNECESSARY;
len = cfd->len;
if (netif_rx_ni(skb) == NET_RX_SUCCESS) { if (netif_rx_ni(skb) == NET_RX_SUCCESS) {
srcstats->tx_packets++; srcstats->tx_packets++;
srcstats->tx_bytes += cfd->len; srcstats->tx_bytes += len;
peerstats = &peer->stats; peerstats = &peer->stats;
peerstats->rx_packets++; peerstats->rx_packets++;
peerstats->rx_bytes += cfd->len; peerstats->rx_bytes += len;
} }
out_unlock: out_unlock:

View File

@ -1330,7 +1330,7 @@ int b53_vlan_prepare(struct dsa_switch *ds, int port,
if ((is5325(dev) || is5365(dev)) && vlan->vid_begin == 0) if ((is5325(dev) || is5365(dev)) && vlan->vid_begin == 0)
return -EOPNOTSUPP; return -EOPNOTSUPP;
if (vlan->vid_end > dev->num_vlans) if (vlan->vid_end >= dev->num_vlans)
return -ERANGE; return -ERANGE;
b53_enable_vlan(dev, true, ds->vlan_filtering); b53_enable_vlan(dev, true, ds->vlan_filtering);

View File

@ -351,6 +351,10 @@ int mv88e6250_g1_vtu_getnext(struct mv88e6xxx_chip *chip,
if (err) if (err)
return 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[3:0] are located in VTU Operation 3:0
* VTU DBNum[5:4] are located in VTU Operation 9:8 * VTU DBNum[5:4] are located in VTU Operation 9:8
*/ */

View File

@ -1895,10 +1895,8 @@ static int ocelot_netdevice_event(struct notifier_block *unused,
struct net_device *dev = netdev_notifier_info_to_dev(ptr); struct net_device *dev = netdev_notifier_info_to_dev(ptr);
int ret = 0; int ret = 0;
if (!ocelot_netdevice_dev_check(dev))
return 0;
if (event == NETDEV_PRECHANGEUPPER && if (event == NETDEV_PRECHANGEUPPER &&
ocelot_netdevice_dev_check(dev) &&
netif_is_lag_master(info->upper_dev)) { netif_is_lag_master(info->upper_dev)) {
struct netdev_lag_upper_info *lag_upper_info = info->upper_info; struct netdev_lag_upper_info *lag_upper_info = info->upper_info;
struct netlink_ext_ack *extack; struct netlink_ext_ack *extack;

View File

@ -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. */ /* Free all the skbuffs in the Rx queue and the DMA buffer. */
sh_eth_ring_free(ndev); sh_eth_ring_free(ndev);
pm_runtime_put_sync(&mdp->pdev->dev);
mdp->is_opened = 0; mdp->is_opened = 0;
pm_runtime_put(&mdp->pdev->dev);
return 0; return 0;
} }

View File

@ -334,7 +334,7 @@ FUNC_GROUP_DECL(RMII4, F24, E23, E24, E25, C25, C24, B26, B25, B24);
#define D22 40 #define D22 40
SIG_EXPR_LIST_DECL_SESG(D22, SD1CLK, SD1, SIG_DESC_SET(SCU414, 8)); SIG_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); PIN_DECL_2(D22, GPIOF0, SD1CLK, PWM8);
GROUP_DECL(PWM8G0, D22); GROUP_DECL(PWM8G0, D22);

View File

@ -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, static void ingenic_gpio_set_value(struct ingenic_gpio_chip *jzgc,
u8 offset, int value) 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); ingenic_gpio_set_bit(jzgc, JZ4760_GPIO_PAT0, offset, !!value);
else else
ingenic_gpio_set_bit(jzgc, JZ4740_GPIO_DATA, offset, !!value); 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; u8 reg1, reg2;
if (jzgc->jzpc->version >= ID_JZ4760) { if (jzgc->jzpc->version >= ID_JZ4770) {
reg1 = JZ4760_GPIO_PAT1; reg1 = JZ4760_GPIO_PAT1;
reg2 = JZ4760_GPIO_PAT0; reg2 = JZ4760_GPIO_PAT0;
} else { } else {
@ -1464,7 +1464,7 @@ static void ingenic_gpio_irq_enable(struct irq_data *irqd)
struct ingenic_gpio_chip *jzgc = gpiochip_get_data(gc); struct ingenic_gpio_chip *jzgc = gpiochip_get_data(gc);
int irq = irqd->hwirq; 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); ingenic_gpio_set_bit(jzgc, JZ4760_GPIO_INT, irq, true);
else else
ingenic_gpio_set_bit(jzgc, JZ4740_GPIO_SELECT, irq, true); 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); 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); ingenic_gpio_set_bit(jzgc, JZ4760_GPIO_INT, irq, false);
else else
ingenic_gpio_set_bit(jzgc, JZ4740_GPIO_SELECT, irq, false); 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); 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); ingenic_gpio_set_bit(jzgc, JZ4760_GPIO_FLAG, irq, false);
else else
ingenic_gpio_set_bit(jzgc, JZ4740_GPIO_DATA, irq, true); 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); 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); flag = ingenic_gpio_read_reg(jzgc, JZ4760_GPIO_FLAG);
else else
flag = ingenic_gpio_read_reg(jzgc, JZ4740_GPIO_FLAG); 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; struct ingenic_pinctrl *jzpc = jzgc->jzpc;
unsigned int pin = gc->base + offset; 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) || return ingenic_get_pin_config(jzpc, pin, JZ4760_GPIO_INT) ||
ingenic_get_pin_config(jzpc, pin, JZ4760_GPIO_PAT1); 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_PAT1, func & 0x2);
ingenic_shadow_config_pin(jzpc, pin, JZ4760_GPIO_PAT0, func & 0x1); ingenic_shadow_config_pin(jzpc, pin, JZ4760_GPIO_PAT0, func & 0x1);
ingenic_shadow_config_pin_load(jzpc, pin); 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, JZ4760_GPIO_INT, false);
ingenic_config_pin(jzpc, pin, GPIO_MSK, false); ingenic_config_pin(jzpc, pin, GPIO_MSK, false);
ingenic_config_pin(jzpc, pin, JZ4760_GPIO_PAT1, func & 0x2); 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 { } else {
ingenic_config_pin(jzpc, pin, JZ4740_GPIO_FUNC, true); 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_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; 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, GPIO_MSK, true);
ingenic_shadow_config_pin(jzpc, pin, JZ4760_GPIO_PAT1, input); ingenic_shadow_config_pin(jzpc, pin, JZ4760_GPIO_PAT1, input);
ingenic_shadow_config_pin_load(jzpc, pin); 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, JZ4760_GPIO_INT, false);
ingenic_config_pin(jzpc, pin, GPIO_MSK, true); ingenic_config_pin(jzpc, pin, GPIO_MSK, true);
ingenic_config_pin(jzpc, pin, JZ4760_GPIO_PAT1, input); 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; unsigned int offt = pin / PINS_PER_GPIO_CHIP;
bool pull; bool pull;
if (jzpc->version >= ID_JZ4760) if (jzpc->version >= ID_JZ4770)
pull = !ingenic_get_pin_config(jzpc, pin, JZ4760_GPIO_PEN); pull = !ingenic_get_pin_config(jzpc, pin, JZ4760_GPIO_PEN);
else else
pull = !ingenic_get_pin_config(jzpc, pin, JZ4740_GPIO_PULL_DIS); 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, static void ingenic_set_bias(struct ingenic_pinctrl *jzpc,
unsigned int pin, bool enabled) unsigned int pin, bool enabled)
{ {
if (jzpc->version >= ID_JZ4760) if (jzpc->version >= ID_JZ4770)
ingenic_config_pin(jzpc, pin, JZ4760_GPIO_PEN, !enabled); ingenic_config_pin(jzpc, pin, JZ4760_GPIO_PEN, !enabled);
else else
ingenic_config_pin(jzpc, pin, JZ4740_GPIO_PULL_DIS, !enabled); ingenic_config_pin(jzpc, pin, JZ4740_GPIO_PULL_DIS, !enabled);

View File

@ -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 }, * Device with _HID INT3515 (TI PD controllers) has some unresolved interrupt
{ "tps6598x", IRQ_RESOURCE_APIC, 1 }, * issues. The most common problem seen is interrupt flood.
{ "tps6598x", IRQ_RESOURCE_APIC, 2 }, *
{ "tps6598x", IRQ_RESOURCE_APIC, 3 }, * 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 * 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[] = { static const struct acpi_device_id i2c_multi_inst_acpi_ids[] = {
{ "BSG1160", (unsigned long)bsg1160_data }, { "BSG1160", (unsigned long)bsg1160_data },
{ "BSG2150", (unsigned long)bsg2150_data }, { "BSG2150", (unsigned long)bsg2150_data },
{ "INT3515", (unsigned long)int3515_data },
{ } { }
}; };
MODULE_DEVICE_TABLE(acpi, i2c_multi_inst_acpi_ids); MODULE_DEVICE_TABLE(acpi, i2c_multi_inst_acpi_ids);

View File

@ -92,6 +92,7 @@ struct ideapad_private {
struct dentry *debug; struct dentry *debug;
unsigned long cfg; unsigned long cfg;
bool has_hw_rfkill_switch; bool has_hw_rfkill_switch;
bool has_touchpad_switch;
const char *fnesc_guid; 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) { } else if (attr == &dev_attr_fn_lock.attr) {
supported = acpi_has_method(priv->adev->handle, "HALS") && supported = acpi_has_method(priv->adev->handle, "HALS") &&
acpi_has_method(priv->adev->handle, "SALS"); acpi_has_method(priv->adev->handle, "SALS");
} else } else if (attr == &dev_attr_touchpad.attr)
supported = priv->has_touchpad_switch;
else
supported = true; supported = true;
return supported ? attr->mode : 0; return supported ? attr->mode : 0;
@ -867,6 +870,9 @@ static void ideapad_sync_touchpad_state(struct ideapad_private *priv)
{ {
unsigned long value; unsigned long value;
if (!priv->has_touchpad_switch)
return;
/* Without reading from EC touchpad LED doesn't switch state */ /* Without reading from EC touchpad LED doesn't switch state */
if (!read_ec_data(priv->adev->handle, VPCCMD_R_TOUCHPAD, &value)) { if (!read_ec_data(priv->adev->handle, VPCCMD_R_TOUCHPAD, &value)) {
/* Some IdeaPads don't really turn off touchpad - they only /* 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->platform_device = pdev;
priv->has_hw_rfkill_switch = dmi_check_system(hw_rfkill_list); 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); ret = ideapad_sysfs_init(priv);
if (ret) if (ret)
return ret; return ret;
@ -1006,6 +1015,10 @@ static int ideapad_acpi_add(struct platform_device *pdev)
if (!priv->has_hw_rfkill_switch) if (!priv->has_hw_rfkill_switch)
write_ec_cmd(priv->adev->handle, VPCCMD_W_RF, 1); 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++) for (i = 0; i < IDEAPAD_RFKILL_DEV_NUM; i++)
if (test_bit(ideapad_rfk_data[i].cfgbit, &priv->cfg)) if (test_bit(ideapad_rfk_data[i].cfgbit, &priv->cfg))
ideapad_register_rfkill(priv, i); ideapad_register_rfkill(priv, i);

View File

@ -191,12 +191,6 @@ static const struct dmi_system_id dmi_switches_allow_list[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "Venue 11 Pro 7130"), 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 = { .matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),

View File

@ -8174,11 +8174,9 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance,
goto out; goto out;
} }
/* always store 64 bits regardless of addressing */
sense_ptr = (void *)cmd->frame + ioc->sense_off; sense_ptr = (void *)cmd->frame + ioc->sense_off;
if (instance->consistent_mask_64bit) put_unaligned_le64(sense_handle, sense_ptr);
put_unaligned_le64(sense_handle, sense_ptr);
else
put_unaligned_le32(sense_handle, sense_ptr);
} }
/* /*

View File

@ -2175,7 +2175,7 @@ qedi_show_boot_tgt_info(struct qedi_ctx *qedi, int type,
chap_name); chap_name);
break; break;
case ISCSI_BOOT_TGT_CHAP_SECRET: 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); chap_secret);
break; break;
case ISCSI_BOOT_TGT_REV_CHAP_NAME: case ISCSI_BOOT_TGT_REV_CHAP_NAME:
@ -2183,7 +2183,7 @@ qedi_show_boot_tgt_info(struct qedi_ctx *qedi, int type,
mchap_name); mchap_name);
break; break;
case ISCSI_BOOT_TGT_REV_CHAP_SECRET: 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); mchap_secret);
break; break;
case ISCSI_BOOT_TGT_FLAGS: case ISCSI_BOOT_TGT_FLAGS:

View File

@ -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; return BLK_STS_TARGET;
}
if (sdkp->ws16 || lba > 0xffffffff || nr_blocks > 0xffff) if (sdkp->ws16 || lba > 0xffffffff || nr_blocks > 0xffff)
return sd_setup_write_same16_cmnd(cmd, false); return sd_setup_write_same16_cmnd(cmd, false);

View File

@ -5980,19 +5980,16 @@ static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd)
{ {
struct Scsi_Host *host; struct Scsi_Host *host;
struct ufs_hba *hba; struct ufs_hba *hba;
unsigned int tag;
u32 pos; u32 pos;
int err; int err;
u8 resp = 0xF; u8 resp = 0xF, lun;
struct ufshcd_lrb *lrbp;
unsigned long flags; unsigned long flags;
host = cmd->device->host; host = cmd->device->host;
hba = shost_priv(host); hba = shost_priv(host);
tag = cmd->request->tag;
lrbp = &hba->lrb[tag]; lun = ufshcd_scsi_to_upiu_lun(cmd->device->lun);
err = ufshcd_issue_tm_cmd(hba, lrbp->lun, 0, UFS_LOGICAL_RESET, &resp); err = ufshcd_issue_tm_cmd(hba, lun, 0, UFS_LOGICAL_RESET, &resp);
if (err || resp != UPIU_TASK_MANAGEMENT_FUNC_COMPL) { if (err || resp != UPIU_TASK_MANAGEMENT_FUNC_COMPL) {
if (!err) if (!err)
err = resp; 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 */ /* clear the commands that were pending for corresponding LUN */
for_each_set_bit(pos, &hba->outstanding_reqs, hba->nutrs) { 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); err = ufshcd_clear_cmd(hba, pos);
if (err) if (err)
break; break;

View File

@ -648,6 +648,14 @@ static void wait_for_xmitr(struct uart_port *port)
(val & STAT_TX_RDY(port)), 1, 10000); (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) static void mvebu_uart_console_putchar(struct uart_port *port, int ch)
{ {
wait_for_xmitr(port); 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); uart_console_write(port, s, count, mvebu_uart_console_putchar);
wait_for_xmitr(port); wait_for_xmite(port);
if (ier) if (ier)
writel(ier, port->membase + UART_CTRL(port)); writel(ier, port->membase + UART_CTRL(port));

View File

@ -973,6 +973,7 @@ static int sifive_serial_probe(struct platform_device *pdev)
/* Set up clock divider */ /* Set up clock divider */
ssp->clkin_rate = clk_get_rate(ssp->clk); ssp->clkin_rate = clk_get_rate(ssp->clk);
ssp->baud_rate = SIFIVE_DEFAULT_BAUD_RATE; ssp->baud_rate = SIFIVE_DEFAULT_BAUD_RATE;
ssp->port.uartclk = ssp->baud_rate * 16;
__ssp_update_div(ssp); __ssp_update_div(ssp);
platform_set_drvdata(pdev, ssp); platform_set_drvdata(pdev, ssp);

View File

@ -420,7 +420,10 @@ static void ast_vhub_stop_active_req(struct ast_vhub_ep *ep,
u32 state, reg, loops; u32 state, reg, loops;
/* Stop DMA activity */ /* 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 */ /* Wait for it to complete */
for (loops = 0; loops < 1000; loops++) { for (loops = 0; loops < 1000; loops++) {

View File

@ -17,7 +17,7 @@ if USB_BDC_UDC
comment "Platform Support" comment "Platform Support"
config USB_BDC_PCI config USB_BDC_PCI
tristate "BDC support for PCIe based platforms" tristate "BDC support for PCIe based platforms"
depends on USB_PCI depends on USB_PCI && BROKEN
default USB_BDC_UDC default USB_BDC_UDC
help help
Enable support for platforms which have BDC connected through PCIe, such as Lego3 FPGA platform. Enable support for platforms which have BDC connected through PCIe, such as Lego3 FPGA platform.

View File

@ -1477,10 +1477,13 @@ static ssize_t soft_connect_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t n) struct device_attribute *attr, const char *buf, size_t n)
{ {
struct usb_udc *udc = container_of(dev, struct usb_udc, dev); struct usb_udc *udc = container_of(dev, struct usb_udc, dev);
ssize_t ret;
mutex_lock(&udc_lock);
if (!udc->driver) { if (!udc->driver) {
dev_err(dev, "soft-connect without a gadget driver\n"); dev_err(dev, "soft-connect without a gadget driver\n");
return -EOPNOTSUPP; ret = -EOPNOTSUPP;
goto out;
} }
if (sysfs_streq(buf, "connect")) { if (sysfs_streq(buf, "connect")) {
@ -1491,10 +1494,14 @@ static ssize_t soft_connect_store(struct device *dev,
usb_gadget_udc_stop(udc); usb_gadget_udc_stop(udc);
} else { } else {
dev_err(dev, "unsupported command '%s'\n", buf); 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); static DEVICE_ATTR_WO(soft_connect);

View File

@ -574,6 +574,7 @@ static int ehci_run (struct usb_hcd *hcd)
struct ehci_hcd *ehci = hcd_to_ehci (hcd); struct ehci_hcd *ehci = hcd_to_ehci (hcd);
u32 temp; u32 temp;
u32 hcc_params; u32 hcc_params;
int rc;
hcd->uses_new_polling = 1; hcd->uses_new_polling = 1;
@ -629,9 +630,20 @@ static int ehci_run (struct usb_hcd *hcd)
down_write(&ehci_cf_port_reset_rwsem); down_write(&ehci_cf_port_reset_rwsem);
ehci->rh_state = EHCI_RH_RUNNING; ehci->rh_state = EHCI_RH_RUNNING;
ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag); ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag);
/* Wait until HC become operational */
ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */ ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */
msleep(5); msleep(5);
rc = ehci_handshake(ehci, &ehci->regs->status, STS_HALT, 0, 100 * 1000);
up_write(&ehci_cf_port_reset_rwsem); 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(); ehci->last_periodic_enable = ktime_get_real();
temp = HC_VERSION(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase)); temp = HC_VERSION(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase));

View File

@ -345,6 +345,9 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)
unlink_empty_async_suspended(ehci); 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 */ /* Any IAA cycle that started before the suspend is now invalid */
end_iaa_cycle(ehci); end_iaa_cycle(ehci);
ehci_handle_start_intr_unlinks(ehci); ehci_handle_start_intr_unlinks(ehci);

View File

@ -2915,6 +2915,8 @@ static void queue_trb(struct xhci_hcd *xhci, struct xhci_ring *ring,
trb->field[0] = cpu_to_le32(field1); trb->field[0] = cpu_to_le32(field1);
trb->field[1] = cpu_to_le32(field2); trb->field[1] = cpu_to_le32(field2);
trb->field[2] = cpu_to_le32(field3); 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); trb->field[3] = cpu_to_le32(field4);
trace_xhci_queue_trb(ring, trb); trace_xhci_queue_trb(ring, trb);

View File

@ -562,6 +562,13 @@ static void tegra_xusb_mbox_handle(struct tegra_xusb *tegra,
enable); enable);
if (err < 0) if (err < 0)
break; break;
/*
* wait 500us for LFPS detector to be disabled before
* sending ACK
*/
if (!enable)
usleep_range(500, 1000);
} }
if (err < 0) { if (err < 0) {

View File

@ -1988,16 +1988,6 @@ static struct irq_chip xen_percpu_chip __read_mostly = {
.irq_ack = ack_dynirq, .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 #ifdef CONFIG_XEN_PVHVM
/* Vector callbacks are better than PCI interrupts to receive event /* Vector callbacks are better than PCI interrupts to receive event
* channel notifications because we can receive vector callbacks on any * channel notifications because we can receive vector callbacks on any

View File

@ -149,7 +149,6 @@ static int platform_pci_probe(struct pci_dev *pdev,
ret = gnttab_init(); ret = gnttab_init();
if (ret) if (ret)
goto grant_out; goto grant_out;
xenbus_probe(NULL);
return 0; return 0;
grant_out: grant_out:
gnttab_free_auto_xlat_frames(); gnttab_free_auto_xlat_frames();

View File

@ -115,6 +115,7 @@ int xenbus_probe_node(struct xen_bus_type *bus,
const char *type, const char *type,
const char *nodename); const char *nodename);
int xenbus_probe_devices(struct xen_bus_type *bus); 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); void xenbus_dev_changed(const char *node, struct xen_bus_type *bus);

View File

@ -57,16 +57,8 @@ DEFINE_MUTEX(xs_response_mutex);
static int xenbus_irq; static int xenbus_irq;
static struct task_struct *xenbus_task; static struct task_struct *xenbus_task;
static DECLARE_WORK(probe_work, xenbus_probe);
static irqreturn_t wake_waiting(int irq, void *unused) 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); wake_up(&xb_waitq);
return IRQ_HANDLED; return IRQ_HANDLED;
} }

View File

@ -683,29 +683,76 @@ void unregister_xenstore_notifier(struct notifier_block *nb)
} }
EXPORT_SYMBOL_GPL(unregister_xenstore_notifier); EXPORT_SYMBOL_GPL(unregister_xenstore_notifier);
void xenbus_probe(struct work_struct *unused) void xenbus_probe(void)
{ {
xenstored_ready = 1; xenstored_ready = 1;
/*
* In the HVM case, xenbus_init() deferred its call to
* xs_init() in case callbacks were not operational yet.
* So do it now.
*/
if (xen_store_domain_type == XS_HVM)
xs_init();
/* Notify others that xenstore is up */ /* Notify others that xenstore is up */
blocking_notifier_call_chain(&xenstore_chain, 0, NULL); blocking_notifier_call_chain(&xenstore_chain, 0, NULL);
} }
EXPORT_SYMBOL_GPL(xenbus_probe);
/*
* Returns true when XenStore init must be deferred in order to
* allow the PCI platform device to be initialised, before we
* can actually have event channel interrupts working.
*/
static bool xs_hvm_defer_init_for_callback(void)
{
#ifdef CONFIG_XEN_PVHVM
return xen_store_domain_type == XS_HVM &&
!xen_have_vector_callback;
#else
return false;
#endif
}
static int __init xenbus_probe_initcall(void) static int __init xenbus_probe_initcall(void)
{ {
if (!xen_domain()) /*
return -ENODEV; * Probe XenBus here in the XS_PV case, and also XS_HVM unless we
* need to wait for the platform PCI device to come up.
*/
if (xen_store_domain_type == XS_PV ||
(xen_store_domain_type == XS_HVM &&
!xs_hvm_defer_init_for_callback()))
xenbus_probe();
if (xen_initial_domain() || xen_hvm_domain())
return 0;
xenbus_probe(NULL);
return 0; return 0;
} }
device_initcall(xenbus_probe_initcall); device_initcall(xenbus_probe_initcall);
int xen_set_callback_via(uint64_t via)
{
struct xen_hvm_param a;
int ret;
a.domid = DOMID_SELF;
a.index = HVM_PARAM_CALLBACK_IRQ;
a.value = via;
ret = HYPERVISOR_hvm_op(HVMOP_set_param, &a);
if (ret)
return ret;
/*
* If xenbus_probe_initcall() deferred the xenbus_probe()
* due to the callback not functioning yet, we can do it now.
*/
if (!xenstored_ready && xs_hvm_defer_init_for_callback())
xenbus_probe();
return ret;
}
EXPORT_SYMBOL_GPL(xen_set_callback_via);
/* Set up event channel for xenstored which is run as a local process /* Set up event channel for xenstored which is run as a local process
* (this is normally used only in dom0) * (this is normally used only in dom0)
*/ */
@ -818,11 +865,17 @@ static int __init xenbus_init(void)
break; break;
} }
/* Initialize the interface to xenstore. */ /*
err = xs_init(); * HVM domains may not have a functional callback yet. In that
if (err) { * case let xs_init() be called from xenbus_probe(), which will
pr_warn("Error initializing xenstore comms: %i\n", err); * get invoked at an appropriate time.
goto out_error; */
if (xen_store_domain_type != XS_HVM) {
err = xs_init();
if (err) {
pr_warn("Error initializing xenstore comms: %i\n", err);
goto out_error;
}
} }
if ((xen_store_domain_type != XS_LOCAL) && if ((xen_store_domain_type != XS_LOCAL) &&

View File

@ -2497,7 +2497,8 @@ again:
* Go through delayed refs for all the stuff we've just kicked off * Go through delayed refs for all the stuff we've just kicked off
* and then loop back (just once) * 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) { if (!ret && loops == 0) {
loops++; loops++;
spin_lock(&cur_trans->dirty_bgs_lock); spin_lock(&cur_trans->dirty_bgs_lock);

View File

@ -5390,7 +5390,15 @@ int btrfs_drop_snapshot(struct btrfs_root *root,
goto out_free; 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)) { if (IS_ERR(trans)) {
err = PTR_ERR(trans); err = PTR_ERR(trans);
goto out_free; goto out_free;

View File

@ -5519,6 +5519,21 @@ static int clone_range(struct send_ctx *sctx,
break; break;
offset += clone_len; offset += clone_len;
clone_root->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; data_offset += clone_len;
next: next:
path->slots[0]++; path->slots[0]++;

View File

@ -4409,6 +4409,8 @@ int btrfs_recover_balance(struct btrfs_fs_info *fs_info)
btrfs_warn(fs_info, btrfs_warn(fs_info,
"balance: cannot set exclusive op status, resume manually"); "balance: cannot set exclusive op status, resume manually");
btrfs_release_path(path);
mutex_lock(&fs_info->balance_mutex); mutex_lock(&fs_info->balance_mutex);
BUG_ON(fs_info->balance_ctl); BUG_ON(fs_info->balance_ctl);
spin_lock(&fs_info->balance_lock); spin_lock(&fs_info->balance_lock);

View File

@ -339,7 +339,7 @@ __smb_send_rqst(struct TCP_Server_Info *server, int num_rqst,
if (ssocket == NULL) if (ssocket == NULL)
return -EAGAIN; return -EAGAIN;
if (signal_pending(current)) { if (fatal_signal_pending(current)) {
cifs_dbg(FYI, "signal pending before send request\n"); cifs_dbg(FYI, "signal pending before send request\n");
return -ERESTARTSYS; return -ERESTARTSYS;
} }
@ -431,7 +431,7 @@ unmask:
if (signal_pending(current) && (total_len != send_length)) { if (signal_pending(current) && (total_len != send_length)) {
cifs_dbg(FYI, "signal is pending after attempt to send\n"); cifs_dbg(FYI, "signal is pending after attempt to send\n");
rc = -EINTR; rc = -ERESTARTSYS;
} }
/* uncork it */ /* uncork it */

View File

@ -11,19 +11,19 @@
* See Documentation/atomic_bitops.txt for details. * 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); p += BIT_WORD(nr);
atomic_long_or(BIT_MASK(nr), (atomic_long_t *)p); 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); p += BIT_WORD(nr);
atomic_long_andnot(BIT_MASK(nr), (atomic_long_t *)p); 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); p += BIT_WORD(nr);
atomic_long_xor(BIT_MASK(nr), (atomic_long_t *)p); atomic_long_xor(BIT_MASK(nr), (atomic_long_t *)p);

View File

@ -83,6 +83,8 @@ struct inet_connection_sock_af_ops {
* @icsk_ext_hdr_len: Network protocol overhead (IP/IPv6 options) * @icsk_ext_hdr_len: Network protocol overhead (IP/IPv6 options)
* @icsk_ack: Delayed ACK control data * @icsk_ack: Delayed ACK control data
* @icsk_mtup; MTU probing 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 { struct inet_connection_sock {
/* inet_sock has to be the first member! */ /* inet_sock has to be the first member! */
@ -133,6 +135,7 @@ struct inet_connection_sock {
u32 probe_timestamp; u32 probe_timestamp;
} icsk_mtup; } icsk_mtup;
u32 icsk_probes_tstamp;
u32 icsk_user_timeout; u32 icsk_user_timeout;
u64 icsk_ca_priv[104 / sizeof(u64)]; u64 icsk_ca_priv[104 / sizeof(u64)];

View File

@ -187,7 +187,7 @@ void xs_suspend_cancel(void);
struct work_struct; struct work_struct;
void xenbus_probe(struct work_struct *); void xenbus_probe(void);
#define XENBUS_IS_ERR_READ(str) ({ \ #define XENBUS_IS_ERR_READ(str) ({ \
if (!IS_ERR(str) && strlen(str) == 0) { \ if (!IS_ERR(str) && strlen(str) == 0) { \

View File

@ -388,9 +388,10 @@ static void kasan_remove_pmd_table(pmd_t *pmd, unsigned long addr,
if (kasan_pte_table(*pmd)) { if (kasan_pte_table(*pmd)) {
if (IS_ALIGNED(addr, PMD_SIZE) && if (IS_ALIGNED(addr, PMD_SIZE) &&
IS_ALIGNED(next, PMD_SIZE)) IS_ALIGNED(next, PMD_SIZE)) {
pmd_clear(pmd); pmd_clear(pmd);
continue; continue;
}
} }
pte = pte_offset_kernel(pmd, addr); pte = pte_offset_kernel(pmd, addr);
kasan_remove_pte_table(pte, addr, next); 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 (kasan_pmd_table(*pud)) {
if (IS_ALIGNED(addr, PUD_SIZE) && if (IS_ALIGNED(addr, PUD_SIZE) &&
IS_ALIGNED(next, PUD_SIZE)) IS_ALIGNED(next, PUD_SIZE)) {
pud_clear(pud); pud_clear(pud);
continue; continue;
}
} }
pmd = pmd_offset(pud, addr); pmd = pmd_offset(pud, addr);
pmd_base = pmd_offset(pud, 0); 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 (kasan_pud_table(*p4d)) {
if (IS_ALIGNED(addr, P4D_SIZE) && if (IS_ALIGNED(addr, P4D_SIZE) &&
IS_ALIGNED(next, P4D_SIZE)) IS_ALIGNED(next, P4D_SIZE)) {
p4d_clear(p4d); p4d_clear(p4d);
continue; continue;
}
} }
pud = pud_offset(p4d, addr); pud = pud_offset(p4d, addr);
kasan_remove_pud_table(pud, addr, next); 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 (kasan_p4d_table(*pgd)) {
if (IS_ALIGNED(addr, PGDIR_SIZE) && if (IS_ALIGNED(addr, PGDIR_SIZE) &&
IS_ALIGNED(next, PGDIR_SIZE)) IS_ALIGNED(next, PGDIR_SIZE)) {
pgd_clear(pgd); pgd_clear(pgd);
continue; continue;
}
} }
p4d = p4d_offset(pgd, addr); 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); ret = kasan_populate_early_shadow(shadow_start, shadow_end);
if (ret) if (ret)
kasan_remove_zero_shadow(shadow_start, kasan_remove_zero_shadow(start, size);
size >> KASAN_SHADOW_SCALE_SHIFT);
return ret; return ret;
} }

View File

@ -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; return features;
} }

View File

@ -431,7 +431,11 @@ struct sk_buff *__netdev_alloc_skb(struct net_device *dev, unsigned int len,
len += NET_SKB_PAD; 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))) { (gfp_mask & (__GFP_DIRECT_RECLAIM | GFP_DMA))) {
skb = __alloc_skb(len, gfp_mask, SKB_ALLOC_RX, NUMA_NO_NODE); skb = __alloc_skb(len, gfp_mask, SKB_ALLOC_RX, NUMA_NO_NODE);
if (!skb) if (!skb)

View File

@ -840,6 +840,7 @@ struct sock *inet_csk_clone_lock(const struct sock *sk,
newicsk->icsk_retransmits = 0; newicsk->icsk_retransmits = 0;
newicsk->icsk_backoff = 0; newicsk->icsk_backoff = 0;
newicsk->icsk_probes_out = 0; newicsk->icsk_probes_out = 0;
newicsk->icsk_probes_tstamp = 0;
/* Deinitialize accept_queue to trap illegal accesses. */ /* Deinitialize accept_queue to trap illegal accesses. */
memset(&newicsk->icsk_accept_queue, 0, sizeof(newicsk->icsk_accept_queue)); memset(&newicsk->icsk_accept_queue, 0, sizeof(newicsk->icsk_accept_queue));

View File

@ -76,7 +76,7 @@ static bool rpfilter_mt(const struct sk_buff *skb, struct xt_action_param *par)
flow.daddr = iph->saddr; flow.daddr = iph->saddr;
flow.saddr = rpfilter_get_saddr(iph->daddr); flow.saddr = rpfilter_get_saddr(iph->daddr);
flow.flowi4_mark = info->flags & XT_RPFILTER_VALID_MARK ? skb->mark : 0; 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_scope = RT_SCOPE_UNIVERSE;
flow.flowi4_oif = l3mdev_master_ifindex_rcu(xt_in(par)); flow.flowi4_oif = l3mdev_master_ifindex_rcu(xt_in(par));

View File

@ -2627,6 +2627,7 @@ int tcp_disconnect(struct sock *sk, int flags)
icsk->icsk_backoff = 0; icsk->icsk_backoff = 0;
tp->snd_cwnd = 2; tp->snd_cwnd = 2;
icsk->icsk_probes_out = 0; icsk->icsk_probes_out = 0;
icsk->icsk_probes_tstamp = 0;
icsk->icsk_rto = TCP_TIMEOUT_INIT; icsk->icsk_rto = TCP_TIMEOUT_INIT;
tp->snd_ssthresh = TCP_INFINITE_SSTHRESH; tp->snd_ssthresh = TCP_INFINITE_SSTHRESH;
tp->snd_cwnd = TCP_INIT_CWND; tp->snd_cwnd = TCP_INIT_CWND;

View File

@ -3286,6 +3286,7 @@ static void tcp_ack_probe(struct sock *sk)
return; return;
if (!after(TCP_SKB_CB(head)->end_seq, tcp_wnd_end(tp))) { if (!after(TCP_SKB_CB(head)->end_seq, tcp_wnd_end(tp))) {
icsk->icsk_backoff = 0; icsk->icsk_backoff = 0;
icsk->icsk_probes_tstamp = 0;
inet_csk_clear_xmit_timer(sk, ICSK_TIME_PROBE0); inet_csk_clear_xmit_timer(sk, ICSK_TIME_PROBE0);
/* Socket must be waked up by subsequent tcp_data_snd_check(). /* Socket must be waked up by subsequent tcp_data_snd_check().
* This function is not for random using! * This function is not for random using!

View File

@ -1657,6 +1657,7 @@ int tcp_v4_early_demux(struct sk_buff *skb)
bool tcp_add_backlog(struct sock *sk, 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 limit = READ_ONCE(sk->sk_rcvbuf) + READ_ONCE(sk->sk_sndbuf);
u32 tail_gso_size, tail_gso_segs;
struct skb_shared_info *shinfo; struct skb_shared_info *shinfo;
const struct tcphdr *th; const struct tcphdr *th;
struct tcphdr *thtail; struct tcphdr *thtail;
@ -1664,6 +1665,7 @@ bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb)
unsigned int hdrlen; unsigned int hdrlen;
bool fragstolen; bool fragstolen;
u32 gso_segs; u32 gso_segs;
u32 gso_size;
int delta; int delta;
/* In case all data was pulled from skb frags (in __pskb_pull_tail()), /* 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; th = (const struct tcphdr *)skb->data;
hdrlen = th->doff * 4; 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; tail = sk->sk_backlog.tail;
if (!tail) if (!tail)
@ -1718,6 +1713,15 @@ bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb)
goto no_coalesce; goto no_coalesce;
__skb_pull(skb, hdrlen); __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)) { if (skb_try_coalesce(tail, skb, &fragstolen, &delta)) {
TCP_SKB_CB(tail)->end_seq = TCP_SKB_CB(skb)->end_seq; 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 */ /* Not as strict as GRO. We only need to carry mss max value */
skb_shinfo(tail)->gso_size = max(shinfo->gso_size, shinfo->gso_size = max(gso_size, tail_gso_size);
skb_shinfo(tail)->gso_size); shinfo->gso_segs = min_t(u32, gso_segs + tail_gso_segs, 0xFFFF);
gso_segs = skb_shinfo(tail)->gso_segs + shinfo->gso_segs;
skb_shinfo(tail)->gso_segs = min_t(u32, gso_segs, 0xFFFF);
sk->sk_backlog.len += delta; sk->sk_backlog.len += delta;
__NET_INC_STATS(sock_net(sk), __NET_INC_STATS(sock_net(sk),

View File

@ -3835,6 +3835,7 @@ void tcp_send_probe0(struct sock *sk)
/* Cancel probe timer, if it is not required. */ /* Cancel probe timer, if it is not required. */
icsk->icsk_probes_out = 0; icsk->icsk_probes_out = 0;
icsk->icsk_backoff = 0; icsk->icsk_backoff = 0;
icsk->icsk_probes_tstamp = 0;
return; return;
} }

View File

@ -344,6 +344,7 @@ static void tcp_probe_timer(struct sock *sk)
if (tp->packets_out || !skb) { if (tp->packets_out || !skb) {
icsk->icsk_probes_out = 0; icsk->icsk_probes_out = 0;
icsk->icsk_probes_tstamp = 0;
return; return;
} }
@ -355,13 +356,12 @@ static void tcp_probe_timer(struct sock *sk)
* corresponding system limit. We also implement similar policy when * corresponding system limit. We also implement similar policy when
* we use RTO to probe window in tcp_retransmit_timer(). * we use RTO to probe window in tcp_retransmit_timer().
*/ */
if (icsk->icsk_user_timeout) { if (!icsk->icsk_probes_tstamp)
u32 elapsed = tcp_model_timeout(sk, icsk->icsk_probes_out, icsk->icsk_probes_tstamp = tcp_jiffies32;
tcp_probe0_base(sk)); else if (icsk->icsk_user_timeout &&
(s32)(tcp_jiffies32 - icsk->icsk_probes_tstamp) >=
if (elapsed >= icsk->icsk_user_timeout) msecs_to_jiffies(icsk->icsk_user_timeout))
goto abort; goto abort;
}
max_probes = sock_net(sk)->ipv4.sysctl_tcp_retries2; max_probes = sock_net(sk)->ipv4.sysctl_tcp_retries2;
if (sock_flag(sk, SOCK_DEAD)) { if (sock_flag(sk, SOCK_DEAD)) {

View File

@ -2495,7 +2495,8 @@ int udp_v4_early_demux(struct sk_buff *skb)
*/ */
if (!inet_sk(sk)->inet_daddr && in_dev) if (!inet_sk(sk)->inet_daddr && in_dev)
return ip_mc_validate_source(skb, iph->daddr, return ip_mc_validate_source(skb, iph->daddr,
iph->saddr, iph->tos, iph->saddr,
iph->tos & IPTOS_RT_MASK,
skb->dev, in_dev, &itag); skb->dev, in_dev, &itag);
} }
return 0; return 0;

View File

@ -2452,8 +2452,9 @@ static void addrconf_add_mroute(struct net_device *dev)
.fc_ifindex = dev->ifindex, .fc_ifindex = dev->ifindex,
.fc_dst_len = 8, .fc_dst_len = 8,
.fc_flags = RTF_UP, .fc_flags = RTF_UP,
.fc_type = RTN_UNICAST, .fc_type = RTN_MULTICAST,
.fc_nlinfo.nl_net = dev_net(dev), .fc_nlinfo.nl_net = dev_net(dev),
.fc_protocol = RTPROT_KERNEL,
}; };
ipv6_addr_set(&cfg.fc_dst, htonl(0xFF000000), 0, 0, 0); ipv6_addr_set(&cfg.fc_dst, htonl(0xFF000000), 0, 0, 0);

View File

@ -366,9 +366,13 @@ tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base,
if (tb[TCA_TCINDEX_MASK]) if (tb[TCA_TCINDEX_MASK])
cp->mask = nla_get_u16(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]); cp->shift = nla_get_u32(tb[TCA_TCINDEX_SHIFT]);
if (cp->shift > 16) {
err = -EINVAL;
goto errout;
}
}
if (!cp->hash) { if (!cp->hash) {
/* Hash not specified, use perfect hash if the upper limit /* Hash not specified, use perfect hash if the upper limit
* of the hashing index is below the threshold. * of the hashing index is below the threshold.

View File

@ -409,7 +409,8 @@ struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r,
{ {
struct qdisc_rate_table *rtab; 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) { nla_len(tab) != TC_RTAB_SIZE) {
NL_SET_ERR_MSG(extack, "Invalid rate table parameters for searching"); NL_SET_ERR_MSG(extack, "Invalid rate table parameters for searching");
return NULL; return NULL;

Some files were not shown because too many files have changed in this diff Show More