mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
Merge 4.9.40 into android-4.9
Changes in 4.9.40
disable new gcc-7.1.1 warnings for now
ir-core: fix gcc-7 warning on bool arithmetic
dm mpath: cleanup -Wbool-operation warning in choose_pgpath()
s5p-jpeg: don't return a random width/height
thermal: max77620: fix device-node reference imbalance
thermal: cpu_cooling: Avoid accessing potentially freed structures
ath9k: fix tx99 use after free
ath9k: fix tx99 bus error
ath9k: fix an invalid pointer dereference in ath9k_rng_stop()
NFC: fix broken device allocation
NFC: nfcmrvl_uart: add missing tty-device sanity check
NFC: nfcmrvl: do not use device-managed resources
NFC: nfcmrvl: use nfc-device for firmware download
NFC: nfcmrvl: fix firmware-management initialisation
nfc: Ensure presence of required attributes in the activate_target handler
nfc: Fix the sockaddr length sanitization in llcp_sock_connect
NFC: Add sockaddr length checks before accessing sa_family in bind handlers
perf intel-pt: Move decoder error setting into one condition
perf intel-pt: Improve sample timestamp
perf intel-pt: Fix missing stack clear
perf intel-pt: Ensure IP is zero when state is INTEL_PT_STATE_NO_IP
perf intel-pt: Fix last_ip usage
perf intel-pt: Ensure never to set 'last_ip' when packet 'count' is zero
perf intel-pt: Use FUP always when scanning for an IP
perf intel-pt: Clear FUP flag on error
Bluetooth: use constant time memory comparison for secret values
wlcore: fix 64K page support
btrfs: Don't clear SGID when inheriting ACLs
igb: Explicitly select page 0 at initialization
ASoC: compress: Derive substream from stream based on direction
PM / Domains: Fix unsafe iteration over modified list of device links
PM / Domains: Fix unsafe iteration over modified list of domain providers
PM / Domains: Fix unsafe iteration over modified list of domains
scsi: ses: do not add a device to an enclosure if enclosure_add_links() fails.
scsi: Add STARGET_CREATED_REMOVE state to scsi_target_state
iscsi-target: Add login_keys_workaround attribute for non RFC initiators
xen/scsiback: Fix a TMR related use-after-free
powerpc/pseries: Fix passing of pp0 in updatepp() and updateboltedpp()
powerpc/64: Fix atomic64_inc_not_zero() to return an int
powerpc: Fix emulation of mcrf in emulate_step()
powerpc: Fix emulation of mfocrf in emulate_step()
powerpc/asm: Mark cr0 as clobbered in mftb()
powerpc/mm/radix: Properly clear process table entry
af_key: Fix sadb_x_ipsecrequest parsing
PCI: Work around poweroff & suspend-to-RAM issue on Macbook Pro 11
PCI: rockchip: Use normal register bank for config accessors
PCI/PM: Restore the status of PCI devices across hibernation
ipvs: SNAT packet replies only for NATed connections
xhci: fix 20000ms port resume timeout
xhci: Fix NULL pointer dereference when cleaning up streams for removed host
xhci: Bad Ethernet performance plugged in ASM1042A host
mxl111sf: Fix driver to use heap allocate buffers for USB messages
usb: storage: return on error to avoid a null pointer dereference
USB: cdc-acm: add device-id for quirky printer
usb: renesas_usbhs: fix usbhsc_resume() for !USBHSF_RUNTIME_PWCTRL
usb: renesas_usbhs: gadget: disable all eps when the driver stops
md: don't use flush_signals in userspace processes
x86/xen: allow userspace access during hypercalls
cx88: Fix regression in initial video standard setting
libnvdimm, btt: fix btt_rw_page not returning errors
libnvdimm: fix badblock range handling of ARS range
ext2: Don't clear SGID when inheriting ACLs
Raid5 should update rdev->sectors after reshape
s390/syscalls: Fix out of bounds arguments access
drm/amd/amdgpu: Return error if initiating read out of range on vram
drm/radeon/ci: disable mclk switching for high refresh rates (v2)
drm/radeon: Fix eDP for single-display iMac10,1 (v2)
ipmi: use rcu lock around call to intf->handlers->sender()
ipmi:ssif: Add missing unlock in error branch
xfs: Don't clear SGID when inheriting ACLs
f2fs: sanity check size of nat and sit cache
f2fs: Don't clear SGID when inheriting ACLs
drm/ttm: Fix use-after-free in ttm_bo_clean_mm
ovl: drop CAP_SYS_RESOURCE from saved mounter's credentials
vfio: Fix group release deadlock
vfio: New external user group/file match
nvme-rdma: remove race conditions from IB signalling
ftrace: Fix uninitialized variable in match_records()
MIPS: Fix mips_atomic_set() retry condition
MIPS: Fix mips_atomic_set() with EVA
MIPS: Negate error syscall return in trace
ubifs: Don't leak kernel memory to the MTD
ACPI / EC: Drop EC noirq hooks to fix a regression
Revert "ACPI / EC: Enable event freeze mode..." to fix a regression
x86/acpi: Prevent out of bound access caused by broken ACPI tables
x86/ioapic: Pass the correct data to unmask_ioapic_irq()
MIPS: Fix MIPS I ISA /proc/cpuinfo reporting
MIPS: Save static registers before sysmips
MIPS: Actually decode JALX in `__compute_return_epc_for_insn'
MIPS: Fix unaligned PC interpretation in `compute_return_epc'
MIPS: math-emu: Prevent wrong ISA mode instruction emulation
MIPS: Send SIGILL for BPOSGE32 in `__compute_return_epc_for_insn'
MIPS: Rename `sigill_r6' to `sigill_r2r6' in `__compute_return_epc_for_insn'
MIPS: Send SIGILL for linked branches in `__compute_return_epc_for_insn'
MIPS: Send SIGILL for R6 branches in `__compute_return_epc_for_insn'
MIPS: Fix a typo: s/preset/present/ in r2-to-r6 emulation error message
Input: i8042 - fix crash at boot time
IB/iser: Fix connection teardown race condition
IB/core: Namespace is mandatory input for address resolution
sunrpc: use constant time memory comparison for mac
NFS: only invalidate dentrys that are clearly invalid.
udf: Fix deadlock between writeback and udf_setsize()
target: Fix COMPARE_AND_WRITE caw_sem leak during se_cmd quiesce
iser-target: Avoid isert_conn->cm_id dereference in isert_login_recv_done
perf annotate: Fix broken arrow at row 0 connecting jmp instruction to its target
Revert "perf/core: Drop kernel samples even though :u is specified"
staging: rtl8188eu: add TL-WN722N v2 support
staging: comedi: ni_mio_common: fix AO timer off-by-one regression
staging: sm750fb: avoid conflicting vesafb
staging: lustre: ko2iblnd: check copy_from_iter/copy_to_iter return code
ceph: fix race in concurrent readdir
RDMA/core: Initialize port_num in qp_attr
drm/mst: Fix error handling during MST sideband message reception
drm/mst: Avoid dereferencing a NULL mstb in drm_dp_mst_handle_up_req()
drm/mst: Avoid processing partially received up/down message transactions
mlx5: Avoid that mlx5_ib_sg_to_klms() overflows the klms[] array
hfsplus: Don't clear SGID when inheriting ACLs
ovl: fix random return value on mount
acpi/nfit: Fix memory corruption/Unregister mce decoder on failure
of: device: Export of_device_{get_modalias, uvent_modalias} to modules
spmi: Include OF based modalias in device uevent
reiserfs: Don't clear SGID when inheriting ACLs
PM / Domains: defer dev_pm_domain_set() until genpd->attach_dev succeeds if present
tracing: Fix kmemleak in instance_rmdir
alarmtimer: don't rate limit one-shot timers
Linux 4.9.40
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
5
Makefile
5
Makefile
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
SUBLEVEL = 39
|
||||
SUBLEVEL = 40
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
@@ -629,6 +629,9 @@ include arch/$(SRCARCH)/Makefile
|
||||
|
||||
KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context)
|
||||
|
||||
ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
|
||||
KBUILD_CFLAGS += $(call cc-option,-ffunction-sections,)
|
||||
|
||||
@@ -74,10 +74,7 @@ static inline int compute_return_epc(struct pt_regs *regs)
|
||||
return __microMIPS_compute_return_epc(regs);
|
||||
if (cpu_has_mips16)
|
||||
return __MIPS16e_compute_return_epc(regs);
|
||||
return regs->cp0_epc;
|
||||
}
|
||||
|
||||
if (!delay_slot(regs)) {
|
||||
} else if (!delay_slot(regs)) {
|
||||
regs->cp0_epc += 4;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -399,7 +399,7 @@ int __MIPS16e_compute_return_epc(struct pt_regs *regs)
|
||||
*
|
||||
* @regs: Pointer to pt_regs
|
||||
* @insn: branch instruction to decode
|
||||
* @returns: -EFAULT on error and forces SIGBUS, and on success
|
||||
* @returns: -EFAULT on error and forces SIGILL, and on success
|
||||
* returns 0 or BRANCH_LIKELY_TAKEN as appropriate after
|
||||
* evaluating the branch.
|
||||
*
|
||||
@@ -431,7 +431,7 @@ int __compute_return_epc_for_insn(struct pt_regs *regs,
|
||||
/* Fall through */
|
||||
case jr_op:
|
||||
if (NO_R6EMU && insn.r_format.func == jr_op)
|
||||
goto sigill_r6;
|
||||
goto sigill_r2r6;
|
||||
regs->cp0_epc = regs->regs[insn.r_format.rs];
|
||||
break;
|
||||
}
|
||||
@@ -446,7 +446,7 @@ int __compute_return_epc_for_insn(struct pt_regs *regs,
|
||||
switch (insn.i_format.rt) {
|
||||
case bltzl_op:
|
||||
if (NO_R6EMU)
|
||||
goto sigill_r6;
|
||||
goto sigill_r2r6;
|
||||
case bltz_op:
|
||||
if ((long)regs->regs[insn.i_format.rs] < 0) {
|
||||
epc = epc + 4 + (insn.i_format.simmediate << 2);
|
||||
@@ -459,7 +459,7 @@ int __compute_return_epc_for_insn(struct pt_regs *regs,
|
||||
|
||||
case bgezl_op:
|
||||
if (NO_R6EMU)
|
||||
goto sigill_r6;
|
||||
goto sigill_r2r6;
|
||||
case bgez_op:
|
||||
if ((long)regs->regs[insn.i_format.rs] >= 0) {
|
||||
epc = epc + 4 + (insn.i_format.simmediate << 2);
|
||||
@@ -473,10 +473,8 @@ int __compute_return_epc_for_insn(struct pt_regs *regs,
|
||||
case bltzal_op:
|
||||
case bltzall_op:
|
||||
if (NO_R6EMU && (insn.i_format.rs ||
|
||||
insn.i_format.rt == bltzall_op)) {
|
||||
ret = -SIGILL;
|
||||
break;
|
||||
}
|
||||
insn.i_format.rt == bltzall_op))
|
||||
goto sigill_r2r6;
|
||||
regs->regs[31] = epc + 8;
|
||||
/*
|
||||
* OK we are here either because we hit a NAL
|
||||
@@ -507,10 +505,8 @@ int __compute_return_epc_for_insn(struct pt_regs *regs,
|
||||
case bgezal_op:
|
||||
case bgezall_op:
|
||||
if (NO_R6EMU && (insn.i_format.rs ||
|
||||
insn.i_format.rt == bgezall_op)) {
|
||||
ret = -SIGILL;
|
||||
break;
|
||||
}
|
||||
insn.i_format.rt == bgezall_op))
|
||||
goto sigill_r2r6;
|
||||
regs->regs[31] = epc + 8;
|
||||
/*
|
||||
* OK we are here either because we hit a BAL
|
||||
@@ -556,6 +552,7 @@ int __compute_return_epc_for_insn(struct pt_regs *regs,
|
||||
/*
|
||||
* These are unconditional and in j_format.
|
||||
*/
|
||||
case jalx_op:
|
||||
case jal_op:
|
||||
regs->regs[31] = regs->cp0_epc + 8;
|
||||
case j_op:
|
||||
@@ -573,7 +570,7 @@ int __compute_return_epc_for_insn(struct pt_regs *regs,
|
||||
*/
|
||||
case beql_op:
|
||||
if (NO_R6EMU)
|
||||
goto sigill_r6;
|
||||
goto sigill_r2r6;
|
||||
case beq_op:
|
||||
if (regs->regs[insn.i_format.rs] ==
|
||||
regs->regs[insn.i_format.rt]) {
|
||||
@@ -587,7 +584,7 @@ int __compute_return_epc_for_insn(struct pt_regs *regs,
|
||||
|
||||
case bnel_op:
|
||||
if (NO_R6EMU)
|
||||
goto sigill_r6;
|
||||
goto sigill_r2r6;
|
||||
case bne_op:
|
||||
if (regs->regs[insn.i_format.rs] !=
|
||||
regs->regs[insn.i_format.rt]) {
|
||||
@@ -601,7 +598,7 @@ int __compute_return_epc_for_insn(struct pt_regs *regs,
|
||||
|
||||
case blezl_op: /* not really i_format */
|
||||
if (!insn.i_format.rt && NO_R6EMU)
|
||||
goto sigill_r6;
|
||||
goto sigill_r2r6;
|
||||
case blez_op:
|
||||
/*
|
||||
* Compact branches for R6 for the
|
||||
@@ -636,7 +633,7 @@ int __compute_return_epc_for_insn(struct pt_regs *regs,
|
||||
|
||||
case bgtzl_op:
|
||||
if (!insn.i_format.rt && NO_R6EMU)
|
||||
goto sigill_r6;
|
||||
goto sigill_r2r6;
|
||||
case bgtz_op:
|
||||
/*
|
||||
* Compact branches for R6 for the
|
||||
@@ -774,35 +771,27 @@ int __compute_return_epc_for_insn(struct pt_regs *regs,
|
||||
#else
|
||||
case bc6_op:
|
||||
/* Only valid for MIPS R6 */
|
||||
if (!cpu_has_mips_r6) {
|
||||
ret = -SIGILL;
|
||||
break;
|
||||
}
|
||||
if (!cpu_has_mips_r6)
|
||||
goto sigill_r6;
|
||||
regs->cp0_epc += 8;
|
||||
break;
|
||||
case balc6_op:
|
||||
if (!cpu_has_mips_r6) {
|
||||
ret = -SIGILL;
|
||||
break;
|
||||
}
|
||||
if (!cpu_has_mips_r6)
|
||||
goto sigill_r6;
|
||||
/* Compact branch: BALC */
|
||||
regs->regs[31] = epc + 4;
|
||||
epc += 4 + (insn.i_format.simmediate << 2);
|
||||
regs->cp0_epc = epc;
|
||||
break;
|
||||
case pop66_op:
|
||||
if (!cpu_has_mips_r6) {
|
||||
ret = -SIGILL;
|
||||
break;
|
||||
}
|
||||
if (!cpu_has_mips_r6)
|
||||
goto sigill_r6;
|
||||
/* Compact branch: BEQZC || JIC */
|
||||
regs->cp0_epc += 8;
|
||||
break;
|
||||
case pop76_op:
|
||||
if (!cpu_has_mips_r6) {
|
||||
ret = -SIGILL;
|
||||
break;
|
||||
}
|
||||
if (!cpu_has_mips_r6)
|
||||
goto sigill_r6;
|
||||
/* Compact branch: BNEZC || JIALC */
|
||||
if (!insn.i_format.rs) {
|
||||
/* JIALC: set $31/ra */
|
||||
@@ -814,10 +803,8 @@ int __compute_return_epc_for_insn(struct pt_regs *regs,
|
||||
case pop10_op:
|
||||
case pop30_op:
|
||||
/* Only valid for MIPS R6 */
|
||||
if (!cpu_has_mips_r6) {
|
||||
ret = -SIGILL;
|
||||
break;
|
||||
}
|
||||
if (!cpu_has_mips_r6)
|
||||
goto sigill_r6;
|
||||
/*
|
||||
* Compact branches:
|
||||
* bovc, beqc, beqzalc, bnvc, bnec, bnezlac
|
||||
@@ -831,11 +818,17 @@ int __compute_return_epc_for_insn(struct pt_regs *regs,
|
||||
return ret;
|
||||
|
||||
sigill_dsp:
|
||||
printk("%s: DSP branch but not DSP ASE - sending SIGBUS.\n", current->comm);
|
||||
force_sig(SIGBUS, current);
|
||||
pr_info("%s: DSP branch but not DSP ASE - sending SIGILL.\n",
|
||||
current->comm);
|
||||
force_sig(SIGILL, current);
|
||||
return -EFAULT;
|
||||
sigill_r2r6:
|
||||
pr_info("%s: R2 branch but r2-to-r6 emulator is not present - sending SIGILL.\n",
|
||||
current->comm);
|
||||
force_sig(SIGILL, current);
|
||||
return -EFAULT;
|
||||
sigill_r6:
|
||||
pr_info("%s: R2 branch but r2-to-r6 emulator is not preset - sending SIGILL.\n",
|
||||
pr_info("%s: R6 branch but no MIPSr6 ISA support - sending SIGILL.\n",
|
||||
current->comm);
|
||||
force_sig(SIGILL, current);
|
||||
return -EFAULT;
|
||||
|
||||
@@ -83,7 +83,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
|
||||
}
|
||||
|
||||
seq_printf(m, "isa\t\t\t:");
|
||||
if (cpu_has_mips_r1)
|
||||
if (cpu_has_mips_1)
|
||||
seq_printf(m, " mips1");
|
||||
if (cpu_has_mips_2)
|
||||
seq_printf(m, "%s", " mips2");
|
||||
|
||||
@@ -924,7 +924,7 @@ asmlinkage void syscall_trace_leave(struct pt_regs *regs)
|
||||
audit_syscall_exit(regs);
|
||||
|
||||
if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
|
||||
trace_sys_exit(regs, regs->regs[2]);
|
||||
trace_sys_exit(regs, regs_return_value(regs));
|
||||
|
||||
if (test_thread_flag(TIF_SYSCALL_TRACE))
|
||||
tracehook_report_syscall_exit(regs, 0);
|
||||
|
||||
@@ -371,7 +371,7 @@ EXPORT(sys_call_table)
|
||||
PTR sys_writev
|
||||
PTR sys_cacheflush
|
||||
PTR sys_cachectl
|
||||
PTR sys_sysmips
|
||||
PTR __sys_sysmips
|
||||
PTR sys_ni_syscall /* 4150 */
|
||||
PTR sys_getsid
|
||||
PTR sys_fdatasync
|
||||
|
||||
@@ -311,7 +311,7 @@ EXPORT(sys_call_table)
|
||||
PTR sys_sched_getaffinity
|
||||
PTR sys_cacheflush
|
||||
PTR sys_cachectl
|
||||
PTR sys_sysmips
|
||||
PTR __sys_sysmips
|
||||
PTR sys_io_setup /* 5200 */
|
||||
PTR sys_io_destroy
|
||||
PTR sys_io_getevents
|
||||
|
||||
@@ -302,7 +302,7 @@ EXPORT(sysn32_call_table)
|
||||
PTR compat_sys_sched_getaffinity
|
||||
PTR sys_cacheflush
|
||||
PTR sys_cachectl
|
||||
PTR sys_sysmips
|
||||
PTR __sys_sysmips
|
||||
PTR compat_sys_io_setup /* 6200 */
|
||||
PTR sys_io_destroy
|
||||
PTR compat_sys_io_getevents
|
||||
|
||||
@@ -371,7 +371,7 @@ EXPORT(sys32_call_table)
|
||||
PTR compat_sys_writev
|
||||
PTR sys_cacheflush
|
||||
PTR sys_cachectl
|
||||
PTR sys_sysmips
|
||||
PTR __sys_sysmips
|
||||
PTR sys_ni_syscall /* 4150 */
|
||||
PTR sys_getsid
|
||||
PTR sys_fdatasync
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <linux/elf.h>
|
||||
|
||||
#include <asm/asm.h>
|
||||
#include <asm/asm-eva.h>
|
||||
#include <asm/branch.h>
|
||||
#include <asm/cachectl.h>
|
||||
#include <asm/cacheflush.h>
|
||||
@@ -138,10 +139,12 @@ static inline int mips_atomic_set(unsigned long addr, unsigned long new)
|
||||
__asm__ __volatile__ (
|
||||
" .set "MIPS_ISA_ARCH_LEVEL" \n"
|
||||
" li %[err], 0 \n"
|
||||
"1: ll %[old], (%[addr]) \n"
|
||||
"1: \n"
|
||||
user_ll("%[old]", "(%[addr])")
|
||||
" move %[tmp], %[new] \n"
|
||||
"2: sc %[tmp], (%[addr]) \n"
|
||||
" bnez %[tmp], 4f \n"
|
||||
"2: \n"
|
||||
user_sc("%[tmp]", "(%[addr])")
|
||||
" beqz %[tmp], 4f \n"
|
||||
"3: \n"
|
||||
" .insn \n"
|
||||
" .subsection 2 \n"
|
||||
@@ -199,6 +202,12 @@ static inline int mips_atomic_set(unsigned long addr, unsigned long new)
|
||||
unreachable();
|
||||
}
|
||||
|
||||
/*
|
||||
* mips_atomic_set() normally returns directly via syscall_exit potentially
|
||||
* clobbering static registers, so be sure to preserve them.
|
||||
*/
|
||||
save_static_function(sys_sysmips);
|
||||
|
||||
SYSCALL_DEFINE3(sysmips, long, cmd, long, arg1, long, arg2)
|
||||
{
|
||||
switch (cmd) {
|
||||
|
||||
@@ -2522,6 +2522,35 @@ dcopuop:
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Emulate FPU instructions.
|
||||
*
|
||||
* If we use FPU hardware, then we have been typically called to handle
|
||||
* an unimplemented operation, such as where an operand is a NaN or
|
||||
* denormalized. In that case exit the emulation loop after a single
|
||||
* iteration so as to let hardware execute any subsequent instructions.
|
||||
*
|
||||
* If we have no FPU hardware or it has been disabled, then continue
|
||||
* emulating floating-point instructions until one of these conditions
|
||||
* has occurred:
|
||||
*
|
||||
* - a non-FPU instruction has been encountered,
|
||||
*
|
||||
* - an attempt to emulate has ended with a signal,
|
||||
*
|
||||
* - the ISA mode has been switched.
|
||||
*
|
||||
* We need to terminate the emulation loop if we got switched to the
|
||||
* MIPS16 mode, whether supported or not, so that we do not attempt
|
||||
* to emulate a MIPS16 instruction as a regular MIPS FPU instruction.
|
||||
* Similarly if we got switched to the microMIPS mode and only the
|
||||
* regular MIPS mode is supported, so that we do not attempt to emulate
|
||||
* a microMIPS instruction as a regular MIPS FPU instruction. Or if
|
||||
* we got switched to the regular MIPS mode and only the microMIPS mode
|
||||
* is supported, so that we do not attempt to emulate a regular MIPS
|
||||
* instruction that should cause an Address Error exception instead.
|
||||
* For simplicity we always terminate upon an ISA mode switch.
|
||||
*/
|
||||
int fpu_emulator_cop1Handler(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
|
||||
int has_fpu, void *__user *fault_addr)
|
||||
{
|
||||
@@ -2607,6 +2636,15 @@ int fpu_emulator_cop1Handler(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
|
||||
break;
|
||||
if (sig)
|
||||
break;
|
||||
/*
|
||||
* We have to check for the ISA bit explicitly here,
|
||||
* because `get_isa16_mode' may return 0 if support
|
||||
* for code compression has been globally disabled,
|
||||
* or otherwise we may produce the wrong signal or
|
||||
* even proceed successfully where we must not.
|
||||
*/
|
||||
if ((xcp->cp0_epc ^ prevepc) & 0x1)
|
||||
break;
|
||||
|
||||
cond_resched();
|
||||
} while (xcp->cp0_epc > prevepc);
|
||||
|
||||
@@ -560,7 +560,7 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
|
||||
* Atomically increments @v by 1, so long as @v is non-zero.
|
||||
* Returns non-zero if @v was non-zero, and zero otherwise.
|
||||
*/
|
||||
static __inline__ long atomic64_inc_not_zero(atomic64_t *v)
|
||||
static __inline__ int atomic64_inc_not_zero(atomic64_t *v)
|
||||
{
|
||||
long t1, t2;
|
||||
|
||||
@@ -579,7 +579,7 @@ static __inline__ long atomic64_inc_not_zero(atomic64_t *v)
|
||||
: "r" (&v->counter)
|
||||
: "cc", "xer", "memory");
|
||||
|
||||
return t1;
|
||||
return t1 != 0;
|
||||
}
|
||||
|
||||
#endif /* __powerpc64__ */
|
||||
|
||||
@@ -1283,7 +1283,7 @@ static inline void msr_check_and_clear(unsigned long bits)
|
||||
" .llong 0\n" \
|
||||
".previous" \
|
||||
: "=r" (rval) \
|
||||
: "i" (CPU_FTR_CELL_TB_BUG), "i" (SPRN_TBRL)); \
|
||||
: "i" (CPU_FTR_CELL_TB_BUG), "i" (SPRN_TBRL) : "cr0"); \
|
||||
rval;})
|
||||
#else
|
||||
#define mftb() ({unsigned long rval; \
|
||||
|
||||
@@ -687,8 +687,10 @@ int __kprobes analyse_instr(struct instruction_op *op, struct pt_regs *regs,
|
||||
case 19:
|
||||
switch ((instr >> 1) & 0x3ff) {
|
||||
case 0: /* mcrf */
|
||||
rd = (instr >> 21) & 0x1c;
|
||||
ra = (instr >> 16) & 0x1c;
|
||||
rd = 7 - ((instr >> 23) & 0x7);
|
||||
ra = 7 - ((instr >> 18) & 0x7);
|
||||
rd *= 4;
|
||||
ra *= 4;
|
||||
val = (regs->ccr >> ra) & 0xf;
|
||||
regs->ccr = (regs->ccr & ~(0xfUL << rd)) | (val << rd);
|
||||
goto instr_done;
|
||||
@@ -968,6 +970,19 @@ int __kprobes analyse_instr(struct instruction_op *op, struct pt_regs *regs,
|
||||
#endif
|
||||
|
||||
case 19: /* mfcr */
|
||||
if ((instr >> 20) & 1) {
|
||||
imm = 0xf0000000UL;
|
||||
for (sh = 0; sh < 8; ++sh) {
|
||||
if (instr & (0x80000 >> sh)) {
|
||||
regs->gpr[rd] = regs->ccr & imm;
|
||||
break;
|
||||
}
|
||||
imm >>= 4;
|
||||
}
|
||||
|
||||
goto instr_done;
|
||||
}
|
||||
|
||||
regs->gpr[rd] = regs->ccr;
|
||||
regs->gpr[rd] &= 0xffffffffUL;
|
||||
goto instr_done;
|
||||
|
||||
@@ -167,9 +167,15 @@ void destroy_context(struct mm_struct *mm)
|
||||
mm->context.cop_lockp = NULL;
|
||||
#endif /* CONFIG_PPC_ICSWX */
|
||||
|
||||
if (radix_enabled())
|
||||
process_tb[mm->context.id].prtb1 = 0;
|
||||
else
|
||||
if (radix_enabled()) {
|
||||
/*
|
||||
* Radix doesn't have a valid bit in the process table
|
||||
* entries. However we know that at least P9 implementation
|
||||
* will avoid caching an entry with an invalid RTS field,
|
||||
* and 0 is invalid. So this will do.
|
||||
*/
|
||||
process_tb[mm->context.id].prtb0 = 0;
|
||||
} else
|
||||
subpage_prot_free(mm);
|
||||
destroy_pagetable_page(mm);
|
||||
__destroy_context(mm->context.id);
|
||||
|
||||
@@ -279,7 +279,7 @@ static long pSeries_lpar_hpte_updatepp(unsigned long slot,
|
||||
int ssize, unsigned long inv_flags)
|
||||
{
|
||||
unsigned long lpar_rc;
|
||||
unsigned long flags = (newpp & 7) | H_AVPN;
|
||||
unsigned long flags;
|
||||
unsigned long want_v;
|
||||
|
||||
want_v = hpte_encode_avpn(vpn, psize, ssize);
|
||||
@@ -287,6 +287,11 @@ static long pSeries_lpar_hpte_updatepp(unsigned long slot,
|
||||
pr_devel(" update: avpnv=%016lx, hash=%016lx, f=%lx, psize: %d ...",
|
||||
want_v, slot, flags, psize);
|
||||
|
||||
flags = (newpp & 7) | H_AVPN;
|
||||
if (mmu_has_feature(MMU_FTR_KERNEL_RO))
|
||||
/* Move pp0 into bit 8 (IBM 55) */
|
||||
flags |= (newpp & HPTE_R_PP0) >> 55;
|
||||
|
||||
lpar_rc = plpar_pte_protect(flags, slot, want_v);
|
||||
|
||||
if (lpar_rc == H_NOT_FOUND) {
|
||||
@@ -358,6 +363,10 @@ static void pSeries_lpar_hpte_updateboltedpp(unsigned long newpp,
|
||||
BUG_ON(slot == -1);
|
||||
|
||||
flags = newpp & 7;
|
||||
if (mmu_has_feature(MMU_FTR_KERNEL_RO))
|
||||
/* Move pp0 into bit 8 (IBM 55) */
|
||||
flags |= (newpp & HPTE_R_PP0) >> 55;
|
||||
|
||||
lpar_rc = plpar_pte_protect(flags, slot, 0);
|
||||
|
||||
BUG_ON(lpar_rc != H_SUCCESS);
|
||||
|
||||
@@ -64,6 +64,12 @@ static inline void syscall_get_arguments(struct task_struct *task,
|
||||
{
|
||||
unsigned long mask = -1UL;
|
||||
|
||||
/*
|
||||
* No arguments for this syscall, there's nothing to do.
|
||||
*/
|
||||
if (!n)
|
||||
return;
|
||||
|
||||
BUG_ON(i + n > 6);
|
||||
#ifdef CONFIG_COMPAT
|
||||
if (test_tsk_thread_flag(task, TIF_31BIT))
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
#include <asm/page.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/smap.h>
|
||||
|
||||
#include <xen/interface/xen.h>
|
||||
#include <xen/interface/sched.h>
|
||||
@@ -214,10 +215,12 @@ privcmd_call(unsigned call,
|
||||
__HYPERCALL_DECLS;
|
||||
__HYPERCALL_5ARG(a1, a2, a3, a4, a5);
|
||||
|
||||
stac();
|
||||
asm volatile("call *%[call]"
|
||||
: __HYPERCALL_5PARAM
|
||||
: [call] "a" (&hypercall_page[call])
|
||||
: __HYPERCALL_CLOBBER5);
|
||||
clac();
|
||||
|
||||
return (long)__res;
|
||||
}
|
||||
|
||||
@@ -337,6 +337,14 @@ static void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger,
|
||||
int pin;
|
||||
struct mpc_intsrc mp_irq;
|
||||
|
||||
/*
|
||||
* Check bus_irq boundary.
|
||||
*/
|
||||
if (bus_irq >= NR_IRQS_LEGACY) {
|
||||
pr_warn("Invalid bus_irq %u for legacy override\n", bus_irq);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Convert 'gsi' to 'ioapic.pin'.
|
||||
*/
|
||||
|
||||
@@ -2116,7 +2116,7 @@ static inline void __init check_timer(void)
|
||||
int idx;
|
||||
idx = find_irq_entry(apic1, pin1, mp_INT);
|
||||
if (idx != -1 && irq_trigger(idx))
|
||||
unmask_ioapic_irq(irq_get_chip_data(0));
|
||||
unmask_ioapic_irq(irq_get_irq_data(0));
|
||||
}
|
||||
irq_domain_deactivate_irq(irq_data);
|
||||
irq_domain_activate_irq(irq_data);
|
||||
|
||||
@@ -571,3 +571,35 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2fc0, pci_invalid_bar);
|
||||
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6f60, pci_invalid_bar);
|
||||
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6fa0, pci_invalid_bar);
|
||||
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6fc0, pci_invalid_bar);
|
||||
|
||||
/*
|
||||
* Apple MacBook Pro: Avoid [mem 0x7fa00000-0x7fbfffff]
|
||||
*
|
||||
* Using the [mem 0x7fa00000-0x7fbfffff] region, e.g., by assigning it to
|
||||
* the 00:1c.0 Root Port, causes a conflict with [io 0x1804], which is used
|
||||
* for soft poweroff and suspend-to-RAM.
|
||||
*
|
||||
* As far as we know, this is related to the address space, not to the Root
|
||||
* Port itself. Attaching the quirk to the Root Port is a convenience, but
|
||||
* it could probably also be a standalone DMI quirk.
|
||||
*
|
||||
* https://bugzilla.kernel.org/show_bug.cgi?id=103211
|
||||
*/
|
||||
static void quirk_apple_mbp_poweroff(struct pci_dev *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct resource *res;
|
||||
|
||||
if ((!dmi_match(DMI_PRODUCT_NAME, "MacBookPro11,4") &&
|
||||
!dmi_match(DMI_PRODUCT_NAME, "MacBookPro11,5")) ||
|
||||
pdev->bus->number != 0 || pdev->devfn != PCI_DEVFN(0x1c, 0))
|
||||
return;
|
||||
|
||||
res = request_mem_region(0x7fa00000, 0x200000,
|
||||
"MacBook Pro poweroff workaround");
|
||||
if (res)
|
||||
dev_info(dev, "claimed %s %pR\n", res->name, res);
|
||||
else
|
||||
dev_info(dev, "can't work around MacBook Pro poweroff issue\n");
|
||||
}
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x8c10, quirk_apple_mbp_poweroff);
|
||||
|
||||
@@ -147,7 +147,7 @@ static unsigned int ec_storm_threshold __read_mostly = 8;
|
||||
module_param(ec_storm_threshold, uint, 0644);
|
||||
MODULE_PARM_DESC(ec_storm_threshold, "Maxim false GPE numbers not considered as GPE storm");
|
||||
|
||||
static bool ec_freeze_events __read_mostly = true;
|
||||
static bool ec_freeze_events __read_mostly = false;
|
||||
module_param(ec_freeze_events, bool, 0644);
|
||||
MODULE_PARM_DESC(ec_freeze_events, "Disabling event handling during suspend/resume");
|
||||
|
||||
@@ -1865,24 +1865,6 @@ error:
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int acpi_ec_suspend_noirq(struct device *dev)
|
||||
{
|
||||
struct acpi_ec *ec =
|
||||
acpi_driver_data(to_acpi_device(dev));
|
||||
|
||||
acpi_ec_enter_noirq(ec);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int acpi_ec_resume_noirq(struct device *dev)
|
||||
{
|
||||
struct acpi_ec *ec =
|
||||
acpi_driver_data(to_acpi_device(dev));
|
||||
|
||||
acpi_ec_leave_noirq(ec);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int acpi_ec_suspend(struct device *dev)
|
||||
{
|
||||
struct acpi_ec *ec =
|
||||
@@ -1904,7 +1886,6 @@ static int acpi_ec_resume(struct device *dev)
|
||||
#endif
|
||||
|
||||
static const struct dev_pm_ops acpi_ec_pm = {
|
||||
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(acpi_ec_suspend_noirq, acpi_ec_resume_noirq)
|
||||
SET_SYSTEM_SLEEP_PM_OPS(acpi_ec_suspend, acpi_ec_resume)
|
||||
};
|
||||
|
||||
|
||||
@@ -2945,6 +2945,8 @@ static struct acpi_driver acpi_nfit_driver = {
|
||||
|
||||
static __init int nfit_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
BUILD_BUG_ON(sizeof(struct acpi_table_nfit) != 40);
|
||||
BUILD_BUG_ON(sizeof(struct acpi_nfit_system_address) != 56);
|
||||
BUILD_BUG_ON(sizeof(struct acpi_nfit_memory_map) != 48);
|
||||
@@ -2972,8 +2974,14 @@ static __init int nfit_init(void)
|
||||
return -ENOMEM;
|
||||
|
||||
nfit_mce_register();
|
||||
ret = acpi_bus_register_driver(&acpi_nfit_driver);
|
||||
if (ret) {
|
||||
nfit_mce_unregister();
|
||||
destroy_workqueue(nfit_wq);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
return acpi_bus_register_driver(&acpi_nfit_driver);
|
||||
}
|
||||
|
||||
static __exit void nfit_exit(void)
|
||||
|
||||
@@ -1029,8 +1029,6 @@ static struct generic_pm_domain_data *genpd_alloc_dev_data(struct device *dev,
|
||||
|
||||
spin_unlock_irq(&dev->power.lock);
|
||||
|
||||
dev_pm_domain_set(dev, &genpd->domain);
|
||||
|
||||
return gpd_data;
|
||||
|
||||
err_free:
|
||||
@@ -1044,8 +1042,6 @@ static struct generic_pm_domain_data *genpd_alloc_dev_data(struct device *dev,
|
||||
static void genpd_free_dev_data(struct device *dev,
|
||||
struct generic_pm_domain_data *gpd_data)
|
||||
{
|
||||
dev_pm_domain_set(dev, NULL);
|
||||
|
||||
spin_lock_irq(&dev->power.lock);
|
||||
|
||||
dev->power.subsys_data->domain_data = NULL;
|
||||
@@ -1082,6 +1078,8 @@ static int genpd_add_device(struct generic_pm_domain *genpd, struct device *dev,
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
dev_pm_domain_set(dev, &genpd->domain);
|
||||
|
||||
genpd->device_count++;
|
||||
genpd->max_off_time_changed = true;
|
||||
|
||||
@@ -1143,6 +1141,8 @@ static int genpd_remove_device(struct generic_pm_domain *genpd,
|
||||
if (genpd->detach_dev)
|
||||
genpd->detach_dev(genpd, dev);
|
||||
|
||||
dev_pm_domain_set(dev, NULL);
|
||||
|
||||
list_del_init(&pdd->list_node);
|
||||
|
||||
mutex_unlock(&genpd->lock);
|
||||
@@ -1244,7 +1244,7 @@ EXPORT_SYMBOL_GPL(pm_genpd_add_subdomain);
|
||||
int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd,
|
||||
struct generic_pm_domain *subdomain)
|
||||
{
|
||||
struct gpd_link *link;
|
||||
struct gpd_link *l, *link;
|
||||
int ret = -EINVAL;
|
||||
|
||||
if (IS_ERR_OR_NULL(genpd) || IS_ERR_OR_NULL(subdomain))
|
||||
@@ -1260,7 +1260,7 @@ int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd,
|
||||
goto out;
|
||||
}
|
||||
|
||||
list_for_each_entry(link, &genpd->master_links, master_node) {
|
||||
list_for_each_entry_safe(link, l, &genpd->master_links, master_node) {
|
||||
if (link->slave != subdomain)
|
||||
continue;
|
||||
|
||||
@@ -1607,12 +1607,12 @@ EXPORT_SYMBOL_GPL(of_genpd_add_provider_onecell);
|
||||
*/
|
||||
void of_genpd_del_provider(struct device_node *np)
|
||||
{
|
||||
struct of_genpd_provider *cp;
|
||||
struct of_genpd_provider *cp, *tmp;
|
||||
struct generic_pm_domain *gpd;
|
||||
|
||||
mutex_lock(&gpd_list_lock);
|
||||
mutex_lock(&of_genpd_mutex);
|
||||
list_for_each_entry(cp, &of_genpd_providers, link) {
|
||||
list_for_each_entry_safe(cp, tmp, &of_genpd_providers, link) {
|
||||
if (cp->node == np) {
|
||||
/*
|
||||
* For each PM domain associated with the
|
||||
@@ -1752,14 +1752,14 @@ EXPORT_SYMBOL_GPL(of_genpd_add_subdomain);
|
||||
*/
|
||||
struct generic_pm_domain *of_genpd_remove_last(struct device_node *np)
|
||||
{
|
||||
struct generic_pm_domain *gpd, *genpd = ERR_PTR(-ENOENT);
|
||||
struct generic_pm_domain *gpd, *tmp, *genpd = ERR_PTR(-ENOENT);
|
||||
int ret;
|
||||
|
||||
if (IS_ERR_OR_NULL(np))
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
mutex_lock(&gpd_list_lock);
|
||||
list_for_each_entry(gpd, &gpd_list, gpd_list_node) {
|
||||
list_for_each_entry_safe(gpd, tmp, &gpd_list, gpd_list_node) {
|
||||
if (gpd->provider == &np->fwnode) {
|
||||
ret = genpd_remove(gpd);
|
||||
genpd = ret ? ERR_PTR(ret) : gpd;
|
||||
|
||||
@@ -3877,6 +3877,9 @@ static void smi_recv_tasklet(unsigned long val)
|
||||
* because the lower layer is allowed to hold locks while calling
|
||||
* message delivery.
|
||||
*/
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
if (!run_to_completion)
|
||||
spin_lock_irqsave(&intf->xmit_msgs_lock, flags);
|
||||
if (intf->curr_msg == NULL && !intf->in_shutdown) {
|
||||
@@ -3899,6 +3902,8 @@ static void smi_recv_tasklet(unsigned long val)
|
||||
if (newmsg)
|
||||
intf->handlers->sender(intf->send_info, newmsg);
|
||||
|
||||
rcu_read_unlock();
|
||||
|
||||
handle_new_recv_msgs(intf);
|
||||
}
|
||||
|
||||
|
||||
@@ -762,6 +762,11 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,
|
||||
result, len, data[2]);
|
||||
} else if (data[0] != (IPMI_NETFN_APP_REQUEST | 1) << 2
|
||||
|| data[1] != IPMI_GET_MSG_FLAGS_CMD) {
|
||||
/*
|
||||
* Don't abort here, maybe it was a queued
|
||||
* response to a previous command.
|
||||
*/
|
||||
ipmi_ssif_unlock_cond(ssif_info, flags);
|
||||
pr_warn(PFX "Invalid response getting flags: %x %x\n",
|
||||
data[0], data[1]);
|
||||
} else {
|
||||
|
||||
@@ -1419,6 +1419,9 @@ static ssize_t amdgpu_ttm_vram_read(struct file *f, char __user *buf,
|
||||
if (size & 0x3 || *pos & 0x3)
|
||||
return -EINVAL;
|
||||
|
||||
if (*pos >= adev->mc.mc_vram_size)
|
||||
return -ENXIO;
|
||||
|
||||
while (size) {
|
||||
unsigned long flags;
|
||||
uint32_t value;
|
||||
|
||||
@@ -330,6 +330,13 @@ static bool drm_dp_sideband_msg_build(struct drm_dp_sideband_msg_rx *msg,
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* ignore out-of-order messages or messages that are part of a
|
||||
* failed transaction
|
||||
*/
|
||||
if (!recv_hdr.somt && !msg->have_somt)
|
||||
return false;
|
||||
|
||||
/* get length contained in this portion */
|
||||
msg->curchunk_len = recv_hdr.msg_len;
|
||||
msg->curchunk_hdrlen = hdrlen;
|
||||
@@ -2168,7 +2175,7 @@ out_unlock:
|
||||
}
|
||||
EXPORT_SYMBOL(drm_dp_mst_topology_mgr_resume);
|
||||
|
||||
static void drm_dp_get_one_sb_msg(struct drm_dp_mst_topology_mgr *mgr, bool up)
|
||||
static bool drm_dp_get_one_sb_msg(struct drm_dp_mst_topology_mgr *mgr, bool up)
|
||||
{
|
||||
int len;
|
||||
u8 replyblock[32];
|
||||
@@ -2183,12 +2190,12 @@ static void drm_dp_get_one_sb_msg(struct drm_dp_mst_topology_mgr *mgr, bool up)
|
||||
replyblock, len);
|
||||
if (ret != len) {
|
||||
DRM_DEBUG_KMS("failed to read DPCD down rep %d %d\n", len, ret);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
ret = drm_dp_sideband_msg_build(msg, replyblock, len, true);
|
||||
if (!ret) {
|
||||
DRM_DEBUG_KMS("sideband msg build failed %d\n", replyblock[0]);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
replylen = msg->curchunk_len + msg->curchunk_hdrlen;
|
||||
|
||||
@@ -2200,21 +2207,32 @@ static void drm_dp_get_one_sb_msg(struct drm_dp_mst_topology_mgr *mgr, bool up)
|
||||
ret = drm_dp_dpcd_read(mgr->aux, basereg + curreply,
|
||||
replyblock, len);
|
||||
if (ret != len) {
|
||||
DRM_DEBUG_KMS("failed to read a chunk\n");
|
||||
DRM_DEBUG_KMS("failed to read a chunk (len %d, ret %d)\n",
|
||||
len, ret);
|
||||
return false;
|
||||
}
|
||||
|
||||
ret = drm_dp_sideband_msg_build(msg, replyblock, len, false);
|
||||
if (ret == false)
|
||||
if (!ret) {
|
||||
DRM_DEBUG_KMS("failed to build sideband msg\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
curreply += len;
|
||||
replylen -= len;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static int drm_dp_mst_handle_down_rep(struct drm_dp_mst_topology_mgr *mgr)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
drm_dp_get_one_sb_msg(mgr, false);
|
||||
if (!drm_dp_get_one_sb_msg(mgr, false)) {
|
||||
memset(&mgr->down_rep_recv, 0,
|
||||
sizeof(struct drm_dp_sideband_msg_rx));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (mgr->down_rep_recv.have_eomt) {
|
||||
struct drm_dp_sideband_msg_tx *txmsg;
|
||||
@@ -2270,7 +2288,12 @@ static int drm_dp_mst_handle_down_rep(struct drm_dp_mst_topology_mgr *mgr)
|
||||
static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr)
|
||||
{
|
||||
int ret = 0;
|
||||
drm_dp_get_one_sb_msg(mgr, true);
|
||||
|
||||
if (!drm_dp_get_one_sb_msg(mgr, true)) {
|
||||
memset(&mgr->up_req_recv, 0,
|
||||
sizeof(struct drm_dp_sideband_msg_rx));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (mgr->up_req_recv.have_eomt) {
|
||||
struct drm_dp_sideband_msg_req_body msg;
|
||||
@@ -2322,7 +2345,9 @@ static int drm_dp_mst_handle_up_req(struct drm_dp_mst_topology_mgr *mgr)
|
||||
DRM_DEBUG_KMS("Got RSN: pn: %d avail_pbn %d\n", msg.u.resource_stat.port_number, msg.u.resource_stat.available_pbn);
|
||||
}
|
||||
|
||||
drm_dp_put_mst_branch_device(mstb);
|
||||
if (mstb)
|
||||
drm_dp_put_mst_branch_device(mstb);
|
||||
|
||||
memset(&mgr->up_req_recv, 0, sizeof(struct drm_dp_sideband_msg_rx));
|
||||
}
|
||||
return ret;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "radeon_audio.h"
|
||||
#include "atom.h"
|
||||
#include <linux/backlight.h>
|
||||
#include <linux/dmi.h>
|
||||
|
||||
extern int atom_debug;
|
||||
|
||||
@@ -2183,9 +2184,17 @@ int radeon_atom_pick_dig_encoder(struct drm_encoder *encoder, int fe_idx)
|
||||
goto assigned;
|
||||
}
|
||||
|
||||
/* on DCE32 and encoder can driver any block so just crtc id */
|
||||
/*
|
||||
* On DCE32 any encoder can drive any block so usually just use crtc id,
|
||||
* but Apple thinks different at least on iMac10,1, so there use linkb,
|
||||
* otherwise the internal eDP panel will stay dark.
|
||||
*/
|
||||
if (ASIC_IS_DCE32(rdev)) {
|
||||
enc_idx = radeon_crtc->crtc_id;
|
||||
if (dmi_match(DMI_PRODUCT_NAME, "iMac10,1"))
|
||||
enc_idx = (dig->linkb) ? 1 : 0;
|
||||
else
|
||||
enc_idx = radeon_crtc->crtc_id;
|
||||
|
||||
goto assigned;
|
||||
}
|
||||
|
||||
|
||||
@@ -776,6 +776,12 @@ bool ci_dpm_vblank_too_short(struct radeon_device *rdev)
|
||||
u32 vblank_time = r600_dpm_get_vblank_time(rdev);
|
||||
u32 switch_limit = pi->mem_gddr5 ? 450 : 300;
|
||||
|
||||
/* disable mclk switching if the refresh is >120Hz, even if the
|
||||
* blanking period would allow it
|
||||
*/
|
||||
if (r600_dpm_get_vrefresh(rdev) > 120)
|
||||
return true;
|
||||
|
||||
/* disable mclk switching if the refresh is >120Hz, even if the
|
||||
* blanking period would allow it
|
||||
*/
|
||||
|
||||
@@ -1343,7 +1343,6 @@ int ttm_bo_clean_mm(struct ttm_bo_device *bdev, unsigned mem_type)
|
||||
mem_type);
|
||||
return ret;
|
||||
}
|
||||
fence_put(man->move);
|
||||
|
||||
man->use_type = false;
|
||||
man->has_type = false;
|
||||
@@ -1355,6 +1354,9 @@ int ttm_bo_clean_mm(struct ttm_bo_device *bdev, unsigned mem_type)
|
||||
ret = (*man->func->takedown)(man);
|
||||
}
|
||||
|
||||
fence_put(man->move);
|
||||
man->move = NULL;
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(ttm_bo_clean_mm);
|
||||
|
||||
@@ -518,6 +518,11 @@ static int addr_resolve(struct sockaddr *src_in,
|
||||
struct dst_entry *dst;
|
||||
int ret;
|
||||
|
||||
if (!addr->net) {
|
||||
pr_warn_ratelimited("%s: missing namespace\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (src_in->sa_family == AF_INET) {
|
||||
struct rtable *rt = NULL;
|
||||
const struct sockaddr_in *dst_in4 =
|
||||
@@ -555,7 +560,6 @@ static int addr_resolve(struct sockaddr *src_in,
|
||||
}
|
||||
|
||||
addr->bound_dev_if = ndev->ifindex;
|
||||
addr->net = dev_net(ndev);
|
||||
dev_put(ndev);
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -976,6 +976,8 @@ int rdma_init_qp_attr(struct rdma_cm_id *id, struct ib_qp_attr *qp_attr,
|
||||
} else
|
||||
ret = iw_cm_init_qp_attr(id_priv->cm_id.iw, qp_attr,
|
||||
qp_attr_mask);
|
||||
qp_attr->port_num = id_priv->id.port_num;
|
||||
*qp_attr_mask |= IB_QP_PORT;
|
||||
} else
|
||||
ret = -ENOSYS;
|
||||
|
||||
|
||||
@@ -1823,7 +1823,7 @@ mlx5_ib_sg_to_klms(struct mlx5_ib_mr *mr,
|
||||
mr->ndescs = sg_nents;
|
||||
|
||||
for_each_sg(sgl, sg, sg_nents, i) {
|
||||
if (unlikely(i > mr->max_descs))
|
||||
if (unlikely(i >= mr->max_descs))
|
||||
break;
|
||||
klms[i].va = cpu_to_be64(sg_dma_address(sg) + sg_offset);
|
||||
klms[i].bcount = cpu_to_be32(sg_dma_len(sg) - sg_offset);
|
||||
|
||||
@@ -83,6 +83,7 @@ static struct scsi_host_template iscsi_iser_sht;
|
||||
static struct iscsi_transport iscsi_iser_transport;
|
||||
static struct scsi_transport_template *iscsi_iser_scsi_transport;
|
||||
static struct workqueue_struct *release_wq;
|
||||
static DEFINE_MUTEX(unbind_iser_conn_mutex);
|
||||
struct iser_global ig;
|
||||
|
||||
int iser_debug_level = 0;
|
||||
@@ -550,12 +551,14 @@ iscsi_iser_conn_stop(struct iscsi_cls_conn *cls_conn, int flag)
|
||||
*/
|
||||
if (iser_conn) {
|
||||
mutex_lock(&iser_conn->state_mutex);
|
||||
mutex_lock(&unbind_iser_conn_mutex);
|
||||
iser_conn_terminate(iser_conn);
|
||||
iscsi_conn_stop(cls_conn, flag);
|
||||
|
||||
/* unbind */
|
||||
iser_conn->iscsi_conn = NULL;
|
||||
conn->dd_data = NULL;
|
||||
mutex_unlock(&unbind_iser_conn_mutex);
|
||||
|
||||
complete(&iser_conn->stop_completion);
|
||||
mutex_unlock(&iser_conn->state_mutex);
|
||||
@@ -973,13 +976,21 @@ static int iscsi_iser_slave_alloc(struct scsi_device *sdev)
|
||||
struct iser_conn *iser_conn;
|
||||
struct ib_device *ib_dev;
|
||||
|
||||
mutex_lock(&unbind_iser_conn_mutex);
|
||||
|
||||
session = starget_to_session(scsi_target(sdev))->dd_data;
|
||||
iser_conn = session->leadconn->dd_data;
|
||||
if (!iser_conn) {
|
||||
mutex_unlock(&unbind_iser_conn_mutex);
|
||||
return -ENOTCONN;
|
||||
}
|
||||
ib_dev = iser_conn->ib_conn.device->ib_device;
|
||||
|
||||
if (!(ib_dev->attrs.device_cap_flags & IB_DEVICE_SG_GAPS_REG))
|
||||
blk_queue_virt_boundary(sdev->request_queue, ~MASK_4K);
|
||||
|
||||
mutex_unlock(&unbind_iser_conn_mutex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1447,7 +1447,7 @@ static void
|
||||
isert_login_recv_done(struct ib_cq *cq, struct ib_wc *wc)
|
||||
{
|
||||
struct isert_conn *isert_conn = wc->qp->qp_context;
|
||||
struct ib_device *ib_dev = isert_conn->cm_id->device;
|
||||
struct ib_device *ib_dev = isert_conn->device->ib_device;
|
||||
|
||||
if (unlikely(wc->status != IB_WC_SUCCESS)) {
|
||||
isert_print_wc(wc, "login recv");
|
||||
|
||||
@@ -434,8 +434,10 @@ static int i8042_start(struct serio *serio)
|
||||
{
|
||||
struct i8042_port *port = serio->port_data;
|
||||
|
||||
spin_lock_irq(&i8042_lock);
|
||||
port->exists = true;
|
||||
mb();
|
||||
spin_unlock_irq(&i8042_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -448,16 +450,20 @@ static void i8042_stop(struct serio *serio)
|
||||
{
|
||||
struct i8042_port *port = serio->port_data;
|
||||
|
||||
spin_lock_irq(&i8042_lock);
|
||||
port->exists = false;
|
||||
port->serio = NULL;
|
||||
spin_unlock_irq(&i8042_lock);
|
||||
|
||||
/*
|
||||
* We need to make sure that interrupt handler finishes using
|
||||
* our serio port before we return from this function.
|
||||
* We synchronize with both AUX and KBD IRQs because there is
|
||||
* a (very unlikely) chance that AUX IRQ is raised for KBD port
|
||||
* and vice versa.
|
||||
*/
|
||||
synchronize_irq(I8042_AUX_IRQ);
|
||||
synchronize_irq(I8042_KBD_IRQ);
|
||||
port->serio = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -574,7 +580,7 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id)
|
||||
|
||||
spin_unlock_irqrestore(&i8042_lock, flags);
|
||||
|
||||
if (likely(port->exists && !filtered))
|
||||
if (likely(serio && !filtered))
|
||||
serio_interrupt(serio, data, dfl);
|
||||
|
||||
out:
|
||||
|
||||
@@ -431,7 +431,7 @@ static struct pgpath *choose_pgpath(struct multipath *m, size_t nr_bytes)
|
||||
unsigned long flags;
|
||||
struct priority_group *pg;
|
||||
struct pgpath *pgpath;
|
||||
bool bypassed = true;
|
||||
unsigned bypassed = 1;
|
||||
|
||||
if (!atomic_read(&m->nr_valid_paths)) {
|
||||
clear_bit(MPATHF_QUEUE_IO, &m->flags);
|
||||
@@ -470,7 +470,7 @@ check_current_pg:
|
||||
*/
|
||||
do {
|
||||
list_for_each_entry(pg, &m->priority_groups, list) {
|
||||
if (pg->bypassed == bypassed)
|
||||
if (pg->bypassed == !!bypassed)
|
||||
continue;
|
||||
pgpath = choose_path_in_pg(m, pg, nr_bytes);
|
||||
if (!IS_ERR_OR_NULL(pgpath)) {
|
||||
|
||||
@@ -1073,7 +1073,7 @@ static void raid1_make_request(struct mddev *mddev, struct bio * bio)
|
||||
*/
|
||||
DEFINE_WAIT(w);
|
||||
for (;;) {
|
||||
flush_signals(current);
|
||||
sigset_t full, old;
|
||||
prepare_to_wait(&conf->wait_barrier,
|
||||
&w, TASK_INTERRUPTIBLE);
|
||||
if (bio_end_sector(bio) <= mddev->suspend_lo ||
|
||||
@@ -1082,7 +1082,10 @@ static void raid1_make_request(struct mddev *mddev, struct bio * bio)
|
||||
!md_cluster_ops->area_resyncing(mddev, WRITE,
|
||||
bio->bi_iter.bi_sector, bio_end_sector(bio))))
|
||||
break;
|
||||
sigfillset(&full);
|
||||
sigprocmask(SIG_BLOCK, &full, &old);
|
||||
schedule();
|
||||
sigprocmask(SIG_SETMASK, &old, NULL);
|
||||
}
|
||||
finish_wait(&conf->wait_barrier, &w);
|
||||
}
|
||||
|
||||
@@ -5300,12 +5300,15 @@ static void raid5_make_request(struct mddev *mddev, struct bio * bi)
|
||||
* userspace, we want an interruptible
|
||||
* wait.
|
||||
*/
|
||||
flush_signals(current);
|
||||
prepare_to_wait(&conf->wait_for_overlap,
|
||||
&w, TASK_INTERRUPTIBLE);
|
||||
if (logical_sector >= mddev->suspend_lo &&
|
||||
logical_sector < mddev->suspend_hi) {
|
||||
sigset_t full, old;
|
||||
sigfillset(&full);
|
||||
sigprocmask(SIG_BLOCK, &full, &old);
|
||||
schedule();
|
||||
sigprocmask(SIG_SETMASK, &old, NULL);
|
||||
do_prepare = true;
|
||||
}
|
||||
goto retry;
|
||||
@@ -7557,12 +7560,10 @@ static void end_reshape(struct r5conf *conf)
|
||||
{
|
||||
|
||||
if (!test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) {
|
||||
struct md_rdev *rdev;
|
||||
|
||||
spin_lock_irq(&conf->device_lock);
|
||||
conf->previous_raid_disks = conf->raid_disks;
|
||||
rdev_for_each(rdev, conf->mddev)
|
||||
rdev->data_offset = rdev->new_data_offset;
|
||||
md_finish_reshape(conf->mddev);
|
||||
smp_wmb();
|
||||
conf->reshape_progress = MaxSector;
|
||||
conf->mddev->reshape_position = MaxSector;
|
||||
|
||||
@@ -3691,7 +3691,14 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
|
||||
core->nr = nr;
|
||||
sprintf(core->name, "cx88[%d]", core->nr);
|
||||
|
||||
core->tvnorm = V4L2_STD_NTSC_M;
|
||||
/*
|
||||
* Note: Setting initial standard here would cause first call to
|
||||
* cx88_set_tvnorm() to return without programming any registers. Leave
|
||||
* it blank for at this point and it will get set later in
|
||||
* cx8800_initdev()
|
||||
*/
|
||||
core->tvnorm = 0;
|
||||
|
||||
core->width = 320;
|
||||
core->height = 240;
|
||||
core->field = V4L2_FIELD_INTERLACED;
|
||||
|
||||
@@ -1422,7 +1422,7 @@ static int cx8800_initdev(struct pci_dev *pci_dev,
|
||||
|
||||
/* initial device configuration */
|
||||
mutex_lock(&core->lock);
|
||||
cx88_set_tvnorm(core, core->tvnorm);
|
||||
cx88_set_tvnorm(core, V4L2_STD_NTSC_M);
|
||||
v4l2_ctrl_handler_setup(&core->video_hdl);
|
||||
v4l2_ctrl_handler_setup(&core->audio_hdl);
|
||||
cx88_video_mux(core, 0);
|
||||
|
||||
@@ -1099,10 +1099,10 @@ static bool s5p_jpeg_parse_hdr(struct s5p_jpeg_q_data *result,
|
||||
struct s5p_jpeg_ctx *ctx)
|
||||
{
|
||||
int c, components = 0, notfound, n_dht = 0, n_dqt = 0;
|
||||
unsigned int height, width, word, subsampling = 0, sos = 0, sof = 0,
|
||||
sof_len = 0;
|
||||
unsigned int dht[S5P_JPEG_MAX_MARKER], dht_len[S5P_JPEG_MAX_MARKER],
|
||||
dqt[S5P_JPEG_MAX_MARKER], dqt_len[S5P_JPEG_MAX_MARKER];
|
||||
unsigned int height = 0, width = 0, word, subsampling = 0;
|
||||
unsigned int sos = 0, sof = 0, sof_len = 0;
|
||||
unsigned int dht[S5P_JPEG_MAX_MARKER], dht_len[S5P_JPEG_MAX_MARKER];
|
||||
unsigned int dqt[S5P_JPEG_MAX_MARKER], dqt_len[S5P_JPEG_MAX_MARKER];
|
||||
long length;
|
||||
struct s5p_jpeg_buffer jpeg_buffer;
|
||||
|
||||
|
||||
@@ -1629,7 +1629,7 @@ static void imon_incoming_packet(struct imon_context *ictx,
|
||||
if (kc == KEY_KEYBOARD && !ictx->release_code) {
|
||||
ictx->last_keycode = kc;
|
||||
if (!nomouse) {
|
||||
ictx->pad_mouse = ~(ictx->pad_mouse) & 0x1;
|
||||
ictx->pad_mouse = !ictx->pad_mouse;
|
||||
dev_dbg(dev, "toggling to %s mode\n",
|
||||
ictx->pad_mouse ? "mouse" : "keyboard");
|
||||
spin_unlock_irqrestore(&ictx->kc_lock, flags);
|
||||
|
||||
@@ -320,7 +320,7 @@ fail:
|
||||
static int mxl111sf_i2c_send_data(struct mxl111sf_state *state,
|
||||
u8 index, u8 *wdata)
|
||||
{
|
||||
int ret = mxl111sf_ctrl_msg(state->d, wdata[0],
|
||||
int ret = mxl111sf_ctrl_msg(state, wdata[0],
|
||||
&wdata[1], 25, NULL, 0);
|
||||
mxl_fail(ret);
|
||||
|
||||
@@ -330,7 +330,7 @@ static int mxl111sf_i2c_send_data(struct mxl111sf_state *state,
|
||||
static int mxl111sf_i2c_get_data(struct mxl111sf_state *state,
|
||||
u8 index, u8 *wdata, u8 *rdata)
|
||||
{
|
||||
int ret = mxl111sf_ctrl_msg(state->d, wdata[0],
|
||||
int ret = mxl111sf_ctrl_msg(state, wdata[0],
|
||||
&wdata[1], 25, rdata, 24);
|
||||
mxl_fail(ret);
|
||||
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
#include "lgdt3305.h"
|
||||
#include "lg2160.h"
|
||||
|
||||
/* Max transfer size done by I2C transfer functions */
|
||||
#define MAX_XFER_SIZE 64
|
||||
|
||||
int dvb_usb_mxl111sf_debug;
|
||||
module_param_named(debug, dvb_usb_mxl111sf_debug, int, 0644);
|
||||
MODULE_PARM_DESC(debug, "set debugging level "
|
||||
@@ -56,27 +53,34 @@ MODULE_PARM_DESC(rfswitch, "force rf switch position (0=auto, 1=ext, 2=int).");
|
||||
|
||||
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
|
||||
|
||||
int mxl111sf_ctrl_msg(struct dvb_usb_device *d,
|
||||
int mxl111sf_ctrl_msg(struct mxl111sf_state *state,
|
||||
u8 cmd, u8 *wbuf, int wlen, u8 *rbuf, int rlen)
|
||||
{
|
||||
struct dvb_usb_device *d = state->d;
|
||||
int wo = (rbuf == NULL || rlen == 0); /* write-only */
|
||||
int ret;
|
||||
u8 sndbuf[MAX_XFER_SIZE];
|
||||
|
||||
if (1 + wlen > sizeof(sndbuf)) {
|
||||
if (1 + wlen > MXL_MAX_XFER_SIZE) {
|
||||
pr_warn("%s: len=%d is too big!\n", __func__, wlen);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
pr_debug("%s(wlen = %d, rlen = %d)\n", __func__, wlen, rlen);
|
||||
|
||||
memset(sndbuf, 0, 1+wlen);
|
||||
mutex_lock(&state->msg_lock);
|
||||
memset(state->sndbuf, 0, 1+wlen);
|
||||
memset(state->rcvbuf, 0, rlen);
|
||||
|
||||
sndbuf[0] = cmd;
|
||||
memcpy(&sndbuf[1], wbuf, wlen);
|
||||
state->sndbuf[0] = cmd;
|
||||
memcpy(&state->sndbuf[1], wbuf, wlen);
|
||||
|
||||
ret = (wo) ? dvb_usbv2_generic_write(d, state->sndbuf, 1+wlen) :
|
||||
dvb_usbv2_generic_rw(d, state->sndbuf, 1+wlen, state->rcvbuf,
|
||||
rlen);
|
||||
|
||||
memcpy(rbuf, state->rcvbuf, rlen);
|
||||
mutex_unlock(&state->msg_lock);
|
||||
|
||||
ret = (wo) ? dvb_usbv2_generic_write(d, sndbuf, 1+wlen) :
|
||||
dvb_usbv2_generic_rw(d, sndbuf, 1+wlen, rbuf, rlen);
|
||||
mxl_fail(ret);
|
||||
|
||||
return ret;
|
||||
@@ -92,7 +96,7 @@ int mxl111sf_read_reg(struct mxl111sf_state *state, u8 addr, u8 *data)
|
||||
u8 buf[2];
|
||||
int ret;
|
||||
|
||||
ret = mxl111sf_ctrl_msg(state->d, MXL_CMD_REG_READ, &addr, 1, buf, 2);
|
||||
ret = mxl111sf_ctrl_msg(state, MXL_CMD_REG_READ, &addr, 1, buf, 2);
|
||||
if (mxl_fail(ret)) {
|
||||
mxl_debug("error reading reg: 0x%02x", addr);
|
||||
goto fail;
|
||||
@@ -118,7 +122,7 @@ int mxl111sf_write_reg(struct mxl111sf_state *state, u8 addr, u8 data)
|
||||
|
||||
pr_debug("W: (0x%02x, 0x%02x)\n", addr, data);
|
||||
|
||||
ret = mxl111sf_ctrl_msg(state->d, MXL_CMD_REG_WRITE, buf, 2, NULL, 0);
|
||||
ret = mxl111sf_ctrl_msg(state, MXL_CMD_REG_WRITE, buf, 2, NULL, 0);
|
||||
if (mxl_fail(ret))
|
||||
pr_err("error writing reg: 0x%02x, val: 0x%02x", addr, data);
|
||||
return ret;
|
||||
@@ -922,6 +926,8 @@ static int mxl111sf_init(struct dvb_usb_device *d)
|
||||
static u8 eeprom[256];
|
||||
struct i2c_client c;
|
||||
|
||||
mutex_init(&state->msg_lock);
|
||||
|
||||
ret = get_chip_info(state);
|
||||
if (mxl_fail(ret))
|
||||
pr_err("failed to get chip info during probe");
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
#include <media/tveeprom.h>
|
||||
#include <media/media-entity.h>
|
||||
|
||||
/* Max transfer size done by I2C transfer functions */
|
||||
#define MXL_MAX_XFER_SIZE 64
|
||||
|
||||
#define MXL_EP1_REG_READ 1
|
||||
#define MXL_EP2_REG_WRITE 2
|
||||
#define MXL_EP3_INTERRUPT 3
|
||||
@@ -86,6 +89,9 @@ struct mxl111sf_state {
|
||||
struct mutex fe_lock;
|
||||
u8 num_frontends;
|
||||
struct mxl111sf_adap_state adap_state[3];
|
||||
u8 sndbuf[MXL_MAX_XFER_SIZE];
|
||||
u8 rcvbuf[MXL_MAX_XFER_SIZE];
|
||||
struct mutex msg_lock;
|
||||
#ifdef CONFIG_MEDIA_CONTROLLER_DVB
|
||||
struct media_entity tuner;
|
||||
struct media_pad tuner_pads[2];
|
||||
@@ -108,7 +114,7 @@ int mxl111sf_ctrl_program_regs(struct mxl111sf_state *state,
|
||||
|
||||
/* needed for hardware i2c functions in mxl111sf-i2c.c:
|
||||
* mxl111sf_i2c_send_data / mxl111sf_i2c_get_data */
|
||||
int mxl111sf_ctrl_msg(struct dvb_usb_device *d,
|
||||
int mxl111sf_ctrl_msg(struct mxl111sf_state *state,
|
||||
u8 cmd, u8 *wbuf, int wlen, u8 *rbuf, int rlen);
|
||||
|
||||
#define mxl_printk(kern, fmt, arg...) \
|
||||
|
||||
@@ -375,6 +375,7 @@ int enclosure_add_device(struct enclosure_device *edev, int component,
|
||||
struct device *dev)
|
||||
{
|
||||
struct enclosure_component *cdev;
|
||||
int err;
|
||||
|
||||
if (!edev || component >= edev->components)
|
||||
return -EINVAL;
|
||||
@@ -384,12 +385,17 @@ int enclosure_add_device(struct enclosure_device *edev, int component,
|
||||
if (cdev->dev == dev)
|
||||
return -EEXIST;
|
||||
|
||||
if (cdev->dev)
|
||||
if (cdev->dev) {
|
||||
enclosure_remove_links(cdev);
|
||||
|
||||
put_device(cdev->dev);
|
||||
put_device(cdev->dev);
|
||||
}
|
||||
cdev->dev = get_device(dev);
|
||||
return enclosure_add_links(cdev);
|
||||
err = enclosure_add_links(cdev);
|
||||
if (err) {
|
||||
put_device(cdev->dev);
|
||||
cdev->dev = NULL;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(enclosure_add_device);
|
||||
|
||||
|
||||
@@ -246,6 +246,7 @@ static s32 igb_init_phy_params_82575(struct e1000_hw *hw)
|
||||
E1000_STATUS_FUNC_SHIFT;
|
||||
|
||||
/* Set phy->phy_addr and phy->id. */
|
||||
igb_write_phy_reg_82580(hw, I347AT4_PAGE_SELECT, 0);
|
||||
ret_val = igb_get_phy_id_82575(hw);
|
||||
if (ret_val)
|
||||
return ret_val;
|
||||
|
||||
@@ -1821,8 +1821,6 @@ static void ar9003_hw_spectral_scan_wait(struct ath_hw *ah)
|
||||
static void ar9003_hw_tx99_start(struct ath_hw *ah, u32 qnum)
|
||||
{
|
||||
REG_SET_BIT(ah, AR_PHY_TEST, PHY_AGC_CLR);
|
||||
REG_SET_BIT(ah, 0x9864, 0x7f000);
|
||||
REG_SET_BIT(ah, 0x9924, 0x7f00fe);
|
||||
REG_CLR_BIT(ah, AR_DIAG_SW, AR_DIAG_RX_DIS);
|
||||
REG_WRITE(ah, AR_CR, AR_CR_RXD);
|
||||
REG_WRITE(ah, AR_DLCL_IFS(qnum), 0);
|
||||
|
||||
@@ -120,6 +120,8 @@ void ath9k_rng_start(struct ath_softc *sc)
|
||||
|
||||
void ath9k_rng_stop(struct ath_softc *sc)
|
||||
{
|
||||
if (sc->rng_task)
|
||||
if (sc->rng_task) {
|
||||
kthread_stop(sc->rng_task);
|
||||
sc->rng_task = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,22 +189,27 @@ static ssize_t write_file_tx99(struct file *file, const char __user *user_buf,
|
||||
if (strtobool(buf, &start))
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&sc->mutex);
|
||||
|
||||
if (start == sc->tx99_state) {
|
||||
if (!start)
|
||||
return count;
|
||||
goto out;
|
||||
ath_dbg(common, XMIT, "Resetting TX99\n");
|
||||
ath9k_tx99_deinit(sc);
|
||||
}
|
||||
|
||||
if (!start) {
|
||||
ath9k_tx99_deinit(sc);
|
||||
return count;
|
||||
goto out;
|
||||
}
|
||||
|
||||
r = ath9k_tx99_init(sc);
|
||||
if (r)
|
||||
if (r) {
|
||||
mutex_unlock(&sc->mutex);
|
||||
return r;
|
||||
|
||||
}
|
||||
out:
|
||||
mutex_unlock(&sc->mutex);
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
@@ -70,10 +70,10 @@
|
||||
#define WSPI_MAX_CHUNK_SIZE 4092
|
||||
|
||||
/*
|
||||
* wl18xx driver aggregation buffer size is (13 * PAGE_SIZE) compared to
|
||||
* (4 * PAGE_SIZE) for wl12xx, so use the larger buffer needed for wl18xx
|
||||
* wl18xx driver aggregation buffer size is (13 * 4K) compared to
|
||||
* (4 * 4K) for wl12xx, so use the larger buffer needed for wl18xx
|
||||
*/
|
||||
#define SPI_AGGR_BUFFER_SIZE (13 * PAGE_SIZE)
|
||||
#define SPI_AGGR_BUFFER_SIZE (13 * SZ_4K)
|
||||
|
||||
/* Maximum number of SPI write chunks */
|
||||
#define WSPI_MAX_NUM_OF_CHUNKS \
|
||||
|
||||
@@ -459,7 +459,7 @@ int nfcmrvl_fw_dnld_init(struct nfcmrvl_private *priv)
|
||||
|
||||
INIT_WORK(&priv->fw_dnld.rx_work, fw_dnld_rx_work);
|
||||
snprintf(name, sizeof(name), "%s_nfcmrvl_fw_dnld_rx_wq",
|
||||
dev_name(priv->dev));
|
||||
dev_name(&priv->ndev->nfc_dev->dev));
|
||||
priv->fw_dnld.rx_wq = create_singlethread_workqueue(name);
|
||||
if (!priv->fw_dnld.rx_wq)
|
||||
return -ENOMEM;
|
||||
@@ -496,6 +496,7 @@ int nfcmrvl_fw_dnld_start(struct nci_dev *ndev, const char *firmware_name)
|
||||
{
|
||||
struct nfcmrvl_private *priv = nci_get_drvdata(ndev);
|
||||
struct nfcmrvl_fw_dnld *fw_dnld = &priv->fw_dnld;
|
||||
int res;
|
||||
|
||||
if (!priv->support_fw_dnld)
|
||||
return -ENOTSUPP;
|
||||
@@ -511,7 +512,9 @@ int nfcmrvl_fw_dnld_start(struct nci_dev *ndev, const char *firmware_name)
|
||||
*/
|
||||
|
||||
/* Retrieve FW binary */
|
||||
if (request_firmware(&fw_dnld->fw, firmware_name, priv->dev) < 0) {
|
||||
res = request_firmware(&fw_dnld->fw, firmware_name,
|
||||
&ndev->nfc_dev->dev);
|
||||
if (res < 0) {
|
||||
nfc_err(priv->dev, "failed to retrieve FW %s", firmware_name);
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
@@ -124,12 +124,13 @@ struct nfcmrvl_private *nfcmrvl_nci_register_dev(enum nfcmrvl_phy phy,
|
||||
memcpy(&priv->config, pdata, sizeof(*pdata));
|
||||
|
||||
if (priv->config.reset_n_io) {
|
||||
rc = devm_gpio_request_one(dev,
|
||||
priv->config.reset_n_io,
|
||||
GPIOF_OUT_INIT_LOW,
|
||||
"nfcmrvl_reset_n");
|
||||
if (rc < 0)
|
||||
rc = gpio_request_one(priv->config.reset_n_io,
|
||||
GPIOF_OUT_INIT_LOW,
|
||||
"nfcmrvl_reset_n");
|
||||
if (rc < 0) {
|
||||
priv->config.reset_n_io = 0;
|
||||
nfc_err(dev, "failed to request reset_n io\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (phy == NFCMRVL_PHY_SPI) {
|
||||
@@ -154,32 +155,36 @@ struct nfcmrvl_private *nfcmrvl_nci_register_dev(enum nfcmrvl_phy phy,
|
||||
if (!priv->ndev) {
|
||||
nfc_err(dev, "nci_allocate_device failed\n");
|
||||
rc = -ENOMEM;
|
||||
goto error;
|
||||
goto error_free_gpio;
|
||||
}
|
||||
|
||||
nci_set_drvdata(priv->ndev, priv);
|
||||
|
||||
rc = nci_register_device(priv->ndev);
|
||||
if (rc) {
|
||||
nfc_err(dev, "nci_register_device failed %d\n", rc);
|
||||
goto error_free_dev;
|
||||
}
|
||||
|
||||
/* Ensure that controller is powered off */
|
||||
nfcmrvl_chip_halt(priv);
|
||||
|
||||
rc = nfcmrvl_fw_dnld_init(priv);
|
||||
if (rc) {
|
||||
nfc_err(dev, "failed to initialize FW download %d\n", rc);
|
||||
goto error_free_dev;
|
||||
}
|
||||
|
||||
nci_set_drvdata(priv->ndev, priv);
|
||||
|
||||
rc = nci_register_device(priv->ndev);
|
||||
if (rc) {
|
||||
nfc_err(dev, "nci_register_device failed %d\n", rc);
|
||||
goto error_fw_dnld_deinit;
|
||||
}
|
||||
|
||||
/* Ensure that controller is powered off */
|
||||
nfcmrvl_chip_halt(priv);
|
||||
|
||||
nfc_info(dev, "registered with nci successfully\n");
|
||||
return priv;
|
||||
|
||||
error_fw_dnld_deinit:
|
||||
nfcmrvl_fw_dnld_deinit(priv);
|
||||
error_free_dev:
|
||||
nci_free_device(priv->ndev);
|
||||
error:
|
||||
error_free_gpio:
|
||||
if (priv->config.reset_n_io)
|
||||
gpio_free(priv->config.reset_n_io);
|
||||
kfree(priv);
|
||||
return ERR_PTR(rc);
|
||||
}
|
||||
@@ -195,7 +200,7 @@ void nfcmrvl_nci_unregister_dev(struct nfcmrvl_private *priv)
|
||||
nfcmrvl_fw_dnld_deinit(priv);
|
||||
|
||||
if (priv->config.reset_n_io)
|
||||
devm_gpio_free(priv->dev, priv->config.reset_n_io);
|
||||
gpio_free(priv->config.reset_n_io);
|
||||
|
||||
nci_unregister_device(ndev);
|
||||
nci_free_device(ndev);
|
||||
|
||||
@@ -109,6 +109,7 @@ static int nfcmrvl_nci_uart_open(struct nci_uart *nu)
|
||||
struct nfcmrvl_private *priv;
|
||||
struct nfcmrvl_platform_data *pdata = NULL;
|
||||
struct nfcmrvl_platform_data config;
|
||||
struct device *dev = nu->tty->dev;
|
||||
|
||||
/*
|
||||
* Platform data cannot be used here since usually it is already used
|
||||
@@ -116,9 +117,8 @@ static int nfcmrvl_nci_uart_open(struct nci_uart *nu)
|
||||
* and check if DT entries were added.
|
||||
*/
|
||||
|
||||
if (nu->tty->dev->parent && nu->tty->dev->parent->of_node)
|
||||
if (nfcmrvl_uart_parse_dt(nu->tty->dev->parent->of_node,
|
||||
&config) == 0)
|
||||
if (dev && dev->parent && dev->parent->of_node)
|
||||
if (nfcmrvl_uart_parse_dt(dev->parent->of_node, &config) == 0)
|
||||
pdata = &config;
|
||||
|
||||
if (!pdata) {
|
||||
@@ -131,7 +131,7 @@ static int nfcmrvl_nci_uart_open(struct nci_uart *nu)
|
||||
}
|
||||
|
||||
priv = nfcmrvl_nci_register_dev(NFCMRVL_PHY_UART, nu, &uart_ops,
|
||||
nu->tty->dev, pdata);
|
||||
dev, pdata);
|
||||
if (IS_ERR(priv))
|
||||
return PTR_ERR(priv);
|
||||
|
||||
|
||||
@@ -1203,10 +1203,13 @@ static int btt_rw_page(struct block_device *bdev, sector_t sector,
|
||||
struct page *page, bool is_write)
|
||||
{
|
||||
struct btt *btt = bdev->bd_disk->private_data;
|
||||
int rc;
|
||||
|
||||
btt_do_bvec(btt, NULL, page, PAGE_SIZE, 0, is_write, sector);
|
||||
page_endio(page, is_write, 0);
|
||||
return 0;
|
||||
rc = btt_do_bvec(btt, NULL, page, PAGE_SIZE, 0, is_write, sector);
|
||||
if (rc == 0)
|
||||
page_endio(page, is_write, 0);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -450,14 +450,15 @@ static void set_badblock(struct badblocks *bb, sector_t s, int num)
|
||||
static void __add_badblock_range(struct badblocks *bb, u64 ns_offset, u64 len)
|
||||
{
|
||||
const unsigned int sector_size = 512;
|
||||
sector_t start_sector;
|
||||
sector_t start_sector, end_sector;
|
||||
u64 num_sectors;
|
||||
u32 rem;
|
||||
|
||||
start_sector = div_u64(ns_offset, sector_size);
|
||||
num_sectors = div_u64_rem(len, sector_size, &rem);
|
||||
end_sector = div_u64_rem(ns_offset + len, sector_size, &rem);
|
||||
if (rem)
|
||||
num_sectors++;
|
||||
end_sector++;
|
||||
num_sectors = end_sector - start_sector;
|
||||
|
||||
if (unlikely(num_sectors > (u64)INT_MAX)) {
|
||||
u64 remaining = num_sectors;
|
||||
|
||||
@@ -88,7 +88,7 @@ enum nvme_rdma_queue_flags {
|
||||
|
||||
struct nvme_rdma_queue {
|
||||
struct nvme_rdma_qe *rsp_ring;
|
||||
u8 sig_count;
|
||||
atomic_t sig_count;
|
||||
int queue_size;
|
||||
size_t cmnd_capsule_len;
|
||||
struct nvme_rdma_ctrl *ctrl;
|
||||
@@ -555,6 +555,7 @@ static int nvme_rdma_init_queue(struct nvme_rdma_ctrl *ctrl,
|
||||
queue->cmnd_capsule_len = sizeof(struct nvme_command);
|
||||
|
||||
queue->queue_size = queue_size;
|
||||
atomic_set(&queue->sig_count, 0);
|
||||
|
||||
queue->cm_id = rdma_create_id(&init_net, nvme_rdma_cm_handler, queue,
|
||||
RDMA_PS_TCP, IB_QPT_RC);
|
||||
@@ -1011,17 +1012,16 @@ static void nvme_rdma_send_done(struct ib_cq *cq, struct ib_wc *wc)
|
||||
nvme_rdma_wr_error(cq, wc, "SEND");
|
||||
}
|
||||
|
||||
static inline int nvme_rdma_queue_sig_limit(struct nvme_rdma_queue *queue)
|
||||
/*
|
||||
* We want to signal completion at least every queue depth/2. This returns the
|
||||
* largest power of two that is not above half of (queue size + 1) to optimize
|
||||
* (avoid divisions).
|
||||
*/
|
||||
static inline bool nvme_rdma_queue_sig_limit(struct nvme_rdma_queue *queue)
|
||||
{
|
||||
int sig_limit;
|
||||
int limit = 1 << ilog2((queue->queue_size + 1) / 2);
|
||||
|
||||
/*
|
||||
* We signal completion every queue depth/2 and also handle the
|
||||
* degenerated case of a device with queue_depth=1, where we
|
||||
* would need to signal every message.
|
||||
*/
|
||||
sig_limit = max(queue->queue_size / 2, 1);
|
||||
return (++queue->sig_count % sig_limit) == 0;
|
||||
return (atomic_inc_return(&queue->sig_count) & (limit - 1)) == 0;
|
||||
}
|
||||
|
||||
static int nvme_rdma_post_send(struct nvme_rdma_queue *queue,
|
||||
|
||||
@@ -225,6 +225,7 @@ ssize_t of_device_get_modalias(struct device *dev, char *str, ssize_t len)
|
||||
|
||||
return tsize;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(of_device_get_modalias);
|
||||
|
||||
/**
|
||||
* of_device_uevent - Display OF related uevent information
|
||||
@@ -287,3 +288,4 @@ int of_device_uevent_modalias(struct device *dev, struct kobj_uevent_env *env)
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(of_device_uevent_modalias);
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
PCIE_CORE_INT_CT | PCIE_CORE_INT_UTC | \
|
||||
PCIE_CORE_INT_MMVC)
|
||||
|
||||
#define PCIE_RC_CONFIG_NORMAL_BASE 0x800000
|
||||
#define PCIE_RC_CONFIG_BASE 0xa00000
|
||||
#define PCIE_RC_CONFIG_VENDOR (PCIE_RC_CONFIG_BASE + 0x00)
|
||||
#define PCIE_RC_CONFIG_RID_CCR (PCIE_RC_CONFIG_BASE + 0x08)
|
||||
@@ -267,7 +268,9 @@ static int rockchip_pcie_valid_device(struct rockchip_pcie *rockchip,
|
||||
static int rockchip_pcie_rd_own_conf(struct rockchip_pcie *rockchip,
|
||||
int where, int size, u32 *val)
|
||||
{
|
||||
void __iomem *addr = rockchip->apb_base + PCIE_RC_CONFIG_BASE + where;
|
||||
void __iomem *addr;
|
||||
|
||||
addr = rockchip->apb_base + PCIE_RC_CONFIG_NORMAL_BASE + where;
|
||||
|
||||
if (!IS_ALIGNED((uintptr_t)addr, size)) {
|
||||
*val = 0;
|
||||
@@ -291,11 +294,13 @@ static int rockchip_pcie_wr_own_conf(struct rockchip_pcie *rockchip,
|
||||
int where, int size, u32 val)
|
||||
{
|
||||
u32 mask, tmp, offset;
|
||||
void __iomem *addr;
|
||||
|
||||
offset = where & ~0x3;
|
||||
addr = rockchip->apb_base + PCIE_RC_CONFIG_NORMAL_BASE + offset;
|
||||
|
||||
if (size == 4) {
|
||||
writel(val, rockchip->apb_base + PCIE_RC_CONFIG_BASE + offset);
|
||||
writel(val, addr);
|
||||
return PCIBIOS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
@@ -306,9 +311,9 @@ static int rockchip_pcie_wr_own_conf(struct rockchip_pcie *rockchip,
|
||||
* corrupt RW1C bits in adjacent registers. But the hardware
|
||||
* doesn't support smaller writes.
|
||||
*/
|
||||
tmp = readl(rockchip->apb_base + PCIE_RC_CONFIG_BASE + offset) & mask;
|
||||
tmp = readl(addr) & mask;
|
||||
tmp |= val << ((where & 0x3) * 8);
|
||||
writel(tmp, rockchip->apb_base + PCIE_RC_CONFIG_BASE + offset);
|
||||
writel(tmp, addr);
|
||||
|
||||
return PCIBIOS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
@@ -954,6 +954,7 @@ static int pci_pm_thaw_noirq(struct device *dev)
|
||||
return pci_legacy_resume_early(dev);
|
||||
|
||||
pci_update_current_state(pci_dev, PCI_D0);
|
||||
pci_restore_state(pci_dev);
|
||||
|
||||
if (drv && drv->pm && drv->pm->thaw_noirq)
|
||||
error = drv->pm->thaw_noirq(dev);
|
||||
|
||||
@@ -384,11 +384,12 @@ static void scsi_target_reap_ref_release(struct kref *kref)
|
||||
= container_of(kref, struct scsi_target, reap_ref);
|
||||
|
||||
/*
|
||||
* if we get here and the target is still in the CREATED state that
|
||||
* if we get here and the target is still in a CREATED state that
|
||||
* means it was allocated but never made visible (because a scan
|
||||
* turned up no LUNs), so don't call device_del() on it.
|
||||
*/
|
||||
if (starget->state != STARGET_CREATED) {
|
||||
if ((starget->state != STARGET_CREATED) &&
|
||||
(starget->state != STARGET_CREATED_REMOVE)) {
|
||||
transport_remove_device(&starget->dev);
|
||||
device_del(&starget->dev);
|
||||
}
|
||||
|
||||
@@ -1370,11 +1370,15 @@ restart:
|
||||
spin_lock_irqsave(shost->host_lock, flags);
|
||||
list_for_each_entry(starget, &shost->__targets, siblings) {
|
||||
if (starget->state == STARGET_DEL ||
|
||||
starget->state == STARGET_REMOVE)
|
||||
starget->state == STARGET_REMOVE ||
|
||||
starget->state == STARGET_CREATED_REMOVE)
|
||||
continue;
|
||||
if (starget->dev.parent == dev || &starget->dev == dev) {
|
||||
kref_get(&starget->reap_ref);
|
||||
starget->state = STARGET_REMOVE;
|
||||
if (starget->state == STARGET_CREATED)
|
||||
starget->state = STARGET_CREATED_REMOVE;
|
||||
else
|
||||
starget->state = STARGET_REMOVE;
|
||||
spin_unlock_irqrestore(shost->host_lock, flags);
|
||||
__scsi_remove_target(starget);
|
||||
scsi_target_reap(starget);
|
||||
|
||||
@@ -365,11 +365,23 @@ static int spmi_drv_remove(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int spmi_drv_uevent(struct device *dev, struct kobj_uevent_env *env)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = of_device_uevent_modalias(dev, env);
|
||||
if (ret != -ENODEV)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct bus_type spmi_bus_type = {
|
||||
.name = "spmi",
|
||||
.match = spmi_device_match,
|
||||
.probe = spmi_drv_probe,
|
||||
.remove = spmi_drv_remove,
|
||||
.uevent = spmi_drv_uevent,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -3078,8 +3078,7 @@ static void ni_ao_cmd_set_update(struct comedi_device *dev,
|
||||
/* following line: 2-1 per STC */
|
||||
ni_stc_writel(dev, 1, NISTC_AO_UI_LOADA_REG);
|
||||
ni_stc_writew(dev, NISTC_AO_CMD1_UI_LOAD, NISTC_AO_CMD1_REG);
|
||||
/* following line: N-1 per STC */
|
||||
ni_stc_writel(dev, trigvar - 1, NISTC_AO_UI_LOADA_REG);
|
||||
ni_stc_writel(dev, trigvar, NISTC_AO_UI_LOADA_REG);
|
||||
} else { /* TRIG_EXT */
|
||||
/* FIXME: assert scan_begin_arg != 0, ret failure otherwise */
|
||||
devpriv->ao_cmd2 |= NISTC_AO_CMD2_BC_GATE_ENA;
|
||||
|
||||
@@ -1650,8 +1650,13 @@ kiblnd_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg)
|
||||
ibmsg = tx->tx_msg;
|
||||
ibmsg->ibm_u.immediate.ibim_hdr = *hdr;
|
||||
|
||||
copy_from_iter(&ibmsg->ibm_u.immediate.ibim_payload, IBLND_MSG_SIZE,
|
||||
&from);
|
||||
rc = copy_from_iter(&ibmsg->ibm_u.immediate.ibim_payload, payload_nob,
|
||||
&from);
|
||||
if (rc != payload_nob) {
|
||||
kiblnd_pool_free_node(&tx->tx_pool->tpo_pool, &tx->tx_list);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
nob = offsetof(struct kib_immediate_msg, ibim_payload[payload_nob]);
|
||||
kiblnd_init_tx_msg(ni, tx, IBLND_MSG_IMMEDIATE, nob);
|
||||
|
||||
@@ -1751,8 +1756,14 @@ kiblnd_recv(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, int delayed,
|
||||
break;
|
||||
}
|
||||
|
||||
copy_to_iter(&rxmsg->ibm_u.immediate.ibim_payload,
|
||||
IBLND_MSG_SIZE, to);
|
||||
rc = copy_to_iter(&rxmsg->ibm_u.immediate.ibim_payload, rlen,
|
||||
to);
|
||||
if (rc != rlen) {
|
||||
rc = -EFAULT;
|
||||
break;
|
||||
}
|
||||
|
||||
rc = 0;
|
||||
lnet_finalize(ni, lntmsg, 0);
|
||||
break;
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
|
||||
{USB_DEVICE(0x2001, 0x330F)}, /* DLink DWA-125 REV D1 */
|
||||
{USB_DEVICE(0x2001, 0x3310)}, /* Dlink DWA-123 REV D1 */
|
||||
{USB_DEVICE(0x2001, 0x3311)}, /* DLink GO-USB-N150 REV B1 */
|
||||
{USB_DEVICE(0x2357, 0x010c)}, /* TP-Link TL-WN722N v2 */
|
||||
{USB_DEVICE(0x0df6, 0x0076)}, /* Sitecom N150 v2 */
|
||||
{} /* Terminating entry */
|
||||
};
|
||||
|
||||
@@ -1049,6 +1049,26 @@ release_fb:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int lynxfb_kick_out_firmware_fb(struct pci_dev *pdev)
|
||||
{
|
||||
struct apertures_struct *ap;
|
||||
bool primary = false;
|
||||
|
||||
ap = alloc_apertures(1);
|
||||
if (!ap)
|
||||
return -ENOMEM;
|
||||
|
||||
ap->ranges[0].base = pci_resource_start(pdev, 0);
|
||||
ap->ranges[0].size = pci_resource_len(pdev, 0);
|
||||
#ifdef CONFIG_X86
|
||||
primary = pdev->resource[PCI_ROM_RESOURCE].flags &
|
||||
IORESOURCE_ROM_SHADOW;
|
||||
#endif
|
||||
remove_conflicting_framebuffers(ap, "sm750_fb1", primary);
|
||||
kfree(ap);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lynxfb_pci_probe(struct pci_dev *pdev,
|
||||
const struct pci_device_id *ent)
|
||||
{
|
||||
@@ -1057,6 +1077,10 @@ static int lynxfb_pci_probe(struct pci_dev *pdev,
|
||||
int fbidx;
|
||||
int err;
|
||||
|
||||
err = lynxfb_kick_out_firmware_fb(pdev);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* enable device */
|
||||
err = pcim_enable_device(pdev);
|
||||
if (err)
|
||||
|
||||
@@ -802,6 +802,7 @@ DEF_TPG_ATTRIB(default_erl);
|
||||
DEF_TPG_ATTRIB(t10_pi);
|
||||
DEF_TPG_ATTRIB(fabric_prot_type);
|
||||
DEF_TPG_ATTRIB(tpg_enabled_sendtargets);
|
||||
DEF_TPG_ATTRIB(login_keys_workaround);
|
||||
|
||||
static struct configfs_attribute *lio_target_tpg_attrib_attrs[] = {
|
||||
&iscsi_tpg_attrib_attr_authentication,
|
||||
@@ -817,6 +818,7 @@ static struct configfs_attribute *lio_target_tpg_attrib_attrs[] = {
|
||||
&iscsi_tpg_attrib_attr_t10_pi,
|
||||
&iscsi_tpg_attrib_attr_fabric_prot_type,
|
||||
&iscsi_tpg_attrib_attr_tpg_enabled_sendtargets,
|
||||
&iscsi_tpg_attrib_attr_login_keys_workaround,
|
||||
NULL,
|
||||
};
|
||||
|
||||
|
||||
@@ -819,7 +819,8 @@ static int iscsi_target_handle_csg_zero(
|
||||
SENDER_TARGET,
|
||||
login->rsp_buf,
|
||||
&login->rsp_length,
|
||||
conn->param_list);
|
||||
conn->param_list,
|
||||
conn->tpg->tpg_attrib.login_keys_workaround);
|
||||
if (ret < 0)
|
||||
return -1;
|
||||
|
||||
@@ -889,7 +890,8 @@ static int iscsi_target_handle_csg_one(struct iscsi_conn *conn, struct iscsi_log
|
||||
SENDER_TARGET,
|
||||
login->rsp_buf,
|
||||
&login->rsp_length,
|
||||
conn->param_list);
|
||||
conn->param_list,
|
||||
conn->tpg->tpg_attrib.login_keys_workaround);
|
||||
if (ret < 0) {
|
||||
iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_INITIATOR_ERR,
|
||||
ISCSI_LOGIN_STATUS_INIT_ERR);
|
||||
|
||||
@@ -765,7 +765,8 @@ static int iscsi_check_for_auth_key(char *key)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void iscsi_check_proposer_for_optional_reply(struct iscsi_param *param)
|
||||
static void iscsi_check_proposer_for_optional_reply(struct iscsi_param *param,
|
||||
bool keys_workaround)
|
||||
{
|
||||
if (IS_TYPE_BOOL_AND(param)) {
|
||||
if (!strcmp(param->value, NO))
|
||||
@@ -773,19 +774,31 @@ static void iscsi_check_proposer_for_optional_reply(struct iscsi_param *param)
|
||||
} else if (IS_TYPE_BOOL_OR(param)) {
|
||||
if (!strcmp(param->value, YES))
|
||||
SET_PSTATE_REPLY_OPTIONAL(param);
|
||||
/*
|
||||
* Required for gPXE iSCSI boot client
|
||||
*/
|
||||
if (!strcmp(param->name, IMMEDIATEDATA))
|
||||
SET_PSTATE_REPLY_OPTIONAL(param);
|
||||
|
||||
if (keys_workaround) {
|
||||
/*
|
||||
* Required for gPXE iSCSI boot client
|
||||
*/
|
||||
if (!strcmp(param->name, IMMEDIATEDATA))
|
||||
SET_PSTATE_REPLY_OPTIONAL(param);
|
||||
}
|
||||
} else if (IS_TYPE_NUMBER(param)) {
|
||||
if (!strcmp(param->name, MAXRECVDATASEGMENTLENGTH))
|
||||
SET_PSTATE_REPLY_OPTIONAL(param);
|
||||
/*
|
||||
* Required for gPXE iSCSI boot client
|
||||
*/
|
||||
if (!strcmp(param->name, MAXCONNECTIONS))
|
||||
SET_PSTATE_REPLY_OPTIONAL(param);
|
||||
|
||||
if (keys_workaround) {
|
||||
/*
|
||||
* Required for Mellanox Flexboot PXE boot ROM
|
||||
*/
|
||||
if (!strcmp(param->name, FIRSTBURSTLENGTH))
|
||||
SET_PSTATE_REPLY_OPTIONAL(param);
|
||||
|
||||
/*
|
||||
* Required for gPXE iSCSI boot client
|
||||
*/
|
||||
if (!strcmp(param->name, MAXCONNECTIONS))
|
||||
SET_PSTATE_REPLY_OPTIONAL(param);
|
||||
}
|
||||
} else if (IS_PHASE_DECLARATIVE(param))
|
||||
SET_PSTATE_REPLY_OPTIONAL(param);
|
||||
}
|
||||
@@ -1422,7 +1435,8 @@ int iscsi_encode_text_output(
|
||||
u8 sender,
|
||||
char *textbuf,
|
||||
u32 *length,
|
||||
struct iscsi_param_list *param_list)
|
||||
struct iscsi_param_list *param_list,
|
||||
bool keys_workaround)
|
||||
{
|
||||
char *output_buf = NULL;
|
||||
struct iscsi_extra_response *er;
|
||||
@@ -1458,7 +1472,8 @@ int iscsi_encode_text_output(
|
||||
*length += 1;
|
||||
output_buf = textbuf + *length;
|
||||
SET_PSTATE_PROPOSER(param);
|
||||
iscsi_check_proposer_for_optional_reply(param);
|
||||
iscsi_check_proposer_for_optional_reply(param,
|
||||
keys_workaround);
|
||||
pr_debug("Sending key: %s=%s\n",
|
||||
param->name, param->value);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ extern int iscsi_extract_key_value(char *, char **, char **);
|
||||
extern int iscsi_update_param_value(struct iscsi_param *, char *);
|
||||
extern int iscsi_decode_text_input(u8, u8, char *, u32, struct iscsi_conn *);
|
||||
extern int iscsi_encode_text_output(u8, u8, char *, u32 *,
|
||||
struct iscsi_param_list *);
|
||||
struct iscsi_param_list *, bool);
|
||||
extern int iscsi_check_negotiated_keys(struct iscsi_param_list *);
|
||||
extern void iscsi_set_connection_parameters(struct iscsi_conn_ops *,
|
||||
struct iscsi_param_list *);
|
||||
|
||||
@@ -227,6 +227,7 @@ static void iscsit_set_default_tpg_attribs(struct iscsi_portal_group *tpg)
|
||||
a->t10_pi = TA_DEFAULT_T10_PI;
|
||||
a->fabric_prot_type = TA_DEFAULT_FABRIC_PROT_TYPE;
|
||||
a->tpg_enabled_sendtargets = TA_DEFAULT_TPG_ENABLED_SENDTARGETS;
|
||||
a->login_keys_workaround = TA_DEFAULT_LOGIN_KEYS_WORKAROUND;
|
||||
}
|
||||
|
||||
int iscsit_tpg_add_portal_group(struct iscsi_tiqn *tiqn, struct iscsi_portal_group *tpg)
|
||||
@@ -899,3 +900,21 @@ int iscsit_ta_tpg_enabled_sendtargets(
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int iscsit_ta_login_keys_workaround(
|
||||
struct iscsi_portal_group *tpg,
|
||||
u32 flag)
|
||||
{
|
||||
struct iscsi_tpg_attrib *a = &tpg->tpg_attrib;
|
||||
|
||||
if ((flag != 0) && (flag != 1)) {
|
||||
pr_err("Illegal value %d\n", flag);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
a->login_keys_workaround = flag;
|
||||
pr_debug("iSCSI_TPG[%hu] - TPG enabled bit for login keys workaround: %s ",
|
||||
tpg->tpgt, (a->login_keys_workaround) ? "ON" : "OFF");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -39,5 +39,6 @@ extern int iscsit_ta_default_erl(struct iscsi_portal_group *, u32);
|
||||
extern int iscsit_ta_t10_pi(struct iscsi_portal_group *, u32);
|
||||
extern int iscsit_ta_fabric_prot_type(struct iscsi_portal_group *, u32);
|
||||
extern int iscsit_ta_tpg_enabled_sendtargets(struct iscsi_portal_group *, u32);
|
||||
extern int iscsit_ta_login_keys_workaround(struct iscsi_portal_group *, u32);
|
||||
|
||||
#endif /* ISCSI_TARGET_TPG_H */
|
||||
|
||||
@@ -753,6 +753,15 @@ void target_complete_cmd(struct se_cmd *cmd, u8 scsi_status)
|
||||
if (cmd->transport_state & CMD_T_ABORTED ||
|
||||
cmd->transport_state & CMD_T_STOP) {
|
||||
spin_unlock_irqrestore(&cmd->t_state_lock, flags);
|
||||
/*
|
||||
* If COMPARE_AND_WRITE was stopped by __transport_wait_for_tasks(),
|
||||
* release se_device->caw_sem obtained by sbc_compare_and_write()
|
||||
* since target_complete_ok_work() or target_complete_failure_work()
|
||||
* won't be called to invoke the normal CAW completion callbacks.
|
||||
*/
|
||||
if (cmd->se_cmd_flags & SCF_COMPARE_AND_WRITE) {
|
||||
up(&dev->caw_sem);
|
||||
}
|
||||
complete_all(&cmd->t_transport_stop_comp);
|
||||
return;
|
||||
} else if (!success) {
|
||||
|
||||
@@ -191,8 +191,10 @@ unsigned long cpufreq_cooling_get_level(unsigned int cpu, unsigned int freq)
|
||||
mutex_lock(&cooling_list_lock);
|
||||
list_for_each_entry(cpufreq_dev, &cpufreq_dev_list, node) {
|
||||
if (cpumask_test_cpu(cpu, &cpufreq_dev->allowed_cpus)) {
|
||||
unsigned long level = get_level(cpufreq_dev, freq);
|
||||
|
||||
mutex_unlock(&cooling_list_lock);
|
||||
return get_level(cpufreq_dev, freq);
|
||||
return level;
|
||||
}
|
||||
}
|
||||
mutex_unlock(&cooling_list_lock);
|
||||
|
||||
@@ -104,8 +104,6 @@ static int max77620_thermal_probe(struct platform_device *pdev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
pdev->dev.of_node = pdev->dev.parent->of_node;
|
||||
|
||||
mtherm->dev = &pdev->dev;
|
||||
mtherm->rmap = dev_get_regmap(pdev->dev.parent, NULL);
|
||||
if (!mtherm->rmap) {
|
||||
@@ -113,6 +111,14 @@ static int max77620_thermal_probe(struct platform_device *pdev)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/*
|
||||
* Drop any current reference to a device-tree node and get a
|
||||
* reference to the parent's node which will be balanced on reprobe or
|
||||
* on platform-device release.
|
||||
*/
|
||||
of_node_put(pdev->dev.of_node);
|
||||
pdev->dev.of_node = of_node_get(pdev->dev.parent->of_node);
|
||||
|
||||
mtherm->tz_device = devm_thermal_zone_of_sensor_register(&pdev->dev, 0,
|
||||
mtherm, &max77620_thermal_ops);
|
||||
if (IS_ERR(mtherm->tz_device)) {
|
||||
|
||||
@@ -1770,6 +1770,9 @@ static const struct usb_device_id acm_ids[] = {
|
||||
{ USB_DEVICE(0x1576, 0x03b1), /* Maretron USB100 */
|
||||
.driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
|
||||
},
|
||||
{ USB_DEVICE(0xfff0, 0x0100), /* DATECS FP-2000 */
|
||||
.driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
|
||||
},
|
||||
|
||||
{ USB_DEVICE(0x2912, 0x0001), /* ATOL FPrint */
|
||||
.driver_info = CLEAR_HALT_CONDITIONS,
|
||||
|
||||
@@ -77,6 +77,16 @@
|
||||
#define USB_INTEL_USB3_PSSEN 0xD8
|
||||
#define USB_INTEL_USB3PRM 0xDC
|
||||
|
||||
/* ASMEDIA quirk use */
|
||||
#define ASMT_DATA_WRITE0_REG 0xF8
|
||||
#define ASMT_DATA_WRITE1_REG 0xFC
|
||||
#define ASMT_CONTROL_REG 0xE0
|
||||
#define ASMT_CONTROL_WRITE_BIT 0x02
|
||||
#define ASMT_WRITEREG_CMD 0x10423
|
||||
#define ASMT_FLOWCTL_ADDR 0xFA30
|
||||
#define ASMT_FLOWCTL_DATA 0xBA
|
||||
#define ASMT_PSEUDO_DATA 0
|
||||
|
||||
/*
|
||||
* amd_chipset_gen values represent AMD different chipset generations
|
||||
*/
|
||||
@@ -412,6 +422,50 @@ void usb_amd_quirk_pll_disable(void)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(usb_amd_quirk_pll_disable);
|
||||
|
||||
static int usb_asmedia_wait_write(struct pci_dev *pdev)
|
||||
{
|
||||
unsigned long retry_count;
|
||||
unsigned char value;
|
||||
|
||||
for (retry_count = 1000; retry_count > 0; --retry_count) {
|
||||
|
||||
pci_read_config_byte(pdev, ASMT_CONTROL_REG, &value);
|
||||
|
||||
if (value == 0xff) {
|
||||
dev_err(&pdev->dev, "%s: check_ready ERROR", __func__);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
if ((value & ASMT_CONTROL_WRITE_BIT) == 0)
|
||||
return 0;
|
||||
|
||||
usleep_range(40, 60);
|
||||
}
|
||||
|
||||
dev_warn(&pdev->dev, "%s: check_write_ready timeout", __func__);
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev)
|
||||
{
|
||||
if (usb_asmedia_wait_write(pdev) != 0)
|
||||
return;
|
||||
|
||||
/* send command and address to device */
|
||||
pci_write_config_dword(pdev, ASMT_DATA_WRITE0_REG, ASMT_WRITEREG_CMD);
|
||||
pci_write_config_dword(pdev, ASMT_DATA_WRITE1_REG, ASMT_FLOWCTL_ADDR);
|
||||
pci_write_config_byte(pdev, ASMT_CONTROL_REG, ASMT_CONTROL_WRITE_BIT);
|
||||
|
||||
if (usb_asmedia_wait_write(pdev) != 0)
|
||||
return;
|
||||
|
||||
/* send data to device */
|
||||
pci_write_config_dword(pdev, ASMT_DATA_WRITE0_REG, ASMT_FLOWCTL_DATA);
|
||||
pci_write_config_dword(pdev, ASMT_DATA_WRITE1_REG, ASMT_PSEUDO_DATA);
|
||||
pci_write_config_byte(pdev, ASMT_CONTROL_REG, ASMT_CONTROL_WRITE_BIT);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(usb_asmedia_modifyflowcontrol);
|
||||
|
||||
void usb_amd_quirk_pll_enable(void)
|
||||
{
|
||||
usb_amd_quirk_pll(0);
|
||||
|
||||
@@ -11,6 +11,7 @@ bool usb_amd_prefetch_quirk(void);
|
||||
void usb_amd_dev_put(void);
|
||||
void usb_amd_quirk_pll_disable(void);
|
||||
void usb_amd_quirk_pll_enable(void);
|
||||
void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev);
|
||||
void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev);
|
||||
void usb_disable_xhci_ports(struct pci_dev *xhci_pdev);
|
||||
void sb800_prefetch(struct device *dev, int on);
|
||||
@@ -18,6 +19,7 @@ void sb800_prefetch(struct device *dev, int on);
|
||||
struct pci_dev;
|
||||
static inline void usb_amd_quirk_pll_disable(void) {}
|
||||
static inline void usb_amd_quirk_pll_enable(void) {}
|
||||
static inline void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev) {}
|
||||
static inline void usb_amd_dev_put(void) {}
|
||||
static inline void usb_disable_xhci_ports(struct pci_dev *xhci_pdev) {}
|
||||
static inline void sb800_prefetch(struct device *dev, int on) {}
|
||||
|
||||
@@ -783,6 +783,9 @@ static u32 xhci_get_port_status(struct usb_hcd *hcd,
|
||||
clear_bit(wIndex, &bus_state->resuming_ports);
|
||||
|
||||
set_bit(wIndex, &bus_state->rexit_ports);
|
||||
|
||||
xhci_test_and_clear_bit(xhci, port_array, wIndex,
|
||||
PORT_PLC);
|
||||
xhci_set_link_state(xhci, port_array, wIndex,
|
||||
XDEV_U0);
|
||||
|
||||
|
||||
@@ -59,6 +59,8 @@
|
||||
#define PCI_DEVICE_ID_AMD_PROMONTORYA_2 0x43bb
|
||||
#define PCI_DEVICE_ID_AMD_PROMONTORYA_1 0x43bc
|
||||
|
||||
#define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142
|
||||
|
||||
static const char hcd_name[] = "xhci_hcd";
|
||||
|
||||
static struct hc_driver __read_mostly xhci_pci_hc_driver;
|
||||
@@ -217,6 +219,10 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||||
pdev->device == 0x1142)
|
||||
xhci->quirks |= XHCI_TRUST_TX_LENGTH;
|
||||
|
||||
if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
|
||||
pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI)
|
||||
xhci->quirks |= XHCI_ASMEDIA_MODIFY_FLOWCONTROL;
|
||||
|
||||
if (pdev->vendor == PCI_VENDOR_ID_TI && pdev->device == 0x8241)
|
||||
xhci->quirks |= XHCI_LIMIT_ENDPOINT_INTERVAL_7;
|
||||
|
||||
|
||||
@@ -860,13 +860,16 @@ static void xhci_kill_endpoint_urbs(struct xhci_hcd *xhci,
|
||||
(ep->ep_state & EP_GETTING_NO_STREAMS)) {
|
||||
int stream_id;
|
||||
|
||||
for (stream_id = 0; stream_id < ep->stream_info->num_streams;
|
||||
for (stream_id = 1; stream_id < ep->stream_info->num_streams;
|
||||
stream_id++) {
|
||||
ring = ep->stream_info->stream_rings[stream_id];
|
||||
if (!ring)
|
||||
continue;
|
||||
|
||||
xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb,
|
||||
"Killing URBs for slot ID %u, ep index %u, stream %u",
|
||||
slot_id, ep_index, stream_id + 1);
|
||||
xhci_kill_ring_urbs(xhci,
|
||||
ep->stream_info->stream_rings[stream_id]);
|
||||
slot_id, ep_index, stream_id);
|
||||
xhci_kill_ring_urbs(xhci, ring);
|
||||
}
|
||||
} else {
|
||||
ring = ep->ring;
|
||||
|
||||
@@ -192,6 +192,9 @@ int xhci_reset(struct xhci_hcd *xhci)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (xhci->quirks & XHCI_ASMEDIA_MODIFY_FLOWCONTROL)
|
||||
usb_asmedia_modifyflowcontrol(to_pci_dev(xhci_to_hcd(xhci)->self.controller));
|
||||
|
||||
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
|
||||
"Wait for controller to be ready for doorbell rings");
|
||||
/*
|
||||
@@ -1122,6 +1125,9 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
|
||||
if ((xhci->quirks & XHCI_COMP_MODE_QUIRK) && !comp_timer_running)
|
||||
compliance_mode_recovery_timer_init(xhci);
|
||||
|
||||
if (xhci->quirks & XHCI_ASMEDIA_MODIFY_FLOWCONTROL)
|
||||
usb_asmedia_modifyflowcontrol(to_pci_dev(hcd->self.controller));
|
||||
|
||||
/* Re-enable port polling. */
|
||||
xhci_dbg(xhci, "%s: starting port polling.\n", __func__);
|
||||
set_bit(HCD_FLAG_POLL_RH, &xhci->shared_hcd->flags);
|
||||
|
||||
@@ -1661,6 +1661,7 @@ struct xhci_hcd {
|
||||
#define XHCI_BROKEN_PORT_PED (1 << 25)
|
||||
#define XHCI_LIMIT_ENDPOINT_INTERVAL_7 (1 << 26)
|
||||
#define XHCI_U2_DISABLE_WAKE (1 << 27)
|
||||
#define XHCI_ASMEDIA_MODIFY_FLOWCONTROL (1 << 28)
|
||||
|
||||
unsigned int num_active_eps;
|
||||
unsigned int limit_active_eps;
|
||||
|
||||
@@ -752,8 +752,10 @@ static int usbhsc_resume(struct device *dev)
|
||||
struct usbhs_priv *priv = dev_get_drvdata(dev);
|
||||
struct platform_device *pdev = usbhs_priv_to_pdev(priv);
|
||||
|
||||
if (!usbhsc_flags_has(priv, USBHSF_RUNTIME_PWCTRL))
|
||||
if (!usbhsc_flags_has(priv, USBHSF_RUNTIME_PWCTRL)) {
|
||||
usbhsc_power_ctrl(priv, 1);
|
||||
usbhs_mod_autonomy_mode(priv);
|
||||
}
|
||||
|
||||
usbhs_platform_call(priv, phy_reset, pdev);
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ struct usbhsg_gpriv;
|
||||
struct usbhsg_uep {
|
||||
struct usb_ep ep;
|
||||
struct usbhs_pipe *pipe;
|
||||
spinlock_t lock; /* protect the pipe */
|
||||
|
||||
char ep_name[EP_NAME_SIZE];
|
||||
|
||||
@@ -636,10 +637,16 @@ usbhsg_ep_enable_end:
|
||||
static int usbhsg_ep_disable(struct usb_ep *ep)
|
||||
{
|
||||
struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep);
|
||||
struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep);
|
||||
struct usbhs_pipe *pipe;
|
||||
unsigned long flags;
|
||||
int ret = 0;
|
||||
|
||||
if (!pipe)
|
||||
return -EINVAL;
|
||||
spin_lock_irqsave(&uep->lock, flags);
|
||||
pipe = usbhsg_uep_to_pipe(uep);
|
||||
if (!pipe) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
usbhsg_pipe_disable(uep);
|
||||
usbhs_pipe_free(pipe);
|
||||
@@ -647,6 +654,9 @@ static int usbhsg_ep_disable(struct usb_ep *ep)
|
||||
uep->pipe->mod_private = NULL;
|
||||
uep->pipe = NULL;
|
||||
|
||||
out:
|
||||
spin_unlock_irqrestore(&uep->lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -696,8 +706,11 @@ static int usbhsg_ep_dequeue(struct usb_ep *ep, struct usb_request *req)
|
||||
{
|
||||
struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep);
|
||||
struct usbhsg_request *ureq = usbhsg_req_to_ureq(req);
|
||||
struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep);
|
||||
struct usbhs_pipe *pipe;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&uep->lock, flags);
|
||||
pipe = usbhsg_uep_to_pipe(uep);
|
||||
if (pipe)
|
||||
usbhs_pkt_pop(pipe, usbhsg_ureq_to_pkt(ureq));
|
||||
|
||||
@@ -706,6 +719,7 @@ static int usbhsg_ep_dequeue(struct usb_ep *ep, struct usb_request *req)
|
||||
* even if the pipe is NULL.
|
||||
*/
|
||||
usbhsg_queue_pop(uep, ureq, -ECONNRESET);
|
||||
spin_unlock_irqrestore(&uep->lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -852,10 +866,10 @@ static int usbhsg_try_stop(struct usbhs_priv *priv, u32 status)
|
||||
{
|
||||
struct usbhsg_gpriv *gpriv = usbhsg_priv_to_gpriv(priv);
|
||||
struct usbhs_mod *mod = usbhs_mod_get_current(priv);
|
||||
struct usbhsg_uep *dcp = usbhsg_gpriv_to_dcp(gpriv);
|
||||
struct usbhsg_uep *uep;
|
||||
struct device *dev = usbhs_priv_to_dev(priv);
|
||||
unsigned long flags;
|
||||
int ret = 0;
|
||||
int ret = 0, i;
|
||||
|
||||
/******************** spin lock ********************/
|
||||
usbhs_lock(priv, flags);
|
||||
@@ -887,7 +901,9 @@ static int usbhsg_try_stop(struct usbhs_priv *priv, u32 status)
|
||||
usbhs_sys_set_test_mode(priv, 0);
|
||||
usbhs_sys_function_ctrl(priv, 0);
|
||||
|
||||
usbhsg_ep_disable(&dcp->ep);
|
||||
/* disable all eps */
|
||||
usbhsg_for_each_uep_with_dcp(uep, gpriv, i)
|
||||
usbhsg_ep_disable(&uep->ep);
|
||||
|
||||
dev_dbg(dev, "stop gadget\n");
|
||||
|
||||
@@ -1069,6 +1085,7 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv)
|
||||
ret = -ENOMEM;
|
||||
goto usbhs_mod_gadget_probe_err_gpriv;
|
||||
}
|
||||
spin_lock_init(&uep->lock);
|
||||
|
||||
gpriv->transceiver = usb_get_phy(USB_PHY_TYPE_UNDEFINED);
|
||||
dev_info(dev, "%stransceiver found\n",
|
||||
|
||||
@@ -1529,8 +1529,11 @@ static void isd200_ata_command(struct scsi_cmnd *srb, struct us_data *us)
|
||||
|
||||
/* Make sure driver was initialized */
|
||||
|
||||
if (us->extra == NULL)
|
||||
if (us->extra == NULL) {
|
||||
usb_stor_dbg(us, "ERROR Driver not initialized\n");
|
||||
srb->result = DID_ERROR << 16;
|
||||
return;
|
||||
}
|
||||
|
||||
scsi_set_resid(srb, 0);
|
||||
/* scsi_bufflen might change in protocol translation to ata */
|
||||
|
||||
@@ -419,6 +419,34 @@ static void vfio_group_put(struct vfio_group *group)
|
||||
kref_put_mutex(&group->kref, vfio_group_release, &vfio.group_lock);
|
||||
}
|
||||
|
||||
struct vfio_group_put_work {
|
||||
struct work_struct work;
|
||||
struct vfio_group *group;
|
||||
};
|
||||
|
||||
static void vfio_group_put_bg(struct work_struct *work)
|
||||
{
|
||||
struct vfio_group_put_work *do_work;
|
||||
|
||||
do_work = container_of(work, struct vfio_group_put_work, work);
|
||||
|
||||
vfio_group_put(do_work->group);
|
||||
kfree(do_work);
|
||||
}
|
||||
|
||||
static void vfio_group_schedule_put(struct vfio_group *group)
|
||||
{
|
||||
struct vfio_group_put_work *do_work;
|
||||
|
||||
do_work = kmalloc(sizeof(*do_work), GFP_KERNEL);
|
||||
if (WARN_ON(!do_work))
|
||||
return;
|
||||
|
||||
INIT_WORK(&do_work->work, vfio_group_put_bg);
|
||||
do_work->group = group;
|
||||
schedule_work(&do_work->work);
|
||||
}
|
||||
|
||||
/* Assume group_lock or group reference is held */
|
||||
static void vfio_group_get(struct vfio_group *group)
|
||||
{
|
||||
@@ -743,7 +771,14 @@ static int vfio_iommu_group_notifier(struct notifier_block *nb,
|
||||
break;
|
||||
}
|
||||
|
||||
vfio_group_put(group);
|
||||
/*
|
||||
* If we're the last reference to the group, the group will be
|
||||
* released, which includes unregistering the iommu group notifier.
|
||||
* We hold a read-lock on that notifier list, unregistering needs
|
||||
* a write-lock... deadlock. Release our reference asynchronously
|
||||
* to avoid that situation.
|
||||
*/
|
||||
vfio_group_schedule_put(group);
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
@@ -1716,6 +1751,15 @@ void vfio_group_put_external_user(struct vfio_group *group)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(vfio_group_put_external_user);
|
||||
|
||||
bool vfio_external_group_match_file(struct vfio_group *test_group,
|
||||
struct file *filep)
|
||||
{
|
||||
struct vfio_group *group = filep->private_data;
|
||||
|
||||
return (filep->f_op == &vfio_group_fops) && (group == test_group);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(vfio_external_group_match_file);
|
||||
|
||||
int vfio_external_user_iommu_id(struct vfio_group *group)
|
||||
{
|
||||
return iommu_group_id(group->iommu_group);
|
||||
|
||||
@@ -134,9 +134,7 @@ struct vscsibk_pend {
|
||||
struct page *pages[VSCSI_MAX_GRANTS];
|
||||
|
||||
struct se_cmd se_cmd;
|
||||
};
|
||||
|
||||
struct scsiback_tmr {
|
||||
atomic_t tmr_complete;
|
||||
wait_queue_head_t tmr_wait;
|
||||
};
|
||||
@@ -599,26 +597,20 @@ static void scsiback_device_action(struct vscsibk_pend *pending_req,
|
||||
struct scsiback_tpg *tpg = pending_req->v2p->tpg;
|
||||
struct scsiback_nexus *nexus = tpg->tpg_nexus;
|
||||
struct se_cmd *se_cmd = &pending_req->se_cmd;
|
||||
struct scsiback_tmr *tmr;
|
||||
u64 unpacked_lun = pending_req->v2p->lun;
|
||||
int rc, err = FAILED;
|
||||
|
||||
tmr = kzalloc(sizeof(struct scsiback_tmr), GFP_KERNEL);
|
||||
if (!tmr) {
|
||||
target_put_sess_cmd(se_cmd);
|
||||
goto err;
|
||||
}
|
||||
|
||||
init_waitqueue_head(&tmr->tmr_wait);
|
||||
init_waitqueue_head(&pending_req->tmr_wait);
|
||||
|
||||
rc = target_submit_tmr(&pending_req->se_cmd, nexus->tvn_se_sess,
|
||||
&pending_req->sense_buffer[0],
|
||||
unpacked_lun, tmr, act, GFP_KERNEL,
|
||||
unpacked_lun, NULL, act, GFP_KERNEL,
|
||||
tag, TARGET_SCF_ACK_KREF);
|
||||
if (rc)
|
||||
goto err;
|
||||
|
||||
wait_event(tmr->tmr_wait, atomic_read(&tmr->tmr_complete));
|
||||
wait_event(pending_req->tmr_wait,
|
||||
atomic_read(&pending_req->tmr_complete));
|
||||
|
||||
err = (se_cmd->se_tmr_req->response == TMR_FUNCTION_COMPLETE) ?
|
||||
SUCCESS : FAILED;
|
||||
@@ -626,9 +618,8 @@ static void scsiback_device_action(struct vscsibk_pend *pending_req,
|
||||
scsiback_do_resp_with_sense(NULL, err, 0, pending_req);
|
||||
transport_generic_free_cmd(&pending_req->se_cmd, 1);
|
||||
return;
|
||||
|
||||
err:
|
||||
if (tmr)
|
||||
kfree(tmr);
|
||||
scsiback_do_resp_with_sense(NULL, err, 0, pending_req);
|
||||
}
|
||||
|
||||
@@ -1389,12 +1380,6 @@ static int scsiback_check_stop_free(struct se_cmd *se_cmd)
|
||||
static void scsiback_release_cmd(struct se_cmd *se_cmd)
|
||||
{
|
||||
struct se_session *se_sess = se_cmd->se_sess;
|
||||
struct se_tmr_req *se_tmr = se_cmd->se_tmr_req;
|
||||
|
||||
if (se_tmr && se_cmd->se_cmd_flags & SCF_SCSI_TMR_CDB) {
|
||||
struct scsiback_tmr *tmr = se_tmr->fabric_tmr_ptr;
|
||||
kfree(tmr);
|
||||
}
|
||||
|
||||
percpu_ida_free(&se_sess->sess_tag_pool, se_cmd->map_tag);
|
||||
}
|
||||
@@ -1455,11 +1440,11 @@ static int scsiback_queue_status(struct se_cmd *se_cmd)
|
||||
|
||||
static void scsiback_queue_tm_rsp(struct se_cmd *se_cmd)
|
||||
{
|
||||
struct se_tmr_req *se_tmr = se_cmd->se_tmr_req;
|
||||
struct scsiback_tmr *tmr = se_tmr->fabric_tmr_ptr;
|
||||
struct vscsibk_pend *pending_req = container_of(se_cmd,
|
||||
struct vscsibk_pend, se_cmd);
|
||||
|
||||
atomic_set(&tmr->tmr_complete, 1);
|
||||
wake_up(&tmr->tmr_wait);
|
||||
atomic_set(&pending_req->tmr_complete, 1);
|
||||
wake_up(&pending_req->tmr_wait);
|
||||
}
|
||||
|
||||
static void scsiback_aborted_task(struct se_cmd *se_cmd)
|
||||
|
||||
@@ -78,12 +78,6 @@ static int __btrfs_set_acl(struct btrfs_trans_handle *trans,
|
||||
switch (type) {
|
||||
case ACL_TYPE_ACCESS:
|
||||
name = XATTR_NAME_POSIX_ACL_ACCESS;
|
||||
if (acl) {
|
||||
ret = posix_acl_update_mode(inode, &inode->i_mode, &acl);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
ret = 0;
|
||||
break;
|
||||
case ACL_TYPE_DEFAULT:
|
||||
if (!S_ISDIR(inode->i_mode))
|
||||
@@ -119,6 +113,13 @@ out:
|
||||
|
||||
int btrfs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (type == ACL_TYPE_ACCESS && acl) {
|
||||
ret = posix_acl_update_mode(inode, &inode->i_mode, &acl);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
return __btrfs_set_acl(NULL, inode, acl, type);
|
||||
}
|
||||
|
||||
|
||||
@@ -292,6 +292,11 @@ out:
|
||||
if (ret < 0)
|
||||
err = ret;
|
||||
dput(last);
|
||||
/* last_name no longer match cache index */
|
||||
if (fi->readdir_cache_idx >= 0) {
|
||||
fi->readdir_cache_idx = -1;
|
||||
fi->dir_release_count = 0;
|
||||
}
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -175,11 +175,8 @@ ext2_get_acl(struct inode *inode, int type)
|
||||
return acl;
|
||||
}
|
||||
|
||||
/*
|
||||
* inode->i_mutex: down
|
||||
*/
|
||||
int
|
||||
ext2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
|
||||
static int
|
||||
__ext2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
|
||||
{
|
||||
int name_index;
|
||||
void *value = NULL;
|
||||
@@ -189,13 +186,6 @@ ext2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
|
||||
switch(type) {
|
||||
case ACL_TYPE_ACCESS:
|
||||
name_index = EXT2_XATTR_INDEX_POSIX_ACL_ACCESS;
|
||||
if (acl) {
|
||||
error = posix_acl_update_mode(inode, &inode->i_mode, &acl);
|
||||
if (error)
|
||||
return error;
|
||||
inode->i_ctime = current_time(inode);
|
||||
mark_inode_dirty(inode);
|
||||
}
|
||||
break;
|
||||
|
||||
case ACL_TYPE_DEFAULT:
|
||||
@@ -221,6 +211,24 @@ ext2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
|
||||
return error;
|
||||
}
|
||||
|
||||
/*
|
||||
* inode->i_mutex: down
|
||||
*/
|
||||
int
|
||||
ext2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
|
||||
{
|
||||
int error;
|
||||
|
||||
if (type == ACL_TYPE_ACCESS && acl) {
|
||||
error = posix_acl_update_mode(inode, &inode->i_mode, &acl);
|
||||
if (error)
|
||||
return error;
|
||||
inode->i_ctime = current_time(inode);
|
||||
mark_inode_dirty(inode);
|
||||
}
|
||||
return __ext2_set_acl(inode, acl, type);
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize the ACLs of a new inode. Called from ext2_new_inode.
|
||||
*
|
||||
@@ -238,12 +246,12 @@ ext2_init_acl(struct inode *inode, struct inode *dir)
|
||||
return error;
|
||||
|
||||
if (default_acl) {
|
||||
error = ext2_set_acl(inode, default_acl, ACL_TYPE_DEFAULT);
|
||||
error = __ext2_set_acl(inode, default_acl, ACL_TYPE_DEFAULT);
|
||||
posix_acl_release(default_acl);
|
||||
}
|
||||
if (acl) {
|
||||
if (!error)
|
||||
error = ext2_set_acl(inode, acl, ACL_TYPE_ACCESS);
|
||||
error = __ext2_set_acl(inode, acl, ACL_TYPE_ACCESS);
|
||||
posix_acl_release(acl);
|
||||
}
|
||||
return error;
|
||||
|
||||
@@ -211,7 +211,7 @@ static int __f2fs_set_acl(struct inode *inode, int type,
|
||||
switch (type) {
|
||||
case ACL_TYPE_ACCESS:
|
||||
name_index = F2FS_XATTR_INDEX_POSIX_ACL_ACCESS;
|
||||
if (acl) {
|
||||
if (acl && !ipage) {
|
||||
error = posix_acl_update_mode(inode, &inode->i_mode, &acl);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
@@ -51,8 +51,8 @@ struct posix_acl *hfsplus_get_posix_acl(struct inode *inode, int type)
|
||||
return acl;
|
||||
}
|
||||
|
||||
int hfsplus_set_posix_acl(struct inode *inode, struct posix_acl *acl,
|
||||
int type)
|
||||
static int __hfsplus_set_posix_acl(struct inode *inode, struct posix_acl *acl,
|
||||
int type)
|
||||
{
|
||||
int err;
|
||||
char *xattr_name;
|
||||
@@ -64,12 +64,6 @@ int hfsplus_set_posix_acl(struct inode *inode, struct posix_acl *acl,
|
||||
switch (type) {
|
||||
case ACL_TYPE_ACCESS:
|
||||
xattr_name = XATTR_NAME_POSIX_ACL_ACCESS;
|
||||
if (acl) {
|
||||
err = posix_acl_update_mode(inode, &inode->i_mode, &acl);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
err = 0;
|
||||
break;
|
||||
|
||||
case ACL_TYPE_DEFAULT:
|
||||
@@ -105,6 +99,18 @@ end_set_acl:
|
||||
return err;
|
||||
}
|
||||
|
||||
int hfsplus_set_posix_acl(struct inode *inode, struct posix_acl *acl, int type)
|
||||
{
|
||||
int err;
|
||||
|
||||
if (type == ACL_TYPE_ACCESS && acl) {
|
||||
err = posix_acl_update_mode(inode, &inode->i_mode, &acl);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
return __hfsplus_set_posix_acl(inode, acl, type);
|
||||
}
|
||||
|
||||
int hfsplus_init_posix_acl(struct inode *inode, struct inode *dir)
|
||||
{
|
||||
int err = 0;
|
||||
@@ -122,15 +128,15 @@ int hfsplus_init_posix_acl(struct inode *inode, struct inode *dir)
|
||||
return err;
|
||||
|
||||
if (default_acl) {
|
||||
err = hfsplus_set_posix_acl(inode, default_acl,
|
||||
ACL_TYPE_DEFAULT);
|
||||
err = __hfsplus_set_posix_acl(inode, default_acl,
|
||||
ACL_TYPE_DEFAULT);
|
||||
posix_acl_release(default_acl);
|
||||
}
|
||||
|
||||
if (acl) {
|
||||
if (!err)
|
||||
err = hfsplus_set_posix_acl(inode, acl,
|
||||
ACL_TYPE_ACCESS);
|
||||
err = __hfsplus_set_posix_acl(inode, acl,
|
||||
ACL_TYPE_ACCESS);
|
||||
posix_acl_release(acl);
|
||||
}
|
||||
return err;
|
||||
|
||||
12
fs/nfs/dir.c
12
fs/nfs/dir.c
@@ -1167,11 +1167,13 @@ static int nfs_lookup_revalidate(struct dentry *dentry, unsigned int flags)
|
||||
/* Force a full look up iff the parent directory has changed */
|
||||
if (!nfs_is_exclusive_create(dir, flags) &&
|
||||
nfs_check_verifier(dir, dentry, flags & LOOKUP_RCU)) {
|
||||
|
||||
if (nfs_lookup_verify_inode(inode, flags)) {
|
||||
error = nfs_lookup_verify_inode(inode, flags);
|
||||
if (error) {
|
||||
if (flags & LOOKUP_RCU)
|
||||
return -ECHILD;
|
||||
goto out_zap_parent;
|
||||
if (error == -ESTALE)
|
||||
goto out_zap_parent;
|
||||
goto out_error;
|
||||
}
|
||||
goto out_valid;
|
||||
}
|
||||
@@ -1195,8 +1197,10 @@ static int nfs_lookup_revalidate(struct dentry *dentry, unsigned int flags)
|
||||
trace_nfs_lookup_revalidate_enter(dir, dentry, flags);
|
||||
error = NFS_PROTO(dir)->lookup(dir, &dentry->d_name, fhandle, fattr, label);
|
||||
trace_nfs_lookup_revalidate_exit(dir, dentry, flags, error);
|
||||
if (error)
|
||||
if (error == -ESTALE || error == -ENOENT)
|
||||
goto out_bad;
|
||||
if (error)
|
||||
goto out_error;
|
||||
if (nfs_compare_fh(NFS_FH(inode), fhandle))
|
||||
goto out_bad;
|
||||
if ((error = nfs_refresh_inode(inode, fattr)) != 0)
|
||||
|
||||
@@ -1278,9 +1278,9 @@ static int nfs_check_inode_attributes(struct inode *inode, struct nfs_fattr *fat
|
||||
return 0;
|
||||
/* Has the inode gone and changed behind our back? */
|
||||
if ((fattr->valid & NFS_ATTR_FATTR_FILEID) && nfsi->fileid != fattr->fileid)
|
||||
return -EIO;
|
||||
return -ESTALE;
|
||||
if ((fattr->valid & NFS_ATTR_FATTR_TYPE) && (inode->i_mode & S_IFMT) != (fattr->mode & S_IFMT))
|
||||
return -EIO;
|
||||
return -ESTALE;
|
||||
|
||||
if (!nfs_file_has_buffered_writers(nfsi)) {
|
||||
/* Verify a few of the more important attributes */
|
||||
|
||||
@@ -1146,6 +1146,7 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
|
||||
unsigned int stacklen = 0;
|
||||
unsigned int i;
|
||||
bool remote = false;
|
||||
struct cred *cred;
|
||||
int err;
|
||||
|
||||
err = -ENOMEM;
|
||||
@@ -1309,10 +1310,14 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
|
||||
else
|
||||
sb->s_d_op = &ovl_dentry_operations;
|
||||
|
||||
ufs->creator_cred = prepare_creds();
|
||||
if (!ufs->creator_cred)
|
||||
err = -ENOMEM;
|
||||
ufs->creator_cred = cred = prepare_creds();
|
||||
if (!cred)
|
||||
goto out_put_lower_mnt;
|
||||
|
||||
/* Never override disk quota limits or use reserved space */
|
||||
cap_lower(cred->cap_effective, CAP_SYS_RESOURCE);
|
||||
|
||||
err = -ENOMEM;
|
||||
oe = ovl_alloc_entry(numlower);
|
||||
if (!oe)
|
||||
|
||||
@@ -37,7 +37,14 @@ reiserfs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
|
||||
error = journal_begin(&th, inode->i_sb, jcreate_blocks);
|
||||
reiserfs_write_unlock(inode->i_sb);
|
||||
if (error == 0) {
|
||||
if (type == ACL_TYPE_ACCESS && acl) {
|
||||
error = posix_acl_update_mode(inode, &inode->i_mode,
|
||||
&acl);
|
||||
if (error)
|
||||
goto unlock;
|
||||
}
|
||||
error = __reiserfs_set_acl(&th, inode, type, acl);
|
||||
unlock:
|
||||
reiserfs_write_lock(inode->i_sb);
|
||||
error2 = journal_end(&th);
|
||||
reiserfs_write_unlock(inode->i_sb);
|
||||
@@ -241,11 +248,6 @@ __reiserfs_set_acl(struct reiserfs_transaction_handle *th, struct inode *inode,
|
||||
switch (type) {
|
||||
case ACL_TYPE_ACCESS:
|
||||
name = XATTR_NAME_POSIX_ACL_ACCESS;
|
||||
if (acl) {
|
||||
error = posix_acl_update_mode(inode, &inode->i_mode, &acl);
|
||||
if (error)
|
||||
return error;
|
||||
}
|
||||
break;
|
||||
case ACL_TYPE_DEFAULT:
|
||||
name = XATTR_NAME_POSIX_ACL_DEFAULT;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user