updating to mainline 4.14.6
This commit is contained in:
parent
9c65155657
commit
d27d5d201f
2
config
2
config
|
@ -1,6 +1,6 @@
|
||||||
#
|
#
|
||||||
# Automatically generated file; DO NOT EDIT.
|
# Automatically generated file; DO NOT EDIT.
|
||||||
# Linux/x86_64 4.14.5-jakeday Kernel Configuration
|
# Linux/x86_64 4.14.6-jakeday Kernel Configuration
|
||||||
#
|
#
|
||||||
CONFIG_64BIT=y
|
CONFIG_64BIT=y
|
||||||
CONFIG_X86_64=y
|
CONFIG_X86_64=y
|
||||||
|
|
|
@ -11,7 +11,7 @@ Required properties:
|
||||||
be used, but a device adhering to this binding may leave out all except
|
be used, but a device adhering to this binding may leave out all except
|
||||||
for usbVID,PID.
|
for usbVID,PID.
|
||||||
- reg: the port number which this device is connecting to, the range
|
- reg: the port number which this device is connecting to, the range
|
||||||
is 1-31.
|
is 1-255.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 14
|
PATCHLEVEL = 14
|
||||||
SUBLEVEL = 5
|
SUBLEVEL = 6
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = Petit Gorille
|
NAME = Petit Gorille
|
||||||
|
|
||||||
|
|
|
@ -433,15 +433,6 @@
|
||||||
clock-names = "ipg", "per";
|
clock-names = "ipg", "per";
|
||||||
};
|
};
|
||||||
|
|
||||||
srtc: srtc@53fa4000 {
|
|
||||||
compatible = "fsl,imx53-rtc", "fsl,imx25-rtc";
|
|
||||||
reg = <0x53fa4000 0x4000>;
|
|
||||||
interrupts = <24>;
|
|
||||||
interrupt-parent = <&tzic>;
|
|
||||||
clocks = <&clks IMX5_CLK_SRTC_GATE>;
|
|
||||||
clock-names = "ipg";
|
|
||||||
};
|
|
||||||
|
|
||||||
iomuxc: iomuxc@53fa8000 {
|
iomuxc: iomuxc@53fa8000 {
|
||||||
compatible = "fsl,imx53-iomuxc";
|
compatible = "fsl,imx53-iomuxc";
|
||||||
reg = <0x53fa8000 0x4000>;
|
reg = <0x53fa8000 0x4000>;
|
||||||
|
|
|
@ -518,4 +518,22 @@ THUMB( orr \reg , \reg , #PSR_T_BIT )
|
||||||
#endif
|
#endif
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
.macro bug, msg, line
|
||||||
|
#ifdef CONFIG_THUMB2_KERNEL
|
||||||
|
1: .inst 0xde02
|
||||||
|
#else
|
||||||
|
1: .inst 0xe7f001f2
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_DEBUG_BUGVERBOSE
|
||||||
|
.pushsection .rodata.str, "aMS", %progbits, 1
|
||||||
|
2: .asciz "\msg"
|
||||||
|
.popsection
|
||||||
|
.pushsection __bug_table, "aw"
|
||||||
|
.align 2
|
||||||
|
.word 1b, 2b
|
||||||
|
.hword \line
|
||||||
|
.popsection
|
||||||
|
#endif
|
||||||
|
.endm
|
||||||
|
|
||||||
#endif /* __ASM_ASSEMBLER_H__ */
|
#endif /* __ASM_ASSEMBLER_H__ */
|
||||||
|
|
|
@ -161,8 +161,7 @@
|
||||||
#else
|
#else
|
||||||
#define VTTBR_X (5 - KVM_T0SZ)
|
#define VTTBR_X (5 - KVM_T0SZ)
|
||||||
#endif
|
#endif
|
||||||
#define VTTBR_BADDR_SHIFT (VTTBR_X - 1)
|
#define VTTBR_BADDR_MASK (((_AC(1, ULL) << (40 - VTTBR_X)) - 1) << VTTBR_X)
|
||||||
#define VTTBR_BADDR_MASK (((_AC(1, ULL) << (40 - VTTBR_X)) - 1) << VTTBR_BADDR_SHIFT)
|
|
||||||
#define VTTBR_VMID_SHIFT _AC(48, ULL)
|
#define VTTBR_VMID_SHIFT _AC(48, ULL)
|
||||||
#define VTTBR_VMID_MASK(size) (_AT(u64, (1 << size) - 1) << VTTBR_VMID_SHIFT)
|
#define VTTBR_VMID_MASK(size) (_AT(u64, (1 << size) - 1) << VTTBR_VMID_SHIFT)
|
||||||
|
|
||||||
|
|
|
@ -300,6 +300,8 @@
|
||||||
mov r2, sp
|
mov r2, sp
|
||||||
ldr r1, [r2, #\offset + S_PSR] @ get calling cpsr
|
ldr r1, [r2, #\offset + S_PSR] @ get calling cpsr
|
||||||
ldr lr, [r2, #\offset + S_PC]! @ get pc
|
ldr lr, [r2, #\offset + S_PC]! @ get pc
|
||||||
|
tst r1, #PSR_I_BIT | 0x0f
|
||||||
|
bne 1f
|
||||||
msr spsr_cxsf, r1 @ save in spsr_svc
|
msr spsr_cxsf, r1 @ save in spsr_svc
|
||||||
#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_32v6K)
|
#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_32v6K)
|
||||||
@ We must avoid clrex due to Cortex-A15 erratum #830321
|
@ We must avoid clrex due to Cortex-A15 erratum #830321
|
||||||
|
@ -314,6 +316,7 @@
|
||||||
@ after ldm {}^
|
@ after ldm {}^
|
||||||
add sp, sp, #\offset + PT_REGS_SIZE
|
add sp, sp, #\offset + PT_REGS_SIZE
|
||||||
movs pc, lr @ return & move spsr_svc into cpsr
|
movs pc, lr @ return & move spsr_svc into cpsr
|
||||||
|
1: bug "Returning to usermode but unexpected PSR bits set?", \@
|
||||||
#elif defined(CONFIG_CPU_V7M)
|
#elif defined(CONFIG_CPU_V7M)
|
||||||
@ V7M restore.
|
@ V7M restore.
|
||||||
@ Note that we don't need to do clrex here as clearing the local
|
@ Note that we don't need to do clrex here as clearing the local
|
||||||
|
@ -329,6 +332,8 @@
|
||||||
ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr
|
ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr
|
||||||
ldr lr, [sp, #\offset + S_PC] @ get pc
|
ldr lr, [sp, #\offset + S_PC] @ get pc
|
||||||
add sp, sp, #\offset + S_SP
|
add sp, sp, #\offset + S_SP
|
||||||
|
tst r1, #PSR_I_BIT | 0x0f
|
||||||
|
bne 1f
|
||||||
msr spsr_cxsf, r1 @ save in spsr_svc
|
msr spsr_cxsf, r1 @ save in spsr_svc
|
||||||
|
|
||||||
@ We must avoid clrex due to Cortex-A15 erratum #830321
|
@ We must avoid clrex due to Cortex-A15 erratum #830321
|
||||||
|
@ -341,6 +346,7 @@
|
||||||
.endif
|
.endif
|
||||||
add sp, sp, #PT_REGS_SIZE - S_SP
|
add sp, sp, #PT_REGS_SIZE - S_SP
|
||||||
movs pc, lr @ return & move spsr_svc into cpsr
|
movs pc, lr @ return & move spsr_svc into cpsr
|
||||||
|
1: bug "Returning to usermode but unexpected PSR bits set?", \@
|
||||||
#endif /* !CONFIG_THUMB2_KERNEL */
|
#endif /* !CONFIG_THUMB2_KERNEL */
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
|
|
@ -132,11 +132,9 @@ static inline void efi_set_pgd(struct mm_struct *mm)
|
||||||
* Defer the switch to the current thread's TTBR0_EL1
|
* Defer the switch to the current thread's TTBR0_EL1
|
||||||
* until uaccess_enable(). Restore the current
|
* until uaccess_enable(). Restore the current
|
||||||
* thread's saved ttbr0 corresponding to its active_mm
|
* thread's saved ttbr0 corresponding to its active_mm
|
||||||
* (if different from init_mm).
|
|
||||||
*/
|
*/
|
||||||
cpu_set_reserved_ttbr0();
|
cpu_set_reserved_ttbr0();
|
||||||
if (current->active_mm != &init_mm)
|
update_saved_ttbr0(current, current->active_mm);
|
||||||
update_saved_ttbr0(current, current->active_mm);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,8 +170,7 @@
|
||||||
#define VTCR_EL2_FLAGS (VTCR_EL2_COMMON_BITS | VTCR_EL2_TGRAN_FLAGS)
|
#define VTCR_EL2_FLAGS (VTCR_EL2_COMMON_BITS | VTCR_EL2_TGRAN_FLAGS)
|
||||||
#define VTTBR_X (VTTBR_X_TGRAN_MAGIC - VTCR_EL2_T0SZ_IPA)
|
#define VTTBR_X (VTTBR_X_TGRAN_MAGIC - VTCR_EL2_T0SZ_IPA)
|
||||||
|
|
||||||
#define VTTBR_BADDR_SHIFT (VTTBR_X - 1)
|
#define VTTBR_BADDR_MASK (((UL(1) << (PHYS_MASK_SHIFT - VTTBR_X)) - 1) << VTTBR_X)
|
||||||
#define VTTBR_BADDR_MASK (((UL(1) << (PHYS_MASK_SHIFT - VTTBR_X)) - 1) << VTTBR_BADDR_SHIFT)
|
|
||||||
#define VTTBR_VMID_SHIFT (UL(48))
|
#define VTTBR_VMID_SHIFT (UL(48))
|
||||||
#define VTTBR_VMID_MASK(size) (_AT(u64, (1 << size) - 1) << VTTBR_VMID_SHIFT)
|
#define VTTBR_VMID_MASK(size) (_AT(u64, (1 << size) - 1) << VTTBR_VMID_SHIFT)
|
||||||
|
|
||||||
|
|
|
@ -156,29 +156,21 @@ void check_and_switch_context(struct mm_struct *mm, unsigned int cpu);
|
||||||
|
|
||||||
#define init_new_context(tsk,mm) ({ atomic64_set(&(mm)->context.id, 0); 0; })
|
#define init_new_context(tsk,mm) ({ atomic64_set(&(mm)->context.id, 0); 0; })
|
||||||
|
|
||||||
/*
|
|
||||||
* This is called when "tsk" is about to enter lazy TLB mode.
|
|
||||||
*
|
|
||||||
* mm: describes the currently active mm context
|
|
||||||
* tsk: task which is entering lazy tlb
|
|
||||||
* cpu: cpu number which is entering lazy tlb
|
|
||||||
*
|
|
||||||
* tsk->mm will be NULL
|
|
||||||
*/
|
|
||||||
static inline void
|
|
||||||
enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_ARM64_SW_TTBR0_PAN
|
#ifdef CONFIG_ARM64_SW_TTBR0_PAN
|
||||||
static inline void update_saved_ttbr0(struct task_struct *tsk,
|
static inline void update_saved_ttbr0(struct task_struct *tsk,
|
||||||
struct mm_struct *mm)
|
struct mm_struct *mm)
|
||||||
{
|
{
|
||||||
if (system_uses_ttbr0_pan()) {
|
u64 ttbr;
|
||||||
BUG_ON(mm->pgd == swapper_pg_dir);
|
|
||||||
task_thread_info(tsk)->ttbr0 =
|
if (!system_uses_ttbr0_pan())
|
||||||
virt_to_phys(mm->pgd) | ASID(mm) << 48;
|
return;
|
||||||
}
|
|
||||||
|
if (mm == &init_mm)
|
||||||
|
ttbr = __pa_symbol(empty_zero_page);
|
||||||
|
else
|
||||||
|
ttbr = virt_to_phys(mm->pgd) | ASID(mm) << 48;
|
||||||
|
|
||||||
|
task_thread_info(tsk)->ttbr0 = ttbr;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static inline void update_saved_ttbr0(struct task_struct *tsk,
|
static inline void update_saved_ttbr0(struct task_struct *tsk,
|
||||||
|
@ -187,6 +179,16 @@ static inline void update_saved_ttbr0(struct task_struct *tsk,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* We don't actually care about the ttbr0 mapping, so point it at the
|
||||||
|
* zero page.
|
||||||
|
*/
|
||||||
|
update_saved_ttbr0(tsk, &init_mm);
|
||||||
|
}
|
||||||
|
|
||||||
static inline void __switch_mm(struct mm_struct *next)
|
static inline void __switch_mm(struct mm_struct *next)
|
||||||
{
|
{
|
||||||
unsigned int cpu = smp_processor_id();
|
unsigned int cpu = smp_processor_id();
|
||||||
|
@ -214,11 +216,9 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next,
|
||||||
* Update the saved TTBR0_EL1 of the scheduled-in task as the previous
|
* Update the saved TTBR0_EL1 of the scheduled-in task as the previous
|
||||||
* value may have not been initialised yet (activate_mm caller) or the
|
* value may have not been initialised yet (activate_mm caller) or the
|
||||||
* ASID has changed since the last run (following the context switch
|
* ASID has changed since the last run (following the context switch
|
||||||
* of another thread of the same process). Avoid setting the reserved
|
* of another thread of the same process).
|
||||||
* TTBR0_EL1 to swapper_pg_dir (init_mm; e.g. via idle_task_exit).
|
|
||||||
*/
|
*/
|
||||||
if (next != &init_mm)
|
update_saved_ttbr0(tsk, next);
|
||||||
update_saved_ttbr0(tsk, next);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define deactivate_mm(tsk,mm) do { } while (0)
|
#define deactivate_mm(tsk,mm) do { } while (0)
|
||||||
|
|
|
@ -258,6 +258,15 @@ int copy_thread(unsigned long clone_flags, unsigned long stack_start,
|
||||||
|
|
||||||
memset(&p->thread.cpu_context, 0, sizeof(struct cpu_context));
|
memset(&p->thread.cpu_context, 0, sizeof(struct cpu_context));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* In case p was allocated the same task_struct pointer as some
|
||||||
|
* other recently-exited task, make sure p is disassociated from
|
||||||
|
* any cpu that may have run that now-exited task recently.
|
||||||
|
* Otherwise we could erroneously skip reloading the FPSIMD
|
||||||
|
* registers for p.
|
||||||
|
*/
|
||||||
|
fpsimd_flush_task_state(p);
|
||||||
|
|
||||||
if (likely(!(p->flags & PF_KTHREAD))) {
|
if (likely(!(p->flags & PF_KTHREAD))) {
|
||||||
*childregs = *current_pt_regs();
|
*childregs = *current_pt_regs();
|
||||||
childregs->regs[0] = 0;
|
childregs->regs[0] = 0;
|
||||||
|
|
|
@ -76,6 +76,7 @@ struct machdep_calls {
|
||||||
|
|
||||||
void __noreturn (*restart)(char *cmd);
|
void __noreturn (*restart)(char *cmd);
|
||||||
void __noreturn (*halt)(void);
|
void __noreturn (*halt)(void);
|
||||||
|
void (*panic)(char *str);
|
||||||
void (*cpu_die)(void);
|
void (*cpu_die)(void);
|
||||||
|
|
||||||
long (*time_init)(void); /* Optional, may be NULL */
|
long (*time_init)(void); /* Optional, may be NULL */
|
||||||
|
|
|
@ -24,6 +24,7 @@ extern void reloc_got2(unsigned long);
|
||||||
|
|
||||||
void check_for_initrd(void);
|
void check_for_initrd(void);
|
||||||
void initmem_init(void);
|
void initmem_init(void);
|
||||||
|
void setup_panic(void);
|
||||||
#define ARCH_PANIC_TIMEOUT 180
|
#define ARCH_PANIC_TIMEOUT 180
|
||||||
|
|
||||||
#ifdef CONFIG_PPC_PSERIES
|
#ifdef CONFIG_PPC_PSERIES
|
||||||
|
|
|
@ -102,6 +102,7 @@ _GLOBAL(__setup_cpu_power9)
|
||||||
li r0,0
|
li r0,0
|
||||||
mtspr SPRN_PSSCR,r0
|
mtspr SPRN_PSSCR,r0
|
||||||
mtspr SPRN_LPID,r0
|
mtspr SPRN_LPID,r0
|
||||||
|
mtspr SPRN_PID,r0
|
||||||
mfspr r3,SPRN_LPCR
|
mfspr r3,SPRN_LPCR
|
||||||
LOAD_REG_IMMEDIATE(r4, LPCR_PECEDH | LPCR_PECE_HVEE | LPCR_HVICE | LPCR_HEIC)
|
LOAD_REG_IMMEDIATE(r4, LPCR_PECEDH | LPCR_PECE_HVEE | LPCR_HVICE | LPCR_HEIC)
|
||||||
or r3, r3, r4
|
or r3, r3, r4
|
||||||
|
@ -126,6 +127,7 @@ _GLOBAL(__restore_cpu_power9)
|
||||||
li r0,0
|
li r0,0
|
||||||
mtspr SPRN_PSSCR,r0
|
mtspr SPRN_PSSCR,r0
|
||||||
mtspr SPRN_LPID,r0
|
mtspr SPRN_LPID,r0
|
||||||
|
mtspr SPRN_PID,r0
|
||||||
mfspr r3,SPRN_LPCR
|
mfspr r3,SPRN_LPCR
|
||||||
LOAD_REG_IMMEDIATE(r4, LPCR_PECEDH | LPCR_PECE_HVEE | LPCR_HVICE | LPCR_HEIC)
|
LOAD_REG_IMMEDIATE(r4, LPCR_PECEDH | LPCR_PECE_HVEE | LPCR_HVICE | LPCR_HEIC)
|
||||||
or r3, r3, r4
|
or r3, r3, r4
|
||||||
|
|
|
@ -1453,25 +1453,6 @@ static void fadump_init_files(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int fadump_panic_event(struct notifier_block *this,
|
|
||||||
unsigned long event, void *ptr)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* If firmware-assisted dump has been registered then trigger
|
|
||||||
* firmware-assisted dump and let firmware handle everything
|
|
||||||
* else. If this returns, then fadump was not registered, so
|
|
||||||
* go through the rest of the panic path.
|
|
||||||
*/
|
|
||||||
crash_fadump(NULL, ptr);
|
|
||||||
|
|
||||||
return NOTIFY_DONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct notifier_block fadump_panic_block = {
|
|
||||||
.notifier_call = fadump_panic_event,
|
|
||||||
.priority = INT_MIN /* may not return; must be done last */
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Prepare for firmware-assisted dump.
|
* Prepare for firmware-assisted dump.
|
||||||
*/
|
*/
|
||||||
|
@ -1504,9 +1485,6 @@ int __init setup_fadump(void)
|
||||||
init_fadump_mem_struct(&fdm, fw_dump.reserve_dump_area_start);
|
init_fadump_mem_struct(&fdm, fw_dump.reserve_dump_area_start);
|
||||||
fadump_init_files();
|
fadump_init_files();
|
||||||
|
|
||||||
atomic_notifier_chain_register(&panic_notifier_list,
|
|
||||||
&fadump_panic_block);
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
subsys_initcall(setup_fadump);
|
subsys_initcall(setup_fadump);
|
||||||
|
|
|
@ -704,6 +704,30 @@ int check_legacy_ioport(unsigned long base_port)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(check_legacy_ioport);
|
EXPORT_SYMBOL(check_legacy_ioport);
|
||||||
|
|
||||||
|
static int ppc_panic_event(struct notifier_block *this,
|
||||||
|
unsigned long event, void *ptr)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* If firmware-assisted dump has been registered then trigger
|
||||||
|
* firmware-assisted dump and let firmware handle everything else.
|
||||||
|
*/
|
||||||
|
crash_fadump(NULL, ptr);
|
||||||
|
ppc_md.panic(ptr); /* May not return */
|
||||||
|
return NOTIFY_DONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct notifier_block ppc_panic_block = {
|
||||||
|
.notifier_call = ppc_panic_event,
|
||||||
|
.priority = INT_MIN /* may not return; must be done last */
|
||||||
|
};
|
||||||
|
|
||||||
|
void __init setup_panic(void)
|
||||||
|
{
|
||||||
|
if (!ppc_md.panic)
|
||||||
|
return;
|
||||||
|
atomic_notifier_chain_register(&panic_notifier_list, &ppc_panic_block);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_CHECK_CACHE_COHERENCY
|
#ifdef CONFIG_CHECK_CACHE_COHERENCY
|
||||||
/*
|
/*
|
||||||
* For platforms that have configurable cache-coherency. This function
|
* For platforms that have configurable cache-coherency. This function
|
||||||
|
@ -848,6 +872,9 @@ void __init setup_arch(char **cmdline_p)
|
||||||
/* Probe the machine type, establish ppc_md. */
|
/* Probe the machine type, establish ppc_md. */
|
||||||
probe_machine();
|
probe_machine();
|
||||||
|
|
||||||
|
/* Setup panic notifier if requested by the platform. */
|
||||||
|
setup_panic();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Configure ppc_md.power_save (ppc32 only, 64-bit machines do
|
* Configure ppc_md.power_save (ppc32 only, 64-bit machines do
|
||||||
* it from their respective probe() function.
|
* it from their respective probe() function.
|
||||||
|
|
|
@ -191,8 +191,10 @@ static int opal_imc_counters_probe(struct platform_device *pdev)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!imc_pmu_create(imc_dev, pmu_count, domain))
|
if (!imc_pmu_create(imc_dev, pmu_count, domain)) {
|
||||||
pmu_count++;
|
if (domain == IMC_DOMAIN_NEST)
|
||||||
|
pmu_count++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -104,6 +104,20 @@ static void __noreturn ps3_halt(void)
|
||||||
ps3_sys_manager_halt(); /* never returns */
|
ps3_sys_manager_halt(); /* never returns */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void ps3_panic(char *str)
|
||||||
|
{
|
||||||
|
DBG("%s:%d %s\n", __func__, __LINE__, str);
|
||||||
|
|
||||||
|
smp_send_stop();
|
||||||
|
printk("\n");
|
||||||
|
printk(" System does not reboot automatically.\n");
|
||||||
|
printk(" Please press POWER button.\n");
|
||||||
|
printk("\n");
|
||||||
|
|
||||||
|
while(1)
|
||||||
|
lv1_pause(1);
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE) || \
|
#if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE) || \
|
||||||
defined(CONFIG_PS3_FLASH) || defined(CONFIG_PS3_FLASH_MODULE)
|
defined(CONFIG_PS3_FLASH) || defined(CONFIG_PS3_FLASH_MODULE)
|
||||||
static void __init prealloc(struct ps3_prealloc *p)
|
static void __init prealloc(struct ps3_prealloc *p)
|
||||||
|
@ -255,6 +269,7 @@ define_machine(ps3) {
|
||||||
.probe = ps3_probe,
|
.probe = ps3_probe,
|
||||||
.setup_arch = ps3_setup_arch,
|
.setup_arch = ps3_setup_arch,
|
||||||
.init_IRQ = ps3_init_IRQ,
|
.init_IRQ = ps3_init_IRQ,
|
||||||
|
.panic = ps3_panic,
|
||||||
.get_boot_time = ps3_get_boot_time,
|
.get_boot_time = ps3_get_boot_time,
|
||||||
.set_dabr = ps3_set_dabr,
|
.set_dabr = ps3_set_dabr,
|
||||||
.calibrate_decr = ps3_calibrate_decr,
|
.calibrate_decr = ps3_calibrate_decr,
|
||||||
|
|
|
@ -726,6 +726,7 @@ define_machine(pseries) {
|
||||||
.pcibios_fixup = pSeries_final_fixup,
|
.pcibios_fixup = pSeries_final_fixup,
|
||||||
.restart = rtas_restart,
|
.restart = rtas_restart,
|
||||||
.halt = rtas_halt,
|
.halt = rtas_halt,
|
||||||
|
.panic = rtas_os_term,
|
||||||
.get_boot_time = rtas_get_boot_time,
|
.get_boot_time = rtas_get_boot_time,
|
||||||
.get_rtc_time = rtas_get_rtc_time,
|
.get_rtc_time = rtas_get_rtc_time,
|
||||||
.set_rtc_time = rtas_set_rtc_time,
|
.set_rtc_time = rtas_set_rtc_time,
|
||||||
|
|
|
@ -30,21 +30,20 @@ static inline void restore_access_regs(unsigned int *acrs)
|
||||||
asm volatile("lam 0,15,%0" : : "Q" (*(acrstype *)acrs));
|
asm volatile("lam 0,15,%0" : : "Q" (*(acrstype *)acrs));
|
||||||
}
|
}
|
||||||
|
|
||||||
#define switch_to(prev,next,last) do { \
|
#define switch_to(prev, next, last) do { \
|
||||||
if (prev->mm) { \
|
/* save_fpu_regs() sets the CIF_FPU flag, which enforces \
|
||||||
save_fpu_regs(); \
|
* a restore of the floating point / vector registers as \
|
||||||
save_access_regs(&prev->thread.acrs[0]); \
|
* soon as the next task returns to user space \
|
||||||
save_ri_cb(prev->thread.ri_cb); \
|
*/ \
|
||||||
save_gs_cb(prev->thread.gs_cb); \
|
save_fpu_regs(); \
|
||||||
} \
|
save_access_regs(&prev->thread.acrs[0]); \
|
||||||
|
save_ri_cb(prev->thread.ri_cb); \
|
||||||
|
save_gs_cb(prev->thread.gs_cb); \
|
||||||
update_cr_regs(next); \
|
update_cr_regs(next); \
|
||||||
if (next->mm) { \
|
restore_access_regs(&next->thread.acrs[0]); \
|
||||||
set_cpu_flag(CIF_FPU); \
|
restore_ri_cb(next->thread.ri_cb, prev->thread.ri_cb); \
|
||||||
restore_access_regs(&next->thread.acrs[0]); \
|
restore_gs_cb(next->thread.gs_cb); \
|
||||||
restore_ri_cb(next->thread.ri_cb, prev->thread.ri_cb); \
|
prev = __switch_to(prev, next); \
|
||||||
restore_gs_cb(next->thread.gs_cb); \
|
|
||||||
} \
|
|
||||||
prev = __switch_to(prev,next); \
|
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#endif /* __ASM_SWITCH_TO_H */
|
#endif /* __ASM_SWITCH_TO_H */
|
||||||
|
|
|
@ -370,10 +370,10 @@ SYSCALL(sys_recvmmsg,compat_sys_recvmmsg)
|
||||||
SYSCALL(sys_sendmmsg,compat_sys_sendmmsg)
|
SYSCALL(sys_sendmmsg,compat_sys_sendmmsg)
|
||||||
SYSCALL(sys_socket,sys_socket)
|
SYSCALL(sys_socket,sys_socket)
|
||||||
SYSCALL(sys_socketpair,compat_sys_socketpair) /* 360 */
|
SYSCALL(sys_socketpair,compat_sys_socketpair) /* 360 */
|
||||||
SYSCALL(sys_bind,sys_bind)
|
SYSCALL(sys_bind,compat_sys_bind)
|
||||||
SYSCALL(sys_connect,sys_connect)
|
SYSCALL(sys_connect,compat_sys_connect)
|
||||||
SYSCALL(sys_listen,sys_listen)
|
SYSCALL(sys_listen,sys_listen)
|
||||||
SYSCALL(sys_accept4,sys_accept4)
|
SYSCALL(sys_accept4,compat_sys_accept4)
|
||||||
SYSCALL(sys_getsockopt,compat_sys_getsockopt) /* 365 */
|
SYSCALL(sys_getsockopt,compat_sys_getsockopt) /* 365 */
|
||||||
SYSCALL(sys_setsockopt,compat_sys_setsockopt)
|
SYSCALL(sys_setsockopt,compat_sys_setsockopt)
|
||||||
SYSCALL(sys_getsockname,compat_sys_getsockname)
|
SYSCALL(sys_getsockname,compat_sys_getsockname)
|
||||||
|
|
|
@ -235,8 +235,6 @@ static int try_handle_skey(struct kvm_vcpu *vcpu)
|
||||||
VCPU_EVENT(vcpu, 4, "%s", "retrying storage key operation");
|
VCPU_EVENT(vcpu, 4, "%s", "retrying storage key operation");
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
}
|
}
|
||||||
if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
|
|
||||||
return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,6 +245,9 @@ static int handle_iske(struct kvm_vcpu *vcpu)
|
||||||
int reg1, reg2;
|
int reg1, reg2;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
|
||||||
|
return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
|
||||||
|
|
||||||
rc = try_handle_skey(vcpu);
|
rc = try_handle_skey(vcpu);
|
||||||
if (rc)
|
if (rc)
|
||||||
return rc != -EAGAIN ? rc : 0;
|
return rc != -EAGAIN ? rc : 0;
|
||||||
|
@ -276,6 +277,9 @@ static int handle_rrbe(struct kvm_vcpu *vcpu)
|
||||||
int reg1, reg2;
|
int reg1, reg2;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
|
||||||
|
return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
|
||||||
|
|
||||||
rc = try_handle_skey(vcpu);
|
rc = try_handle_skey(vcpu);
|
||||||
if (rc)
|
if (rc)
|
||||||
return rc != -EAGAIN ? rc : 0;
|
return rc != -EAGAIN ? rc : 0;
|
||||||
|
@ -311,6 +315,9 @@ static int handle_sske(struct kvm_vcpu *vcpu)
|
||||||
int reg1, reg2;
|
int reg1, reg2;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
|
||||||
|
return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
|
||||||
|
|
||||||
rc = try_handle_skey(vcpu);
|
rc = try_handle_skey(vcpu);
|
||||||
if (rc)
|
if (rc)
|
||||||
return rc != -EAGAIN ? rc : 0;
|
return rc != -EAGAIN ? rc : 0;
|
||||||
|
|
|
@ -85,8 +85,6 @@ int crst_table_upgrade(struct mm_struct *mm, unsigned long end)
|
||||||
|
|
||||||
/* upgrade should only happen from 3 to 4, 3 to 5, or 4 to 5 levels */
|
/* upgrade should only happen from 3 to 4, 3 to 5, or 4 to 5 levels */
|
||||||
VM_BUG_ON(mm->context.asce_limit < _REGION2_SIZE);
|
VM_BUG_ON(mm->context.asce_limit < _REGION2_SIZE);
|
||||||
if (end >= TASK_SIZE_MAX)
|
|
||||||
return -ENOMEM;
|
|
||||||
rc = 0;
|
rc = 0;
|
||||||
notify = 0;
|
notify = 0;
|
||||||
while (mm->context.asce_limit < end) {
|
while (mm->context.asce_limit < end) {
|
||||||
|
|
|
@ -2540,9 +2540,16 @@ void __init mem_init(void)
|
||||||
{
|
{
|
||||||
high_memory = __va(last_valid_pfn << PAGE_SHIFT);
|
high_memory = __va(last_valid_pfn << PAGE_SHIFT);
|
||||||
|
|
||||||
register_page_bootmem_info();
|
|
||||||
free_all_bootmem();
|
free_all_bootmem();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Must be done after boot memory is put on freelist, because here we
|
||||||
|
* might set fields in deferred struct pages that have not yet been
|
||||||
|
* initialized, and free_all_bootmem() initializes all the reserved
|
||||||
|
* deferred pages for us.
|
||||||
|
*/
|
||||||
|
register_page_bootmem_info();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set up the zero page, mark it reserved, so that page count
|
* Set up the zero page, mark it reserved, so that page count
|
||||||
* is not manipulated when freeing the page from user ptes.
|
* is not manipulated when freeing the page from user ptes.
|
||||||
|
|
|
@ -1426,4 +1426,7 @@ static inline int kvm_cpu_get_apicid(int mps_cpu)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm,
|
||||||
|
unsigned long start, unsigned long end);
|
||||||
|
|
||||||
#endif /* _ASM_X86_KVM_HOST_H */
|
#endif /* _ASM_X86_KVM_HOST_H */
|
||||||
|
|
|
@ -239,7 +239,7 @@ static void notrace start_secondary(void *unused)
|
||||||
load_cr3(swapper_pg_dir);
|
load_cr3(swapper_pg_dir);
|
||||||
__flush_tlb_all();
|
__flush_tlb_all();
|
||||||
#endif
|
#endif
|
||||||
|
load_current_idt();
|
||||||
cpu_init();
|
cpu_init();
|
||||||
x86_cpuinit.early_percpu_clock_init();
|
x86_cpuinit.early_percpu_clock_init();
|
||||||
preempt_disable();
|
preempt_disable();
|
||||||
|
|
|
@ -6750,12 +6750,7 @@ static __init int hardware_setup(void)
|
||||||
memset(vmx_vmread_bitmap, 0xff, PAGE_SIZE);
|
memset(vmx_vmread_bitmap, 0xff, PAGE_SIZE);
|
||||||
memset(vmx_vmwrite_bitmap, 0xff, PAGE_SIZE);
|
memset(vmx_vmwrite_bitmap, 0xff, PAGE_SIZE);
|
||||||
|
|
||||||
/*
|
|
||||||
* Allow direct access to the PC debug port (it is often used for I/O
|
|
||||||
* delays, but the vmexits simply slow things down).
|
|
||||||
*/
|
|
||||||
memset(vmx_io_bitmap_a, 0xff, PAGE_SIZE);
|
memset(vmx_io_bitmap_a, 0xff, PAGE_SIZE);
|
||||||
clear_bit(0x80, vmx_io_bitmap_a);
|
|
||||||
|
|
||||||
memset(vmx_io_bitmap_b, 0xff, PAGE_SIZE);
|
memset(vmx_io_bitmap_b, 0xff, PAGE_SIZE);
|
||||||
|
|
||||||
|
|
|
@ -6745,6 +6745,20 @@ static void kvm_vcpu_flush_tlb(struct kvm_vcpu *vcpu)
|
||||||
kvm_x86_ops->tlb_flush(vcpu);
|
kvm_x86_ops->tlb_flush(vcpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm,
|
||||||
|
unsigned long start, unsigned long end)
|
||||||
|
{
|
||||||
|
unsigned long apic_address;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The physical address of apic access page is stored in the VMCS.
|
||||||
|
* Update it when it becomes invalid.
|
||||||
|
*/
|
||||||
|
apic_address = gfn_to_hva(kvm, APIC_DEFAULT_PHYS_BASE >> PAGE_SHIFT);
|
||||||
|
if (start <= apic_address && apic_address < end)
|
||||||
|
kvm_make_all_cpus_request(kvm, KVM_REQ_APIC_PAGE_RELOAD);
|
||||||
|
}
|
||||||
|
|
||||||
void kvm_vcpu_reload_apic_access_page(struct kvm_vcpu *vcpu)
|
void kvm_vcpu_reload_apic_access_page(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
struct page *page = NULL;
|
struct page *page = NULL;
|
||||||
|
|
|
@ -97,7 +97,7 @@ static int __init broadcom_postcore_init(void)
|
||||||
* We should get host bridge information from ACPI unless the BIOS
|
* We should get host bridge information from ACPI unless the BIOS
|
||||||
* doesn't support it.
|
* doesn't support it.
|
||||||
*/
|
*/
|
||||||
if (acpi_os_get_root_pointer())
|
if (!acpi_disabled && acpi_os_get_root_pointer())
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -605,8 +605,8 @@ void blk_set_queue_dying(struct request_queue *q)
|
||||||
spin_lock_irq(q->queue_lock);
|
spin_lock_irq(q->queue_lock);
|
||||||
blk_queue_for_each_rl(rl, q) {
|
blk_queue_for_each_rl(rl, q) {
|
||||||
if (rl->rq_pool) {
|
if (rl->rq_pool) {
|
||||||
wake_up(&rl->wait[BLK_RW_SYNC]);
|
wake_up_all(&rl->wait[BLK_RW_SYNC]);
|
||||||
wake_up(&rl->wait[BLK_RW_ASYNC]);
|
wake_up_all(&rl->wait[BLK_RW_ASYNC]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
spin_unlock_irq(q->queue_lock);
|
spin_unlock_irq(q->queue_lock);
|
||||||
|
|
|
@ -150,7 +150,7 @@ static int pkcs7_find_key(struct pkcs7_message *pkcs7,
|
||||||
pr_devel("Sig %u: Found cert serial match X.509[%u]\n",
|
pr_devel("Sig %u: Found cert serial match X.509[%u]\n",
|
||||||
sinfo->index, certix);
|
sinfo->index, certix);
|
||||||
|
|
||||||
if (x509->pub->pkey_algo != sinfo->sig->pkey_algo) {
|
if (strcmp(x509->pub->pkey_algo, sinfo->sig->pkey_algo) != 0) {
|
||||||
pr_warn("Sig %u: X.509 algo and PKCS#7 sig algo don't match\n",
|
pr_warn("Sig %u: X.509 algo and PKCS#7 sig algo don't match\n",
|
||||||
sinfo->index);
|
sinfo->index);
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -409,6 +409,8 @@ int x509_extract_key_data(void *context, size_t hdrlen,
|
||||||
ctx->cert->pub->pkey_algo = "rsa";
|
ctx->cert->pub->pkey_algo = "rsa";
|
||||||
|
|
||||||
/* Discard the BIT STRING metadata */
|
/* Discard the BIT STRING metadata */
|
||||||
|
if (vlen < 1 || *(const u8 *)value != 0)
|
||||||
|
return -EBADMSG;
|
||||||
ctx->key = value + 1;
|
ctx->key = value + 1;
|
||||||
ctx->key_size = vlen - 1;
|
ctx->key_size = vlen - 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -135,7 +135,7 @@ int x509_check_for_self_signed(struct x509_certificate *cert)
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = -EKEYREJECTED;
|
ret = -EKEYREJECTED;
|
||||||
if (cert->pub->pkey_algo != cert->sig->pkey_algo)
|
if (strcmp(cert->pub->pkey_algo, cert->sig->pkey_algo) != 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
ret = public_key_verify_signature(cert->pub, cert->sig);
|
ret = public_key_verify_signature(cert->pub, cert->sig);
|
||||||
|
|
|
@ -2803,7 +2803,7 @@ out:
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
out_free_irq:
|
out_free_irq:
|
||||||
free_irq(dev->irq, dev);
|
free_irq(irq, dev);
|
||||||
out_free:
|
out_free:
|
||||||
kfree(dev);
|
kfree(dev);
|
||||||
out_release:
|
out_release:
|
||||||
|
|
|
@ -91,22 +91,23 @@ config FIRMWARE_IN_KERNEL
|
||||||
depends on FW_LOADER
|
depends on FW_LOADER
|
||||||
default y
|
default y
|
||||||
help
|
help
|
||||||
The kernel source tree includes a number of firmware 'blobs'
|
Various drivers in the kernel source tree may require firmware,
|
||||||
that are used by various drivers. The recommended way to
|
which is generally available in your distribution's linux-firmware
|
||||||
use these is to run "make firmware_install", which, after
|
package.
|
||||||
converting ihex files to binary, copies all of the needed
|
|
||||||
binary files in firmware/ to /lib/firmware/ on your system so
|
The linux-firmware package should install firmware into
|
||||||
that they can be loaded by userspace helpers on request.
|
/lib/firmware/ on your system, so they can be loaded by userspace
|
||||||
|
helpers on request.
|
||||||
|
|
||||||
Enabling this option will build each required firmware blob
|
Enabling this option will build each required firmware blob
|
||||||
into the kernel directly, where request_firmware() will find
|
specified by EXTRA_FIRMWARE into the kernel directly, where
|
||||||
them without having to call out to userspace. This may be
|
request_firmware() will find them without having to call out to
|
||||||
useful if your root file system requires a device that uses
|
userspace. This may be useful if your root file system requires a
|
||||||
such firmware and do not wish to use an initrd.
|
device that uses such firmware and you do not wish to use an
|
||||||
|
initrd.
|
||||||
|
|
||||||
This single option controls the inclusion of firmware for
|
This single option controls the inclusion of firmware for
|
||||||
every driver that uses request_firmware() and ships its
|
every driver that uses request_firmware(), which avoids a
|
||||||
firmware in the kernel source tree, which avoids a
|
|
||||||
proliferation of 'Include firmware for xxx device' options.
|
proliferation of 'Include firmware for xxx device' options.
|
||||||
|
|
||||||
Say 'N' and let firmware be loaded from userspace.
|
Say 'N' and let firmware be loaded from userspace.
|
||||||
|
|
|
@ -39,7 +39,7 @@ static int isa_bus_probe(struct device *dev)
|
||||||
{
|
{
|
||||||
struct isa_driver *isa_driver = dev->platform_data;
|
struct isa_driver *isa_driver = dev->platform_data;
|
||||||
|
|
||||||
if (isa_driver->probe)
|
if (isa_driver && isa_driver->probe)
|
||||||
return isa_driver->probe(dev, to_isa_dev(dev)->id);
|
return isa_driver->probe(dev, to_isa_dev(dev)->id);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -49,7 +49,7 @@ static int isa_bus_remove(struct device *dev)
|
||||||
{
|
{
|
||||||
struct isa_driver *isa_driver = dev->platform_data;
|
struct isa_driver *isa_driver = dev->platform_data;
|
||||||
|
|
||||||
if (isa_driver->remove)
|
if (isa_driver && isa_driver->remove)
|
||||||
return isa_driver->remove(dev, to_isa_dev(dev)->id);
|
return isa_driver->remove(dev, to_isa_dev(dev)->id);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -59,7 +59,7 @@ static void isa_bus_shutdown(struct device *dev)
|
||||||
{
|
{
|
||||||
struct isa_driver *isa_driver = dev->platform_data;
|
struct isa_driver *isa_driver = dev->platform_data;
|
||||||
|
|
||||||
if (isa_driver->shutdown)
|
if (isa_driver && isa_driver->shutdown)
|
||||||
isa_driver->shutdown(dev, to_isa_dev(dev)->id);
|
isa_driver->shutdown(dev, to_isa_dev(dev)->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ static int isa_bus_suspend(struct device *dev, pm_message_t state)
|
||||||
{
|
{
|
||||||
struct isa_driver *isa_driver = dev->platform_data;
|
struct isa_driver *isa_driver = dev->platform_data;
|
||||||
|
|
||||||
if (isa_driver->suspend)
|
if (isa_driver && isa_driver->suspend)
|
||||||
return isa_driver->suspend(dev, to_isa_dev(dev)->id, state);
|
return isa_driver->suspend(dev, to_isa_dev(dev)->id, state);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -77,7 +77,7 @@ static int isa_bus_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct isa_driver *isa_driver = dev->platform_data;
|
struct isa_driver *isa_driver = dev->platform_data;
|
||||||
|
|
||||||
if (isa_driver->resume)
|
if (isa_driver && isa_driver->resume)
|
||||||
return isa_driver->resume(dev, to_isa_dev(dev)->id);
|
return isa_driver->resume(dev, to_isa_dev(dev)->id);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -1755,14 +1755,17 @@ static int cci_pmu_probe(struct platform_device *pdev)
|
||||||
raw_spin_lock_init(&cci_pmu->hw_events.pmu_lock);
|
raw_spin_lock_init(&cci_pmu->hw_events.pmu_lock);
|
||||||
mutex_init(&cci_pmu->reserve_mutex);
|
mutex_init(&cci_pmu->reserve_mutex);
|
||||||
atomic_set(&cci_pmu->active_events, 0);
|
atomic_set(&cci_pmu->active_events, 0);
|
||||||
cpumask_set_cpu(smp_processor_id(), &cci_pmu->cpus);
|
cpumask_set_cpu(get_cpu(), &cci_pmu->cpus);
|
||||||
|
|
||||||
ret = cci_pmu_init(cci_pmu, pdev);
|
ret = cci_pmu_init(cci_pmu, pdev);
|
||||||
if (ret)
|
if (ret) {
|
||||||
|
put_cpu();
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
cpuhp_state_add_instance_nocalls(CPUHP_AP_PERF_ARM_CCI_ONLINE,
|
cpuhp_state_add_instance_nocalls(CPUHP_AP_PERF_ARM_CCI_ONLINE,
|
||||||
&cci_pmu->node);
|
&cci_pmu->node);
|
||||||
|
put_cpu();
|
||||||
pr_info("ARM %s PMU driver probed", cci_pmu->model->name);
|
pr_info("ARM %s PMU driver probed", cci_pmu->model->name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1271,6 +1271,10 @@ static int arm_ccn_pmu_init(struct arm_ccn *ccn)
|
||||||
int len = snprintf(NULL, 0, "ccn_%d", ccn->dt.id);
|
int len = snprintf(NULL, 0, "ccn_%d", ccn->dt.id);
|
||||||
|
|
||||||
name = devm_kzalloc(ccn->dev, len + 1, GFP_KERNEL);
|
name = devm_kzalloc(ccn->dev, len + 1, GFP_KERNEL);
|
||||||
|
if (!name) {
|
||||||
|
err = -ENOMEM;
|
||||||
|
goto error_choose_name;
|
||||||
|
}
|
||||||
snprintf(name, len + 1, "ccn_%d", ccn->dt.id);
|
snprintf(name, len + 1, "ccn_%d", ccn->dt.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1297,7 +1301,7 @@ static int arm_ccn_pmu_init(struct arm_ccn *ccn)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Pick one CPU which we will use to collect data from CCN... */
|
/* Pick one CPU which we will use to collect data from CCN... */
|
||||||
cpumask_set_cpu(smp_processor_id(), &ccn->dt.cpu);
|
cpumask_set_cpu(get_cpu(), &ccn->dt.cpu);
|
||||||
|
|
||||||
/* Also make sure that the overflow interrupt is handled by this CPU */
|
/* Also make sure that the overflow interrupt is handled by this CPU */
|
||||||
if (ccn->irq) {
|
if (ccn->irq) {
|
||||||
|
@ -1314,10 +1318,13 @@ static int arm_ccn_pmu_init(struct arm_ccn *ccn)
|
||||||
|
|
||||||
cpuhp_state_add_instance_nocalls(CPUHP_AP_PERF_ARM_CCN_ONLINE,
|
cpuhp_state_add_instance_nocalls(CPUHP_AP_PERF_ARM_CCN_ONLINE,
|
||||||
&ccn->dt.node);
|
&ccn->dt.node);
|
||||||
|
put_cpu();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error_pmu_register:
|
error_pmu_register:
|
||||||
error_set_affinity:
|
error_set_affinity:
|
||||||
|
put_cpu();
|
||||||
|
error_choose_name:
|
||||||
ida_simple_remove(&arm_ccn_pmu_ida, ccn->dt.id);
|
ida_simple_remove(&arm_ccn_pmu_ida, ccn->dt.id);
|
||||||
for (i = 0; i < ccn->num_xps; i++)
|
for (i = 0; i < ccn->num_xps; i++)
|
||||||
writel(0, ccn->xp[i].base + CCN_XP_DT_CONTROL);
|
writel(0, ccn->xp[i].base + CCN_XP_DT_CONTROL);
|
||||||
|
@ -1580,8 +1587,8 @@ static int __init arm_ccn_init(void)
|
||||||
|
|
||||||
static void __exit arm_ccn_exit(void)
|
static void __exit arm_ccn_exit(void)
|
||||||
{
|
{
|
||||||
cpuhp_remove_multi_state(CPUHP_AP_PERF_ARM_CCN_ONLINE);
|
|
||||||
platform_driver_unregister(&arm_ccn_driver);
|
platform_driver_unregister(&arm_ccn_driver);
|
||||||
|
cpuhp_remove_multi_state(CPUHP_AP_PERF_ARM_CCN_ONLINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(arm_ccn_init);
|
module_init(arm_ccn_init);
|
||||||
|
|
|
@ -384,7 +384,7 @@ static void get_cfg_composite_div(const struct composite_clk_gcfg *gcfg,
|
||||||
mux_ops = div_ops = gate_ops = NULL;
|
mux_ops = div_ops = gate_ops = NULL;
|
||||||
mux_hw = div_hw = gate_hw = NULL;
|
mux_hw = div_hw = gate_hw = NULL;
|
||||||
|
|
||||||
if (gcfg->mux && gcfg->mux) {
|
if (gcfg->mux && cfg->mux) {
|
||||||
mux = _get_cmux(base + cfg->mux->offset,
|
mux = _get_cmux(base + cfg->mux->offset,
|
||||||
cfg->mux->shift,
|
cfg->mux->shift,
|
||||||
cfg->mux->width,
|
cfg->mux->width,
|
||||||
|
@ -410,7 +410,7 @@ static void get_cfg_composite_div(const struct composite_clk_gcfg *gcfg,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gcfg->gate && gcfg->gate) {
|
if (gcfg->gate && cfg->gate) {
|
||||||
gate = _get_cgate(base + cfg->gate->offset,
|
gate = _get_cgate(base + cfg->gate->offset,
|
||||||
cfg->gate->bit_idx,
|
cfg->gate->bit_idx,
|
||||||
gcfg->gate->flags, lock);
|
gcfg->gate->flags, lock);
|
||||||
|
|
|
@ -34,7 +34,7 @@ static const struct hisi_fixed_rate_clock hi3660_fixed_rate_clks[] = {
|
||||||
|
|
||||||
/* crgctrl */
|
/* crgctrl */
|
||||||
static const struct hisi_fixed_factor_clock hi3660_crg_fixed_factor_clks[] = {
|
static const struct hisi_fixed_factor_clock hi3660_crg_fixed_factor_clks[] = {
|
||||||
{ HI3660_FACTOR_UART3, "clk_factor_uart3", "iomcu_peri0", 1, 8, 0, },
|
{ HI3660_FACTOR_UART3, "clk_factor_uart3", "iomcu_peri0", 1, 16, 0, },
|
||||||
{ HI3660_CLK_FACTOR_MMC, "clk_factor_mmc", "clkin_sys", 1, 6, 0, },
|
{ HI3660_CLK_FACTOR_MMC, "clk_factor_mmc", "clkin_sys", 1, 6, 0, },
|
||||||
{ HI3660_CLK_GATE_I2C0, "clk_gate_i2c0", "clk_i2c0_iomcu", 1, 4, 0, },
|
{ HI3660_CLK_GATE_I2C0, "clk_gate_i2c0", "clk_i2c0_iomcu", 1, 4, 0, },
|
||||||
{ HI3660_CLK_GATE_I2C1, "clk_gate_i2c1", "clk_i2c1_iomcu", 1, 4, 0, },
|
{ HI3660_CLK_GATE_I2C1, "clk_gate_i2c1", "clk_i2c1_iomcu", 1, 4, 0, },
|
||||||
|
|
|
@ -143,8 +143,10 @@ static int _qcom_cc_register_board_clk(struct device *dev, const char *path,
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
clocks_node = of_find_node_by_path("/clocks");
|
clocks_node = of_find_node_by_path("/clocks");
|
||||||
if (clocks_node)
|
if (clocks_node) {
|
||||||
node = of_find_node_by_name(clocks_node, path);
|
node = of_get_child_by_name(clocks_node, path);
|
||||||
|
of_node_put(clocks_node);
|
||||||
|
}
|
||||||
|
|
||||||
if (!node) {
|
if (!node) {
|
||||||
fixed = devm_kzalloc(dev, sizeof(*fixed), GFP_KERNEL);
|
fixed = devm_kzalloc(dev, sizeof(*fixed), GFP_KERNEL);
|
||||||
|
|
|
@ -354,9 +354,9 @@ static SUNXI_CCU_GATE(bus_tdm_clk, "bus-tdm", "apb1",
|
||||||
static SUNXI_CCU_GATE(bus_i2c0_clk, "bus-i2c0", "apb2",
|
static SUNXI_CCU_GATE(bus_i2c0_clk, "bus-i2c0", "apb2",
|
||||||
0x06c, BIT(0), 0);
|
0x06c, BIT(0), 0);
|
||||||
static SUNXI_CCU_GATE(bus_i2c1_clk, "bus-i2c1", "apb2",
|
static SUNXI_CCU_GATE(bus_i2c1_clk, "bus-i2c1", "apb2",
|
||||||
0x06c, BIT(0), 0);
|
0x06c, BIT(1), 0);
|
||||||
static SUNXI_CCU_GATE(bus_i2c2_clk, "bus-i2c2", "apb2",
|
static SUNXI_CCU_GATE(bus_i2c2_clk, "bus-i2c2", "apb2",
|
||||||
0x06c, BIT(0), 0);
|
0x06c, BIT(2), 0);
|
||||||
static SUNXI_CCU_GATE(bus_uart0_clk, "bus-uart0", "apb2",
|
static SUNXI_CCU_GATE(bus_uart0_clk, "bus-uart0", "apb2",
|
||||||
0x06c, BIT(16), 0);
|
0x06c, BIT(16), 0);
|
||||||
static SUNXI_CCU_GATE(bus_uart1_clk, "bus-uart1", "apb2",
|
static SUNXI_CCU_GATE(bus_uart1_clk, "bus-uart1", "apb2",
|
||||||
|
|
|
@ -123,7 +123,7 @@ const struct uniphier_clk_data uniphier_sld8_sys_clk_data[] = {
|
||||||
const struct uniphier_clk_data uniphier_pro5_sys_clk_data[] = {
|
const struct uniphier_clk_data uniphier_pro5_sys_clk_data[] = {
|
||||||
UNIPHIER_CLK_FACTOR("spll", -1, "ref", 120, 1), /* 2400 MHz */
|
UNIPHIER_CLK_FACTOR("spll", -1, "ref", 120, 1), /* 2400 MHz */
|
||||||
UNIPHIER_CLK_FACTOR("dapll1", -1, "ref", 128, 1), /* 2560 MHz */
|
UNIPHIER_CLK_FACTOR("dapll1", -1, "ref", 128, 1), /* 2560 MHz */
|
||||||
UNIPHIER_CLK_FACTOR("dapll2", -1, "ref", 144, 125), /* 2949.12 MHz */
|
UNIPHIER_CLK_FACTOR("dapll2", -1, "dapll1", 144, 125), /* 2949.12 MHz */
|
||||||
UNIPHIER_CLK_FACTOR("uart", 0, "dapll2", 1, 40),
|
UNIPHIER_CLK_FACTOR("uart", 0, "dapll2", 1, 40),
|
||||||
UNIPHIER_CLK_FACTOR("i2c", 1, "spll", 1, 48),
|
UNIPHIER_CLK_FACTOR("i2c", 1, "spll", 1, 48),
|
||||||
UNIPHIER_PRO5_SYS_CLK_NAND(2),
|
UNIPHIER_PRO5_SYS_CLK_NAND(2),
|
||||||
|
|
|
@ -1232,12 +1232,11 @@ static int ipsec_esp(struct talitos_edesc *edesc, struct aead_request *areq,
|
||||||
sg_link_tbl_len += authsize;
|
sg_link_tbl_len += authsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
sg_count = talitos_sg_map(dev, areq->src, cryptlen, edesc,
|
ret = talitos_sg_map(dev, areq->src, sg_link_tbl_len, edesc,
|
||||||
&desc->ptr[4], sg_count, areq->assoclen,
|
&desc->ptr[4], sg_count, areq->assoclen, tbl_off);
|
||||||
tbl_off);
|
|
||||||
|
|
||||||
if (sg_count > 1) {
|
if (ret > 1) {
|
||||||
tbl_off += sg_count;
|
tbl_off += ret;
|
||||||
sync_needed = true;
|
sync_needed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1248,14 +1247,15 @@ static int ipsec_esp(struct talitos_edesc *edesc, struct aead_request *areq,
|
||||||
dma_map_sg(dev, areq->dst, sg_count, DMA_FROM_DEVICE);
|
dma_map_sg(dev, areq->dst, sg_count, DMA_FROM_DEVICE);
|
||||||
}
|
}
|
||||||
|
|
||||||
sg_count = talitos_sg_map(dev, areq->dst, cryptlen, edesc,
|
ret = talitos_sg_map(dev, areq->dst, cryptlen, edesc, &desc->ptr[5],
|
||||||
&desc->ptr[5], sg_count, areq->assoclen,
|
sg_count, areq->assoclen, tbl_off);
|
||||||
tbl_off);
|
|
||||||
|
|
||||||
if (desc->hdr & DESC_HDR_TYPE_IPSEC_ESP)
|
if (desc->hdr & DESC_HDR_TYPE_IPSEC_ESP)
|
||||||
to_talitos_ptr_ext_or(&desc->ptr[5], authsize, is_sec1);
|
to_talitos_ptr_ext_or(&desc->ptr[5], authsize, is_sec1);
|
||||||
|
|
||||||
if (sg_count > 1) {
|
/* ICV data */
|
||||||
|
if (ret > 1) {
|
||||||
|
tbl_off += ret;
|
||||||
edesc->icv_ool = true;
|
edesc->icv_ool = true;
|
||||||
sync_needed = true;
|
sync_needed = true;
|
||||||
|
|
||||||
|
@ -1265,9 +1265,7 @@ static int ipsec_esp(struct talitos_edesc *edesc, struct aead_request *areq,
|
||||||
sizeof(struct talitos_ptr) + authsize;
|
sizeof(struct talitos_ptr) + authsize;
|
||||||
|
|
||||||
/* Add an entry to the link table for ICV data */
|
/* Add an entry to the link table for ICV data */
|
||||||
tbl_ptr += sg_count - 1;
|
to_talitos_ptr_ext_set(tbl_ptr - 1, 0, is_sec1);
|
||||||
to_talitos_ptr_ext_set(tbl_ptr, 0, is_sec1);
|
|
||||||
tbl_ptr++;
|
|
||||||
to_talitos_ptr_ext_set(tbl_ptr, DESC_PTR_LNKTBL_RETURN,
|
to_talitos_ptr_ext_set(tbl_ptr, DESC_PTR_LNKTBL_RETURN,
|
||||||
is_sec1);
|
is_sec1);
|
||||||
to_talitos_ptr_len(tbl_ptr, authsize, is_sec1);
|
to_talitos_ptr_len(tbl_ptr, authsize, is_sec1);
|
||||||
|
@ -1275,18 +1273,33 @@ static int ipsec_esp(struct talitos_edesc *edesc, struct aead_request *areq,
|
||||||
/* icv data follows link tables */
|
/* icv data follows link tables */
|
||||||
to_talitos_ptr(tbl_ptr, edesc->dma_link_tbl + offset,
|
to_talitos_ptr(tbl_ptr, edesc->dma_link_tbl + offset,
|
||||||
is_sec1);
|
is_sec1);
|
||||||
|
} else {
|
||||||
|
dma_addr_t addr = edesc->dma_link_tbl;
|
||||||
|
|
||||||
|
if (is_sec1)
|
||||||
|
addr += areq->assoclen + cryptlen;
|
||||||
|
else
|
||||||
|
addr += sizeof(struct talitos_ptr) * tbl_off;
|
||||||
|
|
||||||
|
to_talitos_ptr(&desc->ptr[6], addr, is_sec1);
|
||||||
|
to_talitos_ptr_len(&desc->ptr[6], authsize, is_sec1);
|
||||||
|
}
|
||||||
|
} else if (!(desc->hdr & DESC_HDR_TYPE_IPSEC_ESP)) {
|
||||||
|
ret = talitos_sg_map(dev, areq->dst, authsize, edesc,
|
||||||
|
&desc->ptr[6], sg_count, areq->assoclen +
|
||||||
|
cryptlen,
|
||||||
|
tbl_off);
|
||||||
|
if (ret > 1) {
|
||||||
|
tbl_off += ret;
|
||||||
|
edesc->icv_ool = true;
|
||||||
|
sync_needed = true;
|
||||||
|
} else {
|
||||||
|
edesc->icv_ool = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
edesc->icv_ool = false;
|
edesc->icv_ool = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ICV data */
|
|
||||||
if (!(desc->hdr & DESC_HDR_TYPE_IPSEC_ESP)) {
|
|
||||||
to_talitos_ptr_len(&desc->ptr[6], authsize, is_sec1);
|
|
||||||
to_talitos_ptr(&desc->ptr[6], edesc->dma_link_tbl +
|
|
||||||
areq->assoclen + cryptlen, is_sec1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* iv out */
|
/* iv out */
|
||||||
if (desc->hdr & DESC_HDR_TYPE_IPSEC_ESP)
|
if (desc->hdr & DESC_HDR_TYPE_IPSEC_ESP)
|
||||||
map_single_talitos_ptr(dev, &desc->ptr[6], ivsize, ctx->iv,
|
map_single_talitos_ptr(dev, &desc->ptr[6], ivsize, ctx->iv,
|
||||||
|
@ -1494,12 +1507,20 @@ static int ablkcipher_setkey(struct crypto_ablkcipher *cipher,
|
||||||
const u8 *key, unsigned int keylen)
|
const u8 *key, unsigned int keylen)
|
||||||
{
|
{
|
||||||
struct talitos_ctx *ctx = crypto_ablkcipher_ctx(cipher);
|
struct talitos_ctx *ctx = crypto_ablkcipher_ctx(cipher);
|
||||||
|
u32 tmp[DES_EXPKEY_WORDS];
|
||||||
|
|
||||||
if (keylen > TALITOS_MAX_KEY_SIZE) {
|
if (keylen > TALITOS_MAX_KEY_SIZE) {
|
||||||
crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN);
|
crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (unlikely(crypto_ablkcipher_get_flags(cipher) &
|
||||||
|
CRYPTO_TFM_REQ_WEAK_KEY) &&
|
||||||
|
!des_ekey(tmp, key)) {
|
||||||
|
crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_WEAK_KEY);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
memcpy(&ctx->key, key, keylen);
|
memcpy(&ctx->key, key, keylen);
|
||||||
ctx->keylen = keylen;
|
ctx->keylen = keylen;
|
||||||
|
|
||||||
|
@ -2614,7 +2635,7 @@ static struct talitos_alg_template driver_algs[] = {
|
||||||
.ivsize = AES_BLOCK_SIZE,
|
.ivsize = AES_BLOCK_SIZE,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
.desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
|
.desc_hdr_template = DESC_HDR_TYPE_AESU_CTR_NONSNOOP |
|
||||||
DESC_HDR_SEL0_AESU |
|
DESC_HDR_SEL0_AESU |
|
||||||
DESC_HDR_MODE0_AESU_CTR,
|
DESC_HDR_MODE0_AESU_CTR,
|
||||||
},
|
},
|
||||||
|
@ -3047,6 +3068,11 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev,
|
||||||
t_alg->algt.alg.aead.setkey = aead_setkey;
|
t_alg->algt.alg.aead.setkey = aead_setkey;
|
||||||
t_alg->algt.alg.aead.encrypt = aead_encrypt;
|
t_alg->algt.alg.aead.encrypt = aead_encrypt;
|
||||||
t_alg->algt.alg.aead.decrypt = aead_decrypt;
|
t_alg->algt.alg.aead.decrypt = aead_decrypt;
|
||||||
|
if (!(priv->features & TALITOS_FTR_SHA224_HWINIT) &&
|
||||||
|
!strncmp(alg->cra_name, "authenc(hmac(sha224)", 20)) {
|
||||||
|
kfree(t_alg);
|
||||||
|
return ERR_PTR(-ENOTSUPP);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case CRYPTO_ALG_TYPE_AHASH:
|
case CRYPTO_ALG_TYPE_AHASH:
|
||||||
alg = &t_alg->algt.alg.hash.halg.base;
|
alg = &t_alg->algt.alg.hash.halg.base;
|
||||||
|
|
|
@ -143,8 +143,7 @@ static ssize_t systab_show(struct kobject *kobj,
|
||||||
return str - buf;
|
return str - buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct kobj_attribute efi_attr_systab =
|
static struct kobj_attribute efi_attr_systab = __ATTR_RO_MODE(systab, 0400);
|
||||||
__ATTR(systab, 0400, systab_show, NULL);
|
|
||||||
|
|
||||||
#define EFI_FIELD(var) efi.var
|
#define EFI_FIELD(var) efi.var
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ static const struct sysfs_ops esre_attr_ops = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Generic ESRT Entry ("ESRE") support. */
|
/* Generic ESRT Entry ("ESRE") support. */
|
||||||
static ssize_t esre_fw_class_show(struct esre_entry *entry, char *buf)
|
static ssize_t fw_class_show(struct esre_entry *entry, char *buf)
|
||||||
{
|
{
|
||||||
char *str = buf;
|
char *str = buf;
|
||||||
|
|
||||||
|
@ -117,18 +117,16 @@ static ssize_t esre_fw_class_show(struct esre_entry *entry, char *buf)
|
||||||
return str - buf;
|
return str - buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct esre_attribute esre_fw_class = __ATTR(fw_class, 0400,
|
static struct esre_attribute esre_fw_class = __ATTR_RO_MODE(fw_class, 0400);
|
||||||
esre_fw_class_show, NULL);
|
|
||||||
|
|
||||||
#define esre_attr_decl(name, size, fmt) \
|
#define esre_attr_decl(name, size, fmt) \
|
||||||
static ssize_t esre_##name##_show(struct esre_entry *entry, char *buf) \
|
static ssize_t name##_show(struct esre_entry *entry, char *buf) \
|
||||||
{ \
|
{ \
|
||||||
return sprintf(buf, fmt "\n", \
|
return sprintf(buf, fmt "\n", \
|
||||||
le##size##_to_cpu(entry->esre.esre1->name)); \
|
le##size##_to_cpu(entry->esre.esre1->name)); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
static struct esre_attribute esre_##name = __ATTR(name, 0400, \
|
static struct esre_attribute esre_##name = __ATTR_RO_MODE(name, 0400)
|
||||||
esre_##name##_show, NULL)
|
|
||||||
|
|
||||||
esre_attr_decl(fw_type, 32, "%u");
|
esre_attr_decl(fw_type, 32, "%u");
|
||||||
esre_attr_decl(fw_version, 32, "%u");
|
esre_attr_decl(fw_version, 32, "%u");
|
||||||
|
@ -193,14 +191,13 @@ static int esre_create_sysfs_entry(void *esre, int entry_num)
|
||||||
|
|
||||||
/* support for displaying ESRT fields at the top level */
|
/* support for displaying ESRT fields at the top level */
|
||||||
#define esrt_attr_decl(name, size, fmt) \
|
#define esrt_attr_decl(name, size, fmt) \
|
||||||
static ssize_t esrt_##name##_show(struct kobject *kobj, \
|
static ssize_t name##_show(struct kobject *kobj, \
|
||||||
struct kobj_attribute *attr, char *buf)\
|
struct kobj_attribute *attr, char *buf)\
|
||||||
{ \
|
{ \
|
||||||
return sprintf(buf, fmt "\n", le##size##_to_cpu(esrt->name)); \
|
return sprintf(buf, fmt "\n", le##size##_to_cpu(esrt->name)); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
static struct kobj_attribute esrt_##name = __ATTR(name, 0400, \
|
static struct kobj_attribute esrt_##name = __ATTR_RO_MODE(name, 0400)
|
||||||
esrt_##name##_show, NULL)
|
|
||||||
|
|
||||||
esrt_attr_decl(fw_resource_count, 32, "%u");
|
esrt_attr_decl(fw_resource_count, 32, "%u");
|
||||||
esrt_attr_decl(fw_resource_count_max, 32, "%u");
|
esrt_attr_decl(fw_resource_count_max, 32, "%u");
|
||||||
|
@ -431,7 +428,7 @@ err_remove_group:
|
||||||
err_remove_esrt:
|
err_remove_esrt:
|
||||||
kobject_put(esrt_kobj);
|
kobject_put(esrt_kobj);
|
||||||
err:
|
err:
|
||||||
kfree(esrt);
|
memunmap(esrt);
|
||||||
esrt = NULL;
|
esrt = NULL;
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,11 +63,11 @@ static ssize_t map_attr_show(struct kobject *kobj, struct attribute *attr,
|
||||||
return map_attr->show(entry, buf);
|
return map_attr->show(entry, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct map_attribute map_type_attr = __ATTR_RO(type);
|
static struct map_attribute map_type_attr = __ATTR_RO_MODE(type, 0400);
|
||||||
static struct map_attribute map_phys_addr_attr = __ATTR_RO(phys_addr);
|
static struct map_attribute map_phys_addr_attr = __ATTR_RO_MODE(phys_addr, 0400);
|
||||||
static struct map_attribute map_virt_addr_attr = __ATTR_RO(virt_addr);
|
static struct map_attribute map_virt_addr_attr = __ATTR_RO_MODE(virt_addr, 0400);
|
||||||
static struct map_attribute map_num_pages_attr = __ATTR_RO(num_pages);
|
static struct map_attribute map_num_pages_attr = __ATTR_RO_MODE(num_pages, 0400);
|
||||||
static struct map_attribute map_attribute_attr = __ATTR_RO(attribute);
|
static struct map_attribute map_attribute_attr = __ATTR_RO_MODE(attribute, 0400);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These are default attributes that are added for every memmap entry.
|
* These are default attributes that are added for every memmap entry.
|
||||||
|
|
|
@ -295,38 +295,60 @@ static int vpd_probe(struct platform_device *pdev)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
return vpd_sections_init(entry.cbmem_addr);
|
vpd_kobj = kobject_create_and_add("vpd", firmware_kobj);
|
||||||
|
if (!vpd_kobj)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
ret = vpd_sections_init(entry.cbmem_addr);
|
||||||
|
if (ret) {
|
||||||
|
kobject_put(vpd_kobj);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int vpd_remove(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
vpd_section_destroy(&ro_vpd);
|
||||||
|
vpd_section_destroy(&rw_vpd);
|
||||||
|
|
||||||
|
kobject_put(vpd_kobj);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct platform_driver vpd_driver = {
|
static struct platform_driver vpd_driver = {
|
||||||
.probe = vpd_probe,
|
.probe = vpd_probe,
|
||||||
|
.remove = vpd_remove,
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "vpd",
|
.name = "vpd",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct platform_device *vpd_pdev;
|
||||||
|
|
||||||
static int __init vpd_platform_init(void)
|
static int __init vpd_platform_init(void)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev;
|
int ret;
|
||||||
|
|
||||||
pdev = platform_device_register_simple("vpd", -1, NULL, 0);
|
ret = platform_driver_register(&vpd_driver);
|
||||||
if (IS_ERR(pdev))
|
if (ret)
|
||||||
return PTR_ERR(pdev);
|
return ret;
|
||||||
|
|
||||||
vpd_kobj = kobject_create_and_add("vpd", firmware_kobj);
|
vpd_pdev = platform_device_register_simple("vpd", -1, NULL, 0);
|
||||||
if (!vpd_kobj)
|
if (IS_ERR(vpd_pdev)) {
|
||||||
return -ENOMEM;
|
platform_driver_unregister(&vpd_driver);
|
||||||
|
return PTR_ERR(vpd_pdev);
|
||||||
platform_driver_register(&vpd_driver);
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit vpd_platform_exit(void)
|
static void __exit vpd_platform_exit(void)
|
||||||
{
|
{
|
||||||
vpd_section_destroy(&ro_vpd);
|
platform_device_unregister(vpd_pdev);
|
||||||
vpd_section_destroy(&rw_vpd);
|
platform_driver_unregister(&vpd_driver);
|
||||||
kobject_put(vpd_kobj);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(vpd_platform_init);
|
module_init(vpd_platform_init);
|
||||||
|
|
|
@ -946,7 +946,9 @@ static int analogix_dp_get_modes(struct drm_connector *connector)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pm_runtime_get_sync(dp->dev);
|
||||||
edid = drm_get_edid(connector, &dp->aux.ddc);
|
edid = drm_get_edid(connector, &dp->aux.ddc);
|
||||||
|
pm_runtime_put(dp->dev);
|
||||||
if (edid) {
|
if (edid) {
|
||||||
drm_mode_connector_update_edid_property(&dp->connector,
|
drm_mode_connector_update_edid_property(&dp->connector,
|
||||||
edid);
|
edid);
|
||||||
|
|
|
@ -247,6 +247,15 @@ struct exynos_drm_gem *exynos_drm_gem_create(struct drm_device *dev,
|
||||||
if (IS_ERR(exynos_gem))
|
if (IS_ERR(exynos_gem))
|
||||||
return exynos_gem;
|
return exynos_gem;
|
||||||
|
|
||||||
|
if (!is_drm_iommu_supported(dev) && (flags & EXYNOS_BO_NONCONTIG)) {
|
||||||
|
/*
|
||||||
|
* when no IOMMU is available, all allocated buffers are
|
||||||
|
* contiguous anyway, so drop EXYNOS_BO_NONCONTIG flag
|
||||||
|
*/
|
||||||
|
flags &= ~EXYNOS_BO_NONCONTIG;
|
||||||
|
DRM_WARN("Non-contiguous allocation is not supported without IOMMU, falling back to contiguous buffer\n");
|
||||||
|
}
|
||||||
|
|
||||||
/* set memory type and cache attribute from user side. */
|
/* set memory type and cache attribute from user side. */
|
||||||
exynos_gem->flags = flags;
|
exynos_gem->flags = flags;
|
||||||
|
|
||||||
|
|
|
@ -1000,7 +1000,8 @@ enum transcoder intel_pipe_to_cpu_transcoder(struct drm_i915_private *dev_priv,
|
||||||
return crtc->config->cpu_transcoder;
|
return crtc->config->cpu_transcoder;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool pipe_dsl_stopped(struct drm_i915_private *dev_priv, enum pipe pipe)
|
static bool pipe_scanline_is_moving(struct drm_i915_private *dev_priv,
|
||||||
|
enum pipe pipe)
|
||||||
{
|
{
|
||||||
i915_reg_t reg = PIPEDSL(pipe);
|
i915_reg_t reg = PIPEDSL(pipe);
|
||||||
u32 line1, line2;
|
u32 line1, line2;
|
||||||
|
@ -1015,7 +1016,28 @@ static bool pipe_dsl_stopped(struct drm_i915_private *dev_priv, enum pipe pipe)
|
||||||
msleep(5);
|
msleep(5);
|
||||||
line2 = I915_READ(reg) & line_mask;
|
line2 = I915_READ(reg) & line_mask;
|
||||||
|
|
||||||
return line1 == line2;
|
return line1 != line2;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void wait_for_pipe_scanline_moving(struct intel_crtc *crtc, bool state)
|
||||||
|
{
|
||||||
|
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
|
||||||
|
enum pipe pipe = crtc->pipe;
|
||||||
|
|
||||||
|
/* Wait for the display line to settle/start moving */
|
||||||
|
if (wait_for(pipe_scanline_is_moving(dev_priv, pipe) == state, 100))
|
||||||
|
DRM_ERROR("pipe %c scanline %s wait timed out\n",
|
||||||
|
pipe_name(pipe), onoff(state));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void intel_wait_for_pipe_scanline_stopped(struct intel_crtc *crtc)
|
||||||
|
{
|
||||||
|
wait_for_pipe_scanline_moving(crtc, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc)
|
||||||
|
{
|
||||||
|
wait_for_pipe_scanline_moving(crtc, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1038,7 +1060,6 @@ static void intel_wait_for_pipe_off(struct intel_crtc *crtc)
|
||||||
{
|
{
|
||||||
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
|
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
|
||||||
enum transcoder cpu_transcoder = crtc->config->cpu_transcoder;
|
enum transcoder cpu_transcoder = crtc->config->cpu_transcoder;
|
||||||
enum pipe pipe = crtc->pipe;
|
|
||||||
|
|
||||||
if (INTEL_GEN(dev_priv) >= 4) {
|
if (INTEL_GEN(dev_priv) >= 4) {
|
||||||
i915_reg_t reg = PIPECONF(cpu_transcoder);
|
i915_reg_t reg = PIPECONF(cpu_transcoder);
|
||||||
|
@ -1049,9 +1070,7 @@ static void intel_wait_for_pipe_off(struct intel_crtc *crtc)
|
||||||
100))
|
100))
|
||||||
WARN(1, "pipe_off wait timed out\n");
|
WARN(1, "pipe_off wait timed out\n");
|
||||||
} else {
|
} else {
|
||||||
/* Wait for the display line to settle */
|
intel_wait_for_pipe_scanline_stopped(crtc);
|
||||||
if (wait_for(pipe_dsl_stopped(dev_priv, pipe), 100))
|
|
||||||
WARN(1, "pipe_off wait timed out\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1944,15 +1963,14 @@ static void intel_enable_pipe(struct intel_crtc *crtc)
|
||||||
POSTING_READ(reg);
|
POSTING_READ(reg);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Until the pipe starts DSL will read as 0, which would cause
|
* Until the pipe starts PIPEDSL reads will return a stale value,
|
||||||
* an apparent vblank timestamp jump, which messes up also the
|
* which causes an apparent vblank timestamp jump when PIPEDSL
|
||||||
* frame count when it's derived from the timestamps. So let's
|
* resets to its proper value. That also messes up the frame count
|
||||||
* wait for the pipe to start properly before we call
|
* when it's derived from the timestamps. So let's wait for the
|
||||||
* drm_crtc_vblank_on()
|
* pipe to start properly before we call drm_crtc_vblank_on()
|
||||||
*/
|
*/
|
||||||
if (dev->max_vblank_count == 0 &&
|
if (dev->max_vblank_count == 0)
|
||||||
wait_for(intel_get_crtc_scanline(crtc) != crtc->scanline_offset, 50))
|
intel_wait_for_pipe_scanline_moving(crtc);
|
||||||
DRM_ERROR("pipe %c didn't start\n", pipe_name(pipe));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14682,6 +14700,8 @@ void i830_enable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe)
|
||||||
|
|
||||||
void i830_disable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe)
|
void i830_disable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe)
|
||||||
{
|
{
|
||||||
|
struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
|
||||||
|
|
||||||
DRM_DEBUG_KMS("disabling pipe %c due to force quirk\n",
|
DRM_DEBUG_KMS("disabling pipe %c due to force quirk\n",
|
||||||
pipe_name(pipe));
|
pipe_name(pipe));
|
||||||
|
|
||||||
|
@ -14691,8 +14711,7 @@ void i830_disable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe)
|
||||||
I915_WRITE(PIPECONF(pipe), 0);
|
I915_WRITE(PIPECONF(pipe), 0);
|
||||||
POSTING_READ(PIPECONF(pipe));
|
POSTING_READ(PIPECONF(pipe));
|
||||||
|
|
||||||
if (wait_for(pipe_dsl_stopped(dev_priv, pipe), 100))
|
intel_wait_for_pipe_scanline_stopped(crtc);
|
||||||
DRM_ERROR("pipe %c off wait timed out\n", pipe_name(pipe));
|
|
||||||
|
|
||||||
I915_WRITE(DPLL(pipe), DPLL_VGA_MODE_DIS);
|
I915_WRITE(DPLL(pipe), DPLL_VGA_MODE_DIS);
|
||||||
POSTING_READ(DPLL(pipe));
|
POSTING_READ(DPLL(pipe));
|
||||||
|
|
|
@ -640,22 +640,28 @@ void vmbus_close(struct vmbus_channel *channel)
|
||||||
*/
|
*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mutex_lock(&vmbus_connection.channel_mutex);
|
|
||||||
/*
|
/*
|
||||||
* Close all the sub-channels first and then close the
|
* Close all the sub-channels first and then close the
|
||||||
* primary channel.
|
* primary channel.
|
||||||
*/
|
*/
|
||||||
list_for_each_safe(cur, tmp, &channel->sc_list) {
|
list_for_each_safe(cur, tmp, &channel->sc_list) {
|
||||||
cur_channel = list_entry(cur, struct vmbus_channel, sc_list);
|
cur_channel = list_entry(cur, struct vmbus_channel, sc_list);
|
||||||
vmbus_close_internal(cur_channel);
|
|
||||||
if (cur_channel->rescind) {
|
if (cur_channel->rescind) {
|
||||||
|
wait_for_completion(&cur_channel->rescind_event);
|
||||||
|
mutex_lock(&vmbus_connection.channel_mutex);
|
||||||
|
vmbus_close_internal(cur_channel);
|
||||||
hv_process_channel_removal(
|
hv_process_channel_removal(
|
||||||
cur_channel->offermsg.child_relid);
|
cur_channel->offermsg.child_relid);
|
||||||
|
} else {
|
||||||
|
mutex_lock(&vmbus_connection.channel_mutex);
|
||||||
|
vmbus_close_internal(cur_channel);
|
||||||
}
|
}
|
||||||
|
mutex_unlock(&vmbus_connection.channel_mutex);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Now close the primary.
|
* Now close the primary.
|
||||||
*/
|
*/
|
||||||
|
mutex_lock(&vmbus_connection.channel_mutex);
|
||||||
vmbus_close_internal(channel);
|
vmbus_close_internal(channel);
|
||||||
mutex_unlock(&vmbus_connection.channel_mutex);
|
mutex_unlock(&vmbus_connection.channel_mutex);
|
||||||
}
|
}
|
||||||
|
|
|
@ -333,6 +333,7 @@ static struct vmbus_channel *alloc_channel(void)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
spin_lock_init(&channel->lock);
|
spin_lock_init(&channel->lock);
|
||||||
|
init_completion(&channel->rescind_event);
|
||||||
|
|
||||||
INIT_LIST_HEAD(&channel->sc_list);
|
INIT_LIST_HEAD(&channel->sc_list);
|
||||||
INIT_LIST_HEAD(&channel->percpu_list);
|
INIT_LIST_HEAD(&channel->percpu_list);
|
||||||
|
@ -883,6 +884,7 @@ static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr)
|
||||||
/*
|
/*
|
||||||
* Now wait for offer handling to complete.
|
* Now wait for offer handling to complete.
|
||||||
*/
|
*/
|
||||||
|
vmbus_rescind_cleanup(channel);
|
||||||
while (READ_ONCE(channel->probe_done) == false) {
|
while (READ_ONCE(channel->probe_done) == false) {
|
||||||
/*
|
/*
|
||||||
* We wait here until any channel offer is currently
|
* We wait here until any channel offer is currently
|
||||||
|
@ -898,7 +900,6 @@ static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr)
|
||||||
if (channel->device_obj) {
|
if (channel->device_obj) {
|
||||||
if (channel->chn_rescind_callback) {
|
if (channel->chn_rescind_callback) {
|
||||||
channel->chn_rescind_callback(channel);
|
channel->chn_rescind_callback(channel);
|
||||||
vmbus_rescind_cleanup(channel);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
@ -907,7 +908,6 @@ static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr)
|
||||||
*/
|
*/
|
||||||
dev = get_device(&channel->device_obj->device);
|
dev = get_device(&channel->device_obj->device);
|
||||||
if (dev) {
|
if (dev) {
|
||||||
vmbus_rescind_cleanup(channel);
|
|
||||||
vmbus_device_unregister(channel->device_obj);
|
vmbus_device_unregister(channel->device_obj);
|
||||||
put_device(dev);
|
put_device(dev);
|
||||||
}
|
}
|
||||||
|
@ -921,13 +921,14 @@ static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr)
|
||||||
* 2. Then close the primary channel.
|
* 2. Then close the primary channel.
|
||||||
*/
|
*/
|
||||||
mutex_lock(&vmbus_connection.channel_mutex);
|
mutex_lock(&vmbus_connection.channel_mutex);
|
||||||
vmbus_rescind_cleanup(channel);
|
|
||||||
if (channel->state == CHANNEL_OPEN_STATE) {
|
if (channel->state == CHANNEL_OPEN_STATE) {
|
||||||
/*
|
/*
|
||||||
* The channel is currently not open;
|
* The channel is currently not open;
|
||||||
* it is safe for us to cleanup the channel.
|
* it is safe for us to cleanup the channel.
|
||||||
*/
|
*/
|
||||||
hv_process_channel_removal(rescind->child_relid);
|
hv_process_channel_removal(rescind->child_relid);
|
||||||
|
} else {
|
||||||
|
complete(&channel->rescind_event);
|
||||||
}
|
}
|
||||||
mutex_unlock(&vmbus_connection.channel_mutex);
|
mutex_unlock(&vmbus_connection.channel_mutex);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1012,7 +1012,7 @@ static int cpcap_adc_probe(struct platform_device *pdev)
|
||||||
platform_set_drvdata(pdev, indio_dev);
|
platform_set_drvdata(pdev, indio_dev);
|
||||||
|
|
||||||
ddata->irq = platform_get_irq_byname(pdev, "adcdone");
|
ddata->irq = platform_get_irq_byname(pdev, "adcdone");
|
||||||
if (!ddata->irq)
|
if (ddata->irq < 0)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
error = devm_request_threaded_irq(&pdev->dev, ddata->irq, NULL,
|
error = devm_request_threaded_irq(&pdev->dev, ddata->irq, NULL,
|
||||||
|
|
|
@ -221,8 +221,10 @@ enum meson_sar_adc_chan7_mux_sel {
|
||||||
|
|
||||||
struct meson_sar_adc_data {
|
struct meson_sar_adc_data {
|
||||||
bool has_bl30_integration;
|
bool has_bl30_integration;
|
||||||
|
u32 bandgap_reg;
|
||||||
unsigned int resolution;
|
unsigned int resolution;
|
||||||
const char *name;
|
const char *name;
|
||||||
|
const struct regmap_config *regmap_config;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct meson_sar_adc_priv {
|
struct meson_sar_adc_priv {
|
||||||
|
@ -242,13 +244,20 @@ struct meson_sar_adc_priv {
|
||||||
int calibscale;
|
int calibscale;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct regmap_config meson_sar_adc_regmap_config = {
|
static const struct regmap_config meson_sar_adc_regmap_config_gxbb = {
|
||||||
.reg_bits = 8,
|
.reg_bits = 8,
|
||||||
.val_bits = 32,
|
.val_bits = 32,
|
||||||
.reg_stride = 4,
|
.reg_stride = 4,
|
||||||
.max_register = MESON_SAR_ADC_REG13,
|
.max_register = MESON_SAR_ADC_REG13,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct regmap_config meson_sar_adc_regmap_config_meson8 = {
|
||||||
|
.reg_bits = 8,
|
||||||
|
.val_bits = 32,
|
||||||
|
.reg_stride = 4,
|
||||||
|
.max_register = MESON_SAR_ADC_DELTA_10,
|
||||||
|
};
|
||||||
|
|
||||||
static unsigned int meson_sar_adc_get_fifo_count(struct iio_dev *indio_dev)
|
static unsigned int meson_sar_adc_get_fifo_count(struct iio_dev *indio_dev)
|
||||||
{
|
{
|
||||||
struct meson_sar_adc_priv *priv = iio_priv(indio_dev);
|
struct meson_sar_adc_priv *priv = iio_priv(indio_dev);
|
||||||
|
@ -600,7 +609,7 @@ static int meson_sar_adc_clk_init(struct iio_dev *indio_dev,
|
||||||
init.num_parents = 1;
|
init.num_parents = 1;
|
||||||
|
|
||||||
priv->clk_gate.reg = base + MESON_SAR_ADC_REG3;
|
priv->clk_gate.reg = base + MESON_SAR_ADC_REG3;
|
||||||
priv->clk_gate.bit_idx = fls(MESON_SAR_ADC_REG3_CLK_EN);
|
priv->clk_gate.bit_idx = __ffs(MESON_SAR_ADC_REG3_CLK_EN);
|
||||||
priv->clk_gate.hw.init = &init;
|
priv->clk_gate.hw.init = &init;
|
||||||
|
|
||||||
priv->adc_clk = devm_clk_register(&indio_dev->dev, &priv->clk_gate.hw);
|
priv->adc_clk = devm_clk_register(&indio_dev->dev, &priv->clk_gate.hw);
|
||||||
|
@ -685,6 +694,20 @@ static int meson_sar_adc_init(struct iio_dev *indio_dev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void meson_sar_adc_set_bandgap(struct iio_dev *indio_dev, bool on_off)
|
||||||
|
{
|
||||||
|
struct meson_sar_adc_priv *priv = iio_priv(indio_dev);
|
||||||
|
u32 enable_mask;
|
||||||
|
|
||||||
|
if (priv->data->bandgap_reg == MESON_SAR_ADC_REG11)
|
||||||
|
enable_mask = MESON_SAR_ADC_REG11_BANDGAP_EN;
|
||||||
|
else
|
||||||
|
enable_mask = MESON_SAR_ADC_DELTA_10_TS_VBG_EN;
|
||||||
|
|
||||||
|
regmap_update_bits(priv->regmap, priv->data->bandgap_reg, enable_mask,
|
||||||
|
on_off ? enable_mask : 0);
|
||||||
|
}
|
||||||
|
|
||||||
static int meson_sar_adc_hw_enable(struct iio_dev *indio_dev)
|
static int meson_sar_adc_hw_enable(struct iio_dev *indio_dev)
|
||||||
{
|
{
|
||||||
struct meson_sar_adc_priv *priv = iio_priv(indio_dev);
|
struct meson_sar_adc_priv *priv = iio_priv(indio_dev);
|
||||||
|
@ -717,9 +740,9 @@ static int meson_sar_adc_hw_enable(struct iio_dev *indio_dev)
|
||||||
regval = FIELD_PREP(MESON_SAR_ADC_REG0_FIFO_CNT_IRQ_MASK, 1);
|
regval = FIELD_PREP(MESON_SAR_ADC_REG0_FIFO_CNT_IRQ_MASK, 1);
|
||||||
regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG0,
|
regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG0,
|
||||||
MESON_SAR_ADC_REG0_FIFO_CNT_IRQ_MASK, regval);
|
MESON_SAR_ADC_REG0_FIFO_CNT_IRQ_MASK, regval);
|
||||||
regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG11,
|
|
||||||
MESON_SAR_ADC_REG11_BANDGAP_EN,
|
meson_sar_adc_set_bandgap(indio_dev, true);
|
||||||
MESON_SAR_ADC_REG11_BANDGAP_EN);
|
|
||||||
regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG3,
|
regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG3,
|
||||||
MESON_SAR_ADC_REG3_ADC_EN,
|
MESON_SAR_ADC_REG3_ADC_EN,
|
||||||
MESON_SAR_ADC_REG3_ADC_EN);
|
MESON_SAR_ADC_REG3_ADC_EN);
|
||||||
|
@ -739,8 +762,7 @@ static int meson_sar_adc_hw_enable(struct iio_dev *indio_dev)
|
||||||
err_adc_clk:
|
err_adc_clk:
|
||||||
regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG3,
|
regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG3,
|
||||||
MESON_SAR_ADC_REG3_ADC_EN, 0);
|
MESON_SAR_ADC_REG3_ADC_EN, 0);
|
||||||
regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG11,
|
meson_sar_adc_set_bandgap(indio_dev, false);
|
||||||
MESON_SAR_ADC_REG11_BANDGAP_EN, 0);
|
|
||||||
clk_disable_unprepare(priv->sana_clk);
|
clk_disable_unprepare(priv->sana_clk);
|
||||||
err_sana_clk:
|
err_sana_clk:
|
||||||
clk_disable_unprepare(priv->core_clk);
|
clk_disable_unprepare(priv->core_clk);
|
||||||
|
@ -765,8 +787,8 @@ static int meson_sar_adc_hw_disable(struct iio_dev *indio_dev)
|
||||||
|
|
||||||
regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG3,
|
regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG3,
|
||||||
MESON_SAR_ADC_REG3_ADC_EN, 0);
|
MESON_SAR_ADC_REG3_ADC_EN, 0);
|
||||||
regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG11,
|
|
||||||
MESON_SAR_ADC_REG11_BANDGAP_EN, 0);
|
meson_sar_adc_set_bandgap(indio_dev, false);
|
||||||
|
|
||||||
clk_disable_unprepare(priv->sana_clk);
|
clk_disable_unprepare(priv->sana_clk);
|
||||||
clk_disable_unprepare(priv->core_clk);
|
clk_disable_unprepare(priv->core_clk);
|
||||||
|
@ -845,30 +867,40 @@ static const struct iio_info meson_sar_adc_iio_info = {
|
||||||
|
|
||||||
static const struct meson_sar_adc_data meson_sar_adc_meson8_data = {
|
static const struct meson_sar_adc_data meson_sar_adc_meson8_data = {
|
||||||
.has_bl30_integration = false,
|
.has_bl30_integration = false,
|
||||||
|
.bandgap_reg = MESON_SAR_ADC_DELTA_10,
|
||||||
|
.regmap_config = &meson_sar_adc_regmap_config_meson8,
|
||||||
.resolution = 10,
|
.resolution = 10,
|
||||||
.name = "meson-meson8-saradc",
|
.name = "meson-meson8-saradc",
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct meson_sar_adc_data meson_sar_adc_meson8b_data = {
|
static const struct meson_sar_adc_data meson_sar_adc_meson8b_data = {
|
||||||
.has_bl30_integration = false,
|
.has_bl30_integration = false,
|
||||||
|
.bandgap_reg = MESON_SAR_ADC_DELTA_10,
|
||||||
|
.regmap_config = &meson_sar_adc_regmap_config_meson8,
|
||||||
.resolution = 10,
|
.resolution = 10,
|
||||||
.name = "meson-meson8b-saradc",
|
.name = "meson-meson8b-saradc",
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct meson_sar_adc_data meson_sar_adc_gxbb_data = {
|
static const struct meson_sar_adc_data meson_sar_adc_gxbb_data = {
|
||||||
.has_bl30_integration = true,
|
.has_bl30_integration = true,
|
||||||
|
.bandgap_reg = MESON_SAR_ADC_REG11,
|
||||||
|
.regmap_config = &meson_sar_adc_regmap_config_gxbb,
|
||||||
.resolution = 10,
|
.resolution = 10,
|
||||||
.name = "meson-gxbb-saradc",
|
.name = "meson-gxbb-saradc",
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct meson_sar_adc_data meson_sar_adc_gxl_data = {
|
static const struct meson_sar_adc_data meson_sar_adc_gxl_data = {
|
||||||
.has_bl30_integration = true,
|
.has_bl30_integration = true,
|
||||||
|
.bandgap_reg = MESON_SAR_ADC_REG11,
|
||||||
|
.regmap_config = &meson_sar_adc_regmap_config_gxbb,
|
||||||
.resolution = 12,
|
.resolution = 12,
|
||||||
.name = "meson-gxl-saradc",
|
.name = "meson-gxl-saradc",
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct meson_sar_adc_data meson_sar_adc_gxm_data = {
|
static const struct meson_sar_adc_data meson_sar_adc_gxm_data = {
|
||||||
.has_bl30_integration = true,
|
.has_bl30_integration = true,
|
||||||
|
.bandgap_reg = MESON_SAR_ADC_REG11,
|
||||||
|
.regmap_config = &meson_sar_adc_regmap_config_gxbb,
|
||||||
.resolution = 12,
|
.resolution = 12,
|
||||||
.name = "meson-gxm-saradc",
|
.name = "meson-gxm-saradc",
|
||||||
};
|
};
|
||||||
|
@ -946,7 +978,7 @@ static int meson_sar_adc_probe(struct platform_device *pdev)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
priv->regmap = devm_regmap_init_mmio(&pdev->dev, base,
|
priv->regmap = devm_regmap_init_mmio(&pdev->dev, base,
|
||||||
&meson_sar_adc_regmap_config);
|
priv->data->regmap_config);
|
||||||
if (IS_ERR(priv->regmap))
|
if (IS_ERR(priv->regmap))
|
||||||
return PTR_ERR(priv->regmap);
|
return PTR_ERR(priv->regmap);
|
||||||
|
|
||||||
|
|
|
@ -371,7 +371,7 @@ static int max30102_read_raw(struct iio_dev *indio_dev,
|
||||||
mutex_unlock(&indio_dev->mlock);
|
mutex_unlock(&indio_dev->mlock);
|
||||||
break;
|
break;
|
||||||
case IIO_CHAN_INFO_SCALE:
|
case IIO_CHAN_INFO_SCALE:
|
||||||
*val = 1; /* 0.0625 */
|
*val = 1000; /* 62.5 */
|
||||||
*val2 = 16;
|
*val2 = 16;
|
||||||
ret = IIO_VAL_FRACTIONAL;
|
ret = IIO_VAL_FRACTIONAL;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -417,8 +417,17 @@ void ib_close_shared_qp_security(struct ib_qp_security *sec)
|
||||||
|
|
||||||
int ib_create_qp_security(struct ib_qp *qp, struct ib_device *dev)
|
int ib_create_qp_security(struct ib_qp *qp, struct ib_device *dev)
|
||||||
{
|
{
|
||||||
|
u8 i = rdma_start_port(dev);
|
||||||
|
bool is_ib = false;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
while (i <= rdma_end_port(dev) && !is_ib)
|
||||||
|
is_ib = rdma_protocol_ib(dev, i++);
|
||||||
|
|
||||||
|
/* If this isn't an IB device don't create the security context */
|
||||||
|
if (!is_ib)
|
||||||
|
return 0;
|
||||||
|
|
||||||
qp->qp_sec = kzalloc(sizeof(*qp->qp_sec), GFP_KERNEL);
|
qp->qp_sec = kzalloc(sizeof(*qp->qp_sec), GFP_KERNEL);
|
||||||
if (!qp->qp_sec)
|
if (!qp->qp_sec)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -441,6 +450,10 @@ EXPORT_SYMBOL(ib_create_qp_security);
|
||||||
|
|
||||||
void ib_destroy_qp_security_begin(struct ib_qp_security *sec)
|
void ib_destroy_qp_security_begin(struct ib_qp_security *sec)
|
||||||
{
|
{
|
||||||
|
/* Return if not IB */
|
||||||
|
if (!sec)
|
||||||
|
return;
|
||||||
|
|
||||||
mutex_lock(&sec->mutex);
|
mutex_lock(&sec->mutex);
|
||||||
|
|
||||||
/* Remove the QP from the lists so it won't get added to
|
/* Remove the QP from the lists so it won't get added to
|
||||||
|
@ -470,6 +483,10 @@ void ib_destroy_qp_security_abort(struct ib_qp_security *sec)
|
||||||
int ret;
|
int ret;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
/* Return if not IB */
|
||||||
|
if (!sec)
|
||||||
|
return;
|
||||||
|
|
||||||
/* If a concurrent cache update is in progress this
|
/* If a concurrent cache update is in progress this
|
||||||
* QP security could be marked for an error state
|
* QP security could be marked for an error state
|
||||||
* transition. Wait for this to complete.
|
* transition. Wait for this to complete.
|
||||||
|
@ -505,6 +522,10 @@ void ib_destroy_qp_security_end(struct ib_qp_security *sec)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
/* Return if not IB */
|
||||||
|
if (!sec)
|
||||||
|
return;
|
||||||
|
|
||||||
/* If a concurrent cache update is occurring we must
|
/* If a concurrent cache update is occurring we must
|
||||||
* wait until this QP security structure is processed
|
* wait until this QP security structure is processed
|
||||||
* in the QP to error flow before destroying it because
|
* in the QP to error flow before destroying it because
|
||||||
|
@ -557,7 +578,7 @@ int ib_security_modify_qp(struct ib_qp *qp,
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
struct ib_ports_pkeys *tmp_pps;
|
struct ib_ports_pkeys *tmp_pps;
|
||||||
struct ib_ports_pkeys *new_pps;
|
struct ib_ports_pkeys *new_pps = NULL;
|
||||||
struct ib_qp *real_qp = qp->real_qp;
|
struct ib_qp *real_qp = qp->real_qp;
|
||||||
bool special_qp = (real_qp->qp_type == IB_QPT_SMI ||
|
bool special_qp = (real_qp->qp_type == IB_QPT_SMI ||
|
||||||
real_qp->qp_type == IB_QPT_GSI ||
|
real_qp->qp_type == IB_QPT_GSI ||
|
||||||
|
@ -565,18 +586,27 @@ int ib_security_modify_qp(struct ib_qp *qp,
|
||||||
bool pps_change = ((qp_attr_mask & (IB_QP_PKEY_INDEX | IB_QP_PORT)) ||
|
bool pps_change = ((qp_attr_mask & (IB_QP_PKEY_INDEX | IB_QP_PORT)) ||
|
||||||
(qp_attr_mask & IB_QP_ALT_PATH));
|
(qp_attr_mask & IB_QP_ALT_PATH));
|
||||||
|
|
||||||
|
WARN_ONCE((qp_attr_mask & IB_QP_PORT &&
|
||||||
|
rdma_protocol_ib(real_qp->device, qp_attr->port_num) &&
|
||||||
|
!real_qp->qp_sec),
|
||||||
|
"%s: QP security is not initialized for IB QP: %d\n",
|
||||||
|
__func__, real_qp->qp_num);
|
||||||
|
|
||||||
/* The port/pkey settings are maintained only for the real QP. Open
|
/* The port/pkey settings are maintained only for the real QP. Open
|
||||||
* handles on the real QP will be in the shared_qp_list. When
|
* handles on the real QP will be in the shared_qp_list. When
|
||||||
* enforcing security on the real QP all the shared QPs will be
|
* enforcing security on the real QP all the shared QPs will be
|
||||||
* checked as well.
|
* checked as well.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (pps_change && !special_qp) {
|
if (pps_change && !special_qp && real_qp->qp_sec) {
|
||||||
mutex_lock(&real_qp->qp_sec->mutex);
|
mutex_lock(&real_qp->qp_sec->mutex);
|
||||||
new_pps = get_new_pps(real_qp,
|
new_pps = get_new_pps(real_qp,
|
||||||
qp_attr,
|
qp_attr,
|
||||||
qp_attr_mask);
|
qp_attr_mask);
|
||||||
|
if (!new_pps) {
|
||||||
|
mutex_unlock(&real_qp->qp_sec->mutex);
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
/* Add this QP to the lists for the new port
|
/* Add this QP to the lists for the new port
|
||||||
* and pkey settings before checking for permission
|
* and pkey settings before checking for permission
|
||||||
* in case there is a concurrent cache update
|
* in case there is a concurrent cache update
|
||||||
|
@ -600,7 +630,7 @@ int ib_security_modify_qp(struct ib_qp *qp,
|
||||||
qp_attr_mask,
|
qp_attr_mask,
|
||||||
udata);
|
udata);
|
||||||
|
|
||||||
if (pps_change && !special_qp) {
|
if (new_pps) {
|
||||||
/* Clean up the lists and free the appropriate
|
/* Clean up the lists and free the appropriate
|
||||||
* ports_pkeys structure.
|
* ports_pkeys structure.
|
||||||
*/
|
*/
|
||||||
|
@ -631,6 +661,9 @@ int ib_security_pkey_access(struct ib_device *dev,
|
||||||
u16 pkey;
|
u16 pkey;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (!rdma_protocol_ib(dev, port_num))
|
||||||
|
return 0;
|
||||||
|
|
||||||
ret = ib_get_cached_pkey(dev, port_num, pkey_index, &pkey);
|
ret = ib_get_cached_pkey(dev, port_num, pkey_index, &pkey);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -665,6 +698,9 @@ int ib_mad_agent_security_setup(struct ib_mad_agent *agent,
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (!rdma_protocol_ib(agent->device, agent->port_num))
|
||||||
|
return 0;
|
||||||
|
|
||||||
ret = security_ib_alloc_security(&agent->security);
|
ret = security_ib_alloc_security(&agent->security);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -690,6 +726,9 @@ int ib_mad_agent_security_setup(struct ib_mad_agent *agent,
|
||||||
|
|
||||||
void ib_mad_agent_security_cleanup(struct ib_mad_agent *agent)
|
void ib_mad_agent_security_cleanup(struct ib_mad_agent *agent)
|
||||||
{
|
{
|
||||||
|
if (!rdma_protocol_ib(agent->device, agent->port_num))
|
||||||
|
return;
|
||||||
|
|
||||||
security_ib_free_security(agent->security);
|
security_ib_free_security(agent->security);
|
||||||
if (agent->lsm_nb_reg)
|
if (agent->lsm_nb_reg)
|
||||||
unregister_lsm_notifier(&agent->lsm_nb);
|
unregister_lsm_notifier(&agent->lsm_nb);
|
||||||
|
@ -697,20 +736,16 @@ void ib_mad_agent_security_cleanup(struct ib_mad_agent *agent)
|
||||||
|
|
||||||
int ib_mad_enforce_security(struct ib_mad_agent_private *map, u16 pkey_index)
|
int ib_mad_enforce_security(struct ib_mad_agent_private *map, u16 pkey_index)
|
||||||
{
|
{
|
||||||
int ret;
|
if (!rdma_protocol_ib(map->agent.device, map->agent.port_num))
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (map->agent.qp->qp_type == IB_QPT_SMI && !map->agent.smp_allowed)
|
if (map->agent.qp->qp_type == IB_QPT_SMI && !map->agent.smp_allowed)
|
||||||
return -EACCES;
|
return -EACCES;
|
||||||
|
|
||||||
ret = ib_security_pkey_access(map->agent.device,
|
return ib_security_pkey_access(map->agent.device,
|
||||||
map->agent.port_num,
|
map->agent.port_num,
|
||||||
pkey_index,
|
pkey_index,
|
||||||
map->agent.security);
|
map->agent.security);
|
||||||
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_SECURITY_INFINIBAND */
|
#endif /* CONFIG_SECURITY_INFINIBAND */
|
||||||
|
|
|
@ -394,6 +394,7 @@ int bnxt_re_add_gid(struct ib_device *ibdev, u8 port_num,
|
||||||
ctx->idx = tbl_idx;
|
ctx->idx = tbl_idx;
|
||||||
ctx->refcnt = 1;
|
ctx->refcnt = 1;
|
||||||
ctx_tbl[tbl_idx] = ctx;
|
ctx_tbl[tbl_idx] = ctx;
|
||||||
|
*context = ctx;
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2216,7 +2216,7 @@ static int __mlx4_ib_modify_qp(void *src, enum mlx4_ib_source_type src_type,
|
||||||
context->mtu_msgmax = (IB_MTU_4096 << 5) |
|
context->mtu_msgmax = (IB_MTU_4096 << 5) |
|
||||||
ilog2(dev->dev->caps.max_gso_sz);
|
ilog2(dev->dev->caps.max_gso_sz);
|
||||||
else
|
else
|
||||||
context->mtu_msgmax = (IB_MTU_4096 << 5) | 12;
|
context->mtu_msgmax = (IB_MTU_4096 << 5) | 13;
|
||||||
} else if (attr_mask & IB_QP_PATH_MTU) {
|
} else if (attr_mask & IB_QP_PATH_MTU) {
|
||||||
if (attr->path_mtu < IB_MTU_256 || attr->path_mtu > IB_MTU_4096) {
|
if (attr->path_mtu < IB_MTU_256 || attr->path_mtu > IB_MTU_4096) {
|
||||||
pr_err("path MTU (%u) is invalid\n",
|
pr_err("path MTU (%u) is invalid\n",
|
||||||
|
|
|
@ -3097,6 +3097,8 @@ static int create_umr_res(struct mlx5_ib_dev *dev)
|
||||||
qp->real_qp = qp;
|
qp->real_qp = qp;
|
||||||
qp->uobject = NULL;
|
qp->uobject = NULL;
|
||||||
qp->qp_type = MLX5_IB_QPT_REG_UMR;
|
qp->qp_type = MLX5_IB_QPT_REG_UMR;
|
||||||
|
qp->send_cq = init_attr->send_cq;
|
||||||
|
qp->recv_cq = init_attr->recv_cq;
|
||||||
|
|
||||||
attr->qp_state = IB_QPS_INIT;
|
attr->qp_state = IB_QPS_INIT;
|
||||||
attr->port_num = 1;
|
attr->port_num = 1;
|
||||||
|
|
|
@ -2254,10 +2254,12 @@ static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn,
|
||||||
uint64_t tmp;
|
uint64_t tmp;
|
||||||
|
|
||||||
if (!sg_res) {
|
if (!sg_res) {
|
||||||
|
unsigned int pgoff = sg->offset & ~PAGE_MASK;
|
||||||
|
|
||||||
sg_res = aligned_nrpages(sg->offset, sg->length);
|
sg_res = aligned_nrpages(sg->offset, sg->length);
|
||||||
sg->dma_address = ((dma_addr_t)iov_pfn << VTD_PAGE_SHIFT) + sg->offset;
|
sg->dma_address = ((dma_addr_t)iov_pfn << VTD_PAGE_SHIFT) + pgoff;
|
||||||
sg->dma_length = sg->length;
|
sg->dma_length = sg->length;
|
||||||
pteval = page_to_phys(sg_page(sg)) | prot;
|
pteval = (sg_phys(sg) - pgoff) | prot;
|
||||||
phys_pfn = pteval >> VTD_PAGE_SHIFT;
|
phys_pfn = pteval >> VTD_PAGE_SHIFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3790,7 +3792,7 @@ static int intel_nontranslate_map_sg(struct device *hddev,
|
||||||
|
|
||||||
for_each_sg(sglist, sg, nelems, i) {
|
for_each_sg(sglist, sg, nelems, i) {
|
||||||
BUG_ON(!sg_page(sg));
|
BUG_ON(!sg_page(sg));
|
||||||
sg->dma_address = page_to_phys(sg_page(sg)) + sg->offset;
|
sg->dma_address = sg_phys(sg);
|
||||||
sg->dma_length = sg->length;
|
sg->dma_length = sg->length;
|
||||||
}
|
}
|
||||||
return nelems;
|
return nelems;
|
||||||
|
|
|
@ -238,7 +238,7 @@ static int __init combiner_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct combiner *combiner;
|
struct combiner *combiner;
|
||||||
size_t alloc_sz;
|
size_t alloc_sz;
|
||||||
u32 nregs;
|
int nregs;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
nregs = count_registers(pdev);
|
nregs = count_registers(pdev);
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#define MBOX_HEXDUMP_MAX_LEN (MBOX_HEXDUMP_LINE_LEN * \
|
#define MBOX_HEXDUMP_MAX_LEN (MBOX_HEXDUMP_LINE_LEN * \
|
||||||
(MBOX_MAX_MSG_LEN / MBOX_BYTES_PER_LINE))
|
(MBOX_MAX_MSG_LEN / MBOX_BYTES_PER_LINE))
|
||||||
|
|
||||||
|
static bool mbox_data_ready;
|
||||||
static struct dentry *root_debugfs_dir;
|
static struct dentry *root_debugfs_dir;
|
||||||
|
|
||||||
struct mbox_test_device {
|
struct mbox_test_device {
|
||||||
|
@ -152,16 +153,14 @@ out:
|
||||||
|
|
||||||
static bool mbox_test_message_data_ready(struct mbox_test_device *tdev)
|
static bool mbox_test_message_data_ready(struct mbox_test_device *tdev)
|
||||||
{
|
{
|
||||||
unsigned char data;
|
bool data_ready;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&tdev->lock, flags);
|
spin_lock_irqsave(&tdev->lock, flags);
|
||||||
data = tdev->rx_buffer[0];
|
data_ready = mbox_data_ready;
|
||||||
spin_unlock_irqrestore(&tdev->lock, flags);
|
spin_unlock_irqrestore(&tdev->lock, flags);
|
||||||
|
|
||||||
if (data != '\0')
|
return data_ready;
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t mbox_test_message_read(struct file *filp, char __user *userbuf,
|
static ssize_t mbox_test_message_read(struct file *filp, char __user *userbuf,
|
||||||
|
@ -223,6 +222,7 @@ static ssize_t mbox_test_message_read(struct file *filp, char __user *userbuf,
|
||||||
*(touser + l) = '\0';
|
*(touser + l) = '\0';
|
||||||
|
|
||||||
memset(tdev->rx_buffer, 0, MBOX_MAX_MSG_LEN);
|
memset(tdev->rx_buffer, 0, MBOX_MAX_MSG_LEN);
|
||||||
|
mbox_data_ready = false;
|
||||||
|
|
||||||
spin_unlock_irqrestore(&tdev->lock, flags);
|
spin_unlock_irqrestore(&tdev->lock, flags);
|
||||||
|
|
||||||
|
@ -292,6 +292,7 @@ static void mbox_test_receive_message(struct mbox_client *client, void *message)
|
||||||
message, MBOX_MAX_MSG_LEN);
|
message, MBOX_MAX_MSG_LEN);
|
||||||
memcpy(tdev->rx_buffer, message, MBOX_MAX_MSG_LEN);
|
memcpy(tdev->rx_buffer, message, MBOX_MAX_MSG_LEN);
|
||||||
}
|
}
|
||||||
|
mbox_data_ready = true;
|
||||||
spin_unlock_irqrestore(&tdev->lock, flags);
|
spin_unlock_irqrestore(&tdev->lock, flags);
|
||||||
|
|
||||||
wake_up_interruptible(&tdev->waitq);
|
wake_up_interruptible(&tdev->waitq);
|
||||||
|
|
|
@ -2571,31 +2571,22 @@ static ssize_t r5c_journal_mode_show(struct mddev *mddev, char *page)
|
||||||
int r5c_journal_mode_set(struct mddev *mddev, int mode)
|
int r5c_journal_mode_set(struct mddev *mddev, int mode)
|
||||||
{
|
{
|
||||||
struct r5conf *conf;
|
struct r5conf *conf;
|
||||||
int err;
|
|
||||||
|
|
||||||
if (mode < R5C_JOURNAL_MODE_WRITE_THROUGH ||
|
if (mode < R5C_JOURNAL_MODE_WRITE_THROUGH ||
|
||||||
mode > R5C_JOURNAL_MODE_WRITE_BACK)
|
mode > R5C_JOURNAL_MODE_WRITE_BACK)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
err = mddev_lock(mddev);
|
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
conf = mddev->private;
|
conf = mddev->private;
|
||||||
if (!conf || !conf->log) {
|
if (!conf || !conf->log)
|
||||||
mddev_unlock(mddev);
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
|
||||||
|
|
||||||
if (raid5_calc_degraded(conf) > 0 &&
|
if (raid5_calc_degraded(conf) > 0 &&
|
||||||
mode == R5C_JOURNAL_MODE_WRITE_BACK) {
|
mode == R5C_JOURNAL_MODE_WRITE_BACK)
|
||||||
mddev_unlock(mddev);
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
|
||||||
|
|
||||||
mddev_suspend(mddev);
|
mddev_suspend(mddev);
|
||||||
conf->log->r5c_journal_mode = mode;
|
conf->log->r5c_journal_mode = mode;
|
||||||
mddev_resume(mddev);
|
mddev_resume(mddev);
|
||||||
mddev_unlock(mddev);
|
|
||||||
|
|
||||||
pr_debug("md/raid:%s: setting r5c cache mode to %d: %s\n",
|
pr_debug("md/raid:%s: setting r5c cache mode to %d: %s\n",
|
||||||
mdname(mddev), mode, r5c_journal_mode_str[mode]);
|
mdname(mddev), mode, r5c_journal_mode_str[mode]);
|
||||||
|
@ -2608,6 +2599,7 @@ static ssize_t r5c_journal_mode_store(struct mddev *mddev,
|
||||||
{
|
{
|
||||||
int mode = ARRAY_SIZE(r5c_journal_mode_str);
|
int mode = ARRAY_SIZE(r5c_journal_mode_str);
|
||||||
size_t len = length;
|
size_t len = length;
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (len < 2)
|
if (len < 2)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -2619,8 +2611,12 @@ static ssize_t r5c_journal_mode_store(struct mddev *mddev,
|
||||||
if (strlen(r5c_journal_mode_str[mode]) == len &&
|
if (strlen(r5c_journal_mode_str[mode]) == len &&
|
||||||
!strncmp(page, r5c_journal_mode_str[mode], len))
|
!strncmp(page, r5c_journal_mode_str[mode], len))
|
||||||
break;
|
break;
|
||||||
|
ret = mddev_lock(mddev);
|
||||||
return r5c_journal_mode_set(mddev, mode) ?: length;
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
ret = r5c_journal_mode_set(mddev, mode);
|
||||||
|
mddev_unlock(mddev);
|
||||||
|
return ret ?: length;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct md_sysfs_entry
|
struct md_sysfs_entry
|
||||||
|
|
|
@ -38,41 +38,41 @@ static const struct {
|
||||||
[RC_PROTO_UNKNOWN] = { .name = "unknown", .repeat_period = 250 },
|
[RC_PROTO_UNKNOWN] = { .name = "unknown", .repeat_period = 250 },
|
||||||
[RC_PROTO_OTHER] = { .name = "other", .repeat_period = 250 },
|
[RC_PROTO_OTHER] = { .name = "other", .repeat_period = 250 },
|
||||||
[RC_PROTO_RC5] = { .name = "rc-5",
|
[RC_PROTO_RC5] = { .name = "rc-5",
|
||||||
.scancode_bits = 0x1f7f, .repeat_period = 164 },
|
.scancode_bits = 0x1f7f, .repeat_period = 250 },
|
||||||
[RC_PROTO_RC5X_20] = { .name = "rc-5x-20",
|
[RC_PROTO_RC5X_20] = { .name = "rc-5x-20",
|
||||||
.scancode_bits = 0x1f7f3f, .repeat_period = 164 },
|
.scancode_bits = 0x1f7f3f, .repeat_period = 250 },
|
||||||
[RC_PROTO_RC5_SZ] = { .name = "rc-5-sz",
|
[RC_PROTO_RC5_SZ] = { .name = "rc-5-sz",
|
||||||
.scancode_bits = 0x2fff, .repeat_period = 164 },
|
.scancode_bits = 0x2fff, .repeat_period = 250 },
|
||||||
[RC_PROTO_JVC] = { .name = "jvc",
|
[RC_PROTO_JVC] = { .name = "jvc",
|
||||||
.scancode_bits = 0xffff, .repeat_period = 250 },
|
.scancode_bits = 0xffff, .repeat_period = 250 },
|
||||||
[RC_PROTO_SONY12] = { .name = "sony-12",
|
[RC_PROTO_SONY12] = { .name = "sony-12",
|
||||||
.scancode_bits = 0x1f007f, .repeat_period = 100 },
|
.scancode_bits = 0x1f007f, .repeat_period = 250 },
|
||||||
[RC_PROTO_SONY15] = { .name = "sony-15",
|
[RC_PROTO_SONY15] = { .name = "sony-15",
|
||||||
.scancode_bits = 0xff007f, .repeat_period = 100 },
|
.scancode_bits = 0xff007f, .repeat_period = 250 },
|
||||||
[RC_PROTO_SONY20] = { .name = "sony-20",
|
[RC_PROTO_SONY20] = { .name = "sony-20",
|
||||||
.scancode_bits = 0x1fff7f, .repeat_period = 100 },
|
.scancode_bits = 0x1fff7f, .repeat_period = 250 },
|
||||||
[RC_PROTO_NEC] = { .name = "nec",
|
[RC_PROTO_NEC] = { .name = "nec",
|
||||||
.scancode_bits = 0xffff, .repeat_period = 160 },
|
.scancode_bits = 0xffff, .repeat_period = 250 },
|
||||||
[RC_PROTO_NECX] = { .name = "nec-x",
|
[RC_PROTO_NECX] = { .name = "nec-x",
|
||||||
.scancode_bits = 0xffffff, .repeat_period = 160 },
|
.scancode_bits = 0xffffff, .repeat_period = 250 },
|
||||||
[RC_PROTO_NEC32] = { .name = "nec-32",
|
[RC_PROTO_NEC32] = { .name = "nec-32",
|
||||||
.scancode_bits = 0xffffffff, .repeat_period = 160 },
|
.scancode_bits = 0xffffffff, .repeat_period = 250 },
|
||||||
[RC_PROTO_SANYO] = { .name = "sanyo",
|
[RC_PROTO_SANYO] = { .name = "sanyo",
|
||||||
.scancode_bits = 0x1fffff, .repeat_period = 250 },
|
.scancode_bits = 0x1fffff, .repeat_period = 250 },
|
||||||
[RC_PROTO_MCIR2_KBD] = { .name = "mcir2-kbd",
|
[RC_PROTO_MCIR2_KBD] = { .name = "mcir2-kbd",
|
||||||
.scancode_bits = 0xffff, .repeat_period = 150 },
|
.scancode_bits = 0xffff, .repeat_period = 250 },
|
||||||
[RC_PROTO_MCIR2_MSE] = { .name = "mcir2-mse",
|
[RC_PROTO_MCIR2_MSE] = { .name = "mcir2-mse",
|
||||||
.scancode_bits = 0x1fffff, .repeat_period = 150 },
|
.scancode_bits = 0x1fffff, .repeat_period = 250 },
|
||||||
[RC_PROTO_RC6_0] = { .name = "rc-6-0",
|
[RC_PROTO_RC6_0] = { .name = "rc-6-0",
|
||||||
.scancode_bits = 0xffff, .repeat_period = 164 },
|
.scancode_bits = 0xffff, .repeat_period = 250 },
|
||||||
[RC_PROTO_RC6_6A_20] = { .name = "rc-6-6a-20",
|
[RC_PROTO_RC6_6A_20] = { .name = "rc-6-6a-20",
|
||||||
.scancode_bits = 0xfffff, .repeat_period = 164 },
|
.scancode_bits = 0xfffff, .repeat_period = 250 },
|
||||||
[RC_PROTO_RC6_6A_24] = { .name = "rc-6-6a-24",
|
[RC_PROTO_RC6_6A_24] = { .name = "rc-6-6a-24",
|
||||||
.scancode_bits = 0xffffff, .repeat_period = 164 },
|
.scancode_bits = 0xffffff, .repeat_period = 250 },
|
||||||
[RC_PROTO_RC6_6A_32] = { .name = "rc-6-6a-32",
|
[RC_PROTO_RC6_6A_32] = { .name = "rc-6-6a-32",
|
||||||
.scancode_bits = 0xffffffff, .repeat_period = 164 },
|
.scancode_bits = 0xffffffff, .repeat_period = 250 },
|
||||||
[RC_PROTO_RC6_MCE] = { .name = "rc-6-mce",
|
[RC_PROTO_RC6_MCE] = { .name = "rc-6-mce",
|
||||||
.scancode_bits = 0xffff7fff, .repeat_period = 164 },
|
.scancode_bits = 0xffff7fff, .repeat_period = 250 },
|
||||||
[RC_PROTO_SHARP] = { .name = "sharp",
|
[RC_PROTO_SHARP] = { .name = "sharp",
|
||||||
.scancode_bits = 0x1fff, .repeat_period = 250 },
|
.scancode_bits = 0x1fff, .repeat_period = 250 },
|
||||||
[RC_PROTO_XMP] = { .name = "xmp", .repeat_period = 250 },
|
[RC_PROTO_XMP] = { .name = "xmp", .repeat_period = 250 },
|
||||||
|
|
|
@ -57,7 +57,7 @@ static void add_read_queue(int flag, unsigned long val);
|
||||||
static irqreturn_t sir_interrupt(int irq, void *dev_id);
|
static irqreturn_t sir_interrupt(int irq, void *dev_id);
|
||||||
static void send_space(unsigned long len);
|
static void send_space(unsigned long len);
|
||||||
static void send_pulse(unsigned long len);
|
static void send_pulse(unsigned long len);
|
||||||
static void init_hardware(void);
|
static int init_hardware(void);
|
||||||
static void drop_hardware(void);
|
static void drop_hardware(void);
|
||||||
/* Initialisation */
|
/* Initialisation */
|
||||||
|
|
||||||
|
@ -263,11 +263,36 @@ static void send_pulse(unsigned long len)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void init_hardware(void)
|
static int init_hardware(void)
|
||||||
{
|
{
|
||||||
|
u8 scratch, scratch2, scratch3;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&hardware_lock, flags);
|
spin_lock_irqsave(&hardware_lock, flags);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is a simple port existence test, borrowed from the autoconfig
|
||||||
|
* function in drivers/tty/serial/8250/8250_port.c
|
||||||
|
*/
|
||||||
|
scratch = sinp(UART_IER);
|
||||||
|
soutp(UART_IER, 0);
|
||||||
|
#ifdef __i386__
|
||||||
|
outb(0xff, 0x080);
|
||||||
|
#endif
|
||||||
|
scratch2 = sinp(UART_IER) & 0x0f;
|
||||||
|
soutp(UART_IER, 0x0f);
|
||||||
|
#ifdef __i386__
|
||||||
|
outb(0x00, 0x080);
|
||||||
|
#endif
|
||||||
|
scratch3 = sinp(UART_IER) & 0x0f;
|
||||||
|
soutp(UART_IER, scratch);
|
||||||
|
if (scratch2 != 0 || scratch3 != 0x0f) {
|
||||||
|
/* we fail, there's nothing here */
|
||||||
|
spin_unlock_irqrestore(&hardware_lock, flags);
|
||||||
|
pr_err("port existence test failed, cannot continue\n");
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
/* reset UART */
|
/* reset UART */
|
||||||
outb(0, io + UART_MCR);
|
outb(0, io + UART_MCR);
|
||||||
outb(0, io + UART_IER);
|
outb(0, io + UART_IER);
|
||||||
|
@ -285,6 +310,8 @@ static void init_hardware(void)
|
||||||
/* turn on UART */
|
/* turn on UART */
|
||||||
outb(UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2, io + UART_MCR);
|
outb(UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2, io + UART_MCR);
|
||||||
spin_unlock_irqrestore(&hardware_lock, flags);
|
spin_unlock_irqrestore(&hardware_lock, flags);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void drop_hardware(void)
|
static void drop_hardware(void)
|
||||||
|
@ -334,14 +361,19 @@ static int sir_ir_probe(struct platform_device *dev)
|
||||||
pr_err("IRQ %d already in use.\n", irq);
|
pr_err("IRQ %d already in use.\n", irq);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
retval = init_hardware();
|
||||||
|
if (retval) {
|
||||||
|
del_timer_sync(&timerlist);
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
pr_info("I/O port 0x%.4x, IRQ %d.\n", io, irq);
|
pr_info("I/O port 0x%.4x, IRQ %d.\n", io, irq);
|
||||||
|
|
||||||
retval = devm_rc_register_device(&sir_ir_dev->dev, rcdev);
|
retval = devm_rc_register_device(&sir_ir_dev->dev, rcdev);
|
||||||
if (retval < 0)
|
if (retval < 0)
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
init_hardware();
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -223,8 +223,20 @@ EXPORT_SYMBOL(dibusb_i2c_algo);
|
||||||
|
|
||||||
int dibusb_read_eeprom_byte(struct dvb_usb_device *d, u8 offs, u8 *val)
|
int dibusb_read_eeprom_byte(struct dvb_usb_device *d, u8 offs, u8 *val)
|
||||||
{
|
{
|
||||||
u8 wbuf[1] = { offs };
|
u8 *buf;
|
||||||
return dibusb_i2c_msg(d, 0x50, wbuf, 1, val, 1);
|
int rc;
|
||||||
|
|
||||||
|
buf = kmalloc(2, GFP_KERNEL);
|
||||||
|
if (!buf)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
buf[0] = offs;
|
||||||
|
|
||||||
|
rc = dibusb_i2c_msg(d, 0x50, &buf[0], 1, &buf[1], 1);
|
||||||
|
*val = buf[1];
|
||||||
|
kfree(buf);
|
||||||
|
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(dibusb_read_eeprom_byte);
|
EXPORT_SYMBOL(dibusb_read_eeprom_byte);
|
||||||
|
|
||||||
|
|
|
@ -189,7 +189,7 @@
|
||||||
* MX35 FlexCAN2 03.00.00.00 no no ? no no
|
* MX35 FlexCAN2 03.00.00.00 no no ? no no
|
||||||
* MX53 FlexCAN2 03.00.00.00 yes no no no no
|
* MX53 FlexCAN2 03.00.00.00 yes no no no no
|
||||||
* MX6s FlexCAN3 10.00.12.00 yes yes no no yes
|
* MX6s FlexCAN3 10.00.12.00 yes yes no no yes
|
||||||
* VF610 FlexCAN3 ? no yes ? yes yes?
|
* VF610 FlexCAN3 ? no yes no yes yes?
|
||||||
*
|
*
|
||||||
* Some SOCs do not have the RX_WARN & TX_WARN interrupt line connected.
|
* Some SOCs do not have the RX_WARN & TX_WARN interrupt line connected.
|
||||||
*/
|
*/
|
||||||
|
@ -297,7 +297,8 @@ static const struct flexcan_devtype_data fsl_imx6q_devtype_data = {
|
||||||
|
|
||||||
static const struct flexcan_devtype_data fsl_vf610_devtype_data = {
|
static const struct flexcan_devtype_data fsl_vf610_devtype_data = {
|
||||||
.quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
|
.quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS |
|
||||||
FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP,
|
FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP |
|
||||||
|
FLEXCAN_QUIRK_BROKEN_PERR_STATE,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct can_bittiming_const flexcan_bittiming_const = {
|
static const struct can_bittiming_const flexcan_bittiming_const = {
|
||||||
|
|
|
@ -258,21 +258,18 @@ static int pucan_handle_can_rx(struct peak_canfd_priv *priv,
|
||||||
/* if this frame is an echo, */
|
/* if this frame is an echo, */
|
||||||
if ((rx_msg_flags & PUCAN_MSG_LOOPED_BACK) &&
|
if ((rx_msg_flags & PUCAN_MSG_LOOPED_BACK) &&
|
||||||
!(rx_msg_flags & PUCAN_MSG_SELF_RECEIVE)) {
|
!(rx_msg_flags & PUCAN_MSG_SELF_RECEIVE)) {
|
||||||
int n;
|
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&priv->echo_lock, flags);
|
spin_lock_irqsave(&priv->echo_lock, flags);
|
||||||
n = can_get_echo_skb(priv->ndev, msg->client);
|
can_get_echo_skb(priv->ndev, msg->client);
|
||||||
spin_unlock_irqrestore(&priv->echo_lock, flags);
|
spin_unlock_irqrestore(&priv->echo_lock, flags);
|
||||||
|
|
||||||
/* count bytes of the echo instead of skb */
|
/* count bytes of the echo instead of skb */
|
||||||
stats->tx_bytes += cf_len;
|
stats->tx_bytes += cf_len;
|
||||||
stats->tx_packets++;
|
stats->tx_packets++;
|
||||||
|
|
||||||
if (n) {
|
/* restart tx queue (a slot is free) */
|
||||||
/* restart tx queue only if a slot is free */
|
netif_wake_queue(priv->ndev);
|
||||||
netif_wake_queue(priv->ndev);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -825,7 +825,10 @@ err_release_regions:
|
||||||
err_disable_pci:
|
err_disable_pci:
|
||||||
pci_disable_device(pdev);
|
pci_disable_device(pdev);
|
||||||
|
|
||||||
return err;
|
/* pci_xxx_config_word() return positive PCIBIOS_xxx error codes while
|
||||||
|
* the probe() function must return a negative errno in case of failure
|
||||||
|
* (err is unchanged if negative) */
|
||||||
|
return pcibios_err_to_errno(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* free the board structure object, as well as its resources: */
|
/* free the board structure object, as well as its resources: */
|
||||||
|
|
|
@ -717,7 +717,10 @@ failure_release_regions:
|
||||||
failure_disable_pci:
|
failure_disable_pci:
|
||||||
pci_disable_device(pdev);
|
pci_disable_device(pdev);
|
||||||
|
|
||||||
return err;
|
/* pci_xxx_config_word() return positive PCIBIOS_xxx error codes while
|
||||||
|
* the probe() function must return a negative errno in case of failure
|
||||||
|
* (err is unchanged if negative) */
|
||||||
|
return pcibios_err_to_errno(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void peak_pci_remove(struct pci_dev *pdev)
|
static void peak_pci_remove(struct pci_dev *pdev)
|
||||||
|
|
|
@ -637,6 +637,9 @@ static int ti_hecc_rx_poll(struct napi_struct *napi, int quota)
|
||||||
mbx_mask = hecc_read(priv, HECC_CANMIM);
|
mbx_mask = hecc_read(priv, HECC_CANMIM);
|
||||||
mbx_mask |= HECC_TX_MBOX_MASK;
|
mbx_mask |= HECC_TX_MBOX_MASK;
|
||||||
hecc_write(priv, HECC_CANMIM, mbx_mask);
|
hecc_write(priv, HECC_CANMIM, mbx_mask);
|
||||||
|
} else {
|
||||||
|
/* repoll is done only if whole budget is used */
|
||||||
|
num_pkts = quota;
|
||||||
}
|
}
|
||||||
|
|
||||||
return num_pkts;
|
return num_pkts;
|
||||||
|
|
|
@ -288,6 +288,8 @@ static void ems_usb_read_interrupt_callback(struct urb *urb)
|
||||||
|
|
||||||
case -ECONNRESET: /* unlink */
|
case -ECONNRESET: /* unlink */
|
||||||
case -ENOENT:
|
case -ENOENT:
|
||||||
|
case -EPIPE:
|
||||||
|
case -EPROTO:
|
||||||
case -ESHUTDOWN:
|
case -ESHUTDOWN:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -393,6 +393,8 @@ static void esd_usb2_read_bulk_callback(struct urb *urb)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case -ENOENT:
|
case -ENOENT:
|
||||||
|
case -EPIPE:
|
||||||
|
case -EPROTO:
|
||||||
case -ESHUTDOWN:
|
case -ESHUTDOWN:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -609,8 +609,8 @@ static int kvaser_usb_wait_msg(const struct kvaser_usb *dev, u8 id,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pos + tmp->len > actual_len) {
|
if (pos + tmp->len > actual_len) {
|
||||||
dev_err(dev->udev->dev.parent,
|
dev_err_ratelimited(dev->udev->dev.parent,
|
||||||
"Format error\n");
|
"Format error\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -813,6 +813,7 @@ static int kvaser_usb_simple_msg_async(struct kvaser_usb_net_priv *priv,
|
||||||
if (err) {
|
if (err) {
|
||||||
netdev_err(netdev, "Error transmitting URB\n");
|
netdev_err(netdev, "Error transmitting URB\n");
|
||||||
usb_unanchor_urb(urb);
|
usb_unanchor_urb(urb);
|
||||||
|
kfree(buf);
|
||||||
usb_free_urb(urb);
|
usb_free_urb(urb);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
@ -1325,6 +1326,8 @@ static void kvaser_usb_read_bulk_callback(struct urb *urb)
|
||||||
case 0:
|
case 0:
|
||||||
break;
|
break;
|
||||||
case -ENOENT:
|
case -ENOENT:
|
||||||
|
case -EPIPE:
|
||||||
|
case -EPROTO:
|
||||||
case -ESHUTDOWN:
|
case -ESHUTDOWN:
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
|
@ -1333,7 +1336,7 @@ static void kvaser_usb_read_bulk_callback(struct urb *urb)
|
||||||
goto resubmit_urb;
|
goto resubmit_urb;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (pos <= urb->actual_length - MSG_HEADER_LEN) {
|
while (pos <= (int)(urb->actual_length - MSG_HEADER_LEN)) {
|
||||||
msg = urb->transfer_buffer + pos;
|
msg = urb->transfer_buffer + pos;
|
||||||
|
|
||||||
/* The Kvaser firmware can only read and write messages that
|
/* The Kvaser firmware can only read and write messages that
|
||||||
|
@ -1352,7 +1355,8 @@ static void kvaser_usb_read_bulk_callback(struct urb *urb)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pos + msg->len > urb->actual_length) {
|
if (pos + msg->len > urb->actual_length) {
|
||||||
dev_err(dev->udev->dev.parent, "Format error\n");
|
dev_err_ratelimited(dev->udev->dev.parent,
|
||||||
|
"Format error\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1768,6 +1772,7 @@ static netdev_tx_t kvaser_usb_start_xmit(struct sk_buff *skb,
|
||||||
spin_unlock_irqrestore(&priv->tx_contexts_lock, flags);
|
spin_unlock_irqrestore(&priv->tx_contexts_lock, flags);
|
||||||
|
|
||||||
usb_unanchor_urb(urb);
|
usb_unanchor_urb(urb);
|
||||||
|
kfree(buf);
|
||||||
|
|
||||||
stats->tx_dropped++;
|
stats->tx_dropped++;
|
||||||
|
|
||||||
|
|
|
@ -592,6 +592,8 @@ static void mcba_usb_read_bulk_callback(struct urb *urb)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case -ENOENT:
|
case -ENOENT:
|
||||||
|
case -EPIPE:
|
||||||
|
case -EPROTO:
|
||||||
case -ESHUTDOWN:
|
case -ESHUTDOWN:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -524,6 +524,8 @@ static void usb_8dev_read_bulk_callback(struct urb *urb)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case -ENOENT:
|
case -ENOENT:
|
||||||
|
case -EPIPE:
|
||||||
|
case -EPROTO:
|
||||||
case -ESHUTDOWN:
|
case -ESHUTDOWN:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -52,8 +52,7 @@ struct nfp_app;
|
||||||
#define NFP_FLOWER_MASK_ELEMENT_RS 1
|
#define NFP_FLOWER_MASK_ELEMENT_RS 1
|
||||||
#define NFP_FLOWER_MASK_HASH_BITS 10
|
#define NFP_FLOWER_MASK_HASH_BITS 10
|
||||||
|
|
||||||
#define NFP_FL_META_FLAG_NEW_MASK 128
|
#define NFP_FL_META_FLAG_MANAGE_MASK BIT(7)
|
||||||
#define NFP_FL_META_FLAG_LAST_MASK 1
|
|
||||||
|
|
||||||
#define NFP_FL_MASK_REUSE_TIME_NS 40000
|
#define NFP_FL_MASK_REUSE_TIME_NS 40000
|
||||||
#define NFP_FL_MASK_ID_LOCATION 1
|
#define NFP_FL_MASK_ID_LOCATION 1
|
||||||
|
|
|
@ -282,7 +282,7 @@ nfp_check_mask_add(struct nfp_app *app, char *mask_data, u32 mask_len,
|
||||||
id = nfp_add_mask_table(app, mask_data, mask_len);
|
id = nfp_add_mask_table(app, mask_data, mask_len);
|
||||||
if (id < 0)
|
if (id < 0)
|
||||||
return false;
|
return false;
|
||||||
*meta_flags |= NFP_FL_META_FLAG_NEW_MASK;
|
*meta_flags |= NFP_FL_META_FLAG_MANAGE_MASK;
|
||||||
}
|
}
|
||||||
*mask_id = id;
|
*mask_id = id;
|
||||||
|
|
||||||
|
@ -299,6 +299,9 @@ nfp_check_mask_remove(struct nfp_app *app, char *mask_data, u32 mask_len,
|
||||||
if (!mask_entry)
|
if (!mask_entry)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (meta_flags)
|
||||||
|
*meta_flags &= ~NFP_FL_META_FLAG_MANAGE_MASK;
|
||||||
|
|
||||||
*mask_id = mask_entry->mask_id;
|
*mask_id = mask_entry->mask_id;
|
||||||
mask_entry->ref_cnt--;
|
mask_entry->ref_cnt--;
|
||||||
if (!mask_entry->ref_cnt) {
|
if (!mask_entry->ref_cnt) {
|
||||||
|
@ -306,7 +309,7 @@ nfp_check_mask_remove(struct nfp_app *app, char *mask_data, u32 mask_len,
|
||||||
nfp_release_mask_id(app, *mask_id);
|
nfp_release_mask_id(app, *mask_id);
|
||||||
kfree(mask_entry);
|
kfree(mask_entry);
|
||||||
if (meta_flags)
|
if (meta_flags)
|
||||||
*meta_flags |= NFP_FL_META_FLAG_LAST_MASK;
|
*meta_flags |= NFP_FL_META_FLAG_MANAGE_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -297,6 +297,8 @@ int nfp_repr_init(struct nfp_app *app, struct net_device *netdev,
|
||||||
netdev->netdev_ops = &nfp_repr_netdev_ops;
|
netdev->netdev_ops = &nfp_repr_netdev_ops;
|
||||||
netdev->ethtool_ops = &nfp_port_ethtool_ops;
|
netdev->ethtool_ops = &nfp_port_ethtool_ops;
|
||||||
|
|
||||||
|
netdev->max_mtu = pf_netdev->max_mtu;
|
||||||
|
|
||||||
SWITCHDEV_SET_OPS(netdev, &nfp_port_switchdev_ops);
|
SWITCHDEV_SET_OPS(netdev, &nfp_port_switchdev_ops);
|
||||||
|
|
||||||
if (nfp_app_has_tc(app)) {
|
if (nfp_app_has_tc(app)) {
|
||||||
|
|
|
@ -1503,6 +1503,7 @@ static int geneve_fill_info(struct sk_buff *skb, const struct net_device *dev)
|
||||||
{
|
{
|
||||||
struct geneve_dev *geneve = netdev_priv(dev);
|
struct geneve_dev *geneve = netdev_priv(dev);
|
||||||
struct ip_tunnel_info *info = &geneve->info;
|
struct ip_tunnel_info *info = &geneve->info;
|
||||||
|
bool metadata = geneve->collect_md;
|
||||||
__u8 tmp_vni[3];
|
__u8 tmp_vni[3];
|
||||||
__u32 vni;
|
__u32 vni;
|
||||||
|
|
||||||
|
@ -1511,32 +1512,24 @@ static int geneve_fill_info(struct sk_buff *skb, const struct net_device *dev)
|
||||||
if (nla_put_u32(skb, IFLA_GENEVE_ID, vni))
|
if (nla_put_u32(skb, IFLA_GENEVE_ID, vni))
|
||||||
goto nla_put_failure;
|
goto nla_put_failure;
|
||||||
|
|
||||||
if (rtnl_dereference(geneve->sock4)) {
|
if (!metadata && ip_tunnel_info_af(info) == AF_INET) {
|
||||||
if (nla_put_in_addr(skb, IFLA_GENEVE_REMOTE,
|
if (nla_put_in_addr(skb, IFLA_GENEVE_REMOTE,
|
||||||
info->key.u.ipv4.dst))
|
info->key.u.ipv4.dst))
|
||||||
goto nla_put_failure;
|
goto nla_put_failure;
|
||||||
|
|
||||||
if (nla_put_u8(skb, IFLA_GENEVE_UDP_CSUM,
|
if (nla_put_u8(skb, IFLA_GENEVE_UDP_CSUM,
|
||||||
!!(info->key.tun_flags & TUNNEL_CSUM)))
|
!!(info->key.tun_flags & TUNNEL_CSUM)))
|
||||||
goto nla_put_failure;
|
goto nla_put_failure;
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_IPV6)
|
#if IS_ENABLED(CONFIG_IPV6)
|
||||||
if (rtnl_dereference(geneve->sock6)) {
|
} else if (!metadata) {
|
||||||
if (nla_put_in6_addr(skb, IFLA_GENEVE_REMOTE6,
|
if (nla_put_in6_addr(skb, IFLA_GENEVE_REMOTE6,
|
||||||
&info->key.u.ipv6.dst))
|
&info->key.u.ipv6.dst))
|
||||||
goto nla_put_failure;
|
goto nla_put_failure;
|
||||||
|
|
||||||
if (nla_put_u8(skb, IFLA_GENEVE_UDP_ZERO_CSUM6_TX,
|
if (nla_put_u8(skb, IFLA_GENEVE_UDP_ZERO_CSUM6_TX,
|
||||||
!(info->key.tun_flags & TUNNEL_CSUM)))
|
!(info->key.tun_flags & TUNNEL_CSUM)))
|
||||||
goto nla_put_failure;
|
goto nla_put_failure;
|
||||||
|
|
||||||
if (nla_put_u8(skb, IFLA_GENEVE_UDP_ZERO_CSUM6_RX,
|
|
||||||
!geneve->use_udp6_rx_checksums))
|
|
||||||
goto nla_put_failure;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
if (nla_put_u8(skb, IFLA_GENEVE_TTL, info->key.ttl) ||
|
if (nla_put_u8(skb, IFLA_GENEVE_TTL, info->key.ttl) ||
|
||||||
nla_put_u8(skb, IFLA_GENEVE_TOS, info->key.tos) ||
|
nla_put_u8(skb, IFLA_GENEVE_TOS, info->key.tos) ||
|
||||||
|
@ -1546,10 +1539,13 @@ static int geneve_fill_info(struct sk_buff *skb, const struct net_device *dev)
|
||||||
if (nla_put_be16(skb, IFLA_GENEVE_PORT, info->key.tp_dst))
|
if (nla_put_be16(skb, IFLA_GENEVE_PORT, info->key.tp_dst))
|
||||||
goto nla_put_failure;
|
goto nla_put_failure;
|
||||||
|
|
||||||
if (geneve->collect_md) {
|
if (metadata && nla_put_flag(skb, IFLA_GENEVE_COLLECT_METADATA))
|
||||||
if (nla_put_flag(skb, IFLA_GENEVE_COLLECT_METADATA))
|
|
||||||
goto nla_put_failure;
|
goto nla_put_failure;
|
||||||
}
|
|
||||||
|
if (nla_put_u8(skb, IFLA_GENEVE_UDP_ZERO_CSUM6_RX,
|
||||||
|
!geneve->use_udp6_rx_checksums))
|
||||||
|
goto nla_put_failure;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
nla_put_failure:
|
nla_put_failure:
|
||||||
|
|
|
@ -4096,8 +4096,8 @@ release:
|
||||||
sdio_release_host(sdiodev->func[1]);
|
sdio_release_host(sdiodev->func[1]);
|
||||||
fail:
|
fail:
|
||||||
brcmf_dbg(TRACE, "failed: dev=%s, err=%d\n", dev_name(dev), err);
|
brcmf_dbg(TRACE, "failed: dev=%s, err=%d\n", dev_name(dev), err);
|
||||||
device_release_driver(dev);
|
|
||||||
device_release_driver(&sdiodev->func[2]->dev);
|
device_release_driver(&sdiodev->func[2]->dev);
|
||||||
|
device_release_driver(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
|
struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
|
||||||
|
|
|
@ -68,6 +68,9 @@
|
||||||
* @IWL_MVM_DQA_CMD_QUEUE: a queue reserved for sending HCMDs to the FW
|
* @IWL_MVM_DQA_CMD_QUEUE: a queue reserved for sending HCMDs to the FW
|
||||||
* @IWL_MVM_DQA_AUX_QUEUE: a queue reserved for aux frames
|
* @IWL_MVM_DQA_AUX_QUEUE: a queue reserved for aux frames
|
||||||
* @IWL_MVM_DQA_P2P_DEVICE_QUEUE: a queue reserved for P2P device frames
|
* @IWL_MVM_DQA_P2P_DEVICE_QUEUE: a queue reserved for P2P device frames
|
||||||
|
* @IWL_MVM_DQA_INJECT_MONITOR_QUEUE: a queue reserved for injection using
|
||||||
|
* monitor mode. Note this queue is the same as the queue for P2P device
|
||||||
|
* but we can't have active monitor mode along with P2P device anyway.
|
||||||
* @IWL_MVM_DQA_GCAST_QUEUE: a queue reserved for P2P GO/SoftAP GCAST frames
|
* @IWL_MVM_DQA_GCAST_QUEUE: a queue reserved for P2P GO/SoftAP GCAST frames
|
||||||
* @IWL_MVM_DQA_BSS_CLIENT_QUEUE: a queue reserved for BSS activity, to ensure
|
* @IWL_MVM_DQA_BSS_CLIENT_QUEUE: a queue reserved for BSS activity, to ensure
|
||||||
* that we are never left without the possibility to connect to an AP.
|
* that we are never left without the possibility to connect to an AP.
|
||||||
|
@ -87,6 +90,7 @@ enum iwl_mvm_dqa_txq {
|
||||||
IWL_MVM_DQA_CMD_QUEUE = 0,
|
IWL_MVM_DQA_CMD_QUEUE = 0,
|
||||||
IWL_MVM_DQA_AUX_QUEUE = 1,
|
IWL_MVM_DQA_AUX_QUEUE = 1,
|
||||||
IWL_MVM_DQA_P2P_DEVICE_QUEUE = 2,
|
IWL_MVM_DQA_P2P_DEVICE_QUEUE = 2,
|
||||||
|
IWL_MVM_DQA_INJECT_MONITOR_QUEUE = 2,
|
||||||
IWL_MVM_DQA_GCAST_QUEUE = 3,
|
IWL_MVM_DQA_GCAST_QUEUE = 3,
|
||||||
IWL_MVM_DQA_BSS_CLIENT_QUEUE = 4,
|
IWL_MVM_DQA_BSS_CLIENT_QUEUE = 4,
|
||||||
IWL_MVM_DQA_MIN_MGMT_QUEUE = 5,
|
IWL_MVM_DQA_MIN_MGMT_QUEUE = 5,
|
||||||
|
|
|
@ -117,6 +117,7 @@
|
||||||
#define FH_RSCSR_FRAME_INVALID 0x55550000
|
#define FH_RSCSR_FRAME_INVALID 0x55550000
|
||||||
#define FH_RSCSR_FRAME_ALIGN 0x40
|
#define FH_RSCSR_FRAME_ALIGN 0x40
|
||||||
#define FH_RSCSR_RPA_EN BIT(25)
|
#define FH_RSCSR_RPA_EN BIT(25)
|
||||||
|
#define FH_RSCSR_RADA_EN BIT(26)
|
||||||
#define FH_RSCSR_RXQ_POS 16
|
#define FH_RSCSR_RXQ_POS 16
|
||||||
#define FH_RSCSR_RXQ_MASK 0x3F0000
|
#define FH_RSCSR_RXQ_MASK 0x3F0000
|
||||||
|
|
||||||
|
@ -128,7 +129,8 @@ struct iwl_rx_packet {
|
||||||
* 31: flag flush RB request
|
* 31: flag flush RB request
|
||||||
* 30: flag ignore TC (terminal counter) request
|
* 30: flag ignore TC (terminal counter) request
|
||||||
* 29: flag fast IRQ request
|
* 29: flag fast IRQ request
|
||||||
* 28-26: Reserved
|
* 28-27: Reserved
|
||||||
|
* 26: RADA enabled
|
||||||
* 25: Offload enabled
|
* 25: Offload enabled
|
||||||
* 24: RPF enabled
|
* 24: RPF enabled
|
||||||
* 23: RSS enabled
|
* 23: RSS enabled
|
||||||
|
|
|
@ -787,7 +787,7 @@ static int iwl_mvm_mac_ctxt_cmd_listener(struct iwl_mvm *mvm,
|
||||||
u32 action)
|
u32 action)
|
||||||
{
|
{
|
||||||
struct iwl_mac_ctx_cmd cmd = {};
|
struct iwl_mac_ctx_cmd cmd = {};
|
||||||
u32 tfd_queue_msk = 0;
|
u32 tfd_queue_msk = BIT(mvm->snif_queue);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
WARN_ON(vif->type != NL80211_IFTYPE_MONITOR);
|
WARN_ON(vif->type != NL80211_IFTYPE_MONITOR);
|
||||||
|
|
|
@ -954,6 +954,7 @@ struct iwl_mvm {
|
||||||
|
|
||||||
/* Tx queues */
|
/* Tx queues */
|
||||||
u16 aux_queue;
|
u16 aux_queue;
|
||||||
|
u16 snif_queue;
|
||||||
u16 probe_queue;
|
u16 probe_queue;
|
||||||
u16 p2p_dev_queue;
|
u16 p2p_dev_queue;
|
||||||
|
|
||||||
|
@ -1042,6 +1043,7 @@ struct iwl_mvm {
|
||||||
* @IWL_MVM_STATUS_ROC_AUX_RUNNING: AUX remain-on-channel is running
|
* @IWL_MVM_STATUS_ROC_AUX_RUNNING: AUX remain-on-channel is running
|
||||||
* @IWL_MVM_STATUS_D3_RECONFIG: D3 reconfiguration is being done
|
* @IWL_MVM_STATUS_D3_RECONFIG: D3 reconfiguration is being done
|
||||||
* @IWL_MVM_STATUS_FIRMWARE_RUNNING: firmware is running
|
* @IWL_MVM_STATUS_FIRMWARE_RUNNING: firmware is running
|
||||||
|
* @IWL_MVM_STATUS_NEED_FLUSH_P2P: need to flush P2P bcast STA
|
||||||
*/
|
*/
|
||||||
enum iwl_mvm_status {
|
enum iwl_mvm_status {
|
||||||
IWL_MVM_STATUS_HW_RFKILL,
|
IWL_MVM_STATUS_HW_RFKILL,
|
||||||
|
@ -1053,6 +1055,7 @@ enum iwl_mvm_status {
|
||||||
IWL_MVM_STATUS_ROC_AUX_RUNNING,
|
IWL_MVM_STATUS_ROC_AUX_RUNNING,
|
||||||
IWL_MVM_STATUS_D3_RECONFIG,
|
IWL_MVM_STATUS_D3_RECONFIG,
|
||||||
IWL_MVM_STATUS_FIRMWARE_RUNNING,
|
IWL_MVM_STATUS_FIRMWARE_RUNNING,
|
||||||
|
IWL_MVM_STATUS_NEED_FLUSH_P2P,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Keep track of completed init configuration */
|
/* Keep track of completed init configuration */
|
||||||
|
|
|
@ -622,6 +622,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||||
mvm->fw_restart = iwlwifi_mod_params.fw_restart ? -1 : 0;
|
mvm->fw_restart = iwlwifi_mod_params.fw_restart ? -1 : 0;
|
||||||
|
|
||||||
mvm->aux_queue = IWL_MVM_DQA_AUX_QUEUE;
|
mvm->aux_queue = IWL_MVM_DQA_AUX_QUEUE;
|
||||||
|
mvm->snif_queue = IWL_MVM_DQA_INJECT_MONITOR_QUEUE;
|
||||||
mvm->probe_queue = IWL_MVM_DQA_AP_PROBE_RESP_QUEUE;
|
mvm->probe_queue = IWL_MVM_DQA_AP_PROBE_RESP_QUEUE;
|
||||||
mvm->p2p_dev_queue = IWL_MVM_DQA_P2P_DEVICE_QUEUE;
|
mvm->p2p_dev_queue = IWL_MVM_DQA_P2P_DEVICE_QUEUE;
|
||||||
|
|
||||||
|
|
|
@ -232,8 +232,8 @@ static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm,
|
||||||
|
|
||||||
static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
|
static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
|
||||||
struct ieee80211_rx_status *stats,
|
struct ieee80211_rx_status *stats,
|
||||||
struct iwl_rx_mpdu_desc *desc, int queue,
|
struct iwl_rx_mpdu_desc *desc, u32 pkt_flags,
|
||||||
u8 *crypt_len)
|
int queue, u8 *crypt_len)
|
||||||
{
|
{
|
||||||
u16 status = le16_to_cpu(desc->status);
|
u16 status = le16_to_cpu(desc->status);
|
||||||
|
|
||||||
|
@ -253,6 +253,8 @@ static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
stats->flag |= RX_FLAG_DECRYPTED;
|
stats->flag |= RX_FLAG_DECRYPTED;
|
||||||
|
if (pkt_flags & FH_RSCSR_RADA_EN)
|
||||||
|
stats->flag |= RX_FLAG_MIC_STRIPPED;
|
||||||
*crypt_len = IEEE80211_CCMP_HDR_LEN;
|
*crypt_len = IEEE80211_CCMP_HDR_LEN;
|
||||||
return 0;
|
return 0;
|
||||||
case IWL_RX_MPDU_STATUS_SEC_TKIP:
|
case IWL_RX_MPDU_STATUS_SEC_TKIP:
|
||||||
|
@ -270,6 +272,10 @@ static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
|
||||||
if ((status & IWL_RX_MPDU_STATUS_SEC_MASK) ==
|
if ((status & IWL_RX_MPDU_STATUS_SEC_MASK) ==
|
||||||
IWL_RX_MPDU_STATUS_SEC_WEP)
|
IWL_RX_MPDU_STATUS_SEC_WEP)
|
||||||
*crypt_len = IEEE80211_WEP_IV_LEN;
|
*crypt_len = IEEE80211_WEP_IV_LEN;
|
||||||
|
|
||||||
|
if (pkt_flags & FH_RSCSR_RADA_EN)
|
||||||
|
stats->flag |= RX_FLAG_ICV_STRIPPED;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
case IWL_RX_MPDU_STATUS_SEC_EXT_ENC:
|
case IWL_RX_MPDU_STATUS_SEC_EXT_ENC:
|
||||||
if (!(status & IWL_RX_MPDU_STATUS_MIC_OK))
|
if (!(status & IWL_RX_MPDU_STATUS_MIC_OK))
|
||||||
|
@ -810,7 +816,9 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
|
||||||
|
|
||||||
rx_status = IEEE80211_SKB_RXCB(skb);
|
rx_status = IEEE80211_SKB_RXCB(skb);
|
||||||
|
|
||||||
if (iwl_mvm_rx_crypto(mvm, hdr, rx_status, desc, queue, &crypt_len)) {
|
if (iwl_mvm_rx_crypto(mvm, hdr, rx_status, desc,
|
||||||
|
le32_to_cpu(pkt->len_n_flags), queue,
|
||||||
|
&crypt_len)) {
|
||||||
kfree_skb(skb);
|
kfree_skb(skb);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1700,29 +1700,29 @@ void iwl_mvm_dealloc_int_sta(struct iwl_mvm *mvm, struct iwl_mvm_int_sta *sta)
|
||||||
sta->sta_id = IWL_MVM_INVALID_STA;
|
sta->sta_id = IWL_MVM_INVALID_STA;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void iwl_mvm_enable_aux_queue(struct iwl_mvm *mvm)
|
static void iwl_mvm_enable_aux_snif_queue(struct iwl_mvm *mvm, u16 *queue,
|
||||||
|
u8 sta_id, u8 fifo)
|
||||||
{
|
{
|
||||||
unsigned int wdg_timeout = iwlmvm_mod_params.tfd_q_hang_detect ?
|
unsigned int wdg_timeout = iwlmvm_mod_params.tfd_q_hang_detect ?
|
||||||
mvm->cfg->base_params->wd_timeout :
|
mvm->cfg->base_params->wd_timeout :
|
||||||
IWL_WATCHDOG_DISABLED;
|
IWL_WATCHDOG_DISABLED;
|
||||||
|
|
||||||
if (iwl_mvm_has_new_tx_api(mvm)) {
|
if (iwl_mvm_has_new_tx_api(mvm)) {
|
||||||
int queue = iwl_mvm_tvqm_enable_txq(mvm, mvm->aux_queue,
|
int tvqm_queue =
|
||||||
mvm->aux_sta.sta_id,
|
iwl_mvm_tvqm_enable_txq(mvm, *queue, sta_id,
|
||||||
IWL_MAX_TID_COUNT,
|
IWL_MAX_TID_COUNT,
|
||||||
wdg_timeout);
|
wdg_timeout);
|
||||||
mvm->aux_queue = queue;
|
*queue = tvqm_queue;
|
||||||
} else {
|
} else {
|
||||||
struct iwl_trans_txq_scd_cfg cfg = {
|
struct iwl_trans_txq_scd_cfg cfg = {
|
||||||
.fifo = IWL_MVM_TX_FIFO_MCAST,
|
.fifo = fifo,
|
||||||
.sta_id = mvm->aux_sta.sta_id,
|
.sta_id = sta_id,
|
||||||
.tid = IWL_MAX_TID_COUNT,
|
.tid = IWL_MAX_TID_COUNT,
|
||||||
.aggregate = false,
|
.aggregate = false,
|
||||||
.frame_limit = IWL_FRAME_LIMIT,
|
.frame_limit = IWL_FRAME_LIMIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
iwl_mvm_enable_txq(mvm, mvm->aux_queue, mvm->aux_queue, 0, &cfg,
|
iwl_mvm_enable_txq(mvm, *queue, *queue, 0, &cfg, wdg_timeout);
|
||||||
wdg_timeout);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1741,7 +1741,9 @@ int iwl_mvm_add_aux_sta(struct iwl_mvm *mvm)
|
||||||
|
|
||||||
/* Map Aux queue to fifo - needs to happen before adding Aux station */
|
/* Map Aux queue to fifo - needs to happen before adding Aux station */
|
||||||
if (!iwl_mvm_has_new_tx_api(mvm))
|
if (!iwl_mvm_has_new_tx_api(mvm))
|
||||||
iwl_mvm_enable_aux_queue(mvm);
|
iwl_mvm_enable_aux_snif_queue(mvm, &mvm->aux_queue,
|
||||||
|
mvm->aux_sta.sta_id,
|
||||||
|
IWL_MVM_TX_FIFO_MCAST);
|
||||||
|
|
||||||
ret = iwl_mvm_add_int_sta_common(mvm, &mvm->aux_sta, NULL,
|
ret = iwl_mvm_add_int_sta_common(mvm, &mvm->aux_sta, NULL,
|
||||||
MAC_INDEX_AUX, 0);
|
MAC_INDEX_AUX, 0);
|
||||||
|
@ -1755,7 +1757,9 @@ int iwl_mvm_add_aux_sta(struct iwl_mvm *mvm)
|
||||||
* to firmware so enable queue here - after the station was added
|
* to firmware so enable queue here - after the station was added
|
||||||
*/
|
*/
|
||||||
if (iwl_mvm_has_new_tx_api(mvm))
|
if (iwl_mvm_has_new_tx_api(mvm))
|
||||||
iwl_mvm_enable_aux_queue(mvm);
|
iwl_mvm_enable_aux_snif_queue(mvm, &mvm->aux_queue,
|
||||||
|
mvm->aux_sta.sta_id,
|
||||||
|
IWL_MVM_TX_FIFO_MCAST);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1763,10 +1767,31 @@ int iwl_mvm_add_aux_sta(struct iwl_mvm *mvm)
|
||||||
int iwl_mvm_add_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
int iwl_mvm_add_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
||||||
{
|
{
|
||||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||||
|
int ret;
|
||||||
|
|
||||||
lockdep_assert_held(&mvm->mutex);
|
lockdep_assert_held(&mvm->mutex);
|
||||||
return iwl_mvm_add_int_sta_common(mvm, &mvm->snif_sta, vif->addr,
|
|
||||||
|
/* Map snif queue to fifo - must happen before adding snif station */
|
||||||
|
if (!iwl_mvm_has_new_tx_api(mvm))
|
||||||
|
iwl_mvm_enable_aux_snif_queue(mvm, &mvm->snif_queue,
|
||||||
|
mvm->snif_sta.sta_id,
|
||||||
|
IWL_MVM_TX_FIFO_BE);
|
||||||
|
|
||||||
|
ret = iwl_mvm_add_int_sta_common(mvm, &mvm->snif_sta, vif->addr,
|
||||||
mvmvif->id, 0);
|
mvmvif->id, 0);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* For 22000 firmware and on we cannot add queue to a station unknown
|
||||||
|
* to firmware so enable queue here - after the station was added
|
||||||
|
*/
|
||||||
|
if (iwl_mvm_has_new_tx_api(mvm))
|
||||||
|
iwl_mvm_enable_aux_snif_queue(mvm, &mvm->snif_queue,
|
||||||
|
mvm->snif_sta.sta_id,
|
||||||
|
IWL_MVM_TX_FIFO_BE);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int iwl_mvm_rm_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
int iwl_mvm_rm_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
||||||
|
@ -1775,6 +1800,8 @@ int iwl_mvm_rm_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
||||||
|
|
||||||
lockdep_assert_held(&mvm->mutex);
|
lockdep_assert_held(&mvm->mutex);
|
||||||
|
|
||||||
|
iwl_mvm_disable_txq(mvm, mvm->snif_queue, mvm->snif_queue,
|
||||||
|
IWL_MAX_TID_COUNT, 0);
|
||||||
ret = iwl_mvm_rm_sta_common(mvm, mvm->snif_sta.sta_id);
|
ret = iwl_mvm_rm_sta_common(mvm, mvm->snif_sta.sta_id);
|
||||||
if (ret)
|
if (ret)
|
||||||
IWL_WARN(mvm, "Failed sending remove station\n");
|
IWL_WARN(mvm, "Failed sending remove station\n");
|
||||||
|
|
|
@ -132,6 +132,24 @@ void iwl_mvm_roc_done_wk(struct work_struct *wk)
|
||||||
* executed, and a new time event means a new command.
|
* executed, and a new time event means a new command.
|
||||||
*/
|
*/
|
||||||
iwl_mvm_flush_sta(mvm, &mvm->aux_sta, true, CMD_ASYNC);
|
iwl_mvm_flush_sta(mvm, &mvm->aux_sta, true, CMD_ASYNC);
|
||||||
|
|
||||||
|
/* Do the same for the P2P device queue (STA) */
|
||||||
|
if (test_and_clear_bit(IWL_MVM_STATUS_NEED_FLUSH_P2P, &mvm->status)) {
|
||||||
|
struct iwl_mvm_vif *mvmvif;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* NB: access to this pointer would be racy, but the flush bit
|
||||||
|
* can only be set when we had a P2P-Device VIF, and we have a
|
||||||
|
* flush of this work in iwl_mvm_prepare_mac_removal() so it's
|
||||||
|
* not really racy.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!WARN_ON(!mvm->p2p_device_vif)) {
|
||||||
|
mvmvif = iwl_mvm_vif_from_mac80211(mvm->p2p_device_vif);
|
||||||
|
iwl_mvm_flush_sta(mvm, &mvmvif->bcast_sta, true,
|
||||||
|
CMD_ASYNC);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void iwl_mvm_roc_finished(struct iwl_mvm *mvm)
|
static void iwl_mvm_roc_finished(struct iwl_mvm *mvm)
|
||||||
|
@ -855,10 +873,12 @@ void iwl_mvm_stop_roc(struct iwl_mvm *mvm)
|
||||||
|
|
||||||
mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif);
|
mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif);
|
||||||
|
|
||||||
if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE)
|
if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) {
|
||||||
iwl_mvm_remove_time_event(mvm, mvmvif, te_data);
|
iwl_mvm_remove_time_event(mvm, mvmvif, te_data);
|
||||||
else
|
set_bit(IWL_MVM_STATUS_NEED_FLUSH_P2P, &mvm->status);
|
||||||
|
} else {
|
||||||
iwl_mvm_remove_aux_roc_te(mvm, mvmvif, te_data);
|
iwl_mvm_remove_aux_roc_te(mvm, mvmvif, te_data);
|
||||||
|
}
|
||||||
|
|
||||||
iwl_mvm_roc_finished(mvm);
|
iwl_mvm_roc_finished(mvm);
|
||||||
}
|
}
|
||||||
|
|
|
@ -657,7 +657,8 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb)
|
||||||
if (ap_sta_id != IWL_MVM_INVALID_STA)
|
if (ap_sta_id != IWL_MVM_INVALID_STA)
|
||||||
sta_id = ap_sta_id;
|
sta_id = ap_sta_id;
|
||||||
} else if (info.control.vif->type == NL80211_IFTYPE_MONITOR) {
|
} else if (info.control.vif->type == NL80211_IFTYPE_MONITOR) {
|
||||||
queue = mvm->aux_queue;
|
queue = mvm->snif_queue;
|
||||||
|
sta_id = mvm->snif_sta.sta_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1143,9 +1143,18 @@ unsigned int iwl_mvm_get_wd_timeout(struct iwl_mvm *mvm,
|
||||||
unsigned int default_timeout =
|
unsigned int default_timeout =
|
||||||
cmd_q ? IWL_DEF_WD_TIMEOUT : mvm->cfg->base_params->wd_timeout;
|
cmd_q ? IWL_DEF_WD_TIMEOUT : mvm->cfg->base_params->wd_timeout;
|
||||||
|
|
||||||
if (!iwl_fw_dbg_trigger_enabled(mvm->fw, FW_DBG_TRIGGER_TXQ_TIMERS))
|
if (!iwl_fw_dbg_trigger_enabled(mvm->fw, FW_DBG_TRIGGER_TXQ_TIMERS)) {
|
||||||
|
/*
|
||||||
|
* We can't know when the station is asleep or awake, so we
|
||||||
|
* must disable the queue hang detection.
|
||||||
|
*/
|
||||||
|
if (fw_has_capa(&mvm->fw->ucode_capa,
|
||||||
|
IWL_UCODE_TLV_CAPA_STA_PM_NOTIF) &&
|
||||||
|
vif && vif->type == NL80211_IFTYPE_AP)
|
||||||
|
return IWL_WATCHDOG_DISABLED;
|
||||||
return iwlmvm_mod_params.tfd_q_hang_detect ?
|
return iwlmvm_mod_params.tfd_q_hang_detect ?
|
||||||
default_timeout : IWL_WATCHDOG_DISABLED;
|
default_timeout : IWL_WATCHDOG_DISABLED;
|
||||||
|
}
|
||||||
|
|
||||||
trigger = iwl_fw_dbg_get_trigger(mvm->fw, FW_DBG_TRIGGER_TXQ_TIMERS);
|
trigger = iwl_fw_dbg_get_trigger(mvm->fw, FW_DBG_TRIGGER_TXQ_TIMERS);
|
||||||
txq_timer = (void *)trigger->data;
|
txq_timer = (void *)trigger->data;
|
||||||
|
|
|
@ -551,6 +551,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
|
||||||
{IWL_PCI_DEVICE(0x271B, 0x0014, iwl9160_2ac_cfg)},
|
{IWL_PCI_DEVICE(0x271B, 0x0014, iwl9160_2ac_cfg)},
|
||||||
{IWL_PCI_DEVICE(0x271B, 0x0210, iwl9160_2ac_cfg)},
|
{IWL_PCI_DEVICE(0x271B, 0x0210, iwl9160_2ac_cfg)},
|
||||||
{IWL_PCI_DEVICE(0x271B, 0x0214, iwl9260_2ac_cfg)},
|
{IWL_PCI_DEVICE(0x271B, 0x0214, iwl9260_2ac_cfg)},
|
||||||
|
{IWL_PCI_DEVICE(0x271C, 0x0214, iwl9260_2ac_cfg)},
|
||||||
{IWL_PCI_DEVICE(0x2720, 0x0034, iwl9560_2ac_cfg)},
|
{IWL_PCI_DEVICE(0x2720, 0x0034, iwl9560_2ac_cfg)},
|
||||||
{IWL_PCI_DEVICE(0x2720, 0x0038, iwl9560_2ac_cfg)},
|
{IWL_PCI_DEVICE(0x2720, 0x0038, iwl9560_2ac_cfg)},
|
||||||
{IWL_PCI_DEVICE(0x2720, 0x003C, iwl9560_2ac_cfg)},
|
{IWL_PCI_DEVICE(0x2720, 0x003C, iwl9560_2ac_cfg)},
|
||||||
|
@ -662,6 +663,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
|
||||||
{IWL_PCI_DEVICE(0x2720, 0x0310, iwla000_2ac_cfg_hr_cdb)},
|
{IWL_PCI_DEVICE(0x2720, 0x0310, iwla000_2ac_cfg_hr_cdb)},
|
||||||
{IWL_PCI_DEVICE(0x40C0, 0x0000, iwla000_2ax_cfg_hr)},
|
{IWL_PCI_DEVICE(0x40C0, 0x0000, iwla000_2ax_cfg_hr)},
|
||||||
{IWL_PCI_DEVICE(0x40C0, 0x0A10, iwla000_2ax_cfg_hr)},
|
{IWL_PCI_DEVICE(0x40C0, 0x0A10, iwla000_2ax_cfg_hr)},
|
||||||
|
{IWL_PCI_DEVICE(0xA0F0, 0x0000, iwla000_2ax_cfg_hr)},
|
||||||
|
|
||||||
#endif /* CONFIG_IWLMVM */
|
#endif /* CONFIG_IWLMVM */
|
||||||
|
|
||||||
|
|
|
@ -3108,6 +3108,7 @@ static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info)
|
||||||
{
|
{
|
||||||
struct hwsim_new_radio_params param = { 0 };
|
struct hwsim_new_radio_params param = { 0 };
|
||||||
const char *hwname = NULL;
|
const char *hwname = NULL;
|
||||||
|
int ret;
|
||||||
|
|
||||||
param.reg_strict = info->attrs[HWSIM_ATTR_REG_STRICT_REG];
|
param.reg_strict = info->attrs[HWSIM_ATTR_REG_STRICT_REG];
|
||||||
param.p2p_device = info->attrs[HWSIM_ATTR_SUPPORT_P2P_DEVICE];
|
param.p2p_device = info->attrs[HWSIM_ATTR_SUPPORT_P2P_DEVICE];
|
||||||
|
@ -3147,7 +3148,9 @@ static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info)
|
||||||
param.regd = hwsim_world_regdom_custom[idx];
|
param.regd = hwsim_world_regdom_custom[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
return mac80211_hwsim_new_radio(info, ¶m);
|
ret = mac80211_hwsim_new_radio(info, ¶m);
|
||||||
|
kfree(hwname);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info)
|
static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info)
|
||||||
|
|
|
@ -162,13 +162,13 @@ static int rsi_usb_reg_read(struct usb_device *usbdev,
|
||||||
u8 *buf;
|
u8 *buf;
|
||||||
int status = -ENOMEM;
|
int status = -ENOMEM;
|
||||||
|
|
||||||
|
if (len > RSI_USB_CTRL_BUF_SIZE)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
buf = kmalloc(RSI_USB_CTRL_BUF_SIZE, GFP_KERNEL);
|
buf = kmalloc(RSI_USB_CTRL_BUF_SIZE, GFP_KERNEL);
|
||||||
if (!buf)
|
if (!buf)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
if (len > RSI_USB_CTRL_BUF_SIZE)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
status = usb_control_msg(usbdev,
|
status = usb_control_msg(usbdev,
|
||||||
usb_rcvctrlpipe(usbdev, 0),
|
usb_rcvctrlpipe(usbdev, 0),
|
||||||
USB_VENDOR_REGISTER_READ,
|
USB_VENDOR_REGISTER_READ,
|
||||||
|
@ -207,13 +207,13 @@ static int rsi_usb_reg_write(struct usb_device *usbdev,
|
||||||
u8 *usb_reg_buf;
|
u8 *usb_reg_buf;
|
||||||
int status = -ENOMEM;
|
int status = -ENOMEM;
|
||||||
|
|
||||||
|
if (len > RSI_USB_CTRL_BUF_SIZE)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
usb_reg_buf = kmalloc(RSI_USB_CTRL_BUF_SIZE, GFP_KERNEL);
|
usb_reg_buf = kmalloc(RSI_USB_CTRL_BUF_SIZE, GFP_KERNEL);
|
||||||
if (!usb_reg_buf)
|
if (!usb_reg_buf)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
if (len > RSI_USB_CTRL_BUF_SIZE)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
usb_reg_buf[0] = (value & 0x00ff);
|
usb_reg_buf[0] = (value & 0x00ff);
|
||||||
usb_reg_buf[1] = (value & 0xff00) >> 8;
|
usb_reg_buf[1] = (value & 0xff00) >> 8;
|
||||||
usb_reg_buf[2] = 0x0;
|
usb_reg_buf[2] = 0x0;
|
||||||
|
|
|
@ -408,12 +408,21 @@ static int armada_37xx_gpio_direction_output(struct gpio_chip *chip,
|
||||||
{
|
{
|
||||||
struct armada_37xx_pinctrl *info = gpiochip_get_data(chip);
|
struct armada_37xx_pinctrl *info = gpiochip_get_data(chip);
|
||||||
unsigned int reg = OUTPUT_EN;
|
unsigned int reg = OUTPUT_EN;
|
||||||
unsigned int mask;
|
unsigned int mask, val, ret;
|
||||||
|
|
||||||
armada_37xx_update_reg(®, offset);
|
armada_37xx_update_reg(®, offset);
|
||||||
mask = BIT(offset);
|
mask = BIT(offset);
|
||||||
|
|
||||||
return regmap_update_bits(info->regmap, reg, mask, mask);
|
ret = regmap_update_bits(info->regmap, reg, mask, mask);
|
||||||
|
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
reg = OUTPUT_VAL;
|
||||||
|
val = value ? mask : 0;
|
||||||
|
regmap_update_bits(info->regmap, reg, mask, val);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int armada_37xx_gpio_get(struct gpio_chip *chip, unsigned int offset)
|
static int armada_37xx_gpio_get(struct gpio_chip *chip, unsigned int offset)
|
||||||
|
|
|
@ -963,7 +963,8 @@ rio_dma_transfer(struct file *filp, u32 transfer_mode,
|
||||||
req->sgt.sgl, req->sgt.nents, dir);
|
req->sgt.sgl, req->sgt.nents, dir);
|
||||||
if (nents == -EFAULT) {
|
if (nents == -EFAULT) {
|
||||||
rmcd_error("Failed to map SG list");
|
rmcd_error("Failed to map SG list");
|
||||||
return -EFAULT;
|
ret = -EFAULT;
|
||||||
|
goto err_pg;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = do_dma_request(req, xfer, sync, nents);
|
ret = do_dma_request(req, xfer, sync, nents);
|
||||||
|
|
|
@ -2126,11 +2126,13 @@ void __scsi_init_queue(struct Scsi_Host *shost, struct request_queue *q)
|
||||||
q->limits.cluster = 0;
|
q->limits.cluster = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* set a reasonable default alignment on word boundaries: the
|
* Set a reasonable default alignment: The larger of 32-byte (dword),
|
||||||
* host and device may alter it using
|
* which is a common minimum for HBAs, and the minimum DMA alignment,
|
||||||
* blk_queue_update_dma_alignment() later.
|
* which is set by the platform.
|
||||||
|
*
|
||||||
|
* Devices that require a bigger alignment can increase it later.
|
||||||
*/
|
*/
|
||||||
blk_queue_dma_alignment(q, 0x03);
|
blk_queue_dma_alignment(q, max(4, dma_get_cache_alignment()) - 1);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(__scsi_init_queue);
|
EXPORT_SYMBOL_GPL(__scsi_init_queue);
|
||||||
|
|
||||||
|
|
|
@ -35,23 +35,41 @@ static int ttyport_receive_buf(struct tty_port *port, const unsigned char *cp,
|
||||||
{
|
{
|
||||||
struct serdev_controller *ctrl = port->client_data;
|
struct serdev_controller *ctrl = port->client_data;
|
||||||
struct serport *serport = serdev_controller_get_drvdata(ctrl);
|
struct serport *serport = serdev_controller_get_drvdata(ctrl);
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (!test_bit(SERPORT_ACTIVE, &serport->flags))
|
if (!test_bit(SERPORT_ACTIVE, &serport->flags))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return serdev_controller_receive_buf(ctrl, cp, count);
|
ret = serdev_controller_receive_buf(ctrl, cp, count);
|
||||||
|
|
||||||
|
dev_WARN_ONCE(&ctrl->dev, ret < 0 || ret > count,
|
||||||
|
"receive_buf returns %d (count = %zu)\n",
|
||||||
|
ret, count);
|
||||||
|
if (ret < 0)
|
||||||
|
return 0;
|
||||||
|
else if (ret > count)
|
||||||
|
return count;
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ttyport_write_wakeup(struct tty_port *port)
|
static void ttyport_write_wakeup(struct tty_port *port)
|
||||||
{
|
{
|
||||||
struct serdev_controller *ctrl = port->client_data;
|
struct serdev_controller *ctrl = port->client_data;
|
||||||
struct serport *serport = serdev_controller_get_drvdata(ctrl);
|
struct serport *serport = serdev_controller_get_drvdata(ctrl);
|
||||||
|
struct tty_struct *tty;
|
||||||
|
|
||||||
if (test_and_clear_bit(TTY_DO_WRITE_WAKEUP, &port->tty->flags) &&
|
tty = tty_port_tty_get(port);
|
||||||
|
if (!tty)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (test_and_clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags) &&
|
||||||
test_bit(SERPORT_ACTIVE, &serport->flags))
|
test_bit(SERPORT_ACTIVE, &serport->flags))
|
||||||
serdev_controller_write_wakeup(ctrl);
|
serdev_controller_write_wakeup(ctrl);
|
||||||
|
|
||||||
wake_up_interruptible_poll(&port->tty->write_wait, POLLOUT);
|
wake_up_interruptible_poll(&tty->write_wait, POLLOUT);
|
||||||
|
|
||||||
|
tty_kref_put(tty);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct tty_port_client_operations client_ops = {
|
static const struct tty_port_client_operations client_ops = {
|
||||||
|
@ -131,8 +149,10 @@ static void ttyport_close(struct serdev_controller *ctrl)
|
||||||
|
|
||||||
clear_bit(SERPORT_ACTIVE, &serport->flags);
|
clear_bit(SERPORT_ACTIVE, &serport->flags);
|
||||||
|
|
||||||
|
tty_lock(tty);
|
||||||
if (tty->ops->close)
|
if (tty->ops->close)
|
||||||
tty->ops->close(tty, NULL);
|
tty->ops->close(tty, NULL);
|
||||||
|
tty_unlock(tty);
|
||||||
|
|
||||||
tty_release_struct(tty, serport->tty_idx);
|
tty_release_struct(tty, serport->tty_idx);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2286,9 +2286,18 @@ static int __ffs_data_do_os_desc(enum ffs_os_desc_type type,
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (len < sizeof(*d) ||
|
if (len < sizeof(*d) ||
|
||||||
d->bFirstInterfaceNumber >= ffs->interfaces_count ||
|
d->bFirstInterfaceNumber >= ffs->interfaces_count)
|
||||||
!d->Reserved1)
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
if (d->Reserved1 != 1) {
|
||||||
|
/*
|
||||||
|
* According to the spec, Reserved1 must be set to 1
|
||||||
|
* but older kernels incorrectly rejected non-zero
|
||||||
|
* values. We fix it here to avoid returning EINVAL
|
||||||
|
* in response to values we used to accept.
|
||||||
|
*/
|
||||||
|
pr_debug("usb_ext_compat_desc::Reserved1 forced to 1\n");
|
||||||
|
d->Reserved1 = 1;
|
||||||
|
}
|
||||||
for (i = 0; i < ARRAY_SIZE(d->Reserved2); ++i)
|
for (i = 0; i < ARRAY_SIZE(d->Reserved2); ++i)
|
||||||
if (d->Reserved2[i])
|
if (d->Reserved2[i])
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue