This is the 5.0.17 stable release

-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlzdoI8ACgkQONu9yGCS
 aT59gRAAx3Se/Ru62F29UE1JikUimdo2NyuwnECxIIb63e6hnUGRHcde+ZgBlNtL
 KQOdANgya6ccYoDQ149KsPoefeDZdVtbphwods35ho9QY1jphH40fGh6UNoInNgy
 C+xAAvkjsxNOWwUWqsnIL8NqO/BjfSajP5oIereRJqFbWJeeLR3I+gdI7BPUx2ng
 jYyw4aJTTsXHsCnrms5uE2Um2uGwA2bE7Hl/YF4xtVrZtYYmUdY4fJjtZY+c4Tb4
 TrNYhkoqlkURX2sUVapPHERIcsza5Mx0IRGUzSt2bE/YNevMKxOYu9Lsky45AfOi
 ZjXb8DizV7dFd7usG7vRp5mW0hA9gT8UMY+IpVq404q1iIQ9fqeZa7llG0QKhLm7
 n3yXSFLEKonbwek67i0LQdGKJLDRjiOUTS/YrruO7RAUITV2KFXd49+xUz2hWtdp
 AnAxOlOiy0uXXflokyNdkuN7JpMavEoeUGEI5AX7MT+kDNZZyDaRarBkpHnZ1N6t
 OPESqfXVgqLpDJc3XE1hbZDO3JzQxe5qGEHBbswW+7ncK535zQR0dADe3ck/5WbL
 +HLezvyVBybtEeeA/gG7oKkX9k0ElLVoClt5bUnvmw58SQKx8N3s9sdY9ND3LBBs
 eaSAkRqP//dgfYqgEJsAmU3jQTofiWRwOjHODFXNUM9XzEG1H6s=
 =/Tlr
 -----END PGP SIGNATURE-----

Merge tag 'v5.0.17' into v5.0/standard/base

This is the 5.0.17 stable release
This commit is contained in:
Bruce Ashfield 2019-05-17 16:54:36 -04:00
commit fa6f061d0d
164 changed files with 1384 additions and 487 deletions

View File

@ -20,6 +20,8 @@ Required properties:
Optional properties: Optional properties:
- phy-handle: See ethernet.txt file in the same directory. - phy-handle: See ethernet.txt file in the same directory.
If absent, davinci_emac driver defaults to 100/FULL. If absent, davinci_emac driver defaults to 100/FULL.
- nvmem-cells: phandle, reference to an nvmem node for the MAC address
- nvmem-cell-names: string, should be "mac-address" if nvmem is to be used
- ti,davinci-rmii-en: 1 byte, 1 means use RMII - ti,davinci-rmii-en: 1 byte, 1 means use RMII
- ti,davinci-no-bd-ram: boolean, does EMAC have BD RAM? - ti,davinci-no-bd-ram: boolean, does EMAC have BD RAM?

View File

