You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'for-linus' into work.misc
This commit is contained in:
@@ -40,18 +40,18 @@ Optional properties:
|
|||||||
|
|
||||||
Slave Properties:
|
Slave Properties:
|
||||||
Required properties:
|
Required properties:
|
||||||
- phy_id : Specifies slave phy id
|
|
||||||
- phy-mode : See ethernet.txt file in the same directory
|
- phy-mode : See ethernet.txt file in the same directory
|
||||||
|
|
||||||
Optional properties:
|
Optional properties:
|
||||||
- dual_emac_res_vlan : Specifies VID to be used to segregate the ports
|
- dual_emac_res_vlan : Specifies VID to be used to segregate the ports
|
||||||
- mac-address : See ethernet.txt file in the same directory
|
- mac-address : See ethernet.txt file in the same directory
|
||||||
|
- phy_id : Specifies slave phy id
|
||||||
- phy-handle : See ethernet.txt file in the same directory
|
- phy-handle : See ethernet.txt file in the same directory
|
||||||
|
|
||||||
Slave sub-nodes:
|
Slave sub-nodes:
|
||||||
- fixed-link : See fixed-link.txt file in the same directory
|
- fixed-link : See fixed-link.txt file in the same directory
|
||||||
Either the properties phy_id and phy-mode,
|
Either the property phy_id, or the sub-node
|
||||||
or the sub-node fixed-link can be specified
|
fixed-link can be specified
|
||||||
|
|
||||||
Note: "ti,hwmods" field is used to fetch the base address and irq
|
Note: "ti,hwmods" field is used to fetch the base address and irq
|
||||||
resources from TI, omap hwmod data base during device registration.
|
resources from TI, omap hwmod data base during device registration.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 4
|
PATCHLEVEL = 4
|
||||||
SUBLEVEL = 0
|
SUBLEVEL = 0
|
||||||
EXTRAVERSION = -rc7
|
EXTRAVERSION = -rc8
|
||||||
NAME = Blurry Fish Butt
|
NAME = Blurry Fish Butt
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
|
|||||||
@@ -193,15 +193,44 @@ struct oabi_flock64 {
|
|||||||
pid_t l_pid;
|
pid_t l_pid;
|
||||||
} __attribute__ ((packed,aligned(4)));
|
} __attribute__ ((packed,aligned(4)));
|
||||||
|
|
||||||
|
static long do_locks(unsigned int fd, unsigned int cmd,
|
||||||
|
unsigned long arg)
|
||||||
|
{
|
||||||
|
struct flock64 kernel;
|
||||||
|
struct oabi_flock64 user;
|
||||||
|
mm_segment_t fs;
|
||||||
|
long ret;
|
||||||
|
|
||||||
|
if (copy_from_user(&user, (struct oabi_flock64 __user *)arg,
|
||||||
|
sizeof(user)))
|
||||||
|
return -EFAULT;
|
||||||
|
kernel.l_type = user.l_type;
|
||||||
|
kernel.l_whence = user.l_whence;
|
||||||
|
kernel.l_start = user.l_start;
|
||||||
|
kernel.l_len = user.l_len;
|
||||||
|
kernel.l_pid = user.l_pid;
|
||||||
|
|
||||||
|
fs = get_fs();
|
||||||
|
set_fs(KERNEL_DS);
|
||||||
|
ret = sys_fcntl64(fd, cmd, (unsigned long)&kernel);
|
||||||
|
set_fs(fs);
|
||||||
|
|
||||||
|
if (!ret && (cmd == F_GETLK64 || cmd == F_OFD_GETLK)) {
|
||||||
|
user.l_type = kernel.l_type;
|
||||||
|
user.l_whence = kernel.l_whence;
|
||||||
|
user.l_start = kernel.l_start;
|
||||||
|
user.l_len = kernel.l_len;
|
||||||
|
user.l_pid = kernel.l_pid;
|
||||||
|
if (copy_to_user((struct oabi_flock64 __user *)arg,
|
||||||
|
&user, sizeof(user)))
|
||||||
|
ret = -EFAULT;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
asmlinkage long sys_oabi_fcntl64(unsigned int fd, unsigned int cmd,
|
asmlinkage long sys_oabi_fcntl64(unsigned int fd, unsigned int cmd,
|
||||||
unsigned long arg)
|
unsigned long arg)
|
||||||
{
|
{
|
||||||
struct oabi_flock64 user;
|
|
||||||
struct flock64 kernel;
|
|
||||||
mm_segment_t fs = USER_DS; /* initialized to kill a warning */
|
|
||||||
unsigned long local_arg = arg;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case F_OFD_GETLK:
|
case F_OFD_GETLK:
|
||||||
case F_OFD_SETLK:
|
case F_OFD_SETLK:
|
||||||
@@ -209,39 +238,11 @@ asmlinkage long sys_oabi_fcntl64(unsigned int fd, unsigned int cmd,
|
|||||||
case F_GETLK64:
|
case F_GETLK64:
|
||||||
case F_SETLK64:
|
case F_SETLK64:
|
||||||
case F_SETLKW64:
|
case F_SETLKW64:
|
||||||
if (copy_from_user(&user, (struct oabi_flock64 __user *)arg,
|
return do_locks(fd, cmd, arg);
|
||||||
sizeof(user)))
|
|
||||||
return -EFAULT;
|
default:
|
||||||
kernel.l_type = user.l_type;
|
return sys_fcntl64(fd, cmd, arg);
|
||||||
kernel.l_whence = user.l_whence;
|
|
||||||
kernel.l_start = user.l_start;
|
|
||||||
kernel.l_len = user.l_len;
|
|
||||||
kernel.l_pid = user.l_pid;
|
|
||||||
local_arg = (unsigned long)&kernel;
|
|
||||||
fs = get_fs();
|
|
||||||
set_fs(KERNEL_DS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = sys_fcntl64(fd, cmd, local_arg);
|
|
||||||
|
|
||||||
switch (cmd) {
|
|
||||||
case F_GETLK64:
|
|
||||||
if (!ret) {
|
|
||||||
user.l_type = kernel.l_type;
|
|
||||||
user.l_whence = kernel.l_whence;
|
|
||||||
user.l_start = kernel.l_start;
|
|
||||||
user.l_len = kernel.l_len;
|
|
||||||
user.l_pid = kernel.l_pid;
|
|
||||||
if (copy_to_user((struct oabi_flock64 __user *)arg,
|
|
||||||
&user, sizeof(user)))
|
|
||||||
ret = -EFAULT;
|
|
||||||
}
|
|
||||||
case F_SETLK64:
|
|
||||||
case F_SETLKW64:
|
|
||||||
set_fs(fs);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct oabi_epoll_event {
|
struct oabi_epoll_event {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ generic-y += clkdev.h
|
|||||||
generic-y += cputime.h
|
generic-y += cputime.h
|
||||||
generic-y += exec.h
|
generic-y += exec.h
|
||||||
generic-y += irq_work.h
|
generic-y += irq_work.h
|
||||||
|
generic-y += kvm_para.h
|
||||||
generic-y += mcs_spinlock.h
|
generic-y += mcs_spinlock.h
|
||||||
generic-y += mm-arch-hooks.h
|
generic-y += mm-arch-hooks.h
|
||||||
generic-y += module.h
|
generic-y += module.h
|
||||||
|
|||||||
@@ -168,13 +168,21 @@ static inline void _writel(unsigned long l, unsigned long addr)
|
|||||||
#define writew_relaxed writew
|
#define writew_relaxed writew
|
||||||
#define writel_relaxed writel
|
#define writel_relaxed writel
|
||||||
|
|
||||||
#define ioread8 read
|
#define ioread8 readb
|
||||||
#define ioread16 readw
|
#define ioread16 readw
|
||||||
#define ioread32 readl
|
#define ioread32 readl
|
||||||
#define iowrite8 writeb
|
#define iowrite8 writeb
|
||||||
#define iowrite16 writew
|
#define iowrite16 writew
|
||||||
#define iowrite32 writel
|
#define iowrite32 writel
|
||||||
|
|
||||||
|
#define ioread8_rep(p, dst, count) insb((unsigned long)(p), (dst), (count))
|
||||||
|
#define ioread16_rep(p, dst, count) insw((unsigned long)(p), (dst), (count))
|
||||||
|
#define ioread32_rep(p, dst, count) insl((unsigned long)(p), (dst), (count))
|
||||||
|
|
||||||
|
#define iowrite8_rep(p, src, count) outsb((unsigned long)(p), (src), (count))
|
||||||
|
#define iowrite16_rep(p, src, count) outsw((unsigned long)(p), (src), (count))
|
||||||
|
#define iowrite32_rep(p, src, count) outsl((unsigned long)(p), (src), (count))
|
||||||
|
|
||||||
#define ioread16be(addr) be16_to_cpu(readw(addr))
|
#define ioread16be(addr) be16_to_cpu(readw(addr))
|
||||||
#define ioread32be(addr) be32_to_cpu(readl(addr))
|
#define ioread32be(addr) be32_to_cpu(readl(addr))
|
||||||
#define iowrite16be(v, addr) writew(cpu_to_be16(v), (addr))
|
#define iowrite16be(v, addr) writew(cpu_to_be16(v), (addr))
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ aflags-vdso := $(ccflags-vdso) \
|
|||||||
# the comments on that file.
|
# the comments on that file.
|
||||||
#
|
#
|
||||||
ifndef CONFIG_CPU_MIPSR6
|
ifndef CONFIG_CPU_MIPSR6
|
||||||
ifeq ($(call ld-ifversion, -lt, 22500000, y),)
|
ifeq ($(call ld-ifversion, -lt, 22500000, y),y)
|
||||||
$(warning MIPS VDSO requires binutils >= 2.25)
|
$(warning MIPS VDSO requires binutils >= 2.25)
|
||||||
obj-vdso-y := $(filter-out gettimeofday.o, $(obj-vdso-y))
|
obj-vdso-y := $(filter-out gettimeofday.o, $(obj-vdso-y))
|
||||||
ccflags-vdso += -DDISABLE_MIPS_VDSO
|
ccflags-vdso += -DDISABLE_MIPS_VDSO
|
||||||
|
|||||||
@@ -418,8 +418,12 @@
|
|||||||
#define __NR_execveat 350
|
#define __NR_execveat 350
|
||||||
#define __NR_membarrier 351
|
#define __NR_membarrier 351
|
||||||
#define __NR_userfaultfd 352
|
#define __NR_userfaultfd 352
|
||||||
|
#define __NR_bind 353
|
||||||
|
#define __NR_listen 354
|
||||||
|
#define __NR_setsockopt 355
|
||||||
|
#define __NR_mlock2 356
|
||||||
|
|
||||||
#define NR_syscalls 353
|
#define NR_syscalls 357
|
||||||
|
|
||||||
/* Bitmask values returned from kern_features system call. */
|
/* Bitmask values returned from kern_features system call. */
|
||||||
#define KERN_FEATURE_MIXED_MODE_STACK 0x00000001
|
#define KERN_FEATURE_MIXED_MODE_STACK 0x00000001
|
||||||
|
|||||||
@@ -35,18 +35,18 @@ sys_call_table:
|
|||||||
/*80*/ .long sys_setgroups16, sys_getpgrp, sys_setgroups, sys_setitimer, sys_ftruncate64
|
/*80*/ .long sys_setgroups16, sys_getpgrp, sys_setgroups, sys_setitimer, sys_ftruncate64
|
||||||
/*85*/ .long sys_swapon, sys_getitimer, sys_setuid, sys_sethostname, sys_setgid
|
/*85*/ .long sys_swapon, sys_getitimer, sys_setuid, sys_sethostname, sys_setgid
|
||||||
/*90*/ .long sys_dup2, sys_setfsuid, sys_fcntl, sys_select, sys_setfsgid
|
/*90*/ .long sys_dup2, sys_setfsuid, sys_fcntl, sys_select, sys_setfsgid
|
||||||
/*95*/ .long sys_fsync, sys_setpriority, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall
|
/*95*/ .long sys_fsync, sys_setpriority, sys_socket, sys_connect, sys_accept
|
||||||
/*100*/ .long sys_getpriority, sys_rt_sigreturn, sys_rt_sigaction, sys_rt_sigprocmask, sys_rt_sigpending
|
/*100*/ .long sys_getpriority, sys_rt_sigreturn, sys_rt_sigaction, sys_rt_sigprocmask, sys_rt_sigpending
|
||||||
/*105*/ .long sys_rt_sigtimedwait, sys_rt_sigqueueinfo, sys_rt_sigsuspend, sys_setresuid, sys_getresuid
|
/*105*/ .long sys_rt_sigtimedwait, sys_rt_sigqueueinfo, sys_rt_sigsuspend, sys_setresuid, sys_getresuid
|
||||||
/*110*/ .long sys_setresgid, sys_getresgid, sys_setregid, sys_nis_syscall, sys_nis_syscall
|
/*110*/ .long sys_setresgid, sys_getresgid, sys_setregid, sys_recvmsg, sys_sendmsg
|
||||||
/*115*/ .long sys_getgroups, sys_gettimeofday, sys_getrusage, sys_nis_syscall, sys_getcwd
|
/*115*/ .long sys_getgroups, sys_gettimeofday, sys_getrusage, sys_getsockopt, sys_getcwd
|
||||||
/*120*/ .long sys_readv, sys_writev, sys_settimeofday, sys_fchown16, sys_fchmod
|
/*120*/ .long sys_readv, sys_writev, sys_settimeofday, sys_fchown16, sys_fchmod
|
||||||
/*125*/ .long sys_nis_syscall, sys_setreuid16, sys_setregid16, sys_rename, sys_truncate
|
/*125*/ .long sys_recvfrom, sys_setreuid16, sys_setregid16, sys_rename, sys_truncate
|
||||||
/*130*/ .long sys_ftruncate, sys_flock, sys_lstat64, sys_nis_syscall, sys_nis_syscall
|
/*130*/ .long sys_ftruncate, sys_flock, sys_lstat64, sys_sendto, sys_shutdown
|
||||||
/*135*/ .long sys_nis_syscall, sys_mkdir, sys_rmdir, sys_utimes, sys_stat64
|
/*135*/ .long sys_socketpair, sys_mkdir, sys_rmdir, sys_utimes, sys_stat64
|
||||||
/*140*/ .long sys_sendfile64, sys_nis_syscall, sys_futex, sys_gettid, sys_getrlimit
|
/*140*/ .long sys_sendfile64, sys_getpeername, sys_futex, sys_gettid, sys_getrlimit
|
||||||
/*145*/ .long sys_setrlimit, sys_pivot_root, sys_prctl, sys_pciconfig_read, sys_pciconfig_write
|
/*145*/ .long sys_setrlimit, sys_pivot_root, sys_prctl, sys_pciconfig_read, sys_pciconfig_write
|
||||||
/*150*/ .long sys_nis_syscall, sys_inotify_init, sys_inotify_add_watch, sys_poll, sys_getdents64
|
/*150*/ .long sys_getsockname, sys_inotify_init, sys_inotify_add_watch, sys_poll, sys_getdents64
|
||||||
/*155*/ .long sys_fcntl64, sys_inotify_rm_watch, sys_statfs, sys_fstatfs, sys_oldumount
|
/*155*/ .long sys_fcntl64, sys_inotify_rm_watch, sys_statfs, sys_fstatfs, sys_oldumount
|
||||||
/*160*/ .long sys_sched_setaffinity, sys_sched_getaffinity, sys_getdomainname, sys_setdomainname, sys_nis_syscall
|
/*160*/ .long sys_sched_setaffinity, sys_sched_getaffinity, sys_getdomainname, sys_setdomainname, sys_nis_syscall
|
||||||
/*165*/ .long sys_quotactl, sys_set_tid_address, sys_mount, sys_ustat, sys_setxattr
|
/*165*/ .long sys_quotactl, sys_set_tid_address, sys_mount, sys_ustat, sys_setxattr
|
||||||
@@ -87,4 +87,5 @@ sys_call_table:
|
|||||||
/*335*/ .long sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev
|
/*335*/ .long sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev
|
||||||
/*340*/ .long sys_ni_syscall, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr
|
/*340*/ .long sys_ni_syscall, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr
|
||||||
/*345*/ .long sys_renameat2, sys_seccomp, sys_getrandom, sys_memfd_create, sys_bpf
|
/*345*/ .long sys_renameat2, sys_seccomp, sys_getrandom, sys_memfd_create, sys_bpf
|
||||||
/*350*/ .long sys_execveat, sys_membarrier, sys_userfaultfd
|
/*350*/ .long sys_execveat, sys_membarrier, sys_userfaultfd, sys_bind, sys_listen
|
||||||
|
/*355*/ .long sys_setsockopt, sys_mlock2
|
||||||
|
|||||||
@@ -37,15 +37,15 @@ sys_call_table32:
|
|||||||
/*80*/ .word sys_setgroups16, sys_getpgrp, sys_setgroups, compat_sys_setitimer, sys32_ftruncate64
|
/*80*/ .word sys_setgroups16, sys_getpgrp, sys_setgroups, compat_sys_setitimer, sys32_ftruncate64
|
||||||
.word sys_swapon, compat_sys_getitimer, sys_setuid, sys_sethostname, sys_setgid
|
.word sys_swapon, compat_sys_getitimer, sys_setuid, sys_sethostname, sys_setgid
|
||||||
/*90*/ .word sys_dup2, sys_setfsuid, compat_sys_fcntl, sys32_select, sys_setfsgid
|
/*90*/ .word sys_dup2, sys_setfsuid, compat_sys_fcntl, sys32_select, sys_setfsgid
|
||||||
.word sys_fsync, sys_setpriority, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall
|
.word sys_fsync, sys_setpriority, sys_socket, sys_connect, sys_accept
|
||||||
/*100*/ .word sys_getpriority, sys32_rt_sigreturn, compat_sys_rt_sigaction, compat_sys_rt_sigprocmask, compat_sys_rt_sigpending
|
/*100*/ .word sys_getpriority, sys32_rt_sigreturn, compat_sys_rt_sigaction, compat_sys_rt_sigprocmask, compat_sys_rt_sigpending
|
||||||
.word compat_sys_rt_sigtimedwait, compat_sys_rt_sigqueueinfo, compat_sys_rt_sigsuspend, sys_setresuid, sys_getresuid
|
.word compat_sys_rt_sigtimedwait, compat_sys_rt_sigqueueinfo, compat_sys_rt_sigsuspend, sys_setresuid, sys_getresuid
|
||||||
/*110*/ .word sys_setresgid, sys_getresgid, sys_setregid, sys_nis_syscall, sys_nis_syscall
|
/*110*/ .word sys_setresgid, sys_getresgid, sys_setregid, compat_sys_recvmsg, compat_sys_sendmsg
|
||||||
.word sys_getgroups, compat_sys_gettimeofday, compat_sys_getrusage, sys_nis_syscall, sys_getcwd
|
.word sys_getgroups, compat_sys_gettimeofday, compat_sys_getrusage, compat_sys_getsockopt, sys_getcwd
|
||||||
/*120*/ .word compat_sys_readv, compat_sys_writev, compat_sys_settimeofday, sys_fchown16, sys_fchmod
|
/*120*/ .word compat_sys_readv, compat_sys_writev, compat_sys_settimeofday, sys_fchown16, sys_fchmod
|
||||||
.word sys_nis_syscall, sys_setreuid16, sys_setregid16, sys_rename, compat_sys_truncate
|
.word sys_recvfrom, sys_setreuid16, sys_setregid16, sys_rename, compat_sys_truncate
|
||||||
/*130*/ .word compat_sys_ftruncate, sys_flock, compat_sys_lstat64, sys_nis_syscall, sys_nis_syscall
|
/*130*/ .word compat_sys_ftruncate, sys_flock, compat_sys_lstat64, sys_sendto, sys_shutdown
|
||||||
.word sys_nis_syscall, sys_mkdir, sys_rmdir, compat_sys_utimes, compat_sys_stat64
|
.word sys_socketpair, sys_mkdir, sys_rmdir, compat_sys_utimes, compat_sys_stat64
|
||||||
/*140*/ .word sys_sendfile64, sys_nis_syscall, sys32_futex, sys_gettid, compat_sys_getrlimit
|
/*140*/ .word sys_sendfile64, sys_nis_syscall, sys32_futex, sys_gettid, compat_sys_getrlimit
|
||||||
.word compat_sys_setrlimit, sys_pivot_root, sys_prctl, sys_pciconfig_read, sys_pciconfig_write
|
.word compat_sys_setrlimit, sys_pivot_root, sys_prctl, sys_pciconfig_read, sys_pciconfig_write
|
||||||
/*150*/ .word sys_nis_syscall, sys_inotify_init, sys_inotify_add_watch, sys_poll, sys_getdents64
|
/*150*/ .word sys_nis_syscall, sys_inotify_init, sys_inotify_add_watch, sys_poll, sys_getdents64
|
||||||
@@ -88,7 +88,8 @@ sys_call_table32:
|
|||||||
.word sys_syncfs, compat_sys_sendmmsg, sys_setns, compat_sys_process_vm_readv, compat_sys_process_vm_writev
|
.word sys_syncfs, compat_sys_sendmmsg, sys_setns, compat_sys_process_vm_readv, compat_sys_process_vm_writev
|
||||||
/*340*/ .word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr
|
/*340*/ .word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr
|
||||||
.word sys32_renameat2, sys_seccomp, sys_getrandom, sys_memfd_create, sys_bpf
|
.word sys32_renameat2, sys_seccomp, sys_getrandom, sys_memfd_create, sys_bpf
|
||||||
/*350*/ .word sys32_execveat, sys_membarrier, sys_userfaultfd
|
/*350*/ .word sys32_execveat, sys_membarrier, sys_userfaultfd, sys_bind, sys_listen
|
||||||
|
.word compat_sys_setsockopt, sys_mlock2
|
||||||
|
|
||||||
#endif /* CONFIG_COMPAT */
|
#endif /* CONFIG_COMPAT */
|
||||||
|
|
||||||
@@ -168,4 +169,5 @@ sys_call_table:
|
|||||||
.word sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev
|
.word sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev
|
||||||
/*340*/ .word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr
|
/*340*/ .word sys_kern_features, sys_kcmp, sys_finit_module, sys_sched_setattr, sys_sched_getattr
|
||||||
.word sys_renameat2, sys_seccomp, sys_getrandom, sys_memfd_create, sys_bpf
|
.word sys_renameat2, sys_seccomp, sys_getrandom, sys_memfd_create, sys_bpf
|
||||||
/*350*/ .word sys64_execveat, sys_membarrier, sys_userfaultfd
|
/*350*/ .word sys64_execveat, sys_membarrier, sys_userfaultfd, sys_bind, sys_listen
|
||||||
|
.word sys_setsockopt, sys_mlock2
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/tick.h>
|
#include <linux/tick.h>
|
||||||
|
|
||||||
|
#include <xen/xen.h>
|
||||||
#include <xen/interface/xen.h>
|
#include <xen/interface/xen.h>
|
||||||
#include <xen/grant_table.h>
|
#include <xen/grant_table.h>
|
||||||
#include <xen/events.h>
|
#include <xen/events.h>
|
||||||
|
|||||||
@@ -206,6 +206,22 @@ void blk_delay_queue(struct request_queue *q, unsigned long msecs)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(blk_delay_queue);
|
EXPORT_SYMBOL(blk_delay_queue);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* blk_start_queue_async - asynchronously restart a previously stopped queue
|
||||||
|
* @q: The &struct request_queue in question
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* blk_start_queue_async() will clear the stop flag on the queue, and
|
||||||
|
* ensure that the request_fn for the queue is run from an async
|
||||||
|
* context.
|
||||||
|
**/
|
||||||
|
void blk_start_queue_async(struct request_queue *q)
|
||||||
|
{
|
||||||
|
queue_flag_clear(QUEUE_FLAG_STOPPED, q);
|
||||||
|
blk_run_queue_async(q);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(blk_start_queue_async);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* blk_start_queue - restart a previously stopped queue
|
* blk_start_queue - restart a previously stopped queue
|
||||||
* @q: The &struct request_queue in question
|
* @q: The &struct request_queue in question
|
||||||
|
|||||||
+1
-1
@@ -81,7 +81,7 @@ static struct bio *blk_bio_segment_split(struct request_queue *q,
|
|||||||
struct bio *new = NULL;
|
struct bio *new = NULL;
|
||||||
|
|
||||||
bio_for_each_segment(bv, bio, iter) {
|
bio_for_each_segment(bv, bio, iter) {
|
||||||
if (sectors + (bv.bv_len >> 9) > queue_max_sectors(q))
|
if (sectors + (bv.bv_len >> 9) > blk_max_size_offset(q, bio->bi_iter.bi_sector))
|
||||||
goto split;
|
goto split;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
+30
-31
@@ -47,7 +47,7 @@ struct skcipher_ctx {
|
|||||||
bool merge;
|
bool merge;
|
||||||
bool enc;
|
bool enc;
|
||||||
|
|
||||||
struct ablkcipher_request req;
|
struct skcipher_request req;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct skcipher_async_rsgl {
|
struct skcipher_async_rsgl {
|
||||||
@@ -64,13 +64,13 @@ struct skcipher_async_req {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define GET_SREQ(areq, ctx) (struct skcipher_async_req *)((char *)areq + \
|
#define GET_SREQ(areq, ctx) (struct skcipher_async_req *)((char *)areq + \
|
||||||
crypto_ablkcipher_reqsize(crypto_ablkcipher_reqtfm(&ctx->req)))
|
crypto_skcipher_reqsize(crypto_skcipher_reqtfm(&ctx->req)))
|
||||||
|
|
||||||
#define GET_REQ_SIZE(ctx) \
|
#define GET_REQ_SIZE(ctx) \
|
||||||
crypto_ablkcipher_reqsize(crypto_ablkcipher_reqtfm(&ctx->req))
|
crypto_skcipher_reqsize(crypto_skcipher_reqtfm(&ctx->req))
|
||||||
|
|
||||||
#define GET_IV_SIZE(ctx) \
|
#define GET_IV_SIZE(ctx) \
|
||||||
crypto_ablkcipher_ivsize(crypto_ablkcipher_reqtfm(&ctx->req))
|
crypto_skcipher_ivsize(crypto_skcipher_reqtfm(&ctx->req))
|
||||||
|
|
||||||
#define MAX_SGL_ENTS ((4096 - sizeof(struct skcipher_sg_list)) / \
|
#define MAX_SGL_ENTS ((4096 - sizeof(struct skcipher_sg_list)) / \
|
||||||
sizeof(struct scatterlist) - 1)
|
sizeof(struct scatterlist) - 1)
|
||||||
@@ -302,8 +302,8 @@ static int skcipher_sendmsg(struct socket *sock, struct msghdr *msg,
|
|||||||
struct sock *sk = sock->sk;
|
struct sock *sk = sock->sk;
|
||||||
struct alg_sock *ask = alg_sk(sk);
|
struct alg_sock *ask = alg_sk(sk);
|
||||||
struct skcipher_ctx *ctx = ask->private;
|
struct skcipher_ctx *ctx = ask->private;
|
||||||
struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(&ctx->req);
|
struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(&ctx->req);
|
||||||
unsigned ivsize = crypto_ablkcipher_ivsize(tfm);
|
unsigned ivsize = crypto_skcipher_ivsize(tfm);
|
||||||
struct skcipher_sg_list *sgl;
|
struct skcipher_sg_list *sgl;
|
||||||
struct af_alg_control con = {};
|
struct af_alg_control con = {};
|
||||||
long copied = 0;
|
long copied = 0;
|
||||||
@@ -507,7 +507,7 @@ static int skcipher_recvmsg_async(struct socket *sock, struct msghdr *msg,
|
|||||||
struct skcipher_sg_list *sgl;
|
struct skcipher_sg_list *sgl;
|
||||||
struct scatterlist *sg;
|
struct scatterlist *sg;
|
||||||
struct skcipher_async_req *sreq;
|
struct skcipher_async_req *sreq;
|
||||||
struct ablkcipher_request *req;
|
struct skcipher_request *req;
|
||||||
struct skcipher_async_rsgl *last_rsgl = NULL;
|
struct skcipher_async_rsgl *last_rsgl = NULL;
|
||||||
unsigned int txbufs = 0, len = 0, tx_nents = skcipher_all_sg_nents(ctx);
|
unsigned int txbufs = 0, len = 0, tx_nents = skcipher_all_sg_nents(ctx);
|
||||||
unsigned int reqlen = sizeof(struct skcipher_async_req) +
|
unsigned int reqlen = sizeof(struct skcipher_async_req) +
|
||||||
@@ -531,9 +531,9 @@ static int skcipher_recvmsg_async(struct socket *sock, struct msghdr *msg,
|
|||||||
}
|
}
|
||||||
sg_init_table(sreq->tsg, tx_nents);
|
sg_init_table(sreq->tsg, tx_nents);
|
||||||
memcpy(sreq->iv, ctx->iv, GET_IV_SIZE(ctx));
|
memcpy(sreq->iv, ctx->iv, GET_IV_SIZE(ctx));
|
||||||
ablkcipher_request_set_tfm(req, crypto_ablkcipher_reqtfm(&ctx->req));
|
skcipher_request_set_tfm(req, crypto_skcipher_reqtfm(&ctx->req));
|
||||||
ablkcipher_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG,
|
skcipher_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG,
|
||||||
skcipher_async_cb, sk);
|
skcipher_async_cb, sk);
|
||||||
|
|
||||||
while (iov_iter_count(&msg->msg_iter)) {
|
while (iov_iter_count(&msg->msg_iter)) {
|
||||||
struct skcipher_async_rsgl *rsgl;
|
struct skcipher_async_rsgl *rsgl;
|
||||||
@@ -608,10 +608,10 @@ static int skcipher_recvmsg_async(struct socket *sock, struct msghdr *msg,
|
|||||||
if (mark)
|
if (mark)
|
||||||
sg_mark_end(sreq->tsg + txbufs - 1);
|
sg_mark_end(sreq->tsg + txbufs - 1);
|
||||||
|
|
||||||
ablkcipher_request_set_crypt(req, sreq->tsg, sreq->first_sgl.sgl.sg,
|
skcipher_request_set_crypt(req, sreq->tsg, sreq->first_sgl.sgl.sg,
|
||||||
len, sreq->iv);
|
len, sreq->iv);
|
||||||
err = ctx->enc ? crypto_ablkcipher_encrypt(req) :
|
err = ctx->enc ? crypto_skcipher_encrypt(req) :
|
||||||
crypto_ablkcipher_decrypt(req);
|
crypto_skcipher_decrypt(req);
|
||||||
if (err == -EINPROGRESS) {
|
if (err == -EINPROGRESS) {
|
||||||
atomic_inc(&ctx->inflight);
|
atomic_inc(&ctx->inflight);
|
||||||
err = -EIOCBQUEUED;
|
err = -EIOCBQUEUED;
|
||||||
@@ -632,7 +632,7 @@ static int skcipher_recvmsg_sync(struct socket *sock, struct msghdr *msg,
|
|||||||
struct sock *sk = sock->sk;
|
struct sock *sk = sock->sk;
|
||||||
struct alg_sock *ask = alg_sk(sk);
|
struct alg_sock *ask = alg_sk(sk);
|
||||||
struct skcipher_ctx *ctx = ask->private;
|
struct skcipher_ctx *ctx = ask->private;
|
||||||
unsigned bs = crypto_ablkcipher_blocksize(crypto_ablkcipher_reqtfm(
|
unsigned bs = crypto_skcipher_blocksize(crypto_skcipher_reqtfm(
|
||||||
&ctx->req));
|
&ctx->req));
|
||||||
struct skcipher_sg_list *sgl;
|
struct skcipher_sg_list *sgl;
|
||||||
struct scatterlist *sg;
|
struct scatterlist *sg;
|
||||||
@@ -669,14 +669,13 @@ static int skcipher_recvmsg_sync(struct socket *sock, struct msghdr *msg,
|
|||||||
if (!used)
|
if (!used)
|
||||||
goto free;
|
goto free;
|
||||||
|
|
||||||
ablkcipher_request_set_crypt(&ctx->req, sg,
|
skcipher_request_set_crypt(&ctx->req, sg, ctx->rsgl.sg, used,
|
||||||
ctx->rsgl.sg, used,
|
ctx->iv);
|
||||||
ctx->iv);
|
|
||||||
|
|
||||||
err = af_alg_wait_for_completion(
|
err = af_alg_wait_for_completion(
|
||||||
ctx->enc ?
|
ctx->enc ?
|
||||||
crypto_ablkcipher_encrypt(&ctx->req) :
|
crypto_skcipher_encrypt(&ctx->req) :
|
||||||
crypto_ablkcipher_decrypt(&ctx->req),
|
crypto_skcipher_decrypt(&ctx->req),
|
||||||
&ctx->completion);
|
&ctx->completion);
|
||||||
|
|
||||||
free:
|
free:
|
||||||
@@ -751,17 +750,17 @@ static struct proto_ops algif_skcipher_ops = {
|
|||||||
|
|
||||||
static void *skcipher_bind(const char *name, u32 type, u32 mask)
|
static void *skcipher_bind(const char *name, u32 type, u32 mask)
|
||||||
{
|
{
|
||||||
return crypto_alloc_ablkcipher(name, type, mask);
|
return crypto_alloc_skcipher(name, type, mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void skcipher_release(void *private)
|
static void skcipher_release(void *private)
|
||||||
{
|
{
|
||||||
crypto_free_ablkcipher(private);
|
crypto_free_skcipher(private);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int skcipher_setkey(void *private, const u8 *key, unsigned int keylen)
|
static int skcipher_setkey(void *private, const u8 *key, unsigned int keylen)
|
||||||
{
|
{
|
||||||
return crypto_ablkcipher_setkey(private, key, keylen);
|
return crypto_skcipher_setkey(private, key, keylen);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void skcipher_wait(struct sock *sk)
|
static void skcipher_wait(struct sock *sk)
|
||||||
@@ -778,13 +777,13 @@ static void skcipher_sock_destruct(struct sock *sk)
|
|||||||
{
|
{
|
||||||
struct alg_sock *ask = alg_sk(sk);
|
struct alg_sock *ask = alg_sk(sk);
|
||||||
struct skcipher_ctx *ctx = ask->private;
|
struct skcipher_ctx *ctx = ask->private;
|
||||||
struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(&ctx->req);
|
struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(&ctx->req);
|
||||||
|
|
||||||
if (atomic_read(&ctx->inflight))
|
if (atomic_read(&ctx->inflight))
|
||||||
skcipher_wait(sk);
|
skcipher_wait(sk);
|
||||||
|
|
||||||
skcipher_free_sgl(sk);
|
skcipher_free_sgl(sk);
|
||||||
sock_kzfree_s(sk, ctx->iv, crypto_ablkcipher_ivsize(tfm));
|
sock_kzfree_s(sk, ctx->iv, crypto_skcipher_ivsize(tfm));
|
||||||
sock_kfree_s(sk, ctx, ctx->len);
|
sock_kfree_s(sk, ctx, ctx->len);
|
||||||
af_alg_release_parent(sk);
|
af_alg_release_parent(sk);
|
||||||
}
|
}
|
||||||
@@ -793,20 +792,20 @@ static int skcipher_accept_parent(void *private, struct sock *sk)
|
|||||||
{
|
{
|
||||||
struct skcipher_ctx *ctx;
|
struct skcipher_ctx *ctx;
|
||||||
struct alg_sock *ask = alg_sk(sk);
|
struct alg_sock *ask = alg_sk(sk);
|
||||||
unsigned int len = sizeof(*ctx) + crypto_ablkcipher_reqsize(private);
|
unsigned int len = sizeof(*ctx) + crypto_skcipher_reqsize(private);
|
||||||
|
|
||||||
ctx = sock_kmalloc(sk, len, GFP_KERNEL);
|
ctx = sock_kmalloc(sk, len, GFP_KERNEL);
|
||||||
if (!ctx)
|
if (!ctx)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
ctx->iv = sock_kmalloc(sk, crypto_ablkcipher_ivsize(private),
|
ctx->iv = sock_kmalloc(sk, crypto_skcipher_ivsize(private),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!ctx->iv) {
|
if (!ctx->iv) {
|
||||||
sock_kfree_s(sk, ctx, len);
|
sock_kfree_s(sk, ctx, len);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(ctx->iv, 0, crypto_ablkcipher_ivsize(private));
|
memset(ctx->iv, 0, crypto_skcipher_ivsize(private));
|
||||||
|
|
||||||
INIT_LIST_HEAD(&ctx->tsgl);
|
INIT_LIST_HEAD(&ctx->tsgl);
|
||||||
ctx->len = len;
|
ctx->len = len;
|
||||||
@@ -819,9 +818,9 @@ static int skcipher_accept_parent(void *private, struct sock *sk)
|
|||||||
|
|
||||||
ask->private = ctx;
|
ask->private = ctx;
|
||||||
|
|
||||||
ablkcipher_request_set_tfm(&ctx->req, private);
|
skcipher_request_set_tfm(&ctx->req, private);
|
||||||
ablkcipher_request_set_callback(&ctx->req, CRYPTO_TFM_REQ_MAY_BACKLOG,
|
skcipher_request_set_callback(&ctx->req, CRYPTO_TFM_REQ_MAY_BACKLOG,
|
||||||
af_alg_complete, &ctx->completion);
|
af_alg_complete, &ctx->completion);
|
||||||
|
|
||||||
sk->sk_destruct = skcipher_sock_destruct;
|
sk->sk_destruct = skcipher_sock_destruct;
|
||||||
|
|
||||||
|
|||||||
@@ -232,20 +232,19 @@ static void end_cmd(struct nullb_cmd *cmd)
|
|||||||
break;
|
break;
|
||||||
case NULL_Q_BIO:
|
case NULL_Q_BIO:
|
||||||
bio_endio(cmd->bio);
|
bio_endio(cmd->bio);
|
||||||
goto free_cmd;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free_cmd(cmd);
|
||||||
|
|
||||||
/* Restart queue if needed, as we are freeing a tag */
|
/* Restart queue if needed, as we are freeing a tag */
|
||||||
if (q && !q->mq_ops && blk_queue_stopped(q)) {
|
if (queue_mode == NULL_Q_RQ && blk_queue_stopped(q)) {
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(q->queue_lock, flags);
|
spin_lock_irqsave(q->queue_lock, flags);
|
||||||
if (blk_queue_stopped(q))
|
blk_start_queue_async(q);
|
||||||
blk_start_queue(q);
|
|
||||||
spin_unlock_irqrestore(q->queue_lock, flags);
|
spin_unlock_irqrestore(q->queue_lock, flags);
|
||||||
}
|
}
|
||||||
free_cmd:
|
|
||||||
free_cmd(cmd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static enum hrtimer_restart null_cmd_timer_expired(struct hrtimer *timer)
|
static enum hrtimer_restart null_cmd_timer_expired(struct hrtimer *timer)
|
||||||
|
|||||||
@@ -12123,18 +12123,22 @@ static void intel_dump_pipe_config(struct intel_crtc *crtc,
|
|||||||
static bool check_digital_port_conflicts(struct drm_atomic_state *state)
|
static bool check_digital_port_conflicts(struct drm_atomic_state *state)
|
||||||
{
|
{
|
||||||
struct drm_device *dev = state->dev;
|
struct drm_device *dev = state->dev;
|
||||||
struct intel_encoder *encoder;
|
|
||||||
struct drm_connector *connector;
|
struct drm_connector *connector;
|
||||||
struct drm_connector_state *connector_state;
|
|
||||||
unsigned int used_ports = 0;
|
unsigned int used_ports = 0;
|
||||||
int i;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Walk the connector list instead of the encoder
|
* Walk the connector list instead of the encoder
|
||||||
* list to detect the problem on ddi platforms
|
* list to detect the problem on ddi platforms
|
||||||
* where there's just one encoder per digital port.
|
* where there's just one encoder per digital port.
|
||||||
*/
|
*/
|
||||||
for_each_connector_in_state(state, connector, connector_state, i) {
|
drm_for_each_connector(connector, dev) {
|
||||||
|
struct drm_connector_state *connector_state;
|
||||||
|
struct intel_encoder *encoder;
|
||||||
|
|
||||||
|
connector_state = drm_atomic_get_existing_connector_state(state, connector);
|
||||||
|
if (!connector_state)
|
||||||
|
connector_state = connector->state;
|
||||||
|
|
||||||
if (!connector_state->best_encoder)
|
if (!connector_state->best_encoder)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|||||||
@@ -1381,7 +1381,7 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)
|
|||||||
|
|
||||||
intel_display_power_get(dev_priv, POWER_DOMAIN_GMBUS);
|
intel_display_power_get(dev_priv, POWER_DOMAIN_GMBUS);
|
||||||
|
|
||||||
for (try = 0; !live_status && try < 4; try++) {
|
for (try = 0; !live_status && try < 9; try++) {
|
||||||
if (try)
|
if (try)
|
||||||
msleep(10);
|
msleep(10);
|
||||||
live_status = intel_digital_port_connected(dev_priv,
|
live_status = intel_digital_port_connected(dev_priv,
|
||||||
|
|||||||
@@ -1265,15 +1265,17 @@ static bool cma_protocol_roce(const struct rdma_cm_id *id)
|
|||||||
return cma_protocol_roce_dev_port(device, port_num);
|
return cma_protocol_roce_dev_port(device, port_num);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool cma_match_net_dev(const struct rdma_id_private *id_priv,
|
static bool cma_match_net_dev(const struct rdma_cm_id *id,
|
||||||
const struct net_device *net_dev)
|
const struct net_device *net_dev,
|
||||||
|
u8 port_num)
|
||||||
{
|
{
|
||||||
const struct rdma_addr *addr = &id_priv->id.route.addr;
|
const struct rdma_addr *addr = &id->route.addr;
|
||||||
|
|
||||||
if (!net_dev)
|
if (!net_dev)
|
||||||
/* This request is an AF_IB request or a RoCE request */
|
/* This request is an AF_IB request or a RoCE request */
|
||||||
return addr->src_addr.ss_family == AF_IB ||
|
return (!id->port_num || id->port_num == port_num) &&
|
||||||
cma_protocol_roce(&id_priv->id);
|
(addr->src_addr.ss_family == AF_IB ||
|
||||||
|
cma_protocol_roce_dev_port(id->device, port_num));
|
||||||
|
|
||||||
return !addr->dev_addr.bound_dev_if ||
|
return !addr->dev_addr.bound_dev_if ||
|
||||||
(net_eq(dev_net(net_dev), addr->dev_addr.net) &&
|
(net_eq(dev_net(net_dev), addr->dev_addr.net) &&
|
||||||
@@ -1295,13 +1297,13 @@ static struct rdma_id_private *cma_find_listener(
|
|||||||
hlist_for_each_entry(id_priv, &bind_list->owners, node) {
|
hlist_for_each_entry(id_priv, &bind_list->owners, node) {
|
||||||
if (cma_match_private_data(id_priv, ib_event->private_data)) {
|
if (cma_match_private_data(id_priv, ib_event->private_data)) {
|
||||||
if (id_priv->id.device == cm_id->device &&
|
if (id_priv->id.device == cm_id->device &&
|
||||||
cma_match_net_dev(id_priv, net_dev))
|
cma_match_net_dev(&id_priv->id, net_dev, req->port))
|
||||||
return id_priv;
|
return id_priv;
|
||||||
list_for_each_entry(id_priv_dev,
|
list_for_each_entry(id_priv_dev,
|
||||||
&id_priv->listen_list,
|
&id_priv->listen_list,
|
||||||
listen_list) {
|
listen_list) {
|
||||||
if (id_priv_dev->id.device == cm_id->device &&
|
if (id_priv_dev->id.device == cm_id->device &&
|
||||||
cma_match_net_dev(id_priv_dev, net_dev))
|
cma_match_net_dev(&id_priv_dev->id, net_dev, req->port))
|
||||||
return id_priv_dev;
|
return id_priv_dev;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ int mlx4_ib_destroy_srq(struct ib_srq *srq)
|
|||||||
mlx4_ib_db_unmap_user(to_mucontext(srq->uobject->context), &msrq->db);
|
mlx4_ib_db_unmap_user(to_mucontext(srq->uobject->context), &msrq->db);
|
||||||
ib_umem_release(msrq->umem);
|
ib_umem_release(msrq->umem);
|
||||||
} else {
|
} else {
|
||||||
kfree(msrq->wrid);
|
kvfree(msrq->wrid);
|
||||||
mlx4_buf_free(dev->dev, msrq->msrq.max << msrq->msrq.wqe_shift,
|
mlx4_buf_free(dev->dev, msrq->msrq.max << msrq->msrq.wqe_shift,
|
||||||
&msrq->buf);
|
&msrq->buf);
|
||||||
mlx4_db_free(dev->dev, &msrq->db);
|
mlx4_db_free(dev->dev, &msrq->db);
|
||||||
|
|||||||
@@ -232,6 +232,10 @@ struct phy_info {
|
|||||||
u16 interface_type;
|
u16 interface_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum ocrdma_flags {
|
||||||
|
OCRDMA_FLAGS_LINK_STATUS_INIT = 0x01
|
||||||
|
};
|
||||||
|
|
||||||
struct ocrdma_dev {
|
struct ocrdma_dev {
|
||||||
struct ib_device ibdev;
|
struct ib_device ibdev;
|
||||||
struct ocrdma_dev_attr attr;
|
struct ocrdma_dev_attr attr;
|
||||||
@@ -287,6 +291,7 @@ struct ocrdma_dev {
|
|||||||
atomic_t update_sl;
|
atomic_t update_sl;
|
||||||
u16 pvid;
|
u16 pvid;
|
||||||
u32 asic_id;
|
u32 asic_id;
|
||||||
|
u32 flags;
|
||||||
|
|
||||||
ulong last_stats_time;
|
ulong last_stats_time;
|
||||||
struct mutex stats_lock; /* provide synch for debugfs operations */
|
struct mutex stats_lock; /* provide synch for debugfs operations */
|
||||||
@@ -591,4 +596,9 @@ static inline u8 ocrdma_is_enabled_and_synced(u32 state)
|
|||||||
(state & OCRDMA_STATE_FLAG_SYNC);
|
(state & OCRDMA_STATE_FLAG_SYNC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline u8 ocrdma_get_ae_link_state(u32 ae_state)
|
||||||
|
{
|
||||||
|
return ((ae_state & OCRDMA_AE_LSC_LS_MASK) >> OCRDMA_AE_LSC_LS_SHIFT);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -579,6 +579,8 @@ static int ocrdma_mbx_create_mq(struct ocrdma_dev *dev,
|
|||||||
|
|
||||||
cmd->async_event_bitmap = BIT(OCRDMA_ASYNC_GRP5_EVE_CODE);
|
cmd->async_event_bitmap = BIT(OCRDMA_ASYNC_GRP5_EVE_CODE);
|
||||||
cmd->async_event_bitmap |= BIT(OCRDMA_ASYNC_RDMA_EVE_CODE);
|
cmd->async_event_bitmap |= BIT(OCRDMA_ASYNC_RDMA_EVE_CODE);
|
||||||
|
/* Request link events on this MQ. */
|
||||||
|
cmd->async_event_bitmap |= BIT(OCRDMA_ASYNC_LINK_EVE_CODE);
|
||||||
|
|
||||||
cmd->async_cqid_ringsize = cq->id;
|
cmd->async_cqid_ringsize = cq->id;
|
||||||
cmd->async_cqid_ringsize |= (ocrdma_encoded_q_len(mq->len) <<
|
cmd->async_cqid_ringsize |= (ocrdma_encoded_q_len(mq->len) <<
|
||||||
@@ -819,20 +821,42 @@ static void ocrdma_process_grp5_aync(struct ocrdma_dev *dev,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void ocrdma_process_link_state(struct ocrdma_dev *dev,
|
||||||
|
struct ocrdma_ae_mcqe *cqe)
|
||||||
|
{
|
||||||
|
struct ocrdma_ae_lnkst_mcqe *evt;
|
||||||
|
u8 lstate;
|
||||||
|
|
||||||
|
evt = (struct ocrdma_ae_lnkst_mcqe *)cqe;
|
||||||
|
lstate = ocrdma_get_ae_link_state(evt->speed_state_ptn);
|
||||||
|
|
||||||
|
if (!(lstate & OCRDMA_AE_LSC_LLINK_MASK))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (dev->flags & OCRDMA_FLAGS_LINK_STATUS_INIT)
|
||||||
|
ocrdma_update_link_state(dev, (lstate & OCRDMA_LINK_ST_MASK));
|
||||||
|
}
|
||||||
|
|
||||||
static void ocrdma_process_acqe(struct ocrdma_dev *dev, void *ae_cqe)
|
static void ocrdma_process_acqe(struct ocrdma_dev *dev, void *ae_cqe)
|
||||||
{
|
{
|
||||||
/* async CQE processing */
|
/* async CQE processing */
|
||||||
struct ocrdma_ae_mcqe *cqe = ae_cqe;
|
struct ocrdma_ae_mcqe *cqe = ae_cqe;
|
||||||
u32 evt_code = (cqe->valid_ae_event & OCRDMA_AE_MCQE_EVENT_CODE_MASK) >>
|
u32 evt_code = (cqe->valid_ae_event & OCRDMA_AE_MCQE_EVENT_CODE_MASK) >>
|
||||||
OCRDMA_AE_MCQE_EVENT_CODE_SHIFT;
|
OCRDMA_AE_MCQE_EVENT_CODE_SHIFT;
|
||||||
|
switch (evt_code) {
|
||||||
if (evt_code == OCRDMA_ASYNC_RDMA_EVE_CODE)
|
case OCRDMA_ASYNC_LINK_EVE_CODE:
|
||||||
|
ocrdma_process_link_state(dev, cqe);
|
||||||
|
break;
|
||||||
|
case OCRDMA_ASYNC_RDMA_EVE_CODE:
|
||||||
ocrdma_dispatch_ibevent(dev, cqe);
|
ocrdma_dispatch_ibevent(dev, cqe);
|
||||||
else if (evt_code == OCRDMA_ASYNC_GRP5_EVE_CODE)
|
break;
|
||||||
|
case OCRDMA_ASYNC_GRP5_EVE_CODE:
|
||||||
ocrdma_process_grp5_aync(dev, cqe);
|
ocrdma_process_grp5_aync(dev, cqe);
|
||||||
else
|
break;
|
||||||
|
default:
|
||||||
pr_err("%s(%d) invalid evt code=0x%x\n", __func__,
|
pr_err("%s(%d) invalid evt code=0x%x\n", __func__,
|
||||||
dev->id, evt_code);
|
dev->id, evt_code);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ocrdma_process_mcqe(struct ocrdma_dev *dev, struct ocrdma_mcqe *cqe)
|
static void ocrdma_process_mcqe(struct ocrdma_dev *dev, struct ocrdma_mcqe *cqe)
|
||||||
@@ -1363,7 +1387,8 @@ mbx_err:
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ocrdma_mbx_get_link_speed(struct ocrdma_dev *dev, u8 *lnk_speed)
|
int ocrdma_mbx_get_link_speed(struct ocrdma_dev *dev, u8 *lnk_speed,
|
||||||
|
u8 *lnk_state)
|
||||||
{
|
{
|
||||||
int status = -ENOMEM;
|
int status = -ENOMEM;
|
||||||
struct ocrdma_get_link_speed_rsp *rsp;
|
struct ocrdma_get_link_speed_rsp *rsp;
|
||||||
@@ -1384,8 +1409,11 @@ int ocrdma_mbx_get_link_speed(struct ocrdma_dev *dev, u8 *lnk_speed)
|
|||||||
goto mbx_err;
|
goto mbx_err;
|
||||||
|
|
||||||
rsp = (struct ocrdma_get_link_speed_rsp *)cmd;
|
rsp = (struct ocrdma_get_link_speed_rsp *)cmd;
|
||||||
*lnk_speed = (rsp->pflt_pps_ld_pnum & OCRDMA_PHY_PS_MASK)
|
if (lnk_speed)
|
||||||
>> OCRDMA_PHY_PS_SHIFT;
|
*lnk_speed = (rsp->pflt_pps_ld_pnum & OCRDMA_PHY_PS_MASK)
|
||||||
|
>> OCRDMA_PHY_PS_SHIFT;
|
||||||
|
if (lnk_state)
|
||||||
|
*lnk_state = (rsp->res_lnk_st & OCRDMA_LINK_ST_MASK);
|
||||||
|
|
||||||
mbx_err:
|
mbx_err:
|
||||||
kfree(cmd);
|
kfree(cmd);
|
||||||
@@ -2515,9 +2543,10 @@ static int ocrdma_set_av_params(struct ocrdma_qp *qp,
|
|||||||
ocrdma_cpu_to_le32(&cmd->params.sgid[0], sizeof(cmd->params.sgid));
|
ocrdma_cpu_to_le32(&cmd->params.sgid[0], sizeof(cmd->params.sgid));
|
||||||
cmd->params.vlan_dmac_b4_to_b5 = mac_addr[4] | (mac_addr[5] << 8);
|
cmd->params.vlan_dmac_b4_to_b5 = mac_addr[4] | (mac_addr[5] << 8);
|
||||||
|
|
||||||
if (vlan_id < 0x1000) {
|
if (vlan_id == 0xFFFF)
|
||||||
if (dev->pfc_state) {
|
vlan_id = 0;
|
||||||
vlan_id = 0;
|
if (vlan_id || dev->pfc_state) {
|
||||||
|
if (!vlan_id) {
|
||||||
pr_err("ocrdma%d:Using VLAN with PFC is recommended\n",
|
pr_err("ocrdma%d:Using VLAN with PFC is recommended\n",
|
||||||
dev->id);
|
dev->id);
|
||||||
pr_err("ocrdma%d:Using VLAN 0 for this connection\n",
|
pr_err("ocrdma%d:Using VLAN 0 for this connection\n",
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user