@ -10,8 +10,6 @@ Documentation/devicetree/bindings/phy/phy-bindings.txt.
the boot program; should be used in cases where the MAC address assigned to the boot program; should be used in cases where the MAC address assigned to
the device by the boot program is different from the "local-mac-address" the device by the boot program is different from the "local-mac-address"
property; property;
- nvmem-cells: phandle, reference to an nvmem node for the MAC address;
- nvmem-cell-names: string, should be "mac-address" if nvmem is to be used;
- max-speed: number, specifies maximum speed in Mbit/s supported by the device; - max-speed: number, specifies maximum speed in Mbit/s supported by the device;
- max-frame-size: number, maximum transfer unit (IEEE defined MTU), rather than - max-frame-size: number, maximum transfer unit (IEEE defined MTU), rather than
the maximum frame size (there's contradiction in the Devicetree the maximum frame size (there's contradiction in the Devicetree

View File

@ -26,6 +26,10 @@ Required properties:
Optional elements: 'tsu_clk' Optional elements: 'tsu_clk'
- clocks: Phandles to input clocks. - clocks: Phandles to input clocks.
Optional properties:
- nvmem-cells: phandle, reference to an nvmem node for the MAC address
- nvmem-cell-names: string, should be "mac-address" if nvmem is to be used
Optional properties for PHY child node: Optional properties for PHY child node:
- reset-gpios : Should specify the gpio for phy reset - reset-gpios : Should specify the gpio for phy reset
- magic-packet : If present, indicates that the hardware supports waking - magic-packet : If present, indicates that the hardware supports waking

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
VERSION = 5 VERSION = 5
PATCHLEVEL = 0 PATCHLEVEL = 0
SUBLEVEL = 16 SUBLEVEL = 17
EXTRAVERSION = EXTRAVERSION =
NAME = Shy Crocodile NAME = Shy Crocodile

View File

@ -69,7 +69,7 @@ config ARM
select HAVE_EFFICIENT_UNALIGNED_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && MMU select HAVE_EFFICIENT_UNALIGNED_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && MMU
select HAVE_EXIT_THREAD select HAVE_EXIT_THREAD
select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL
select HAVE_FUNCTION_GRAPH_TRACER if !THUMB2_KERNEL select HAVE_FUNCTION_GRAPH_TRACER if !THUMB2_KERNEL && !CC_IS_CLANG
select HAVE_FUNCTION_TRACER if !XIP_KERNEL select HAVE_FUNCTION_TRACER if !XIP_KERNEL
select HAVE_GCC_PLUGINS select HAVE_GCC_PLUGINS
select HAVE_GENERIC_DMA_COHERENT select HAVE_GENERIC_DMA_COHERENT

View File

@ -47,8 +47,8 @@ config DEBUG_WX
choice choice
prompt "Choose kernel unwinder" prompt "Choose kernel unwinder"
default UNWINDER_ARM if AEABI && !FUNCTION_GRAPH_TRACER default UNWINDER_ARM if AEABI
default UNWINDER_FRAME_POINTER if !AEABI || FUNCTION_GRAPH_TRACER default UNWINDER_FRAME_POINTER if !AEABI
help help
This determines which method will be used for unwinding kernel stack This determines which method will be used for unwinding kernel stack
traces for panics, oopses, bugs, warnings, perf, /proc/<pid>/stack, traces for panics, oopses, bugs, warnings, perf, /proc/<pid>/stack,
@ -65,7 +65,7 @@ config UNWINDER_FRAME_POINTER
config UNWINDER_ARM config UNWINDER_ARM
bool "ARM EABI stack unwinder" bool "ARM EABI stack unwinder"
depends on AEABI depends on AEABI && !FUNCTION_GRAPH_TRACER
select ARM_UNWIND select ARM_UNWIND
help help
This option enables stack unwinding support in the kernel This option enables stack unwinding support in the kernel

View File

@ -133,9 +133,9 @@ __secondary_data:
*/ */
.text .text
__after_proc_init: __after_proc_init:
#ifdef CONFIG_ARM_MPU
M_CLASS(movw r12, #:lower16:BASEADDR_V7M_SCB) M_CLASS(movw r12, #:lower16:BASEADDR_V7M_SCB)
M_CLASS(movt r12, #:upper16:BASEADDR_V7M_SCB) M_CLASS(movt r12, #:upper16:BASEADDR_V7M_SCB)
#ifdef CONFIG_ARM_MPU
M_CLASS(ldr r3, [r12, 0x50]) M_CLASS(ldr r3, [r12, 0x50])
AR_CLASS(mrc p15, 0, r3, c0, c1, 4) @ Read ID_MMFR0 AR_CLASS(mrc p15, 0, r3, c0, c1, 4) @ Read ID_MMFR0
and r3, r3, #(MMFR0_PMSA) @ PMSA field and r3, r3, #(MMFR0_PMSA) @ PMSA field

View File

@ -103,10 +103,15 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
* to be revisited if support for multiple ftrace entry points * to be revisited if support for multiple ftrace entry points
* is added in the future, but for now, the pr_err() below * is added in the future, but for now, the pr_err() below
* deals with a theoretical issue only. * deals with a theoretical issue only.
*
* Note that PLTs are place relative, and plt_entries_equal()
* checks whether they point to the same target. Here, we need
* to check if the actual opcodes are in fact identical,
* regardless of the offset in memory so use memcmp() instead.
*/ */
trampoline = get_plt_entry(addr, mod->arch.ftrace_trampoline); trampoline = get_plt_entry(addr, mod->arch.ftrace_trampoline);
if (!plt_entries_equal(mod->arch.ftrace_trampoline, if (memcmp(mod->arch.ftrace_trampoline, &trampoline,
&trampoline)) { sizeof(trampoline))) {
if (plt_entry_is_initialized(mod->arch.ftrace_trampoline)) { if (plt_entry_is_initialized(mod->arch.ftrace_trampoline)) {
pr_err("ftrace: far branches to multiple entry points unsupported inside a single module\n"); pr_err("ftrace: far branches to multiple entry points unsupported inside a single module\n");
return -EINVAL; return -EINVAL;

View File

@ -211,12 +211,6 @@ const char *get_system_type(void)
return ath79_sys_type; return ath79_sys_type;
} }
int get_c0_perfcount_int(void)
{
return ATH79_MISC_IRQ(5);
}
EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
unsigned int get_c0_compare_int(void) unsigned int get_c0_compare_int(void)
{ {
return CP0_LEGACY_COMPARE_IRQ; return CP0_LEGACY_COMPARE_IRQ;

View File

@ -81,6 +81,9 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm)
pgd = kmem_cache_alloc(PGT_CACHE(PGD_INDEX_SIZE), pgd = kmem_cache_alloc(PGT_CACHE(PGD_INDEX_SIZE),
pgtable_gfp_flags(mm, GFP_KERNEL)); pgtable_gfp_flags(mm, GFP_KERNEL));
if (unlikely(!pgd))
return pgd;
/* /*
* Don't scan the PGD for pointers, it contains references to PUDs but * Don't scan the PGD for pointers, it contains references to PUDs but
* those references are not full pointers and so can't be recognised by * those references are not full pointers and so can't be recognised by

View File

@ -41,7 +41,7 @@
#if defined(CONFIG_PPC_BOOK3E_64) #if defined(CONFIG_PPC_BOOK3E_64)
#define MSR_64BIT MSR_CM #define MSR_64BIT MSR_CM
#define MSR_ (MSR_ME | MSR_CE) #define MSR_ (MSR_ME | MSR_RI | MSR_CE)
#define MSR_KERNEL (MSR_ | MSR_64BIT) #define MSR_KERNEL (MSR_ | MSR_64BIT)
#define MSR_USER32 (MSR_ | MSR_PR | MSR_EE) #define MSR_USER32 (MSR_ | MSR_PR | MSR_EE)
#define MSR_USER64 (MSR_USER32 | MSR_64BIT) #define MSR_USER64 (MSR_USER32 | MSR_64BIT)

View File

@ -170,6 +170,9 @@ core_idle_lock_held:
bne- core_idle_lock_held bne- core_idle_lock_held
blr blr
/* Reuse an unused pt_regs slot for IAMR */
#define PNV_POWERSAVE_IAMR _DAR
/* /*
* Pass requested state in r3: * Pass requested state in r3:
* r3 - PNV_THREAD_NAP/SLEEP/WINKLE in POWER8 * r3 - PNV_THREAD_NAP/SLEEP/WINKLE in POWER8
@ -200,6 +203,12 @@ pnv_powersave_common:
/* Continue saving state */ /* Continue saving state */
SAVE_GPR(2, r1) SAVE_GPR(2, r1)
SAVE_NVGPRS(r1) SAVE_NVGPRS(r1)
BEGIN_FTR_SECTION
mfspr r5, SPRN_IAMR
std r5, PNV_POWERSAVE_IAMR(r1)
END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
mfcr r5 mfcr r5
std r5,_CCR(r1) std r5,_CCR(r1)
std r1,PACAR1(r13) std r1,PACAR1(r13)
@ -924,6 +933,17 @@ BEGIN_FTR_SECTION
END_FTR_SECTION_IFSET(CPU_FTR_HVMODE) END_FTR_SECTION_IFSET(CPU_FTR_HVMODE)
REST_NVGPRS(r1) REST_NVGPRS(r1)
REST_GPR(2, r1) REST_GPR(2, r1)
BEGIN_FTR_SECTION
/* IAMR was saved in pnv_powersave_common() */
ld r5, PNV_POWERSAVE_IAMR(r1)
mtspr SPRN_IAMR, r5
/*
* We don't need an isync here because the upcoming mtmsrd is
* execution synchronizing.
*/
END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
ld r4,PACAKMSR(r13) ld r4,PACAKMSR(r13)
ld r5,_LINK(r1) ld r5,_LINK(r1)
ld r6,_CCR(r1) ld r6,_CCR(r1)

View File

@ -146,6 +146,7 @@
#define VMX_ABORT_SAVE_GUEST_MSR_FAIL 1 #define VMX_ABORT_SAVE_GUEST_MSR_FAIL 1
#define VMX_ABORT_LOAD_HOST_PDPTE_FAIL 2 #define VMX_ABORT_LOAD_HOST_PDPTE_FAIL 2
#define VMX_ABORT_VMCS_CORRUPTED 3
#define VMX_ABORT_LOAD_HOST_MSR_FAIL 4 #define VMX_ABORT_LOAD_HOST_MSR_FAIL 4
#endif /* _UAPIVMX_H */ #endif /* _UAPIVMX_H */

View File

@ -81,6 +81,19 @@ static int __init set_bios_reboot(const struct dmi_system_id *d)
return 0; return 0;
} }
/*
* Some machines don't handle the default ACPI reboot method and
* require the EFI reboot method:
*/
static int __init set_efi_reboot(const struct dmi_system_id *d)
{
if (reboot_type != BOOT_EFI && !efi_runtime_disabled()) {
reboot_type = BOOT_EFI;
pr_info("%s series board detected. Selecting EFI-method for reboot.\n", d->ident);
}
return 0;
}
void __noreturn machine_real_restart(unsigned int type) void __noreturn machine_real_restart(unsigned int type)
{ {
local_irq_disable(); local_irq_disable();
@ -166,6 +179,14 @@ static const struct dmi_system_id reboot_dmi_table[] __initconst = {
DMI_MATCH(DMI_PRODUCT_NAME, "AOA110"), DMI_MATCH(DMI_PRODUCT_NAME, "AOA110"),
}, },
}, },
{ /* Handle reboot issue on Acer TravelMate X514-51T */
.callback = set_efi_reboot,
.ident = "Acer TravelMate X514-51T",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate X514-51T"),
},
},
/* Apple */ /* Apple */
{ /* Handle problems with rebooting on Apple MacBook5 */ { /* Handle problems with rebooting on Apple MacBook5 */

View File

@ -362,7 +362,7 @@ SECTIONS
.bss : AT(ADDR(.bss) - LOAD_OFFSET) { .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
__bss_start = .; __bss_start = .;
*(.bss..page_aligned) *(.bss..page_aligned)
*(.bss) *(BSS_MAIN)
BSS_DECRYPTED BSS_DECRYPTED
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
__bss_stop = .; __bss_stop = .;

View File

@ -137,6 +137,7 @@ static inline bool kvm_apic_map_get_logical_dest(struct kvm_apic_map *map,
if (offset <= max_apic_id) { if (offset <= max_apic_id) {
u8 cluster_size = min(max_apic_id - offset + 1, 16U); u8 cluster_size = min(max_apic_id - offset + 1, 16U);
offset = array_index_nospec(offset, map->max_apic_id + 1);
*cluster = &map->phys_map[offset]; *cluster = &map->phys_map[offset];
*mask = dest_id & (0xffff >> (16 - cluster_size)); *mask = dest_id & (0xffff >> (16 - cluster_size));
} else { } else {
@ -899,7 +900,8 @@ static inline bool kvm_apic_map_get_dest_lapic(struct kvm *kvm,
if (irq->dest_id > map->max_apic_id) { if (irq->dest_id > map->max_apic_id) {
*bitmap = 0; *bitmap = 0;
} else { } else {
*dst = &map->phys_map[irq->dest_id]; u32 dest_id = array_index_nospec(irq->dest_id, map->max_apic_id + 1);
*dst = &map->phys_map[dest_id];
*bitmap = 1; *bitmap = 1;
} }
return true; return true;

View File

@ -438,13 +438,13 @@ TRACE_EVENT(kvm_apic_ipi,
); );
TRACE_EVENT(kvm_apic_accept_irq, TRACE_EVENT(kvm_apic_accept_irq,
TP_PROTO(__u32 apicid, __u16 dm, __u8 tm, __u8 vec), TP_PROTO(__u32 apicid, __u16 dm, __u16 tm, __u8 vec),
TP_ARGS(apicid, dm, tm, vec), TP_ARGS(apicid, dm, tm, vec),
TP_STRUCT__entry( TP_STRUCT__entry(
__field( __u32, apicid ) __field( __u32, apicid )
__field( __u16, dm ) __field( __u16, dm )
__field( __u8, tm ) __field( __u16, tm )
__field( __u8, vec ) __field( __u8, vec )
), ),

View File

@ -3790,8 +3790,18 @@ static void nested_vmx_restore_host_state(struct kvm_vcpu *vcpu)
vmx_set_cr4(vcpu, vmcs_readl(CR4_READ_SHADOW)); vmx_set_cr4(vcpu, vmcs_readl(CR4_READ_SHADOW));
nested_ept_uninit_mmu_context(vcpu); nested_ept_uninit_mmu_context(vcpu);
/*
* This is only valid if EPT is in use, otherwise the vmcs01 GUEST_CR3
* points to shadow pages! Fortunately we only get here after a WARN_ON
* if EPT is disabled, so a VMabort is perfectly fine.
*/
if (enable_ept) {
vcpu->arch.cr3 = vmcs_readl(GUEST_CR3); vcpu->arch.cr3 = vmcs_readl(GUEST_CR3);
__set_bit(VCPU_EXREG_CR3, (ulong *)&vcpu->arch.regs_avail); __set_bit(VCPU_EXREG_CR3, (ulong *)&vcpu->arch.regs_avail);
} else {
nested_vmx_abort(vcpu, VMX_ABORT_VMCS_CORRUPTED);
}
/* /*
* Use ept_save_pdptrs(vcpu) to load the MMU's cached PDPTRs * Use ept_save_pdptrs(vcpu) to load the MMU's cached PDPTRs
@ -5739,6 +5749,14 @@ __init int nested_vmx_hardware_setup(int (*exit_handlers[])(struct kvm_vcpu *))
{ {
int i; int i;
/*
* Without EPT it is not possible to restore L1's CR3 and PDPTR on
* VMfail, because they are not available in vmcs01. Just always
* use hardware checks.
*/
if (!enable_ept)
nested_early_check = 1;
if (!cpu_has_vmx_shadow_vmcs()) if (!cpu_has_vmx_shadow_vmcs())
enable_shadow_vmcs = 0; enable_shadow_vmcs = 0;
if (enable_shadow_vmcs) { if (enable_shadow_vmcs) {

View File

@ -259,7 +259,8 @@ static void note_wx(struct pg_state *st)
#endif #endif
/* Account the WX pages */ /* Account the WX pages */
st->wx_pages += npages; st->wx_pages += npages;
WARN_ONCE(1, "x86/mm: Found insecure W+X mapping at address %pS\n", WARN_ONCE(__supported_pte_mask & _PAGE_NX,
"x86/mm: Found insecure W+X mapping at address %pS\n",
(void *)st->start_address); (void *)st->start_address);
} }

View File

@ -825,7 +825,7 @@ void __init __early_set_fixmap(enum fixed_addresses idx,
pte = early_ioremap_pte(addr); pte = early_ioremap_pte(addr);
/* Sanitize 'prot' against any unsupported bits: */ /* Sanitize 'prot' against any unsupported bits: */
pgprot_val(flags) &= __default_kernel_pte_mask; pgprot_val(flags) &= __supported_pte_mask;
if (pgprot_val(flags)) if (pgprot_val(flags))
set_pte(pte, pfn_pte(phys >> PAGE_SHIFT, flags)); set_pte(pte, pfn_pte(phys >> PAGE_SHIFT, flags));

View File

@ -5353,7 +5353,7 @@ static unsigned int bfq_update_depths(struct bfq_data *bfqd,
return min_shallow; return min_shallow;
} }
static int bfq_init_hctx(struct blk_mq_hw_ctx *hctx, unsigned int index) static void bfq_depth_updated(struct blk_mq_hw_ctx *hctx)
{ {
struct bfq_data *bfqd = hctx->queue->elevator->elevator_data; struct bfq_data *bfqd = hctx->queue->elevator->elevator_data;
struct blk_mq_tags *tags = hctx->sched_tags; struct blk_mq_tags *tags = hctx->sched_tags;
@ -5361,6 +5361,11 @@ static int bfq_init_hctx(struct blk_mq_hw_ctx *hctx, unsigned int index)
min_shallow = bfq_update_depths(bfqd, &tags->bitmap_tags); min_shallow = bfq_update_depths(bfqd, &tags->bitmap_tags);
sbitmap_queue_min_shallow_depth(&tags->bitmap_tags, min_shallow); sbitmap_queue_min_shallow_depth(&tags->bitmap_tags, min_shallow);
}
static int bfq_init_hctx(struct blk_mq_hw_ctx *hctx, unsigned int index)
{
bfq_depth_updated(hctx);
return 0; return 0;
} }
@ -5783,6 +5788,7 @@ static struct elevator_type iosched_bfq_mq = {
.requests_merged = bfq_requests_merged, .requests_merged = bfq_requests_merged,
.request_merged = bfq_request_merged, .request_merged = bfq_request_merged,
.has_work = bfq_has_work, .has_work = bfq_has_work,
.depth_updated = bfq_depth_updated,
.init_hctx = bfq_init_hctx, .init_hctx = bfq_init_hctx,
.init_sched = bfq_init_queue, .init_sched = bfq_init_queue,
.exit_sched = bfq_exit_queue, .exit_sched = bfq_exit_queue,

View File

@ -3131,6 +3131,8 @@ int blk_mq_update_nr_requests(struct request_queue *q, unsigned int nr)
} }
if (ret) if (ret)
break; break;
if (q->elevator && q->elevator->type->ops.depth_updated)
q->elevator->type->ops.depth_updated(hctx);
} }
if (!ret) if (!ret)

View File

@ -563,6 +563,12 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
goto out; goto out;
} }
dev_dbg(dev, "%s cmd: %s output length: %d\n", dimm_name,
cmd_name, out_obj->buffer.length);
print_hex_dump_debug(cmd_name, DUMP_PREFIX_OFFSET, 4, 4,
out_obj->buffer.pointer,
min_t(u32, 128, out_obj->buffer.length), true);
if (call_pkg) { if (call_pkg) {
call_pkg->nd_fw_size = out_obj->buffer.length; call_pkg->nd_fw_size = out_obj->buffer.length;
memcpy(call_pkg->nd_payload + call_pkg->nd_size_in, memcpy(call_pkg->nd_payload + call_pkg->nd_size_in,
@ -581,12 +587,6 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
return 0; return 0;
} }
dev_dbg(dev, "%s cmd: %s output length: %d\n", dimm_name,
cmd_name, out_obj->buffer.length);
print_hex_dump_debug(cmd_name, DUMP_PREFIX_OFFSET, 4, 4,
out_obj->buffer.pointer,
min_t(u32, 128, out_obj->buffer.length), true);
for (i = 0, offset = 0; i < desc->out_num; i++) { for (i = 0, offset = 0; i < desc->out_num; i++) {
u32 out_size = nd_cmd_out_size(nvdimm, cmd, desc, i, buf, u32 out_size = nd_cmd_out_size(nvdimm, cmd, desc, i, buf,
(u32 *) out_obj->buffer.pointer, (u32 *) out_obj->buffer.pointer,

View File

@ -201,6 +201,8 @@ void __init ipmi_hardcode_init(void)
char *str; char *str;
char *si_type[SI_MAX_PARMS]; char *si_type[SI_MAX_PARMS];
memset(si_type, 0, sizeof(si_type));
/* Parse out the si_type string into its components. */ /* Parse out the si_type string into its components. */
str = si_type_str; str = si_type_str;
if (*str != '\0') { if (*str != '\0') {

View File

@ -144,6 +144,7 @@ config VT8500_TIMER
config NPCM7XX_TIMER config NPCM7XX_TIMER
bool "NPCM7xx timer driver" if COMPILE_TEST bool "NPCM7xx timer driver" if COMPILE_TEST
depends on HAS_IOMEM depends on HAS_IOMEM
select TIMER_OF
select CLKSRC_MMIO select CLKSRC_MMIO
help help
Enable 24-bit TIMER0 and TIMER1 counters in the NPCM7xx architecture, Enable 24-bit TIMER0 and TIMER1 counters in the NPCM7xx architecture,

View File

@ -296,4 +296,4 @@ err_alloc:
TIMER_OF_DECLARE(ox810se_rps, TIMER_OF_DECLARE(ox810se_rps,
"oxsemi,ox810se-rps-timer", oxnas_rps_timer_init); "oxsemi,ox810se-rps-timer", oxnas_rps_timer_init);
TIMER_OF_DECLARE(ox820_rps, TIMER_OF_DECLARE(ox820_rps,
"oxsemi,ox820se-rps-timer", oxnas_rps_timer_init); "oxsemi,ox820-rps-timer", oxnas_rps_timer_init);

View File

@ -674,7 +674,7 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_slave_sg(
d = bcm2835_dma_create_cb_chain(chan, direction, false, d = bcm2835_dma_create_cb_chain(chan, direction, false,
info, extra, info, extra,
frames, src, dst, 0, 0, frames, src, dst, 0, 0,
GFP_KERNEL); GFP_NOWAIT);
if (!d) if (!d)
return NULL; return NULL;

View File

@ -1379,7 +1379,7 @@ int gpiochip_add_data_with_key(struct gpio_chip *chip, void *data,
status = gpiochip_add_irqchip(chip, lock_key, request_key); status = gpiochip_add_irqchip(chip, lock_key, request_key);
if (status) if (status)
goto err_remove_chip; goto err_free_gpiochip_mask;
status = of_gpiochip_add(chip); status = of_gpiochip_add(chip);
if (status) if (status)
@ -1387,7 +1387,7 @@ int gpiochip_add_data_with_key(struct gpio_chip *chip, void *data,
status = gpiochip_init_valid_mask(chip); status = gpiochip_init_valid_mask(chip);
if (status) if (status)
goto err_remove_chip; goto err_remove_of_chip;
for (i = 0; i < chip->ngpio; i++) { for (i = 0; i < chip->ngpio; i++) {
struct gpio_desc *desc = &gdev->descs[i]; struct gpio_desc *desc = &gdev->descs[i];
@ -1415,14 +1415,18 @@ int gpiochip_add_data_with_key(struct gpio_chip *chip, void *data,
if (gpiolib_initialized) { if (gpiolib_initialized) {
status = gpiochip_setup_dev(gdev); status = gpiochip_setup_dev(gdev);
if (status) if (status)
goto err_remove_chip; goto err_remove_acpi_chip;
} }
return 0; return 0;
err_remove_chip: err_remove_acpi_chip:
acpi_gpiochip_remove(chip); acpi_gpiochip_remove(chip);
err_remove_of_chip:
gpiochip_free_hogs(chip); gpiochip_free_hogs(chip);
of_gpiochip_remove(chip); of_gpiochip_remove(chip);
err_remove_chip:
gpiochip_irqchip_remove(chip);
err_free_gpiochip_mask:
gpiochip_free_valid_mask(chip); gpiochip_free_valid_mask(chip);
err_remove_irqchip_mask: err_remove_irqchip_mask:
gpiochip_irqchip_free_valid_mask(chip); gpiochip_irqchip_free_valid_mask(chip);

View File

@ -3150,6 +3150,7 @@ static int amdgpu_device_recover_vram(struct amdgpu_device *adev)
/* No need to recover an evicted BO */ /* No need to recover an evicted BO */
if (shadow->tbo.mem.mem_type != TTM_PL_TT || if (shadow->tbo.mem.mem_type != TTM_PL_TT ||
shadow->tbo.mem.start == AMDGPU_BO_INVALID_OFFSET ||
shadow->parent->tbo.mem.mem_type != TTM_PL_VRAM) shadow->parent->tbo.mem.mem_type != TTM_PL_VRAM)
continue; continue;

View File

@ -1308,6 +1308,11 @@ static enum surface_update_type det_surface_update(const struct dc *dc,
return UPDATE_TYPE_FULL; return UPDATE_TYPE_FULL;
} }
if (u->surface->force_full_update) {
update_flags->bits.full_update = 1;
return UPDATE_TYPE_FULL;
}
type = get_plane_info_update_type(u); type = get_plane_info_update_type(u);
elevate_update_type(&overall_type, type); elevate_update_type(&overall_type, type);
@ -1637,6 +1642,14 @@ void dc_commit_updates_for_stream(struct dc *dc,
} }
dc_resource_state_copy_construct(state, context); dc_resource_state_copy_construct(state, context);
for (i = 0; i < dc->res_pool->pipe_count; i++) {
struct pipe_ctx *new_pipe = &context->res_ctx.pipe_ctx[i];
struct pipe_ctx *old_pipe = &dc->current_state->res_ctx.pipe_ctx[i];
if (new_pipe->plane_state && new_pipe->plane_state != old_pipe->plane_state)
new_pipe->plane_state->force_full_update = true;
}
} }
@ -1680,6 +1693,12 @@ void dc_commit_updates_for_stream(struct dc *dc,
dc->current_state = context; dc->current_state = context;
dc_release_state(old); dc_release_state(old);
for (i = 0; i < dc->res_pool->pipe_count; i++) {
struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[i];
if (pipe_ctx->plane_state && pipe_ctx->stream == stream)
pipe_ctx->plane_state->force_full_update = false;
}
} }
/*let's use current_state to update watermark etc*/ /*let's use current_state to update watermark etc*/
if (update_type >= UPDATE_TYPE_FULL) if (update_type >= UPDATE_TYPE_FULL)

View File

@ -496,6 +496,9 @@ struct dc_plane_state {
struct dc_plane_status status; struct dc_plane_status status;
struct dc_context *ctx; struct dc_context *ctx;
/* HACK: Workaround for forcing full reprogramming under some conditions */
bool force_full_update;
/* private to dc_surface.c */ /* private to dc_surface.c */
enum dc_irq_source irq_source; enum dc_irq_source irq_source;
struct kref refcount; struct kref refcount;

View File

@ -189,6 +189,12 @@ static void submit_channel_request(
1, 1,
0); 0);
} }
REG_UPDATE(AUX_INTERRUPT_CONTROL, AUX_SW_DONE_ACK, 1);
REG_WAIT(AUX_SW_STATUS, AUX_SW_DONE, 0,
10, aux110->timeout_period/10);
/* set the delay and the number of bytes to write */ /* set the delay and the number of bytes to write */
/* The length include /* The length include
@ -241,9 +247,6 @@ static void submit_channel_request(
} }
} }
REG_UPDATE(AUX_INTERRUPT_CONTROL, AUX_SW_DONE_ACK, 1);
REG_WAIT(AUX_SW_STATUS, AUX_SW_DONE, 0,
10, aux110->timeout_period/10);
REG_UPDATE(AUX_SW_CONTROL, AUX_SW_GO, 1); REG_UPDATE(AUX_SW_CONTROL, AUX_SW_GO, 1);
} }

View File

@ -69,11 +69,11 @@ enum { /* This is the timeout as defined in DP 1.2a,
* at most within ~240usec. That means, * at most within ~240usec. That means,
* increasing this timeout will not affect normal operation, * increasing this timeout will not affect normal operation,
* and we'll timeout after * and we'll timeout after
* SW_AUX_TIMEOUT_PERIOD_MULTIPLIER * AUX_TIMEOUT_PERIOD = 1600usec. * SW_AUX_TIMEOUT_PERIOD_MULTIPLIER * AUX_TIMEOUT_PERIOD = 2400usec.
* This timeout is especially important for * This timeout is especially important for
* resume from S3 and CTS. * converters, resume from S3, and CTS.
*/ */
SW_AUX_TIMEOUT_PERIOD_MULTIPLIER = 4 SW_AUX_TIMEOUT_PERIOD_MULTIPLIER = 6
}; };
struct aux_engine_dce110 { struct aux_engine_dce110 {
struct aux_engine base; struct aux_engine base;

View File

@ -1655,6 +1655,8 @@ static void dw_hdmi_clear_overflow(struct dw_hdmi *hdmi)
* iteration for others. * iteration for others.
* The Amlogic Meson GX SoCs (v2.01a) have been identified as needing * The Amlogic Meson GX SoCs (v2.01a) have been identified as needing
* the workaround with a single iteration. * the workaround with a single iteration.
* The Rockchip RK3288 SoC (v2.00a) and RK3328/RK3399 SoCs (v2.11a) have
* been identified as needing the workaround with a single iteration.
*/ */
switch (hdmi->version) { switch (hdmi->version) {
@ -1663,7 +1665,9 @@ static void dw_hdmi_clear_overflow(struct dw_hdmi *hdmi)
break; break;
case 0x131a: case 0x131a:
case 0x132a: case 0x132a:
case 0x200a:
case 0x201a: case 0x201a:
case 0x211a:
case 0x212a: case 0x212a:
count = 1; count = 1;
break; break;

View File

@ -70,7 +70,7 @@ static void ipu_crtc_disable_planes(struct ipu_crtc *ipu_crtc,
if (disable_partial) if (disable_partial)
ipu_plane_disable(ipu_crtc->plane[1], true); ipu_plane_disable(ipu_crtc->plane[1], true);
if (disable_full) if (disable_full)
ipu_plane_disable(ipu_crtc->plane[0], false); ipu_plane_disable(ipu_crtc->plane[0], true);
} }
static void ipu_crtc_atomic_disable(struct drm_crtc *crtc, static void ipu_crtc_atomic_disable(struct drm_crtc *crtc,

View File

@ -113,7 +113,7 @@ static int cdp_dp_mailbox_write(struct cdn_dp_device *dp, u8 val)
static int cdn_dp_mailbox_validate_receive(struct cdn_dp_device *dp, static int cdn_dp_mailbox_validate_receive(struct cdn_dp_device *dp,
u8 module_id, u8 opcode, u8 module_id, u8 opcode,
u8 req_size) u16 req_size)
{ {
u32 mbox_size, i; u32 mbox_size, i;
u8 header[4]; u8 header[4];

View File

@ -85,6 +85,8 @@ static int sun4i_drv_bind(struct device *dev)
ret = -ENOMEM; ret = -ENOMEM;
goto free_drm; goto free_drm;
} }
dev_set_drvdata(dev, drm);
drm->dev_private = drv; drm->dev_private = drv;
INIT_LIST_HEAD(&drv->frontend_list); INIT_LIST_HEAD(&drv->frontend_list);
INIT_LIST_HEAD(&drv->engine_list); INIT_LIST_HEAD(&drv->engine_list);
@ -144,7 +146,10 @@ static void sun4i_drv_unbind(struct device *dev)
drm_dev_unregister(drm); drm_dev_unregister(drm);
drm_kms_helper_poll_fini(drm); drm_kms_helper_poll_fini(drm);
drm_mode_config_cleanup(drm); drm_mode_config_cleanup(drm);
component_unbind_all(dev, NULL);
of_reserved_mem_device_release(dev); of_reserved_mem_device_release(dev);
drm_dev_put(drm); drm_dev_put(drm);
} }
@ -393,6 +398,8 @@ static int sun4i_drv_probe(struct platform_device *pdev)
static int sun4i_drv_remove(struct platform_device *pdev) static int sun4i_drv_remove(struct platform_device *pdev)
{ {
component_master_del(&pdev->dev, &sun4i_drv_master_ops);
return 0; return 0;
} }

View File

@ -881,8 +881,10 @@ static int ttm_bo_add_move_fence(struct ttm_buffer_object *bo,
reservation_object_add_shared_fence(bo->resv, fence); reservation_object_add_shared_fence(bo->resv, fence);
ret = reservation_object_reserve_shared(bo->resv, 1); ret = reservation_object_reserve_shared(bo->resv, 1);
if (unlikely(ret)) if (unlikely(ret)) {
dma_fence_put(fence);
return ret; return ret;
}
dma_fence_put(bo->moving); dma_fence_put(bo->moving);
bo->moving = fence; bo->moving = fence;

View File

@ -127,10 +127,14 @@ static struct drm_driver driver = {
#if defined(CONFIG_DEBUG_FS) #if defined(CONFIG_DEBUG_FS)
.debugfs_init = virtio_gpu_debugfs_init, .debugfs_init = virtio_gpu_debugfs_init,
#endif #endif
.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
.gem_prime_export = drm_gem_prime_export, .gem_prime_export = drm_gem_prime_export,
.gem_prime_import = drm_gem_prime_import, .gem_prime_import = drm_gem_prime_import,
.gem_prime_pin = virtgpu_gem_prime_pin, .gem_prime_pin = virtgpu_gem_prime_pin,
.gem_prime_unpin = virtgpu_gem_prime_unpin, .gem_prime_unpin = virtgpu_gem_prime_unpin,
.gem_prime_get_sg_table = virtgpu_gem_prime_get_sg_table,
.gem_prime_import_sg_table = virtgpu_gem_prime_import_sg_table,
.gem_prime_vmap = virtgpu_gem_prime_vmap, .gem_prime_vmap = virtgpu_gem_prime_vmap,
.gem_prime_vunmap = virtgpu_gem_prime_vunmap, .gem_prime_vunmap = virtgpu_gem_prime_vunmap,
.gem_prime_mmap = virtgpu_gem_prime_mmap, .gem_prime_mmap = virtgpu_gem_prime_mmap,

View File

@ -372,6 +372,10 @@ int virtio_gpu_object_wait(struct virtio_gpu_object *bo, bool no_wait);
/* virtgpu_prime.c */ /* virtgpu_prime.c */
int virtgpu_gem_prime_pin(struct drm_gem_object *obj); int virtgpu_gem_prime_pin(struct drm_gem_object *obj);
void virtgpu_gem_prime_unpin(struct drm_gem_object *obj); void virtgpu_gem_prime_unpin(struct drm_gem_object *obj);
struct sg_table *virtgpu_gem_prime_get_sg_table(struct drm_gem_object *obj);
struct drm_gem_object *virtgpu_gem_prime_import_sg_table(
struct drm_device *dev, struct dma_buf_attachment *attach,
struct sg_table *sgt);
void *virtgpu_gem_prime_vmap(struct drm_gem_object *obj); void *virtgpu_gem_prime_vmap(struct drm_gem_object *obj);
void virtgpu_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr); void virtgpu_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
int virtgpu_gem_prime_mmap(struct drm_gem_object *obj, int virtgpu_gem_prime_mmap(struct drm_gem_object *obj,

View File

@ -39,6 +39,18 @@ void virtgpu_gem_prime_unpin(struct drm_gem_object *obj)
WARN_ONCE(1, "not implemented"); WARN_ONCE(1, "not implemented");
} }
struct sg_table *virtgpu_gem_prime_get_sg_table(struct drm_gem_object *obj)
{
return ERR_PTR(-ENODEV);
}
struct drm_gem_object *virtgpu_gem_prime_import_sg_table(
struct drm_device *dev, struct dma_buf_attachment *attach,
struct sg_table *table)
{
return ERR_PTR(-ENODEV);
}
void *virtgpu_gem_prime_vmap(struct drm_gem_object *obj) void *virtgpu_gem_prime_vmap(struct drm_gem_object *obj)
{ {
struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(obj); struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(obj);

View File

@ -195,7 +195,8 @@ int ipu_dp_setup_channel(struct ipu_dp *dp,
ipu_dp_csc_init(flow, flow->foreground.in_cs, flow->out_cs, ipu_dp_csc_init(flow, flow->foreground.in_cs, flow->out_cs,
DP_COM_CONF_CSC_DEF_BOTH); DP_COM_CONF_CSC_DEF_BOTH);
} else { } else {
if (flow->foreground.in_cs == flow->out_cs) if (flow->foreground.in_cs == IPUV3_COLORSPACE_UNKNOWN ||
flow->foreground.in_cs == flow->out_cs)
/* /*
* foreground identical to output, apply color * foreground identical to output, apply color
* conversion on background * conversion on background
@ -261,6 +262,8 @@ void ipu_dp_disable_channel(struct ipu_dp *dp, bool sync)
struct ipu_dp_priv *priv = flow->priv; struct ipu_dp_priv *priv = flow->priv;
u32 reg, csc; u32 reg, csc;
dp->in_cs = IPUV3_COLORSPACE_UNKNOWN;
if (!dp->foreground) if (!dp->foreground)
return; return;
@ -268,8 +271,9 @@ void ipu_dp_disable_channel(struct ipu_dp *dp, bool sync)
reg = readl(flow->base + DP_COM_CONF); reg = readl(flow->base + DP_COM_CONF);
csc = reg & DP_COM_CONF_CSC_DEF_MASK; csc = reg & DP_COM_CONF_CSC_DEF_MASK;
if (csc == DP_COM_CONF_CSC_DEF_FG)
reg &= ~DP_COM_CONF_CSC_DEF_MASK; reg &= ~DP_COM_CONF_CSC_DEF_MASK;
if (csc == DP_COM_CONF_CSC_DEF_BOTH || csc == DP_COM_CONF_CSC_DEF_BG)
reg |= DP_COM_CONF_CSC_DEF_BG;
reg &= ~DP_COM_CONF_FG_EN; reg &= ~DP_COM_CONF_FG_EN;
writel(reg, flow->base + DP_COM_CONF); writel(reg, flow->base + DP_COM_CONF);
@ -347,6 +351,8 @@ int ipu_dp_init(struct ipu_soc *ipu, struct device *dev, unsigned long base)
mutex_init(&priv->mutex); mutex_init(&priv->mutex);
for (i = 0; i < IPUV3_NUM_FLOWS; i++) { for (i = 0; i < IPUV3_NUM_FLOWS; i++) {
priv->flow[i].background.in_cs = IPUV3_COLORSPACE_UNKNOWN;
priv->flow[i].foreground.in_cs = IPUV3_COLORSPACE_UNKNOWN;
priv->flow[i].foreground.foreground = true; priv->flow[i].foreground.foreground = true;
priv->flow[i].base = priv->base + ipu_dp_flow_base[i]; priv->flow[i].base = priv->base + ipu_dp_flow_base[i];
priv->flow[i].priv = priv; priv->flow[i].priv = priv;

View File

@ -677,6 +677,14 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
break; break;
} }
if ((usage->hid & 0xf0) == 0xb0) { /* SC - Display */
switch (usage->hid & 0xf) {
case 0x05: map_key_clear(KEY_SWITCHVIDEOMODE); break;
default: goto ignore;
}
break;
}
/* /*
* Some lazy vendors declare 255 usages for System Control, * Some lazy vendors declare 255 usages for System Control,
* leading to the creation of ABS_X|Y axis and too many others. * leading to the creation of ABS_X|Y axis and too many others.
@ -908,6 +916,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
case 0x074: map_key_clear(KEY_BRIGHTNESS_MAX); break; case 0x074: map_key_clear(KEY_BRIGHTNESS_MAX); break;
case 0x075: map_key_clear(KEY_BRIGHTNESS_AUTO); break; case 0x075: map_key_clear(KEY_BRIGHTNESS_AUTO); break;
case 0x079: map_key_clear(KEY_KBDILLUMUP); break;
case 0x07a: map_key_clear(KEY_KBDILLUMDOWN); break;
case 0x07c: map_key_clear(KEY_KBDILLUMTOGGLE); break;
case 0x082: map_key_clear(KEY_VIDEO_NEXT); break; case 0x082: map_key_clear(KEY_VIDEO_NEXT); break;
case 0x083: map_key_clear(KEY_LAST); break; case 0x083: map_key_clear(KEY_LAST); break;
case 0x084: map_key_clear(KEY_ENTER); break; case 0x084: map_key_clear(KEY_ENTER); break;
@ -1042,6 +1054,8 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
case 0x2cb: map_key_clear(KEY_KBDINPUTASSIST_ACCEPT); break; case 0x2cb: map_key_clear(KEY_KBDINPUTASSIST_ACCEPT); break;
case 0x2cc: map_key_clear(KEY_KBDINPUTASSIST_CANCEL); break; case 0x2cc: map_key_clear(KEY_KBDINPUTASSIST_CANCEL); break;
case 0x29f: map_key_clear(KEY_SCALE); break;
default: map_key_clear(KEY_UNKNOWN); default: map_key_clear(KEY_UNKNOWN);
} }
break; break;

View File

@ -51,16 +51,16 @@ static ssize_t occ_sysfs_show(struct device *dev,
val = !!(header->status & OCC_STAT_ACTIVE); val = !!(header->status & OCC_STAT_ACTIVE);
break; break;
case 2: case 2:
val = !!(header->status & OCC_EXT_STAT_DVFS_OT); val = !!(header->ext_status & OCC_EXT_STAT_DVFS_OT);
break; break;
case 3: case 3:
val = !!(header->status & OCC_EXT_STAT_DVFS_POWER); val = !!(header->ext_status & OCC_EXT_STAT_DVFS_POWER);
break; break;
case 4: case 4:
val = !!(header->status & OCC_EXT_STAT_MEM_THROTTLE); val = !!(header->ext_status & OCC_EXT_STAT_MEM_THROTTLE);
break; break;
case 5: case 5:
val = !!(header->status & OCC_EXT_STAT_QUICK_DROP); val = !!(header->ext_status & OCC_EXT_STAT_QUICK_DROP);
break; break;
case 6: case 6:
val = header->occ_state; val = header->occ_state;

View File

@ -254,7 +254,7 @@ static int pwm_fan_probe(struct platform_device *pdev)
ret = pwm_fan_of_get_cooling_data(&pdev->dev, ctx); ret = pwm_fan_of_get_cooling_data(&pdev->dev, ctx);
if (ret) if (ret)
return ret; goto err_pwm_disable;
ctx->pwm_fan_state = ctx->pwm_fan_max_state; ctx->pwm_fan_state = ctx->pwm_fan_max_state;
if (IS_ENABLED(CONFIG_THERMAL)) { if (IS_ENABLED(CONFIG_THERMAL)) {

View File

@ -1290,6 +1290,7 @@ static int xadc_probe(struct platform_device *pdev)
err_free_irq: err_free_irq:
free_irq(xadc->irq, indio_dev); free_irq(xadc->irq, indio_dev);
cancel_delayed_work_sync(&xadc->zynq_unmask_work);
err_clk_disable_unprepare: err_clk_disable_unprepare:
clk_disable_unprepare(xadc->clk); clk_disable_unprepare(xadc->clk);
err_free_samplerate_trigger: err_free_samplerate_trigger:
@ -1319,8 +1320,8 @@ static int xadc_remove(struct platform_device *pdev)
iio_triggered_buffer_cleanup(indio_dev); iio_triggered_buffer_cleanup(indio_dev);
} }
free_irq(xadc->irq, indio_dev); free_irq(xadc->irq, indio_dev);
cancel_delayed_work_sync(&xadc->zynq_unmask_work);
clk_disable_unprepare(xadc->clk); clk_disable_unprepare(xadc->clk);
cancel_delayed_work(&xadc->zynq_unmask_work);
kfree(xadc->data); kfree(xadc->data);
kfree(indio_dev->channels); kfree(indio_dev->channels);

View File

@ -517,7 +517,7 @@ static int hns_roce_set_kernel_sq_size(struct hns_roce_dev *hr_dev,
static int hns_roce_qp_has_sq(struct ib_qp_init_attr *attr) static int hns_roce_qp_has_sq(struct ib_qp_init_attr *attr)
{ {
if (attr->qp_type == IB_QPT_XRC_TGT) if (attr->qp_type == IB_QPT_XRC_TGT || !attr->cap.max_send_wr)
return 0; return 0;
return 1; return 1;

View File

@ -1025,6 +1025,8 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
if (MLX5_CAP_GEN(mdev, qp_packet_based)) if (MLX5_CAP_GEN(mdev, qp_packet_based))
resp.flags |= resp.flags |=
MLX5_IB_QUERY_DEV_RESP_PACKET_BASED_CREDIT_MODE; MLX5_IB_QUERY_DEV_RESP_PACKET_BASED_CREDIT_MODE;
resp.flags |= MLX5_IB_QUERY_DEV_RESP_FLAGS_SCAT2CQE_DCT;
} }
if (field_avail(typeof(resp), sw_parsing_caps, if (field_avail(typeof(resp), sw_parsing_caps,

View File

@ -1724,13 +1724,16 @@ static void configure_responder_scat_cqe(struct ib_qp_init_attr *init_attr,
rcqe_sz = mlx5_ib_get_cqe_size(init_attr->recv_cq); rcqe_sz = mlx5_ib_get_cqe_size(init_attr->recv_cq);
if (rcqe_sz == 128) { if (init_attr->qp_type == MLX5_IB_QPT_DCT) {
MLX5_SET(qpc, qpc, cs_res, MLX5_RES_SCAT_DATA64_CQE); if (rcqe_sz == 128)
MLX5_SET(dctc, qpc, cs_res, MLX5_RES_SCAT_DATA64_CQE);
return; return;
} }
if (init_attr->qp_type != MLX5_IB_QPT_DCT) MLX5_SET(qpc, qpc, cs_res,
MLX5_SET(qpc, qpc, cs_res, MLX5_RES_SCAT_DATA32_CQE); rcqe_sz == 128 ? MLX5_RES_SCAT_DATA64_CQE :
MLX5_RES_SCAT_DATA32_CQE);
} }
static void configure_requester_scat_cqe(struct mlx5_ib_dev *dev, static void configure_requester_scat_cqe(struct mlx5_ib_dev *dev,

View File

@ -420,7 +420,7 @@ config KEYBOARD_MPR121
config KEYBOARD_SNVS_PWRKEY config KEYBOARD_SNVS_PWRKEY
tristate "IMX SNVS Power Key Driver" tristate "IMX SNVS Power Key Driver"
depends on SOC_IMX6SX || SOC_IMX7D depends on ARCH_MXC || COMPILE_TEST
depends on OF depends on OF
help help
This is the snvs powerkey driver for the Freescale i.MX application This is the snvs powerkey driver for the Freescale i.MX application

View File

@ -860,7 +860,7 @@ static int rmi_create_function(struct rmi_device *rmi_dev,
error = rmi_register_function(fn); error = rmi_register_function(fn);
if (error) if (error)
goto err_put_fn; return error;
if (pdt->function_number == 0x01) if (pdt->function_number == 0x01)
data->f01_container = fn; data->f01_container = fn;
@ -870,10 +870,6 @@ static int rmi_create_function(struct rmi_device *rmi_dev,
list_add_tail(&fn->node, &data->function_list); list_add_tail(&fn->node, &data->function_list);
return RMI_SCAN_CONTINUE; return RMI_SCAN_CONTINUE;
err_put_fn:
put_device(&fn->dev);
return error;
} }
void rmi_enable_irq(struct rmi_device *rmi_dev, bool clear_wake) void rmi_enable_irq(struct rmi_device *rmi_dev, bool clear_wake)

View File

@ -22,6 +22,15 @@
#define AR71XX_RESET_REG_MISC_INT_ENABLE 4 #define AR71XX_RESET_REG_MISC_INT_ENABLE 4
#define ATH79_MISC_IRQ_COUNT 32 #define ATH79_MISC_IRQ_COUNT 32
#define ATH79_MISC_PERF_IRQ 5
static int ath79_perfcount_irq;
int get_c0_perfcount_int(void)
{
return ath79_perfcount_irq;
}
EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
static void ath79_misc_irq_handler(struct irq_desc *desc) static void ath79_misc_irq_handler(struct irq_desc *desc)
{ {
@ -113,6 +122,8 @@ static void __init ath79_misc_intc_domain_init(
{ {
void __iomem *base = domain->host_data; void __iomem *base = domain->host_data;
ath79_perfcount_irq = irq_create_mapping(domain, ATH79_MISC_PERF_IRQ);
/* Disable and clear all interrupts */ /* Disable and clear all interrupts */
__raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_ENABLE); __raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_ENABLE);
__raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_STATUS); __raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_STATUS);

View File

@ -958,6 +958,7 @@ static void write_iso_callback(struct urb *urb)
*/ */
static int starturbs(struct bc_state *bcs) static int starturbs(struct bc_state *bcs)
{ {
struct usb_device *udev = bcs->cs->hw.bas->udev;
struct bas_bc_state *ubc = bcs->hw.bas; struct bas_bc_state *ubc = bcs->hw.bas;
struct urb *urb; struct urb *urb;
int j, k; int j, k;
@ -975,8 +976,8 @@ static int starturbs(struct bc_state *bcs)
rc = -EFAULT; rc = -EFAULT;
goto error; goto error;
} }
usb_fill_int_urb(urb, bcs->cs->hw.bas->udev, usb_fill_int_urb(urb, udev,
usb_rcvisocpipe(urb->dev, 3 + 2 * bcs->channel), usb_rcvisocpipe(udev, 3 + 2 * bcs->channel),
ubc->isoinbuf + k * BAS_INBUFSIZE, ubc->isoinbuf + k * BAS_INBUFSIZE,
BAS_INBUFSIZE, read_iso_callback, bcs, BAS_INBUFSIZE, read_iso_callback, bcs,
BAS_FRAMETIME); BAS_FRAMETIME);
@ -1006,8 +1007,8 @@ static int starturbs(struct bc_state *bcs)
rc = -EFAULT; rc = -EFAULT;
goto error; goto error;
} }
usb_fill_int_urb(urb, bcs->cs->hw.bas->udev, usb_fill_int_urb(urb, udev,
usb_sndisocpipe(urb->dev, 4 + 2 * bcs->channel), usb_sndisocpipe(udev, 4 + 2 * bcs->channel),
ubc->isooutbuf->data, ubc->isooutbuf->data,
sizeof(ubc->isooutbuf->data), sizeof(ubc->isooutbuf->data),
write_iso_callback, &ubc->isoouturbs[k], write_iso_callback, &ubc->isoouturbs[k],

View File

@ -710,10 +710,10 @@ base_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_len)
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
int err = 0; int err = 0;
if (!maddr || maddr->family != AF_ISDN) if (addr_len < sizeof(struct sockaddr_mISDN))
return -EINVAL; return -EINVAL;
if (addr_len < sizeof(struct sockaddr_mISDN)) if (!maddr || maddr->family != AF_ISDN)
return -EINVAL; return -EINVAL;
lock_sock(sk); lock_sock(sk);

View File

@ -4233,26 +4233,15 @@ static void handle_parity_checks6(struct r5conf *conf, struct stripe_head *sh,
case check_state_check_result: case check_state_check_result:
sh->check_state = check_state_idle; sh->check_state = check_state_idle;
if (s->failed > 1)
break;
/* handle a successful check operation, if parity is correct /* handle a successful check operation, if parity is correct
* we are done. Otherwise update the mismatch count and repair * we are done. Otherwise update the mismatch count and repair
* parity if !MD_RECOVERY_CHECK * parity if !MD_RECOVERY_CHECK
*/ */
if (sh->ops.zero_sum_result == 0) { if (sh->ops.zero_sum_result == 0) {
/* both parities are correct */ /* Any parity checked was correct */
if (!s->failed)
set_bit(STRIPE_INSYNC, &sh->state); set_bit(STRIPE_INSYNC, &sh->state);
else {
/* in contrast to the raid5 case we can validate
* parity, but still have a failure to write
* back
*/
sh->check_state = check_state_compute_result;
/* Returning at this point means that we may go
* off and bring p and/or q uptodate again so
* we make sure to check zero_sum_result again
* to verify if p or q need writeback
*/
}
} else { } else {
atomic64_add(STRIPE_SECTORS, &conf->mddev->resync_mismatches); atomic64_add(STRIPE_SECTORS, &conf->mddev->resync_mismatches);
if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) { if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) {

View File

@ -1098,13 +1098,6 @@ static int bond_option_arp_validate_set(struct bonding *bond,
{ {
netdev_dbg(bond->dev, "Setting arp_validate to %s (%llu)\n", netdev_dbg(bond->dev, "Setting arp_validate to %s (%llu)\n",
newval->string, newval->value); newval->string, newval->value);
if (bond->dev->flags & IFF_UP) {
if (!newval->value)
bond->recv_probe = NULL;
else if (bond->params.arp_interval)
bond->recv_probe = bond_arp_rcv;
}
bond->params.arp_validate = newval->value; bond->params.arp_validate = newval->value;
return 0; return 0;

View File

@ -2414,12 +2414,12 @@ static int macb_open(struct net_device *dev)
return err; return err;
} }
bp->macbgem_ops.mog_init_rings(bp);
macb_init_hw(bp);
for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue) for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue)
napi_enable(&queue->napi); napi_enable(&queue->napi);
bp->macbgem_ops.mog_init_rings(bp);
macb_init_hw(bp);
/* schedule a link state check */ /* schedule a link state check */
phy_start(dev->phydev); phy_start(dev->phydev);

View File

@ -1648,7 +1648,7 @@ static struct sk_buff *dpaa_cleanup_tx_fd(const struct dpaa_priv *priv,
qm_sg_entry_get_len(&sgt[0]), dma_dir); qm_sg_entry_get_len(&sgt[0]), dma_dir);
/* remaining pages were mapped with skb_frag_dma_map() */ /* remaining pages were mapped with skb_frag_dma_map() */
for (i = 1; i < nr_frags; i++) { for (i = 1; i <= nr_frags; i++) {
WARN_ON(qm_sg_entry_is_ext(&sgt[i])); WARN_ON(qm_sg_entry_is_ext(&sgt[i]));
dma_unmap_page(dev, qm_sg_addr(&sgt[i]), dma_unmap_page(dev, qm_sg_addr(&sgt[i]),

View File

@ -252,14 +252,12 @@ uec_set_ringparam(struct net_device *netdev,
return -EINVAL; return -EINVAL;
} }
if (netif_running(netdev))
return -EBUSY;
ug_info->bdRingLenRx[queue] = ring->rx_pending; ug_info->bdRingLenRx[queue] = ring->rx_pending;
ug_info->bdRingLenTx[queue] = ring->tx_pending; ug_info->bdRingLenTx[queue] = ring->tx_pending;
if (netif_running(netdev)) {
/* FIXME: restart automatically */
netdev_info(netdev, "Please re-open the interface\n");
}
return ret; return ret;
} }

View File

@ -4370,7 +4370,7 @@ static void mvpp2_phylink_validate(struct net_device *dev,
case PHY_INTERFACE_MODE_RGMII_ID: case PHY_INTERFACE_MODE_RGMII_ID:
case PHY_INTERFACE_MODE_RGMII_RXID: case PHY_INTERFACE_MODE_RGMII_RXID:
case PHY_INTERFACE_MODE_RGMII_TXID: case PHY_INTERFACE_MODE_RGMII_TXID:
if (port->gop_id == 0) if (port->priv->hw_version == MVPP22 && port->gop_id == 0)
goto empty_set; goto empty_set;
break; break;
default: default:

View File

@ -613,7 +613,7 @@ static int ocelot_mact_mc_add(struct ocelot_port *port,
struct netdev_hw_addr *hw_addr) struct netdev_hw_addr *hw_addr)
{ {
struct ocelot *ocelot = port->ocelot; struct ocelot *ocelot = port->ocelot;
struct netdev_hw_addr *ha = kzalloc(sizeof(*ha), GFP_KERNEL); struct netdev_hw_addr *ha = kzalloc(sizeof(*ha), GFP_ATOMIC);
if (!ha) if (!ha)
return -ENOMEM; return -ENOMEM;

View File

@ -2366,6 +2366,7 @@ static void *__vxge_hw_blockpool_malloc(struct __vxge_hw_device *devh, u32 size,
dma_object->addr))) { dma_object->addr))) {
vxge_os_dma_free(devh->pdev, memblock, vxge_os_dma_free(devh->pdev, memblock,
&dma_object->acc_handle); &dma_object->acc_handle);
memblock = NULL;
goto exit; goto exit;
} }

View File

@ -431,12 +431,16 @@ struct qed_qm_info {
u8 num_pf_rls; u8 num_pf_rls;
}; };
#define QED_OVERFLOW_BIT 1
struct qed_db_recovery_info { struct qed_db_recovery_info {
struct list_head list; struct list_head list;
/* Lock to protect the doorbell recovery mechanism list */ /* Lock to protect the doorbell recovery mechanism list */
spinlock_t lock; spinlock_t lock;
bool dorq_attn;
u32 db_recovery_counter; u32 db_recovery_counter;
unsigned long overflow;
}; };
struct storm_stats { struct storm_stats {
@ -918,8 +922,7 @@ u16 qed_get_cm_pq_idx_llt_mtc(struct qed_hwfn *p_hwfn, u8 tc);
/* doorbell recovery mechanism */ /* doorbell recovery mechanism */
void qed_db_recovery_dp(struct qed_hwfn *p_hwfn); void qed_db_recovery_dp(struct qed_hwfn *p_hwfn);
void qed_db_recovery_execute(struct qed_hwfn *p_hwfn, void qed_db_recovery_execute(struct qed_hwfn *p_hwfn);
enum qed_db_rec_exec db_exec);
bool qed_edpm_enabled(struct qed_hwfn *p_hwfn); bool qed_edpm_enabled(struct qed_hwfn *p_hwfn);
/* Other Linux specific common definitions */ /* Other Linux specific common definitions */

View File

@ -102,11 +102,15 @@ static void qed_db_recovery_dp_entry(struct qed_hwfn *p_hwfn,
/* Doorbell address sanity (address within doorbell bar range) */ /* Doorbell address sanity (address within doorbell bar range) */
static bool qed_db_rec_sanity(struct qed_dev *cdev, static bool qed_db_rec_sanity(struct qed_dev *cdev,
void __iomem *db_addr, void *db_data) void __iomem *db_addr,
enum qed_db_rec_width db_width,
void *db_data)
{ {
u32 width = (db_width == DB_REC_WIDTH_32B) ? 32 : 64;
/* Make sure doorbell address is within the doorbell bar */ /* Make sure doorbell address is within the doorbell bar */
if (db_addr < cdev->doorbells || if (db_addr < cdev->doorbells ||
(u8 __iomem *)db_addr > (u8 __iomem *)db_addr + width >
(u8 __iomem *)cdev->doorbells + cdev->db_size) { (u8 __iomem *)cdev->doorbells + cdev->db_size) {
WARN(true, WARN(true,
"Illegal doorbell address: %p. Legal range for doorbell addresses is [%p..%p]\n", "Illegal doorbell address: %p. Legal range for doorbell addresses is [%p..%p]\n",
@ -159,7 +163,7 @@ int qed_db_recovery_add(struct qed_dev *cdev,
} }
/* Sanitize doorbell address */ /* Sanitize doorbell address */
if (!qed_db_rec_sanity(cdev, db_addr, db_data)) if (!qed_db_rec_sanity(cdev, db_addr, db_width, db_data))
return -EINVAL; return -EINVAL;
/* Obtain hwfn from doorbell address */ /* Obtain hwfn from doorbell address */
@ -205,10 +209,6 @@ int qed_db_recovery_del(struct qed_dev *cdev,
return 0; return 0;
} }
/* Sanitize doorbell address */
if (!qed_db_rec_sanity(cdev, db_addr, db_data))
return -EINVAL;
/* Obtain hwfn from doorbell address */ /* Obtain hwfn from doorbell address */
p_hwfn = qed_db_rec_find_hwfn(cdev, db_addr); p_hwfn = qed_db_rec_find_hwfn(cdev, db_addr);
@ -300,31 +300,24 @@ void qed_db_recovery_dp(struct qed_hwfn *p_hwfn)
/* Ring the doorbell of a single doorbell recovery entry */ /* Ring the doorbell of a single doorbell recovery entry */
static void qed_db_recovery_ring(struct qed_hwfn *p_hwfn, static void qed_db_recovery_ring(struct qed_hwfn *p_hwfn,
struct qed_db_recovery_entry *db_entry, struct qed_db_recovery_entry *db_entry)
enum qed_db_rec_exec db_exec)
{ {
if (db_exec != DB_REC_ONCE) {
/* Print according to width */ /* Print according to width */
if (db_entry->db_width == DB_REC_WIDTH_32B) { if (db_entry->db_width == DB_REC_WIDTH_32B) {
DP_VERBOSE(p_hwfn, QED_MSG_SPQ, DP_VERBOSE(p_hwfn, QED_MSG_SPQ,
"%s doorbell address %p data %x\n", "ringing doorbell address %p data %x\n",
db_exec == DB_REC_DRY_RUN ?
"would have rung" : "ringing",
db_entry->db_addr, db_entry->db_addr,
*(u32 *)db_entry->db_data); *(u32 *)db_entry->db_data);
} else { } else {
DP_VERBOSE(p_hwfn, QED_MSG_SPQ, DP_VERBOSE(p_hwfn, QED_MSG_SPQ,
"%s doorbell address %p data %llx\n", "ringing doorbell address %p data %llx\n",
db_exec == DB_REC_DRY_RUN ?
"would have rung" : "ringing",
db_entry->db_addr, db_entry->db_addr,
*(u64 *)(db_entry->db_data)); *(u64 *)(db_entry->db_data));
} }
}
/* Sanity */ /* Sanity */
if (!qed_db_rec_sanity(p_hwfn->cdev, db_entry->db_addr, if (!qed_db_rec_sanity(p_hwfn->cdev, db_entry->db_addr,
db_entry->db_data)) db_entry->db_width, db_entry->db_data))
return; return;
/* Flush the write combined buffer. Since there are multiple doorbelling /* Flush the write combined buffer. Since there are multiple doorbelling
@ -334,14 +327,12 @@ static void qed_db_recovery_ring(struct qed_hwfn *p_hwfn,
wmb(); wmb();
/* Ring the doorbell */ /* Ring the doorbell */
if (db_exec == DB_REC_REAL_DEAL || db_exec == DB_REC_ONCE) {
if (db_entry->db_width == DB_REC_WIDTH_32B) if (db_entry->db_width == DB_REC_WIDTH_32B)
DIRECT_REG_WR(db_entry->db_addr, DIRECT_REG_WR(db_entry->db_addr,
*(u32 *)(db_entry->db_data)); *(u32 *)(db_entry->db_data));
else else
DIRECT_REG_WR64(db_entry->db_addr, DIRECT_REG_WR64(db_entry->db_addr,
*(u64 *)(db_entry->db_data)); *(u64 *)(db_entry->db_data));
}
/* Flush the write combined buffer. Next doorbell may come from a /* Flush the write combined buffer. Next doorbell may come from a
* different entity to the same address... * different entity to the same address...
@ -350,29 +341,21 @@ static void qed_db_recovery_ring(struct qed_hwfn *p_hwfn,
} }
/* Traverse the doorbell recovery entry list and ring all the doorbells */ /* Traverse the doorbell recovery entry list and ring all the doorbells */
void qed_db_recovery_execute(struct qed_hwfn *p_hwfn, void qed_db_recovery_execute(struct qed_hwfn *p_hwfn)
enum qed_db_rec_exec db_exec)
{ {
struct qed_db_recovery_entry *db_entry = NULL; struct qed_db_recovery_entry *db_entry = NULL;
if (db_exec != DB_REC_ONCE) { DP_NOTICE(p_hwfn, "Executing doorbell recovery. Counter was %d\n",
DP_NOTICE(p_hwfn,
"Executing doorbell recovery. Counter was %d\n",
p_hwfn->db_recovery_info.db_recovery_counter); p_hwfn->db_recovery_info.db_recovery_counter);
/* Track amount of times recovery was executed */ /* Track amount of times recovery was executed */
p_hwfn->db_recovery_info.db_recovery_counter++; p_hwfn->db_recovery_info.db_recovery_counter++;
}
/* Protect the list */ /* Protect the list */
spin_lock_bh(&p_hwfn->db_recovery_info.lock); spin_lock_bh(&p_hwfn->db_recovery_info.lock);
list_for_each_entry(db_entry, list_for_each_entry(db_entry,
&p_hwfn->db_recovery_info.list, list_entry) { &p_hwfn->db_recovery_info.list, list_entry)
qed_db_recovery_ring(p_hwfn, db_entry, db_exec); qed_db_recovery_ring(p_hwfn, db_entry);
if (db_exec == DB_REC_ONCE)
break;
}
spin_unlock_bh(&p_hwfn->db_recovery_info.lock); spin_unlock_bh(&p_hwfn->db_recovery_info.lock);
} }

View File

@ -376,6 +376,9 @@ static int qed_db_rec_flush_queue(struct qed_hwfn *p_hwfn,
u32 count = QED_DB_REC_COUNT; u32 count = QED_DB_REC_COUNT;
u32 usage = 1; u32 usage = 1;
/* Flush any pending (e)dpms as they may never arrive */
qed_wr(p_hwfn, p_ptt, DORQ_REG_DPM_FORCE_ABORT, 0x1);
/* wait for usage to zero or count to run out. This is necessary since /* wait for usage to zero or count to run out. This is necessary since
* EDPM doorbell transactions can take multiple 64b cycles, and as such * EDPM doorbell transactions can take multiple 64b cycles, and as such
* can "split" over the pci. Possibly, the doorbell drop can happen with * can "split" over the pci. Possibly, the doorbell drop can happen with
@ -404,51 +407,74 @@ static int qed_db_rec_flush_queue(struct qed_hwfn *p_hwfn,
int qed_db_rec_handler(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) int qed_db_rec_handler(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
{ {
u32 overflow; u32 attn_ovfl, cur_ovfl;
int rc; int rc;
overflow = qed_rd(p_hwfn, p_ptt, DORQ_REG_PF_OVFL_STICKY); attn_ovfl = test_and_clear_bit(QED_OVERFLOW_BIT,
DP_NOTICE(p_hwfn, "PF Overflow sticky 0x%x\n", overflow); &p_hwfn->db_recovery_info.overflow);
if (!overflow) { cur_ovfl = qed_rd(p_hwfn, p_ptt, DORQ_REG_PF_OVFL_STICKY);
qed_db_recovery_execute(p_hwfn, DB_REC_ONCE); if (!cur_ovfl && !attn_ovfl)
return 0; return 0;
}
if (qed_edpm_enabled(p_hwfn)) { DP_NOTICE(p_hwfn, "PF Overflow sticky: attn %u current %u\n",
attn_ovfl, cur_ovfl);
if (cur_ovfl && !p_hwfn->db_bar_no_edpm) {
rc = qed_db_rec_flush_queue(p_hwfn, p_ptt); rc = qed_db_rec_flush_queue(p_hwfn, p_ptt);
if (rc) if (rc)
return rc; return rc;
} }
/* Flush any pending (e)dpm as they may never arrive */
qed_wr(p_hwfn, p_ptt, DORQ_REG_DPM_FORCE_ABORT, 0x1);
/* Release overflow sticky indication (stop silently dropping everything) */ /* Release overflow sticky indication (stop silently dropping everything) */
qed_wr(p_hwfn, p_ptt, DORQ_REG_PF_OVFL_STICKY, 0x0); qed_wr(p_hwfn, p_ptt, DORQ_REG_PF_OVFL_STICKY, 0x0);
/* Repeat all last doorbells (doorbell drop recovery) */ /* Repeat all last doorbells (doorbell drop recovery) */
qed_db_recovery_execute(p_hwfn, DB_REC_REAL_DEAL); qed_db_recovery_execute(p_hwfn);
return 0; return 0;
} }
static int qed_dorq_attn_cb(struct qed_hwfn *p_hwfn) static void qed_dorq_attn_overflow(struct qed_hwfn *p_hwfn)
{
struct qed_ptt *p_ptt = p_hwfn->p_dpc_ptt;
u32 overflow;
int rc;
overflow = qed_rd(p_hwfn, p_ptt, DORQ_REG_PF_OVFL_STICKY);
if (!overflow)
goto out;
/* Run PF doorbell recovery in next periodic handler */
set_bit(QED_OVERFLOW_BIT, &p_hwfn->db_recovery_info.overflow);
if (!p_hwfn->db_bar_no_edpm) {
rc = qed_db_rec_flush_queue(p_hwfn, p_ptt);
if (rc)
goto out;
}
qed_wr(p_hwfn, p_ptt, DORQ_REG_PF_OVFL_STICKY, 0x0);
out:
/* Schedule the handler even if overflow was not detected */
qed_periodic_db_rec_start(p_hwfn);
}
static int qed_dorq_attn_int_sts(struct qed_hwfn *p_hwfn)
{ {
u32 int_sts, first_drop_reason, details, address, all_drops_reason; u32 int_sts, first_drop_reason, details, address, all_drops_reason;
struct qed_ptt *p_ptt = p_hwfn->p_dpc_ptt; struct qed_ptt *p_ptt = p_hwfn->p_dpc_ptt;
int rc;
int_sts = qed_rd(p_hwfn, p_ptt, DORQ_REG_INT_STS);
DP_NOTICE(p_hwfn->cdev, "DORQ attention. int_sts was %x\n", int_sts);
/* int_sts may be zero since all PFs were interrupted for doorbell /* int_sts may be zero since all PFs were interrupted for doorbell
* overflow but another one already handled it. Can abort here. If * overflow but another one already handled it. Can abort here. If
* This PF also requires overflow recovery we will be interrupted again. * This PF also requires overflow recovery we will be interrupted again.
* The masked almost full indication may also be set. Ignoring. * The masked almost full indication may also be set. Ignoring.
*/ */
int_sts = qed_rd(p_hwfn, p_ptt, DORQ_REG_INT_STS);
if (!(int_sts & ~DORQ_REG_INT_STS_DORQ_FIFO_AFULL)) if (!(int_sts & ~DORQ_REG_INT_STS_DORQ_FIFO_AFULL))
return 0; return 0;
DP_NOTICE(p_hwfn->cdev, "DORQ attention. int_sts was %x\n", int_sts);
/* check if db_drop or overflow happened */ /* check if db_drop or overflow happened */
if (int_sts & (DORQ_REG_INT_STS_DB_DROP | if (int_sts & (DORQ_REG_INT_STS_DB_DROP |
DORQ_REG_INT_STS_DORQ_FIFO_OVFL_ERR)) { DORQ_REG_INT_STS_DORQ_FIFO_OVFL_ERR)) {
@ -475,11 +501,6 @@ static int qed_dorq_attn_cb(struct qed_hwfn *p_hwfn)
GET_FIELD(details, QED_DORQ_ATTENTION_SIZE) * 4, GET_FIELD(details, QED_DORQ_ATTENTION_SIZE) * 4,
first_drop_reason, all_drops_reason); first_drop_reason, all_drops_reason);
rc = qed_db_rec_handler(p_hwfn, p_ptt);
qed_periodic_db_rec_start(p_hwfn);
if (rc)
return rc;
/* Clear the doorbell drop details and prepare for next drop */ /* Clear the doorbell drop details and prepare for next drop */
qed_wr(p_hwfn, p_ptt, DORQ_REG_DB_DROP_DETAILS_REL, 0); qed_wr(p_hwfn, p_ptt, DORQ_REG_DB_DROP_DETAILS_REL, 0);
@ -505,6 +526,25 @@ static int qed_dorq_attn_cb(struct qed_hwfn *p_hwfn)
return -EINVAL; return -EINVAL;
} }
static int qed_dorq_attn_cb(struct qed_hwfn *p_hwfn)
{
p_hwfn->db_recovery_info.dorq_attn = true;
qed_dorq_attn_overflow(p_hwfn);
return qed_dorq_attn_int_sts(p_hwfn);
}
static void qed_dorq_attn_handler(struct qed_hwfn *p_hwfn)
{
if (p_hwfn->db_recovery_info.dorq_attn)
goto out;
/* Call DORQ callback if the attention was missed */
qed_dorq_attn_cb(p_hwfn);
out:
p_hwfn->db_recovery_info.dorq_attn = false;
}
/* Instead of major changes to the data-structure, we have a some 'special' /* Instead of major changes to the data-structure, we have a some 'special'
* identifiers for sources that changed meaning between adapters. * identifiers for sources that changed meaning between adapters.
*/ */
@ -1078,6 +1118,9 @@ static int qed_int_deassertion(struct qed_hwfn *p_hwfn,
} }
} }
/* Handle missed DORQ attention */
qed_dorq_attn_handler(p_hwfn);
/* Clear IGU indication for the deasserted bits */ /* Clear IGU indication for the deasserted bits */
DIRECT_REG_WR((u8 __iomem *)p_hwfn->regview + DIRECT_REG_WR((u8 __iomem *)p_hwfn->regview +
GTT_BAR0_MAP_REG_IGU_CMD + GTT_BAR0_MAP_REG_IGU_CMD +

View File

@ -192,8 +192,8 @@ void qed_int_disable_post_isr_release(struct qed_dev *cdev);
/** /**
* @brief - Doorbell Recovery handler. * @brief - Doorbell Recovery handler.
* Run DB_REAL_DEAL doorbell recovery in case of PF overflow * Run doorbell recovery in case of PF overflow (and flush DORQ if
* (and flush DORQ if needed), otherwise run DB_REC_ONCE. * needed).
* *
* @param p_hwfn * @param p_hwfn
* @param p_ptt * @param p_ptt

View File

@ -966,7 +966,7 @@ static void qed_update_pf_params(struct qed_dev *cdev,
} }
} }
#define QED_PERIODIC_DB_REC_COUNT 100 #define QED_PERIODIC_DB_REC_COUNT 10
#define QED_PERIODIC_DB_REC_INTERVAL_MS 100 #define QED_PERIODIC_DB_REC_INTERVAL_MS 100
#define QED_PERIODIC_DB_REC_INTERVAL \ #define QED_PERIODIC_DB_REC_INTERVAL \
msecs_to_jiffies(QED_PERIODIC_DB_REC_INTERVAL_MS) msecs_to_jiffies(QED_PERIODIC_DB_REC_INTERVAL_MS)

View File

@ -490,18 +490,17 @@ int qede_ptp_enable(struct qede_dev *edev, bool init_tc)
ptp->clock = ptp_clock_register(&ptp->clock_info, &edev->pdev->dev); ptp->clock = ptp_clock_register(&ptp->clock_info, &edev->pdev->dev);
if (IS_ERR(ptp->clock)) { if (IS_ERR(ptp->clock)) {
rc = -EINVAL;
DP_ERR(edev, "PTP clock registration failed\n"); DP_ERR(edev, "PTP clock registration failed\n");
qede_ptp_disable(edev);
rc = -EINVAL;
goto err2; goto err2;
} }
return 0; return 0;
err2:
qede_ptp_disable(edev);
ptp->clock = NULL;
err1: err1:
kfree(ptp); kfree(ptp);
err2:
edev->ptp = NULL; edev->ptp = NULL;
return rc; return rc;

View File

@ -735,6 +735,7 @@ static int sgiseeq_probe(struct platform_device *pdev)
} }
platform_set_drvdata(pdev, dev); platform_set_drvdata(pdev, dev);
SET_NETDEV_DEV(dev, &pdev->dev);
sp = netdev_priv(dev); sp = netdev_priv(dev);
/* Make private data page aligned */ /* Make private data page aligned */

View File

@ -1015,6 +1015,8 @@ static struct mac_device_info *sun8i_dwmac_setup(void *ppriv)
mac->mac = &sun8i_dwmac_ops; mac->mac = &sun8i_dwmac_ops;
mac->dma = &sun8i_dwmac_dma_ops; mac->dma = &sun8i_dwmac_dma_ops;
priv->dev->priv_flags |= IFF_UNICAST_FLT;
/* The loopback bit seems to be re-set when link change /* The loopback bit seems to be re-set when link change
* Simply mask it each time * Simply mask it each time
* Speed 10/100/1000 are set in BIT(2)/BIT(3) * Speed 10/100/1000 are set in BIT(2)/BIT(3)

View File

@ -2083,11 +2083,14 @@ bool phy_validate_pause(struct phy_device *phydev,
struct ethtool_pauseparam *pp) struct ethtool_pauseparam *pp)
{ {
if (!linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT, if (!linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT,
phydev->supported) || phydev->supported) && pp->rx_pause)
(!linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
phydev->supported) &&
pp->rx_pause != pp->tx_pause))
return false; return false;
if (!linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
phydev->supported) &&
pp->rx_pause != pp->tx_pause)
return false;
return true; return true;
} }
EXPORT_SYMBOL(phy_validate_pause); EXPORT_SYMBOL(phy_validate_pause);

View File

@ -162,6 +162,14 @@ static const struct spi_device_id ks8995_id[] = {
}; };
MODULE_DEVICE_TABLE(spi, ks8995_id); MODULE_DEVICE_TABLE(spi, ks8995_id);
static const struct of_device_id ks8895_spi_of_match[] = {
{ .compatible = "micrel,ks8995" },
{ .compatible = "micrel,ksz8864" },
{ .compatible = "micrel,ksz8795" },
{ },
};
MODULE_DEVICE_TABLE(of, ks8895_spi_of_match);
static inline u8 get_chip_id(u8 val) static inline u8 get_chip_id(u8 val)
{ {
return (val >> ID1_CHIPID_S) & ID1_CHIPID_M; return (val >> ID1_CHIPID_S) & ID1_CHIPID_M;
@ -529,6 +537,7 @@ static int ks8995_remove(struct spi_device *spi)
static struct spi_driver ks8995_driver = { static struct spi_driver ks8995_driver = {
.driver = { .driver = {
.name = "spi-ks8995", .name = "spi-ks8995",
.of_match_table = of_match_ptr(ks8895_spi_of_match),
}, },
.probe = ks8995_probe, .probe = ks8995_probe,
.remove = ks8995_remove, .remove = ks8995_remove,

View File

@ -596,13 +596,18 @@ static u16 tun_automq_select_queue(struct tun_struct *tun, struct sk_buff *skb)
static u16 tun_ebpf_select_queue(struct tun_struct *tun, struct sk_buff *skb) static u16 tun_ebpf_select_queue(struct tun_struct *tun, struct sk_buff *skb)
{ {
struct tun_prog *prog; struct tun_prog *prog;
u32 numqueues;
u16 ret = 0; u16 ret = 0;
numqueues = READ_ONCE(tun->numqueues);
if (!numqueues)
return 0;
prog = rcu_dereference(tun->steering_prog); prog = rcu_dereference(tun->steering_prog);
if (prog) if (prog)
ret = bpf_prog_run_clear_cb(prog->prog, skb); ret = bpf_prog_run_clear_cb(prog->prog, skb);
return ret % tun->numqueues; return ret % numqueues;
} }
static u16 tun_select_queue(struct net_device *dev, struct sk_buff *skb, static u16 tun_select_queue(struct net_device *dev, struct sk_buff *skb,
@ -700,6 +705,8 @@ static void __tun_detach(struct tun_file *tfile, bool clean)
tun->tfiles[tun->numqueues - 1]); tun->tfiles[tun->numqueues - 1]);
ntfile = rtnl_dereference(tun->tfiles[index]); ntfile = rtnl_dereference(tun->tfiles[index]);
ntfile->queue_index = index; ntfile->queue_index = index;
rcu_assign_pointer(tun->tfiles[tun->numqueues - 1],
NULL);
--tun->numqueues; --tun->numqueues;
if (clean) { if (clean) {
@ -1082,7 +1089,7 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
tfile = rcu_dereference(tun->tfiles[txq]); tfile = rcu_dereference(tun->tfiles[txq]);
/* Drop packet if interface is not attached */ /* Drop packet if interface is not attached */
if (txq >= tun->numqueues) if (!tfile)
goto drop; goto drop;
if (!rcu_dereference(tun->steering_prog)) if (!rcu_dereference(tun->steering_prog))
@ -1305,6 +1312,7 @@ static int tun_xdp_xmit(struct net_device *dev, int n,
rcu_read_lock(); rcu_read_lock();
resample:
numqueues = READ_ONCE(tun->numqueues); numqueues = READ_ONCE(tun->numqueues);
if (!numqueues) { if (!numqueues) {
rcu_read_unlock(); rcu_read_unlock();
@ -1313,6 +1321,8 @@ static int tun_xdp_xmit(struct net_device *dev, int n,
tfile = rcu_dereference(tun->tfiles[smp_processor_id() % tfile = rcu_dereference(tun->tfiles[smp_processor_id() %
numqueues]); numqueues]);
if (unlikely(!tfile))
goto resample;
spin_lock(&tfile->tx_ring.producer_lock); spin_lock(&tfile->tx_ring.producer_lock);
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {

View File

@ -875,6 +875,7 @@ static const struct net_device_ops vrf_netdev_ops = {
.ndo_init = vrf_dev_init, .ndo_init = vrf_dev_init,
.ndo_uninit = vrf_dev_uninit, .ndo_uninit = vrf_dev_uninit,
.ndo_start_xmit = vrf_xmit, .ndo_start_xmit = vrf_xmit,
.ndo_set_mac_address = eth_mac_addr,
.ndo_get_stats64 = vrf_get_stats64, .ndo_get_stats64 = vrf_get_stats64,
.ndo_add_slave = vrf_add_slave, .ndo_add_slave = vrf_add_slave,
.ndo_del_slave = vrf_del_slave, .ndo_del_slave = vrf_del_slave,
@ -1274,6 +1275,7 @@ static void vrf_setup(struct net_device *dev)
/* default to no qdisc; user can add if desired */ /* default to no qdisc; user can add if desired */
dev->priv_flags |= IFF_NO_QUEUE; dev->priv_flags |= IFF_NO_QUEUE;
dev->priv_flags |= IFF_NO_RX_HANDLER; dev->priv_flags |= IFF_NO_RX_HANDLER;
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
/* VRF devices do not care about MTU, but if the MTU is set /* VRF devices do not care about MTU, but if the MTU is set
* too low then the ipv4 and ipv6 protocols are disabled * too low then the ipv4 and ipv6 protocols are disabled

View File

@ -441,6 +441,9 @@ static const struct ieee80211_rate mwl8k_rates_50[] = {
#define MWL8K_CMD_UPDATE_STADB 0x1123 #define MWL8K_CMD_UPDATE_STADB 0x1123
#define MWL8K_CMD_BASTREAM 0x1125 #define MWL8K_CMD_BASTREAM 0x1125
#define MWL8K_LEGACY_5G_RATE_OFFSET \
(ARRAY_SIZE(mwl8k_rates_24) - ARRAY_SIZE(mwl8k_rates_50))
static const char *mwl8k_cmd_name(__le16 cmd, char *buf, int bufsize) static const char *mwl8k_cmd_name(__le16 cmd, char *buf, int bufsize)
{ {
u16 command = le16_to_cpu(cmd); u16 command = le16_to_cpu(cmd);
@ -1016,8 +1019,9 @@ mwl8k_rxd_ap_process(void *_rxd, struct ieee80211_rx_status *status,
if (rxd->channel > 14) { if (rxd->channel > 14) {
status->band = NL80211_BAND_5GHZ; status->band = NL80211_BAND_5GHZ;
if (!(status->encoding == RX_ENC_HT)) if (!(status->encoding == RX_ENC_HT) &&
status->rate_idx -= 5; status->rate_idx >= MWL8K_LEGACY_5G_RATE_OFFSET)
status->rate_idx -= MWL8K_LEGACY_5G_RATE_OFFSET;
} else { } else {
status->band = NL80211_BAND_2GHZ; status->band = NL80211_BAND_2GHZ;
} }
@ -1124,8 +1128,9 @@ mwl8k_rxd_sta_process(void *_rxd, struct ieee80211_rx_status *status,
if (rxd->channel > 14) { if (rxd->channel > 14) {
status->band = NL80211_BAND_5GHZ; status->band = NL80211_BAND_5GHZ;
if (!(status->encoding == RX_ENC_HT)) if (!(status->encoding == RX_ENC_HT) &&
status->rate_idx -= 5; status->rate_idx >= MWL8K_LEGACY_5G_RATE_OFFSET)
status->rate_idx -= MWL8K_LEGACY_5G_RATE_OFFSET;
} else { } else {
status->band = NL80211_BAND_2GHZ; status->band = NL80211_BAND_2GHZ;
} }

View File

@ -1697,6 +1697,7 @@ static void _rtl8723e_read_adapter_info(struct ieee80211_hw *hw,
rtlhal->oem_id = RT_CID_819X_LENOVO; rtlhal->oem_id = RT_CID_819X_LENOVO;
break; break;
} }
break;
case 0x1025: case 0x1025:
rtlhal->oem_id = RT_CID_819X_ACER; rtlhal->oem_id = RT_CID_819X_ACER;
break; break;

View File

@ -84,8 +84,11 @@ int cw1200_hw_scan(struct ieee80211_hw *hw,
frame.skb = ieee80211_probereq_get(hw, priv->vif->addr, NULL, 0, frame.skb = ieee80211_probereq_get(hw, priv->vif->addr, NULL, 0,
req->ie_len); req->ie_len);
if (!frame.skb) if (!frame.skb) {
mutex_unlock(&priv->conf_mutex);
up(&priv->scan.lock);
return -ENOMEM; return -ENOMEM;
}
if (req->ie_len) if (req->ie_len)
skb_put_data(frame.skb, req->ie, req->ie_len); skb_put_data(frame.skb, req->ie, req->ie_len);

View File

@ -1074,6 +1074,12 @@ static const struct spi_device_id st95hf_id[] = {
}; };
MODULE_DEVICE_TABLE(spi, st95hf_id); MODULE_DEVICE_TABLE(spi, st95hf_id);
static const struct of_device_id st95hf_spi_of_match[] = {
{ .compatible = "st,st95hf" },
{ },
};
MODULE_DEVICE_TABLE(of, st95hf_spi_of_match);
static int st95hf_probe(struct spi_device *nfc_spi_dev) static int st95hf_probe(struct spi_device *nfc_spi_dev)
{ {
int ret; int ret;
@ -1260,6 +1266,7 @@ static struct spi_driver st95hf_driver = {
.driver = { .driver = {
.name = "st95hf", .name = "st95hf",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.of_match_table = of_match_ptr(st95hf_spi_of_match),
}, },
.id_table = st95hf_id, .id_table = st95hf_id,
.probe = st95hf_probe, .probe = st95hf_probe,

View File

@ -190,14 +190,15 @@ static struct device *__nd_btt_create(struct nd_region *nd_region,
return NULL; return NULL;
nd_btt->id = ida_simple_get(&nd_region->btt_ida, 0, 0, GFP_KERNEL); nd_btt->id = ida_simple_get(&nd_region->btt_ida, 0, 0, GFP_KERNEL);
if (nd_btt->id < 0) { if (nd_btt->id < 0)
kfree(nd_btt); goto out_nd_btt;
return NULL;
}
nd_btt->lbasize = lbasize; nd_btt->lbasize = lbasize;
if (uuid) if (uuid) {
uuid = kmemdup(uuid, 16, GFP_KERNEL); uuid = kmemdup(uuid, 16, GFP_KERNEL);
if (!uuid)
goto out_put_id;
}
nd_btt->uuid = uuid; nd_btt->uuid = uuid;
dev = &nd_btt->dev; dev = &nd_btt->dev;
dev_set_name(dev, "btt%d.%d", nd_region->id, nd_btt->id); dev_set_name(dev, "btt%d.%d", nd_region->id, nd_btt->id);
@ -212,6 +213,13 @@ static struct device *__nd_btt_create(struct nd_region *nd_region,
return NULL; return NULL;
} }
return dev; return dev;
out_put_id:
ida_simple_remove(&nd_region->btt_ida, nd_btt->id);
out_nd_btt:
kfree(nd_btt);
return NULL;
} }
struct device *nd_btt_create(struct nd_region *nd_region) struct device *nd_btt_create(struct nd_region *nd_region)

View File

@ -2249,9 +2249,12 @@ static struct device *create_namespace_blk(struct nd_region *nd_region,
if (!nsblk->uuid) if (!nsblk->uuid)
goto blk_err; goto blk_err;
memcpy(name, nd_label->name, NSLABEL_NAME_LEN); memcpy(name, nd_label->name, NSLABEL_NAME_LEN);
if (name[0]) if (name[0]) {
nsblk->alt_name = kmemdup(name, NSLABEL_NAME_LEN, nsblk->alt_name = kmemdup(name, NSLABEL_NAME_LEN,
GFP_KERNEL); GFP_KERNEL);
if (!nsblk->alt_name)
goto blk_err;
}
res = nsblk_add_resource(nd_region, ndd, nsblk, res = nsblk_add_resource(nd_region, ndd, nsblk,
__le64_to_cpu(nd_label->dpa)); __le64_to_cpu(nd_label->dpa));
if (!res) if (!res)

View File

@ -113,13 +113,13 @@ static void write_pmem(void *pmem_addr, struct page *page,
while (len) { while (len) {
mem = kmap_atomic(page); mem = kmap_atomic(page);
chunk = min_t(unsigned int, len, PAGE_SIZE); chunk = min_t(unsigned int, len, PAGE_SIZE - off);
memcpy_flushcache(pmem_addr, mem + off, chunk); memcpy_flushcache(pmem_addr, mem + off, chunk);
kunmap_atomic(mem); kunmap_atomic(mem);
len -= chunk; len -= chunk;
off = 0; off = 0;
page++; page++;
pmem_addr += PAGE_SIZE; pmem_addr += chunk;
} }
} }
@ -132,7 +132,7 @@ static blk_status_t read_pmem(struct page *page, unsigned int off,
while (len) { while (len) {
mem = kmap_atomic(page); mem = kmap_atomic(page);
chunk = min_t(unsigned int, len, PAGE_SIZE); chunk = min_t(unsigned int, len, PAGE_SIZE - off);
rem = memcpy_mcsafe(mem + off, pmem_addr, chunk); rem = memcpy_mcsafe(mem + off, pmem_addr, chunk);
kunmap_atomic(mem); kunmap_atomic(mem);
if (rem) if (rem)
@ -140,7 +140,7 @@ static blk_status_t read_pmem(struct page *page, unsigned int off,
len -= chunk; len -= chunk;
off = 0; off = 0;
page++; page++;
pmem_addr += PAGE_SIZE; pmem_addr += chunk;
} }
return BLK_STS_OK; return BLK_STS_OK;
} }

View File

@ -22,6 +22,8 @@ static bool key_revalidate = true;
module_param(key_revalidate, bool, 0444); module_param(key_revalidate, bool, 0444);
MODULE_PARM_DESC(key_revalidate, "Require key validation at init."); MODULE_PARM_DESC(key_revalidate, "Require key validation at init.");
static const char zero_key[NVDIMM_PASSPHRASE_LEN];
static void *key_data(struct key *key) static void *key_data(struct key *key)
{ {
struct encrypted_key_payload *epayload = dereference_key_locked(key); struct encrypted_key_payload *epayload = dereference_key_locked(key);
@ -286,8 +288,9 @@ int nvdimm_security_erase(struct nvdimm *nvdimm, unsigned int keyid,
{ {
struct device *dev = &nvdimm->dev; struct device *dev = &nvdimm->dev;
struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(dev); struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(dev);
struct key *key; struct key *key = NULL;
int rc; int rc;
const void *data;
/* The bus lock should be held at the top level of the call stack */ /* The bus lock should be held at the top level of the call stack */
lockdep_assert_held(&nvdimm_bus->reconfig_mutex); lockdep_assert_held(&nvdimm_bus->reconfig_mutex);
@ -319,11 +322,15 @@ int nvdimm_security_erase(struct nvdimm *nvdimm, unsigned int keyid,
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
if (keyid != 0) {
key = nvdimm_lookup_user_key(nvdimm, keyid, NVDIMM_BASE_KEY); key = nvdimm_lookup_user_key(nvdimm, keyid, NVDIMM_BASE_KEY);
if (!key) if (!key)
return -ENOKEY; return -ENOKEY;
data = key_data(key);
} else
data = zero_key;
rc = nvdimm->sec.ops->erase(nvdimm, key_data(key), pass_type); rc = nvdimm->sec.ops->erase(nvdimm, data, pass_type);
dev_dbg(dev, "key: %d erase%s: %s\n", key_serial(key), dev_dbg(dev, "key: %d erase%s: %s\n", key_serial(key),
pass_type == NVDIMM_MASTER ? "(master)" : "(user)", pass_type == NVDIMM_MASTER ? "(master)" : "(user)",
rc == 0 ? "success" : "fail"); rc == 0 ? "success" : "fail");

View File

@ -7,7 +7,6 @@
*/ */
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/nvmem-consumer.h>
#include <linux/of_net.h> #include <linux/of_net.h>
#include <linux/phy.h> #include <linux/phy.h>
#include <linux/export.h> #include <linux/export.h>

View File

@ -1491,6 +1491,21 @@ static void hv_pci_assign_slots(struct hv_pcibus_device *hbus)
} }
} }
/*
* Remove entries in sysfs pci slot directory.
*/
static void hv_pci_remove_slots(struct hv_pcibus_device *hbus)
{
struct hv_pci_dev *hpdev;
list_for_each_entry(hpdev, &hbus->children, list_entry) {
if (!hpdev->pci_slot)
continue;
pci_destroy_slot(hpdev->pci_slot);
hpdev->pci_slot = NULL;
}
}
/** /**
* create_root_hv_pci_bus() - Expose a new root PCI bus * create_root_hv_pci_bus() - Expose a new root PCI bus
* @hbus: Root PCI bus, as understood by this driver * @hbus: Root PCI bus, as understood by this driver
@ -1766,6 +1781,10 @@ static void pci_devices_present_work(struct work_struct *work)
hpdev = list_first_entry(&removed, struct hv_pci_dev, hpdev = list_first_entry(&removed, struct hv_pci_dev,
list_entry); list_entry);
list_del(&hpdev->list_entry); list_del(&hpdev->list_entry);
if (hpdev->pci_slot)
pci_destroy_slot(hpdev->pci_slot);
put_pcichild(hpdev); put_pcichild(hpdev);
} }
@ -1905,6 +1924,9 @@ static void hv_eject_device_work(struct work_struct *work)
sizeof(*ejct_pkt), (unsigned long)&ctxt.pkt, sizeof(*ejct_pkt), (unsigned long)&ctxt.pkt,
VM_PKT_DATA_INBAND, 0); VM_PKT_DATA_INBAND, 0);
/* For the get_pcichild() in hv_pci_eject_device() */
put_pcichild(hpdev);
/* For the two refs got in new_pcichild_device() */
put_pcichild(hpdev); put_pcichild(hpdev);
put_pcichild(hpdev); put_pcichild(hpdev);
put_hvpcibus(hpdev->hbus); put_hvpcibus(hpdev->hbus);
@ -2682,6 +2704,7 @@ static int hv_pci_remove(struct hv_device *hdev)
pci_lock_rescan_remove(); pci_lock_rescan_remove();
pci_stop_root_bus(hbus->pci_bus); pci_stop_root_bus(hbus->pci_bus);
pci_remove_root_bus(hbus->pci_bus); pci_remove_root_bus(hbus->pci_bus);
hv_pci_remove_slots(hbus);
pci_unlock_rescan_remove(); pci_unlock_rescan_remove();
hbus->state = hv_pcibus_removed; hbus->state = hv_pcibus_removed;
} }

View File

@ -531,7 +531,7 @@ static void dell_rfkill_query(struct rfkill *rfkill, void *data)
return; return;
} }
dell_fill_request(&buffer, 0, 0x2, 0, 0); dell_fill_request(&buffer, 0x2, 0, 0, 0);
ret = dell_send_request(&buffer, CLASS_INFO, SELECT_RFKILL); ret = dell_send_request(&buffer, CLASS_INFO, SELECT_RFKILL);
hwswitch = buffer.output[1]; hwswitch = buffer.output[1];
@ -562,7 +562,7 @@ static int dell_debugfs_show(struct seq_file *s, void *data)
return ret; return ret;
status = buffer.output[1]; status = buffer.output[1];
dell_fill_request(&buffer, 0, 0x2, 0, 0); dell_fill_request(&buffer, 0x2, 0, 0, 0);
hwswitch_ret = dell_send_request(&buffer, CLASS_INFO, SELECT_RFKILL); hwswitch_ret = dell_send_request(&buffer, CLASS_INFO, SELECT_RFKILL);
if (hwswitch_ret) if (hwswitch_ret)
return hwswitch_ret; return hwswitch_ret;
@ -647,7 +647,7 @@ static void dell_update_rfkill(struct work_struct *ignored)
if (ret != 0) if (ret != 0)
return; return;
dell_fill_request(&buffer, 0, 0x2, 0, 0); dell_fill_request(&buffer, 0x2, 0, 0, 0);
ret = dell_send_request(&buffer, CLASS_INFO, SELECT_RFKILL); ret = dell_send_request(&buffer, CLASS_INFO, SELECT_RFKILL);
if (ret == 0 && (status & BIT(0))) if (ret == 0 && (status & BIT(0)))

View File

@ -4424,14 +4424,16 @@ sony_pic_read_possible_resource(struct acpi_resource *resource, void *context)
} }
return AE_OK; return AE_OK;
} }
default:
dprintk("Resource %d isn't an IRQ nor an IO port\n",
resource->type);
case ACPI_RESOURCE_TYPE_END_TAG: case ACPI_RESOURCE_TYPE_END_TAG:
return AE_OK; return AE_OK;
}
default:
dprintk("Resource %d isn't an IRQ nor an IO port\n",
resource->type);
return AE_CTRL_TERMINATE; return AE_CTRL_TERMINATE;
}
} }
static int sony_pic_possible_resources(struct acpi_device *device) static int sony_pic_possible_resources(struct acpi_device *device)

View File

@ -79,7 +79,7 @@
#include <linux/jiffies.h> #include <linux/jiffies.h>
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <linux/acpi.h> #include <linux/acpi.h>
#include <linux/pci_ids.h> #include <linux/pci.h>
#include <linux/power_supply.h> #include <linux/power_supply.h>
#include <sound/core.h> #include <sound/core.h>
#include <sound/control.h> #include <sound/control.h>
@ -4501,6 +4501,74 @@ static void bluetooth_exit(void)
bluetooth_shutdown(); bluetooth_shutdown();
} }
static const struct dmi_system_id bt_fwbug_list[] __initconst = {
{
.ident = "ThinkPad E485",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_BOARD_NAME, "20KU"),
},
},
{
.ident = "ThinkPad E585",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_BOARD_NAME, "20KV"),
},
},
{
.ident = "ThinkPad A285 - 20MW",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_BOARD_NAME, "20MW"),
},
},
{
.ident = "ThinkPad A285 - 20MX",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_BOARD_NAME, "20MX"),
},
},
{
.ident = "ThinkPad A485 - 20MU",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_BOARD_NAME, "20MU"),
},
},
{
.ident = "ThinkPad A485 - 20MV",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_BOARD_NAME, "20MV"),
},
},
{}
};
static const struct pci_device_id fwbug_cards_ids[] __initconst = {
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24F3) },
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x24FD) },
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x2526) },
{}
};
static int __init have_bt_fwbug(void)
{
/*
* Some AMD based ThinkPads have a firmware bug that calling
* "GBDC" will cause bluetooth on Intel wireless cards blocked
*/
if (dmi_check_system(bt_fwbug_list) && pci_dev_present(fwbug_cards_ids)) {
vdbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_RFKILL,
FW_BUG "disable bluetooth subdriver for Intel cards\n");
return 1;
} else
return 0;
}
static int __init bluetooth_init(struct ibm_init_struct *iibm) static int __init bluetooth_init(struct ibm_init_struct *iibm)
{ {
int res; int res;
@ -4513,7 +4581,7 @@ static int __init bluetooth_init(struct ibm_init_struct *iibm)
/* bluetooth not supported on 570, 600e/x, 770e, 770x, A21e, A2xm/p, /* bluetooth not supported on 570, 600e/x, 770e, 770x, A21e, A2xm/p,
G4x, R30, R31, R40e, R50e, T20-22, X20-21 */ G4x, R30, R31, R40e, R50e, T20-22, X20-21 */
tp_features.bluetooth = hkey_handle && tp_features.bluetooth = !have_bt_fwbug() && hkey_handle &&
acpi_evalf(hkey_handle, &status, "GBDC", "qd"); acpi_evalf(hkey_handle, &status, "GBDC", "qd");
vdbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_RFKILL, vdbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_RFKILL,

View File

@ -2004,14 +2004,14 @@ static int dasd_eckd_end_analysis(struct dasd_block *block)
blk_per_trk = recs_per_track(&private->rdc_data, 0, block->bp_block); blk_per_trk = recs_per_track(&private->rdc_data, 0, block->bp_block);
raw: raw:
block->blocks = (private->real_cyl * block->blocks = ((unsigned long) private->real_cyl *
private->rdc_data.trk_per_cyl * private->rdc_data.trk_per_cyl *
blk_per_trk); blk_per_trk);
dev_info(&device->cdev->dev, dev_info(&device->cdev->dev,
"DASD with %d KB/block, %d KB total size, %d KB/track, " "DASD with %u KB/block, %lu KB total size, %u KB/track, "
"%s\n", (block->bp_block >> 10), "%s\n", (block->bp_block >> 10),
((private->real_cyl * (((unsigned long) private->real_cyl *
private->rdc_data.trk_per_cyl * private->rdc_data.trk_per_cyl *
blk_per_trk * (block->bp_block >> 9)) >> 1), blk_per_trk * (block->bp_block >> 9)) >> 1),
((blk_per_trk * block->bp_block) >> 10), ((blk_per_trk * block->bp_block) >> 10),

View File

@ -629,7 +629,7 @@ con3270_init(void)
(void (*)(unsigned long)) con3270_read_tasklet, (void (*)(unsigned long)) con3270_read_tasklet,
(unsigned long) condev->read); (unsigned long) condev->read);
raw3270_add_view(&condev->view, &con3270_fn, 1); raw3270_add_view(&condev->view, &con3270_fn, 1, RAW3270_VIEW_LOCK_IRQ);
INIT_LIST_HEAD(&condev->freemem); INIT_LIST_HEAD(&condev->freemem);
for (i = 0; i < CON3270_STRING_PAGES; i++) { for (i = 0; i < CON3270_STRING_PAGES; i++) {

View File

@ -463,7 +463,8 @@ fs3270_open(struct inode *inode, struct file *filp)
init_waitqueue_head(&fp->wait); init_waitqueue_head(&fp->wait);
fp->fs_pid = get_pid(task_pid(current)); fp->fs_pid = get_pid(task_pid(current));
rc = raw3270_add_view(&fp->view, &fs3270_fn, minor); rc = raw3270_add_view(&fp->view, &fs3270_fn, minor,
RAW3270_VIEW_LOCK_BH);
if (rc) { if (rc) {
fs3270_free_view(&fp->view); fs3270_free_view(&fp->view);
goto out; goto out;

View File

@ -920,7 +920,7 @@ raw3270_deactivate_view(struct raw3270_view *view)
* Add view to device with minor "minor". * Add view to device with minor "minor".
*/ */
int int
raw3270_add_view(struct raw3270_view *view, struct raw3270_fn *fn, int minor) raw3270_add_view(struct raw3270_view *view, struct raw3270_fn *fn, int minor, int subclass)
{ {
unsigned long flags; unsigned long flags;
struct raw3270 *rp; struct raw3270 *rp;
@ -942,6 +942,7 @@ raw3270_add_view(struct raw3270_view *view, struct raw3270_fn *fn, int minor)
view->cols = rp->cols; view->cols = rp->cols;
view->ascebc = rp->ascebc; view->ascebc = rp->ascebc;
spin_lock_init(&view->lock); spin_lock_init(&view->lock);
lockdep_set_subclass(&view->lock, subclass);
list_add(&view->list, &rp->view_list); list_add(&view->list, &rp->view_list);
rc = 0; rc = 0;
spin_unlock_irqrestore(get_ccwdev_lock(rp->cdev), flags); spin_unlock_irqrestore(get_ccwdev_lock(rp->cdev), flags);

View File

@ -150,6 +150,8 @@ struct raw3270_fn {
struct raw3270_view { struct raw3270_view {
struct list_head list; struct list_head list;
spinlock_t lock; spinlock_t lock;
#define RAW3270_VIEW_LOCK_IRQ 0
#define RAW3270_VIEW_LOCK_BH 1
atomic_t ref_count; atomic_t ref_count;
struct raw3270 *dev; struct raw3270 *dev;
struct raw3270_fn *fn; struct raw3270_fn *fn;
@ -158,7 +160,7 @@ struct raw3270_view {
unsigned char *ascebc; /* ascii -> ebcdic table */ unsigned char *ascebc; /* ascii -> ebcdic table */
}; };
int raw3270_add_view(struct raw3270_view *, struct raw3270_fn *, int); int raw3270_add_view(struct raw3270_view *, struct raw3270_fn *, int, int);
int raw3270_activate_view(struct raw3270_view *); int raw3270_activate_view(struct raw3270_view *);
void raw3270_del_view(struct raw3270_view *); void raw3270_del_view(struct raw3270_view *);
void raw3270_deactivate_view(struct raw3270_view *); void raw3270_deactivate_view(struct raw3270_view *);

View File

@ -980,7 +980,8 @@ static int tty3270_install(struct tty_driver *driver, struct tty_struct *tty)
return PTR_ERR(tp); return PTR_ERR(tp);
rc = raw3270_add_view(&tp->view, &tty3270_fn, rc = raw3270_add_view(&tp->view, &tty3270_fn,
tty->index + RAW3270_FIRSTMINOR); tty->index + RAW3270_FIRSTMINOR,
RAW3270_VIEW_LOCK_BH);
if (rc) { if (rc) {
tty3270_free_view(tp); tty3270_free_view(tp);
return rc; return rc;

View File

@ -51,7 +51,8 @@ static debug_info_t *debug_info;
static void __init pkey_debug_init(void) static void __init pkey_debug_init(void)
{ {
debug_info = debug_register("pkey", 1, 1, 4 * sizeof(long)); /* 5 arguments per dbf entry (including the format string ptr) */
debug_info = debug_register("pkey", 1, 1, 5 * sizeof(long));
debug_register_view(debug_info, &debug_sprintf_view); debug_register_view(debug_info, &debug_sprintf_view);
debug_set_level(debug_info, 3); debug_set_level(debug_info, 3);
} }

View File

@ -1595,6 +1595,7 @@ static int ctcm_new_device(struct ccwgroup_device *cgdev)
if (priv->channel[direction] == NULL) { if (priv->channel[direction] == NULL) {
if (direction == CTCM_WRITE) if (direction == CTCM_WRITE)
channel_free(priv->channel[CTCM_READ]); channel_free(priv->channel[CTCM_READ]);
result = -ENODEV;
goto out_dev; goto out_dev;
} }
priv->channel[direction]->netdev = dev; priv->channel[direction]->netdev = dev;

View File

@ -91,6 +91,7 @@ aic7770_probe(struct device *dev)
ahc = ahc_alloc(&aic7xxx_driver_template, name); ahc = ahc_alloc(&aic7xxx_driver_template, name);
if (ahc == NULL) if (ahc == NULL)
return (ENOMEM); return (ENOMEM);
ahc->dev = dev;
error = aic7770_config(ahc, aic7770_ident_table + edev->id.driver_data, error = aic7770_config(ahc, aic7770_ident_table + edev->id.driver_data,
eisaBase); eisaBase);
if (error != 0) { if (error != 0) {

View File

@ -943,6 +943,7 @@ struct ahc_softc {
* Platform specific device information. * Platform specific device information.
*/ */
ahc_dev_softc_t dev_softc; ahc_dev_softc_t dev_softc;
struct device *dev;
/* /*
* Bus specific device information. * Bus specific device information.

View File

@ -860,8 +860,8 @@ int
ahc_dmamem_alloc(struct ahc_softc *ahc, bus_dma_tag_t dmat, void** vaddr, ahc_dmamem_alloc(struct ahc_softc *ahc, bus_dma_tag_t dmat, void** vaddr,
int flags, bus_dmamap_t *mapp) int flags, bus_dmamap_t *mapp)
{ {
*vaddr = pci_alloc_consistent(ahc->dev_softc, /* XXX: check if we really need the GFP_ATOMIC and unwind this mess! */
dmat->maxsize, mapp); *vaddr = dma_alloc_coherent(ahc->dev, dmat->maxsize, mapp, GFP_ATOMIC);
if (*vaddr == NULL) if (*vaddr == NULL)
return ENOMEM; return ENOMEM;
return 0; return 0;
@ -871,8 +871,7 @@ void
ahc_dmamem_free(struct ahc_softc *ahc, bus_dma_tag_t dmat, ahc_dmamem_free(struct ahc_softc *ahc, bus_dma_tag_t dmat,
void* vaddr, bus_dmamap_t map) void* vaddr, bus_dmamap_t map)
{ {
pci_free_consistent(ahc->dev_softc, dmat->maxsize, dma_free_coherent(ahc->dev, dmat->maxsize, vaddr, map);
vaddr, map);
} }
int int
@ -1123,8 +1122,7 @@ ahc_linux_register_host(struct ahc_softc *ahc, struct scsi_host_template *templa
host->transportt = ahc_linux_transport_template; host->transportt = ahc_linux_transport_template;
retval = scsi_add_host(host, retval = scsi_add_host(host, ahc->dev);
(ahc->dev_softc ? &ahc->dev_softc->dev : NULL));
if (retval) { if (retval) {
printk(KERN_WARNING "aic7xxx: scsi_add_host failed\n"); printk(KERN_WARNING "aic7xxx: scsi_add_host failed\n");
scsi_host_put(host); scsi_host_put(host);

View File

@ -250,6 +250,7 @@ ahc_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
} }
} }
ahc->dev_softc = pci; ahc->dev_softc = pci;
ahc->dev = &pci->dev;
error = ahc_pci_config(ahc, entry); error = ahc_pci_config(ahc, entry);
if (error != 0) { if (error != 0) {
ahc_free(ahc); ahc_free(ahc);

View File

@ -376,6 +376,7 @@ void usb_serial_generic_read_bulk_callback(struct urb *urb)
struct usb_serial_port *port = urb->context; struct usb_serial_port *port = urb->context;
unsigned char *data = urb->transfer_buffer; unsigned char *data = urb->transfer_buffer;
unsigned long flags; unsigned long flags;
bool stopped = false;
int status = urb->status; int status = urb->status;
int i; int i;
@ -383,33 +384,51 @@ void usb_serial_generic_read_bulk_callback(struct urb *urb)
if (urb == port->read_urbs[i]) if (urb == port->read_urbs[i])
break; break;
} }
set_bit(i, &port->read_urbs_free);
dev_dbg(&port->dev, "%s - urb %d, len %d\n", __func__, i, dev_dbg(&port->dev, "%s - urb %d, len %d\n", __func__, i,
urb->actual_length); urb->actual_length);
switch (status) { switch (status) {
case 0: case 0:
usb_serial_debug_data(&port->dev, __func__, urb->actual_length,
data);
port->serial->type->process_read_urb(urb);
break; break;
case -ENOENT: case -ENOENT:
case -ECONNRESET: case -ECONNRESET:
case -ESHUTDOWN: case -ESHUTDOWN:
dev_dbg(&port->dev, "%s - urb stopped: %d\n", dev_dbg(&port->dev, "%s - urb stopped: %d\n",
__func__, status); __func__, status);
return; stopped = true;
break;
case -EPIPE: case -EPIPE:
dev_err(&port->dev, "%s - urb stopped: %d\n", dev_err(&port->dev, "%s - urb stopped: %d\n",
__func__, status); __func__, status);
return; stopped = true;
break;
default: default:
dev_dbg(&port->dev, "%s - nonzero urb status: %d\n", dev_dbg(&port->dev, "%s - nonzero urb status: %d\n",
__func__, status); __func__, status);
goto resubmit; break;
} }
usb_serial_debug_data(&port->dev, __func__, urb->actual_length, data); /*
port->serial->type->process_read_urb(urb); * Make sure URB processing is done before marking as free to avoid
* racing with unthrottle() on another CPU. Matches the barriers
* implied by the test_and_clear_bit() in
* usb_serial_generic_submit_read_urb().
*/
smp_mb__before_atomic();
set_bit(i, &port->read_urbs_free);
/*
* Make sure URB is marked as free before checking the throttled flag
* to avoid racing with unthrottle() on another CPU. Matches the
* smp_mb() in unthrottle().
*/
smp_mb__after_atomic();
if (stopped)
return;
resubmit:
/* Throttle the device if requested by tty */ /* Throttle the device if requested by tty */
spin_lock_irqsave(&port->lock, flags); spin_lock_irqsave(&port->lock, flags);
port->throttled = port->throttle_req; port->throttled = port->throttle_req;
@ -484,6 +503,12 @@ void usb_serial_generic_unthrottle(struct tty_struct *tty)
port->throttled = port->throttle_req = 0; port->throttled = port->throttle_req = 0;
spin_unlock_irq(&port->lock); spin_unlock_irq(&port->lock);
/*
* Matches the smp_mb__after_atomic() in
* usb_serial_generic_read_bulk_callback().
*/
smp_mb();
if (was_throttled) if (was_throttled)
usb_serial_generic_submit_read_urbs(port, GFP_KERNEL); usb_serial_generic_submit_read_urbs(port, GFP_KERNEL);
} }

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