Linux 4.4.162
Greg KH
maintainerI'm announcing the release of the 4.4.162 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/devicetree/bindings/net/macb.txt | 1 Documentation/kernel-parameters.txt | 5 - Makefile | 2 arch/arc/Makefile | 14 --- arch/arm/boot/dts/sama5d3_emac.dtsi | 2 arch/powerpc/kernel/tm.S | 20 ++++ arch/x86/crypto/crc32c-intel_glue.c | 17 ---- arch/x86/include/asm/cpufeatures.h | 1 arch/x86/include/asm/fpu/internal.h | 37 --------- arch/x86/include/asm/fpu/types.h | 34 -------- arch/x86/include/asm/kvm_host.h | 1 arch/x86/kernel/fpu/core.c | 41 +-------- arch/x86/kernel/fpu/signal.c | 8 - arch/x86/kvm/cpuid.c | 5 - arch/x86/kvm/x86.c | 10 -- drivers/clocksource/timer-ti-32k.c | 3 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 2 drivers/hv/hv_fcopy.c | 2 drivers/hv/hv_kvp.c | 40 +++++++++ drivers/hv/hv_snapshot.c | 4 drivers/hv/hv_util.c | 1 drivers/hv/hyperv_vmbus.h | 5 + drivers/i2c/busses/i2c-scmi.c | 1 drivers/input/keyboard/atakbd.c | 74 ++++++------------ drivers/media/usb/dvb-usb-v2/af9035.c | 6 - drivers/mfd/omap-usb-host.c | 11 +- drivers/net/bonding/bond_main.c | 43 ++++------ drivers/net/ethernet/broadcom/bcmsysport.c | 22 ++--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 13 ++- drivers/net/ethernet/cadence/macb.c | 8 + drivers/net/ethernet/marvell/mvpp2.c | 10 +- drivers/net/ethernet/mellanox/mlx4/eq.c | 3 drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 8 + drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 3 drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h | 3 drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.h | 3 drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 12 +- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 5 - drivers/net/team/team.c | 5 + drivers/net/usb/smsc75xx.c | 1 drivers/usb/gadget/function/u_serial.c | 2 drivers/usb/host/xhci-hub.c | 18 ++-- drivers/video/fbdev/aty/atyfb.h | 3 drivers/video/fbdev/aty/atyfb_base.c | 7 - drivers/video/fbdev/aty/mach64_ct.c | 10 +- fs/ext4/xattr.c | 22 +++-- fs/jffs2/xattr.c | 6 - include/linux/hyperv.h | 1 include/linux/netdevice.h | 7 + include/net/bonding.h | 7 - include/net/ip_fib.h | 1 mm/vmstat.c | 1 net/core/dev.c | 28 ++++++ net/core/rtnetlink.c | 6 + net/ipv4/fib_frontend.c | 12 +- net/ipv4/fib_semantics.c | 50 ++++++++++++ net/ipv4/ip_sockglue.c | 3 net/ipv4/ip_tunnel.c | 9 ++ net/ipv6/addrconf.c | 4 net/ipv6/ip6_tunnel.c | 13 ++- net/netlabel/netlabel_unlabeled.c | 3 sound/hda/hdac_controller.c | 8 + sound/soc/codecs/sigmadsp.c | 3 sound/soc/codecs/wm8804-i2c.c | 15 +++ tools/perf/scripts/python/export-to-postgresql.py | 9 ++ tools/testing/selftests/efivarfs/config | 1 66 files changed, 396 insertions(+), 339 deletions(-)
Adrian Hunter (1):
perf script python: Fix export-to-postgresql.py occasional failure
Alexey Brodkin (1):
ARC: build: Get rid of toolchain check
Amber Lin (1):
drm/amdgpu: Fix SDMA HQD destroy error on gfx_v7
Andreas Schwab (1):
Input: atakbd - fix Atari keymap
Andy Lutomirski (2):
x86/fpu: Remove use_eager_fpu()
x86/fpu: Finish excising 'eagerfpu'
Danny Smith (1):
ASoC: sigmadsp: safeload should not have lower byte limit
Edgar Cherkasov (1):
i2c: i2c-scmi: fix for i2c_smbus_write_block_data
Eric Dumazet (2):
ipv4: fix use-after-free in ip_cmsg_recv_dstaddr()
rtnl: limit IFLA_NUM_TX_QUEUES and IFLA_NUM_RX_QUEUES to 4096
Florian Fainelli (1):
net: systemport: Fix wake-up interrupt race during resume
Greg Kroah-Hartman (1):
Linux 4.4.162
Hou Tao (1):
jffs2: return -ERANGE when xattr buffer is too small
Ido Schimmel (1):
team: Forbid enslaving team device to itself
Jann Horn (1):
mm/vmstat.c: fix outdated vmstat_text
Jeff Barnhill (1):
net/ipv6: Display all addresses in output of /proc/net/if_inet6
Jongsung Kim (1):
stmmac: fix valid numbers of unicast filter entries
Jozef Balga (1):
media: af9035: prevent buffer overflow on write
K. Y. Srinivasan (2):
Drivers: hv: utils: Invoke the poll function after handshake
Drivers: hv: util: Pass the channel information during the init call
Keerthy (1):
clocksource/drivers/ti-32k: Add CLOCK_SOURCE_SUSPEND_NONSTOP flag for non-am43 SoCs
Lei Yang (1):
selftests/efivarfs: add required kernel configs
Long Li (1):
HV: properly delay KVP packets when negotiation is in progress
Mahesh Bandewar (1):
bonding: avoid possible dead-lock
Mathias Nyman (1):
xhci: Don't print a warning when setting link state for disabled ports
Maxime Chevallier (1):
net: mvpp2: Extract the correct ethtype from the skb for tx csum offload
Michael Chan (1):
bnxt_en: Fix TX timeout during netpoll.
Michael Neuling (2):
powerpc/tm: Fix userspace r13 corruption powerpc/tm: Avoid possible userspace r1 corruption on reclaim
Michael Schmitz (1):
Input: atakbd - fix Atari CapsLock behaviour
Mikulas Patocka (1):
mach64: detect the dot clock divider correctly on sparc
Nathan Chancellor (1):
net/mlx4: Use cpumask_available for eq->affinity_mask
Nicolas Ferre (2):
net: macb: disable scatter-gather for macb on sama5d3
ARM: dts: at91: add new compatibility string for macb on sama5d3
Paolo Abeni (2):
ip6_tunnel: be careful when accessing the inner header
ip_tunnel: be careful when accessing the inner header
Paolo Bonzini (1):
KVM: x86: remove eager_fpu field of struct kvm_vcpu_arch
Pierre-Louis Bossart (1):
ASoC: wm8804: Add ACPI support
Rik van Riel (1):
x86/fpu: Remove struct fpu::counter
Sabrina Dubroca (1):
net: ipv4: update fnhe_pmtu when first hop's MTU changes
Sean Tranchetti (1):
netlabel: check for IPV4MASK in addrinfo_get
Shahed Shaikh (1):
qlcnic: fix Tx descriptor corruption on 82xx devices
Stephen Warren (1):
usb: gadget: serial: fix oops when data rx'd after close
Theodore Ts'o (1):
ext4: add corruption check in ext4_xattr_set_entry()
Tony Lindgren (1):
mfd: omap-usb-host: Fix dts probe of children
Vitaly Kuznetsov (1):
Drivers: hv: kvp: fix IP Failover
Yu Zhao (2):
sound: enable interrupt after dma buffer initialization net/usb: cancel pending work when unbinding smsc75xx
Greg KH
maintainerDocumentation/devicetree/bindings/net/macb.txt +1 -0
@@ -8,6 +8,7 @@ Required properties: Use "cdns,pc302-gem" for Picochip picoXcell pc302 and later devices based on the Cadence GEM, or the generic form: "cdns,gem". Use "atmel,sama5d2-gem" for the GEM IP (10/100) available on Atmel sama5d2 SoCs. + Use "atmel,sama5d3-macb" for the 10/100Mbit IP available on Atmel sama5d3 SoCs. Use "atmel,sama5d3-gem" for the Gigabit IP available on Atmel sama5d3 SoCs. Use "atmel,sama5d4-gem" for the GEM IP (10/100) available on Atmel sama5d4 SoCs. Use "cdns,zynqmp-gem" for Zynq Ultrascale+ MPSoC.
Documentation/kernel-parameters.txt +0 -5
@@ -961,11 +961,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. See Documentation/x86/intel_mpx.txt for more information about the feature. - eagerfpu= [X86] - on enable eager fpu restore - off disable eager fpu restore - auto selects the default scheme, which automatically - enables eagerfpu restore for xsaveopt. module.async_probe [KNL] Enable asynchronous probe on this module.
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 161 +SUBLEVEL = 162 EXTRAVERSION = NAME = Blurry Fish Butt
arch/arc/Makefile +0 -14
@@ -18,20 +18,6 @@ cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__ cflags-$(CONFIG_ISA_ARCOMPACT) += -mA7 cflags-$(CONFIG_ISA_ARCV2) += -mcpu=archs -is_700 = $(shell $(CC) -dM -E - < /dev/null | grep -q "ARC700" && echo 1 || echo 0) - -ifdef CONFIG_ISA_ARCOMPACT -ifeq ($(is_700), 0) - $(error Toolchain not configured for ARCompact builds) -endif -endif - -ifdef CONFIG_ISA_ARCV2 -ifeq ($(is_700), 1) - $(error Toolchain not configured for ARCv2 builds) -endif -endif - ifdef CONFIG_ARC_CURR_IN_REG # For a global register defintion, make sure it gets passed to every file # We had a customer reported bug where some code built in kernel was NOT using
arch/arm/boot/dts/sama5d3_emac.dtsi +1 -1
@@ -41,7 +41,7 @@ }; macb1: ethernet@f802c000 { - compatible = "cdns,at91sam9260-macb", "cdns,macb"; + compatible = "atmel,sama5d3-macb", "cdns,at91sam9260-macb", "cdns,macb"; reg = <0xf802c000 0x100>; interrupts = <35 IRQ_TYPE_LEVEL_HIGH 3>; pinctrl-names = "default";
arch/powerpc/kernel/tm.S +17 -3
@@ -199,13 +199,27 @@ dont_backup_fp: std r1, PACATMSCRATCH(r13) ld r1, PACAR1(r13) - /* Store the PPR in r11 and reset to decent value */ std r11, GPR11(r1) /* Temporary stash */ + /* + * Move the saved user r1 to the kernel stack in case PACATMSCRATCH is + * clobbered by an exception once we turn on MSR_RI below. + */ + ld r11, PACATMSCRATCH(r13) + std r11, GPR1(r1) + + /* + * Store r13 away so we can free up the scratch SPR for the SLB fault + * handler (needed once we start accessing the thread_struct). + */ + GET_SCRATCH0(r11) + std r11, GPR13(r1) + /* Reset MSR RI so we can take SLB faults again */ li r11, MSR_RI mtmsrd r11, 1 + /* Store the PPR in r11 and reset to decent value */ mfspr r11, SPRN_PPR HMT_MEDIUM
@@ -230,11 +244,11 @@ dont_backup_fp: SAVE_GPR(8, r7) /* user r8 */ SAVE_GPR(9, r7) /* user r9 */ SAVE_GPR(10, r7) /* user r10 */ - ld r3, PACATMSCRATCH(r13) /* user r1 */ + ld r3, GPR1(r1) /* user r1 */ ld r4, GPR7(r1) /* user r7 */ ld r5, GPR11(r1) /* user r11 */ ld r6, GPR12(r1) /* user r12 */ - GET_SCRATCH0(8) /* user r13 */ + ld r8, GPR13(r1) /* user r13 */ std r3, GPR1(r7) std r4, GPR7(r7) std r5, GPR11(r7)
arch/x86/crypto/crc32c-intel_glue.c +4 -13
@@ -48,21 +48,13 @@#ifdef CONFIG_X86_64 /* * use carryless multiply version of crc32c when buffer -* size is >= 512 (when eager fpu is enabled) or -* >= 1024 (when eager fpu is disabled) to account +* size is >= 512 to account * for fpu state save/restore overhead. */ -#define CRC32C_PCL_BREAKEVEN_EAGERFPU 512 -#define CRC32C_PCL_BREAKEVEN_NOEAGERFPU 1024 +#define CRC32C_PCL_BREAKEVEN 512 asmlinkage unsigned int crc_pcl(const u8 *buffer, int len,unsigned int crc_init); -static int crc32c_pcl_breakeven =CRC32C_PCL_BREAKEVEN_EAGERFPU ; -#define set_pcl_breakeven_point () \ -do { \ - if (!use_eager_fpu()) \ - crc32c_pcl_breakeven = CRC32C_PCL_BREAKEVEN_NOEAGERFPU; \ -} while (0)#endif /* CONFIG_X86_64 */ static u32 crc32c_intel_le_hw_byte (u32 crc,unsigned char const *data,size_t length)
@@ -185,7 +177,7 @@ static int crc32c_pcl_intel_update(struct shash_desc *desc, const u8 *data,* use faster PCL version if datasize is large enough to * overcome kernel fpu state save/restore overhead */ -if (len >= crc32c_pcl_breakeven &&irq_fpu_usable ()) { +if (len >=CRC32C_PCL_BREAKEVEN &&irq_fpu_usable ()) {kernel_fpu_begin (); *crcp =crc_pcl (data, len, *crcp);kernel_fpu_end ();
@@ -197,7 +189,7 @@ static int crc32c_pcl_intel_update(struct shash_desc *desc, const u8 *data,static int __crc32c_pcl_intel_finup (u32 *crcp,const u8 *data,unsigned int len,u8 *out) { -if (len >= crc32c_pcl_breakeven &&irq_fpu_usable ()) { +if (len >=CRC32C_PCL_BREAKEVEN &&irq_fpu_usable ()) {kernel_fpu_begin (); *(__le32 *)out = ~cpu_to_le32 (crc_pcl (data, len, *crcp));kernel_fpu_end ();
@@ -256,7 +248,6 @@ static int __init crc32c_intel_mod_init(void) alg.update = crc32c_pcl_intel_update; alg.finup = crc32c_pcl_intel_finup; alg.digest = crc32c_pcl_intel_digest; - set_pcl_breakeven_point(); }#endif return crypto_register_shash (&alg);
arch/x86/include/asm/cpufeatures.h +0 -1
@@ -104,7 +104,6 @@#define X86_FEATURE_EXTD_APICID ( 3*32+26)/* has extended APICID (8 bits) */ #define X86_FEATURE_AMD_DCM ( 3*32+27)/* multi-node processor */ #define X86_FEATURE_APERFMPERF ( 3*32+28)/* APERFMPERF */ -/* free, was #define X86_FEATURE_EAGER_FPU ( 3*32+29) * "eagerfpu" Non lazy FPU restore */ #define X86_FEATURE_NONSTOP_TSC_S3 ( 3*32+30)/* TSC doesn't stop in S3 state */ /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
arch/x86/include/asm/fpu/internal.h +1 -36
@@ -57,11 +57,6 @@ extern u64 fpu__get_supported_xfeatures_mask(void);/* * FPU related CPU feature flag helper routines: */ -static __always_inline __pure bool use_eager_fpu(void) -{ -return true; -} - static __always_inline __pure bool use_xsaveopt(void) {return static_cpu_has (X86_FEATURE_XSAVEOPT );
@@ -498,24 +493,6 @@ static inline int fpu_want_lazy_restore(struct fpu *fpu, unsigned int cpu) } -/* -* Wrap lazy FPU TS handling in a 'hw fpregs activation/deactivation' -* idiom, which is then paired with the sw-flag (fpregs_active) later on: -*/ - -static inline void __fpregs_activate_hw (void ) -{ -if (!use_eager_fpu ()) -clts (); -} - -static inline void __fpregs_deactivate_hw (void ) -{ -if (!use_eager_fpu ()) -stts (); -} - -/* Must be paired with an 'stts' (fpregs_deactivate_hw()) after! */ static inline void __fpregs_deactivate (struct fpu *fpu) {WARN_ON_FPU (!fpu->fpregs_active);
@@ -524,7 +501,6 @@ static inline void __fpregs_deactivate(struct fpu *fpu)this_cpu_write (fpu_fpregs_owner_ctx,NULL ); } -/* Must be paired with a 'clts' (fpregs_activate_hw()) before! */ static inline void __fpregs_activate (struct fpu *fpu) {WARN_ON_FPU (fpu->fpregs_active);
@@ -549,22 +525,17 @@ static inline int fpregs_active(void) }/* -* Encapsulate the CR0.TS handling together with the -* software flag. -* * These generally need preemption protection to work, * do try to avoid using these on their own. */ static inline void fpregs_activate (struct fpu *fpu) { -__fpregs_activate_hw ();__fpregs_activate (fpu); }static inline void fpregs_deactivate (struct fpu *fpu) {__fpregs_deactivate (fpu); -__fpregs_deactivate_hw (); }/*
@@ -591,8 +562,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu)* or if the past 5 consecutive context-switches used math. */ fpu.preload =static_cpu_has (X86_FEATURE_FPU ) && - new_fpu->fpstate_active && - (use_eager_fpu () || new_fpu->counter >5 ); + new_fpu->fpstate_active;if (old_fpu->fpregs_active) {if (!copy_fpregs_to_fpstate (old_fpu))
@@ -605,17 +575,12 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu)/* Don't change CR0.TS if we just switch! */ if (fpu.preload) { - new_fpu->counter++;__fpregs_activate (new_fpu);prefetch (&new_fpu->state); - }else { -__fpregs_deactivate_hw (); } }else { - old_fpu->counter =0 ; old_fpu->last_cpu =-1 ;if (fpu.preload) { - new_fpu->counter++;if (fpu_want_lazy_restore (new_fpu, cpu)) fpu.preload =0 ;else
arch/x86/include/asm/fpu/types.h +0 -34
@@ -302,17 +302,6 @@ struct fpu {*/ unsigned char fpregs_active; -/* -* @counter: -* -* This counter contains the number of consecutive context switches -* during which the FPU stays used. If this is over a threshold, the -* lazy FPU restore logic becomes eager, to save the trap overhead. -* This is an unsigned char so that after 256 iterations the counter -* wraps and the context switch behavior turns lazy again; this is to -* deal with bursty apps that only use the FPU for a short time: -*/ -unsigned char counter;/* * @state: *
@@ -321,29 +310,6 @@ struct fpu {* the registers in the FPU are more recent than this state * copy. If the task context-switches away then they get * saved here and represent the FPU state. -* -* After context switches there may be a (short) time period -* during which the in-FPU hardware registers are unchanged -* and still perfectly match this state, if the tasks -* scheduled afterwards are not using the FPU. -* -* This is the 'lazy restore' window of optimization, which -* we track though 'fpu_fpregs_owner_ctx' and 'fpu->last_cpu'. -* -* We detect whether a subsequent task uses the FPU via setting -* CR0::TS to 1, which causes any FPU use to raise a #NM fault. -* -* During this window, if the task gets scheduled again, we -* might be able to skip having to do a restore from this -* memory buffer to the hardware registers - at the cost of -* incurring the overhead of #NM fault traps. -* -* Note that on modern CPUs that support the XSAVEOPT (or other -* optimized XSAVE instructions), we don't use #NM traps anymore, -* as the hardware can track whether FPU registers need saving -* or not. On such CPUs we activate the non-lazy ('eagerfpu') -* logic, which unconditionally saves/restores all FPU state -* across context switches. (if FPU state exists.) */ union fpregs_state state;/*
arch/x86/include/asm/kvm_host.h +0 -1
@@ -439,7 +439,6 @@ struct kvm_vcpu_arch {struct kvm_mmu_memory_cache mmu_page_header_cache;struct fpu guest_fpu; -bool eager_fpu;u64 xcr0;u64 guest_supported_xcr0;u32 guest_xstate_size;
arch/x86/kernel/fpu/core.c +5 -36
103 lines not on this page · raw message
arch/x86/kernel/fpu/signal.c +3 -5
@@ -319,11 +319,9 @@ static int __fpu__restore_sig(void __user *buf, void __user *buf_fx, int size) } fpu->fpstate_active =1 ; -if (use_eager_fpu ()) { -preempt_disable (); -fpu__restore (fpu); -preempt_enable (); - } +preempt_disable (); +fpu__restore (fpu); +preempt_enable ();return err; }else {
arch/x86/kvm/cpuid.c +1 -4
@@ -16,7 +16,6 @@#include <linux/module.h> #include <linux/vmalloc.h> #include <linux/uaccess.h> -#include <asm/fpu/internal.h> /* For use_eager_fpu. Ugh! */ #include <asm/user.h> #include <asm/fpu/xstate.h> #include "cpuid.h"
@@ -104,9 +103,7 @@ int kvm_update_cpuid(struct kvm_vcpu *vcpu)if (best && (best->eax & (F (XSAVES ) |F (XSAVEC )))) best->ebx =xstate_required_size (vcpu->arch.xcr0, true); - vcpu->arch.eager_fpu =use_eager_fpu (); -if (vcpu->arch.eager_fpu) - kvm_x86_ops->fpu_activate (vcpu); + kvm_x86_ops->fpu_activate (vcpu);/* * The existing code assumes virtual address is 48-bit in the canonical
arch/x86/kvm/x86.c +0 -10
@@ -7319,16 +7319,6 @@ void kvm_put_guest_fpu(struct kvm_vcpu *vcpu)copy_fpregs_to_fpstate (&vcpu->arch.guest_fpu);__kernel_fpu_end (); ++vcpu->stat.fpu_reload; -/* -* If using eager FPU mode, or if the guest is a frequent user -* of the FPU, just leave the FPU active for next time. -* Every 255 times fpu_counter rolls over to 0; a guest that uses -* the FPU in bursts will revert to loading it on demand. -*/ -if (!vcpu->arch.eager_fpu) { -if (++vcpu->fpu_counter <5 ) -kvm_make_request (KVM_REQ_DEACTIVATE_FPU , vcpu); - }trace_kvm_fpu (0 ); }
drivers/clocksource/timer-ti-32k.c +3 -0
@@ -98,6 +98,9 @@ static void __init ti_32k_timer_init(struct device_node *np)return ; } +if (!of_machine_is_compatible ("ti,am43" )) + ti_32k_timer.cs.flags |=CLOCK_SOURCE_SUSPEND_NONSTOP ; + ti_32k_timer.counter = ti_32k_timer.base;/*
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c +1 -1
@@ -504,7 +504,7 @@ static int kgd_hqd_sdma_destroy(struct kgd_dev *kgd, void *mqd,while (true) { temp =RREG32 (sdma_base_addr + mmSDMA0_RLC0_CONTEXT_STATUS); -if (temp &SDMA0_STATUS_REG__RB_CMD_IDLE__SHIFT ) +if (temp &SDMA0_RLC0_CONTEXT_STATUS__IDLE_MASK )break ;if (timeout ==0 )return -ETIME ;
drivers/hv/hv_fcopy.c +1 -1
@@ -256,7 +256,6 @@ void hv_fcopy_onchannelcallback(void *context)*/ fcopy_transaction.recv_len = recvlen; - fcopy_transaction.recv_channel = channel; fcopy_transaction.recv_req_id = requestid; fcopy_transaction.fcopy_msg = fcopy_msg;
@@ -323,6 +322,7 @@ static void fcopy_on_reset(void)int hv_fcopy_init (struct hv_util_service *srv) { recv_buffer = srv->recv_buffer; + fcopy_transaction.recv_channel = srv->channel;init_completion (&release_event);/*
drivers/hv/hv_kvp.c +37 -3
@@ -78,9 +78,11 @@ static void kvp_send_key(struct work_struct *dummy);static void kvp_respond_to_host (struct hv_kvp_msg *msg,int error);static void kvp_timeout_func (struct work_struct *dummy); +static void kvp_host_handshake_func (struct work_struct *dummy);static void kvp_register (int ); static DECLARE_DELAYED_WORK(kvp_timeout_work, kvp_timeout_func); +static DECLARE_DELAYED_WORK(kvp_host_handshake_work, kvp_host_handshake_func); static DECLARE_WORK(kvp_sendkey_work, kvp_send_key);static const char kvp_devname[] ="vmbus/hv_kvp" ;
@@ -131,6 +133,11 @@ static void kvp_timeout_func(struct work_struct *dummy)hv_poll_channel (kvp_transaction.recv_channel, kvp_poll_wrapper); } +static void kvp_host_handshake_func (struct work_struct *dummy) +{ +hv_poll_channel (kvp_transaction.recv_channel, hv_kvp_onchannelcallback); +} +static int kvp_handle_handshake (struct hv_kvp_msg *msg) {switch (msg->kvp_hdr.operation) {
@@ -155,7 +162,13 @@ static int kvp_handle_handshake(struct hv_kvp_msg *msg)pr_debug ("KVP: userspace daemon ver. %d registered\n" ,KVP_OP_REGISTER );kvp_register (dm_reg_value); - kvp_transaction.state =HVUTIL_READY ; + +/* +* If we're still negotiating with the host cancel the timeout +* work to not poll the channel twice. +*/ +cancel_delayed_work_sync (&kvp_host_handshake_work); +hv_poll_channel (kvp_transaction.recv_channel, kvp_poll_wrapper);return 0 ; }
@@ -595,10 +608,26 @@ void hv_kvp_onchannelcallback(void *context)struct icmsg_negotiate *negop =NULL ;int util_fw_version;int kvp_srv_version; +static enum {NEGO_NOT_STARTED , +NEGO_IN_PROGRESS , +NEGO_FINISHED } host_negotiatied =NEGO_NOT_STARTED ; +if (kvp_transaction.state <HVUTIL_READY ) { +/* +* If userspace daemon is not connected and host is asking +* us to negotiate we need to delay to not lose messages. +* This is important for Failover IP setting. +*/ +if (host_negotiatied ==NEGO_NOT_STARTED ) { + host_negotiatied =NEGO_IN_PROGRESS ; +schedule_delayed_work (&kvp_host_handshake_work, +HV_UTIL_NEGO_TIMEOUT *HZ ); + } +return ; + }if (kvp_transaction.state >HVUTIL_READY )return ; - +recheck:vmbus_recvpacket (channel, recv_buffer,PAGE_SIZE *4 , &recvlen, &requestid);
@@ -640,7 +669,6 @@ void hv_kvp_onchannelcallback(void *context)*/ kvp_transaction.recv_len = recvlen; - kvp_transaction.recv_channel = channel; kvp_transaction.recv_req_id = requestid; kvp_transaction.kvp_msg = kvp_msg;
@@ -674,6 +702,10 @@ void hv_kvp_onchannelcallback(void *context)vmbus_sendpacket (channel, recv_buffer, recvlen, requestid,VM_PKT_DATA_INBAND ,0 ); + + host_negotiatied =NEGO_FINISHED ; + + goto recheck; } }
@@ -690,6 +722,7 @@ int hv_kvp_init(struct hv_util_service *srv) { recv_buffer = srv->recv_buffer; + kvp_transaction.recv_channel = srv->channel;init_completion (&release_event);/*
@@ -711,6 +744,7 @@ hv_kvp_init(struct hv_util_service *srv)void hv_kvp_deinit (void ) { kvp_transaction.state =HVUTIL_DEVICE_DYING ; +cancel_delayed_work_sync (&kvp_host_handshake_work);cancel_delayed_work_sync (&kvp_timeout_work);cancel_work_sync (&kvp_sendkey_work);hvutil_transport_destroy (hvt);
drivers/hv/hv_snapshot.c +2 -2
@@ -114,7 +114,7 @@ static int vss_handle_handshake(struct hv_vss_msg *vss_msg)default :return -EINVAL ; } - vss_transaction.state =HVUTIL_READY ; +hv_poll_channel (vss_transaction.recv_channel, vss_poll_wrapper);pr_debug ("VSS: userspace daemon ver. %d registered\n" , dm_reg_value);return 0 ; }
@@ -264,7 +264,6 @@ void hv_vss_onchannelcallback(void *context)*/ vss_transaction.recv_len = recvlen; - vss_transaction.recv_channel = channel; vss_transaction.recv_req_id = requestid; vss_transaction.msg = (struct hv_vss_msg *)vss_msg;
@@ -340,6 +339,7 @@ hv_vss_init(struct hv_util_service *srv)return -ENOTSUPP ; } recv_buffer = srv->recv_buffer; + vss_transaction.recv_channel = srv->channel;/* * When this driver loads, the user level daemon that
drivers/hv/hv_util.c +1 -0
@@ -326,6 +326,7 @@ static int util_probe(struct hv_device *dev, srv->recv_buffer =kmalloc (PAGE_SIZE *4 ,GFP_KERNEL );if (!srv->recv_buffer)return -ENOMEM ; + srv->channel = dev->channel;if (srv->util_init) { ret = srv->util_init (srv);if (ret) {
drivers/hv/hyperv_vmbus.h +5 -0
@@ -35,6 +35,11 @@*/ #define HV_UTIL_TIMEOUT 30 +/* +* Timeout for guest-host handshake for services. +*/ +#define HV_UTIL_NEGO_TIMEOUT 60 +/* * The below CPUID leaves are present if VersionAndFeatures.HypervisorPresent * is set by CPUID(HVCPUID_VERSION_FEATURES).
drivers/i2c/busses/i2c-scmi.c +1 -0
@@ -152,6 +152,7 @@ acpi_smbus_cmi_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, mt_params[3 ].type =ACPI_TYPE_INTEGER ; mt_params[3 ].integer.value = len; mt_params[4 ].type =ACPI_TYPE_BUFFER ; + mt_params[4 ].buffer.length = len; mt_params[4 ].buffer.pointer = data->block +1 ; }break ;
drivers/input/keyboard/atakbd.c +28 -46
111 lines not on this page · raw message
drivers/media/usb/dvb-usb-v2/af9035.c +4 -2
@@ -389,8 +389,10 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap, msg[0].addr == (state->af9033_i2c_addr[1] >> 1)) reg |=0x100000 ; - ret =af9035_wr_regs (d, reg, &msg[0 ].buf[3 ], - msg[0 ].len -3 ); + ret = (msg[0 ].len >=3 ) ?af9035_wr_regs (d, reg, + &msg[0 ].buf[3 ], + msg[0 ].len -3 ) + : -EOPNOTSUPP ; }else {/* I2C write */ u8 buf[MAX_XFER_SIZE ];
drivers/mfd/omap-usb-host.c +6 -5
@@ -548,8 +548,8 @@ static int usbhs_omap_get_dt_pdata(struct device *dev, }static const struct of_device_id usbhs_child_match_table[] = { - { .compatible ="ti,omap-ehci" , }, - { .compatible ="ti,omap-ohci" , }, + { .compatible ="ti,ehci-omap" , }, + { .compatible ="ti,ohci-omap3" , }, { } };
@@ -875,6 +875,7 @@ static struct platform_driver usbhs_omap_driver = { .pm = &usbhsomap_dev_pm_ops, .of_match_table = usbhs_omap_dt_ids, }, + .probe = usbhs_omap_probe, .remove = usbhs_omap_remove, };
@@ -884,9 +885,9 @@ MODULE_ALIAS("platform:" USBHS_DRIVER_NAME);MODULE_LICENSE ("GPL v2" );MODULE_DESCRIPTION ("usb host common core driver for omap EHCI and OHCI" ); -static int __init omap_usbhs_drvinit (void ) +static int omap_usbhs_drvinit (void ) { -return platform_driver_probe (&usbhs_omap_driver, usbhs_omap_probe); +return platform_driver_register (&usbhs_omap_driver); }/*
@@ -898,7 +899,7 @@ static int __init omap_usbhs_drvinit(void)*/ fs_initcall_sync (omap_usbhs_drvinit); -static void __exit omap_usbhs_drvexit(void) +static void omap_usbhs_drvexit (void ) {platform_driver_unregister (&usbhs_omap_driver); }
drivers/net/bonding/bond_main.c +17 -26
74 lines not on this page · raw message
drivers/net/ethernet/broadcom/bcmsysport.c +11 -11
@@ -850,14 +850,22 @@ static void bcm_sysport_resume_from_wol(struct bcm_sysport_priv *priv) {u32 reg; -/* Stop monitoring MPD interrupt */ -intrl2_0_mask_set (priv,INTRL2_0_MPD ); -/* Clear the MagicPacket detection logic */ reg =umac_readl (priv,UMAC_MPD_CTRL ); reg &= ~MPD_EN ;umac_writel (priv, reg,UMAC_MPD_CTRL ); + reg =intrl2_0_readl (priv,INTRL2_CPU_STATUS ); +if (reg &INTRL2_0_MPD ) +netdev_info (priv->netdev,"Wake-on-LAN (MPD) interrupt!\n" ); + +if (reg &INTRL2_0_BRCM_MATCH_TAG ) { + reg =rxchk_readl (priv,RXCHK_BRCM_TAG_MATCH_STATUS ) & +RXCHK_BRCM_TAG_MATCH_MASK ; +netdev_info (priv->netdev, +"Wake-on-LAN (filters 0x%02x) interrupt!\n" , reg); + } +netif_dbg (priv, wol, priv->netdev,"resumed from WOL\n" ); }
@@ -890,11 +898,6 @@ static irqreturn_t bcm_sysport_rx_isr(int irq, void *dev_id)if (priv->irq0_stat &INTRL2_0_TX_RING_FULL )bcm_sysport_tx_reclaim_all (priv); -if (priv->irq0_stat &INTRL2_0_MPD ) { -netdev_info (priv->netdev,"Wake-on-LAN interrupt!\n" ); -bcm_sysport_resume_from_wol (priv); - } -return IRQ_HANDLED ; }
@@ -1915,9 +1918,6 @@ static int bcm_sysport_suspend_to_wol(struct bcm_sysport_priv *priv)/* UniMAC receive needs to be turned on */ umac_enable_set (priv,CMD_RX_EN ,1 ); -/* Enable the interrupt wake-up source */ -intrl2_0_mask_clear (priv,INTRL2_0_MPD ); -netif_dbg (priv, wol, ndev,"entered WOL mode\n" );return 0 ;
drivers/net/ethernet/broadcom/bnxt/bnxt.c +10 -3
@@ -1343,8 +1343,11 @@ static int bnxt_poll_work(struct bnxt *bp, struct bnxt_napi *bnapi, int budget)if (TX_CMP_TYPE (txcmp) ==CMP_TYPE_TX_L2_CMP ) { tx_pkts++;/* return full budget so NAPI will complete. */ -if (unlikely (tx_pkts > bp->tx_wake_thresh)) +if (unlikely (tx_pkts > bp->tx_wake_thresh)) { rx_pkts = budget; + raw_cons =NEXT_RAW_CMP (raw_cons); +break ; + } }else if ((TX_CMP_TYPE (txcmp) &0x30 ) ==0x10 ) { rc =bnxt_rx_pkt (bp, bnapi, &raw_cons, &agg_event);if (likely (rc >=0 ))
@@ -1362,7 +1365,7 @@ static int bnxt_poll_work(struct bnxt *bp, struct bnxt_napi *bnapi, int budget) } raw_cons =NEXT_RAW_CMP (raw_cons); -if (rx_pkts == budget) +if (rx_pkts && rx_pkts == budget)break ; }
@@ -1404,8 +1407,12 @@ static int bnxt_poll(struct napi_struct *napi, int budget)while (1 ) { work_done +=bnxt_poll_work (bp, bnapi, budget - work_done); -if (work_done >= budget) +if (work_done >= budget) { +if (!budget) +BNXT_CP_DB_REARM (cpr->cp_doorbell, + cpr->cp_raw_cons);break ; + }if (!bnxt_has_work (bp, cpr)) {napi_complete (napi);
drivers/net/ethernet/cadence/macb.c +8 -0
@@ -2743,6 +2743,13 @@ static const struct macb_config at91sam9260_config = { .init = macb_init, }; +static const struct macb_config sama5d3macb_config = { + .caps =MACB_CAPS_SG_DISABLED + |MACB_CAPS_USRIO_HAS_CLKEN |MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII , + .clk_init = macb_clk_init, + .init = macb_init, +}; +static const struct macb_config pc302gem_config = { .caps =MACB_CAPS_SG_DISABLED |MACB_CAPS_GIGABIT_MODE_AVAILABLE , .dma_burst_length =16 ,
@@ -2801,6 +2808,7 @@ static const struct of_device_id macb_dt_ids[] = { { .compatible = "cdns,gem", .data = &pc302gem_config }, { .compatible = "atmel,sama5d2-gem", .data = &sama5d2_config }, { .compatible = "atmel,sama5d3-gem", .data = &sama5d3_config }, + { .compatible = "atmel,sama5d3-macb", .data = &sama5d3macb_config }, { .compatible = "atmel,sama5d4-gem", .data = &sama5d4_config }, { .compatible = "cdns,at91rm9200-emac", .data = &emac_config }, { .compatible = "cdns,emac", .data = &emac_config },
drivers/net/ethernet/marvell/mvpp2.c +6 -4
@@ -29,6 +29,7 @@#include <linux/clk.h> #include <linux/hrtimer.h> #include <linux/ktime.h> +#include <linux/if_vlan.h> #include <uapi/linux/ppp_defs.h> #include <net/ip.h> #include <net/ipv6.h>
@@ -4268,7 +4269,7 @@ static void mvpp2_txq_desc_put(struct mvpp2_tx_queue *txq) }/* Set Tx descriptors fields relevant for CSUM calculation */ -static u32 mvpp2_txq_desc_csum (int l3_offs,int l3_proto, +static u32 mvpp2_txq_desc_csum (int l3_offs,__be16 l3_proto,int ip_hdr_len,int l4_proto) {u32 command;
@@ -5032,14 +5033,15 @@ static u32 mvpp2_skb_tx_csum(struct mvpp2_port *port, struct sk_buff *skb)if (skb->ip_summed ==CHECKSUM_PARTIAL ) {int ip_hdr_len =0 ;u8 l4_proto; +__be16 l3_proto =vlan_get_protocol (skb); -if (skb->protocol ==htons (ETH_P_IP )) { +if (l3_proto ==htons (ETH_P_IP )) {struct iphdr *ip4h =ip_hdr (skb);/* Calculate IPv4 checksum and L4 checksum */ ip_hdr_len = ip4h->ihl; l4_proto = ip4h->protocol; - }else if (skb->protocol ==htons (ETH_P_IPV6 )) { + }else if (l3_proto ==htons (ETH_P_IPV6 )) {struct ipv6hdr *ip6h =ipv6_hdr (skb);/* Read l4_protocol from one of IPv6 extra headers */
@@ -5051,7 +5053,7 @@ static u32 mvpp2_skb_tx_csum(struct mvpp2_port *port, struct sk_buff *skb) }return mvpp2_txq_desc_csum (skb_network_offset (skb), - skb->protocol, ip_hdr_len, l4_proto); + l3_proto, ip_hdr_len, l4_proto); }return MVPP2_TXD_L4_CSUM_NOT |MVPP2_TXD_IP_CSUM_DISABLE ;
drivers/net/ethernet/mellanox/mlx4/eq.c +2 -1
@@ -228,7 +228,8 @@ static void mlx4_set_eq_affinity_hint(struct mlx4_priv *priv, int vec)struct mlx4_dev *dev = &priv->dev;struct mlx4_eq *eq = &priv->eq_table.eq[vec]; -if (!eq->affinity_mask ||cpumask_empty (eq->affinity_mask)) +if (!cpumask_available (eq->affinity_mask) || +cpumask_empty (eq->affinity_mask))return ; hint_err =irq_set_affinity_hint (eq->irq, eq->affinity_mask);
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h +5 -3
@@ -1802,7 +1802,8 @@ struct qlcnic_hardware_ops {int (*config_loopback) (struct qlcnic_adapter *,u8 );int (*clear_loopback) (struct qlcnic_adapter *,u8 );int (*config_promisc_mode) (struct qlcnic_adapter *,u32 ); -void (*change_l2_filter) (struct qlcnic_adapter *,u64 *,u16 ); +void (*change_l2_filter)(struct qlcnic_adapter *adapter,u64 *addr, +u16 vlan,struct qlcnic_host_tx_ring *tx_ring);int (*get_board_info) (struct qlcnic_adapter *);void (*set_mac_filter_count) (struct qlcnic_adapter *);void (*free_mac_list) (struct qlcnic_adapter *);
@@ -2044,9 +2045,10 @@ static inline int qlcnic_nic_set_promisc(struct qlcnic_adapter *adapter, }static inline void qlcnic_change_filter (struct qlcnic_adapter *adapter, -u64 *addr,u16 id) +u64 *addr,u16 vlan, +struct qlcnic_host_tx_ring *tx_ring) { - adapter->ahw->hw_ops->change_l2_filter (adapter, addr, id); + adapter->ahw->hw_ops->change_l2_filter (adapter, addr, vlan, tx_ring); }static inline int qlcnic_get_board_info (struct qlcnic_adapter *adapter)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +2 -1
@@ -2132,7 +2132,8 @@ out: }void qlcnic_83xx_change_l2_filter (struct qlcnic_adapter *adapter,u64 *addr, -u16 vlan_id) +u16 vlan_id, +struct qlcnic_host_tx_ring *tx_ring) {u8 mac[ETH_ALEN ];memcpy (&mac, addr,ETH_ALEN );
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h +2 -1
@@ -550,7 +550,8 @@ int qlcnic_83xx_wrt_reg_indirect(struct qlcnic_adapter *, ulong, u32);int qlcnic_83xx_nic_set_promisc (struct qlcnic_adapter *,u32 );int qlcnic_83xx_config_hw_lro (struct qlcnic_adapter *,int );int qlcnic_83xx_config_rss (struct qlcnic_adapter *,int ); -void qlcnic_83xx_change_l2_filter (struct qlcnic_adapter *,u64 *,u16 ); +void qlcnic_83xx_change_l2_filter (struct qlcnic_adapter *adapter,u64 *addr, +u16 vlan,struct qlcnic_host_tx_ring *ring);int qlcnic_83xx_get_pci_info (struct qlcnic_adapter *,struct qlcnic_pci_info *);int qlcnic_83xx_set_nic_info (struct qlcnic_adapter *,struct qlcnic_info *);void qlcnic_83xx_initialize_nic (struct qlcnic_adapter *,int );
drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.h +2 -1
@@ -173,7 +173,8 @@ int qlcnic_82xx_napi_add(struct qlcnic_adapter *adapter, struct net_device *netdev);void qlcnic_82xx_get_beacon_state (struct qlcnic_adapter *);void qlcnic_82xx_change_filter (struct qlcnic_adapter *adapter, -u64 *uaddr,u16 vlan_id); +u64 *uaddr,u16 vlan_id, +struct qlcnic_host_tx_ring *tx_ring);int qlcnic_82xx_config_intr_coalesce (struct qlcnic_adapter *,struct ethtool_coalesce *);int qlcnic_82xx_set_rx_coalesce (struct qlcnic_adapter *);
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c +6 -6
@@ -269,13 +269,12 @@ static void qlcnic_add_lb_filter(struct qlcnic_adapter *adapter, }void qlcnic_82xx_change_filter (struct qlcnic_adapter *adapter,u64 *uaddr, -u16 vlan_id) +u16 vlan_id,struct qlcnic_host_tx_ring *tx_ring) {struct cmd_desc_type0 *hwdesc;struct qlcnic_nic_req *req;struct qlcnic_mac_req *mac_req;struct qlcnic_vlan_req *vlan_req; -struct qlcnic_host_tx_ring *tx_ring = adapter->tx_ring;u32 producer;u64 word;
@@ -302,7 +301,8 @@ void qlcnic_82xx_change_filter(struct qlcnic_adapter *adapter, u64 *uaddr,static void qlcnic_send_filter (struct qlcnic_adapter *adapter,struct cmd_desc_type0 *first_desc, -struct sk_buff *skb) +struct sk_buff *skb, +struct qlcnic_host_tx_ring *tx_ring) {struct vlan_ethhdr *vh = (struct vlan_ethhdr *)(skb->data);struct ethhdr *phdr = (struct ethhdr *)(skb->data);
@@ -336,7 +336,7 @@ static void qlcnic_send_filter(struct qlcnic_adapter *adapter, tmp_fil->vlan_id == vlan_id) {if (jiffies > (QLCNIC_READD_AGE *HZ + tmp_fil->ftime))qlcnic_change_filter (adapter, &src_addr, - vlan_id); + vlan_id, tx_ring); tmp_fil->ftime = jiffies;return ; }
@@ -351,7 +351,7 @@ static void qlcnic_send_filter(struct qlcnic_adapter *adapter,if (!fil)return ; -qlcnic_change_filter (adapter, &src_addr, vlan_id); +qlcnic_change_filter (adapter, &src_addr, vlan_id, tx_ring); fil->ftime = jiffies; fil->vlan_id = vlan_id;memcpy (fil->faddr, &src_addr,ETH_ALEN );
@@ -767,7 +767,7 @@ netdev_tx_t qlcnic_xmit_frame(struct sk_buff *skb, struct net_device *netdev) }if (adapter->drv_mac_learn) -qlcnic_send_filter (adapter, first_desc, skb); +qlcnic_send_filter (adapter, first_desc, skb, tx_ring); tx_ring->tx_stats.tx_bytes += skb->len; tx_ring->tx_stats.xmit_called++;
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +2 -3
@@ -71,7 +71,7 @@ static int dwmac1000_validate_mcast_bins(int mcast_bins)* Description: * This function validates the number of Unicast address entries supported * by a particular Synopsys 10/100/1000 controller. The Synopsys controller -* supports 1, 32, 64, or 128 Unicast filter entries for it's Unicast filter +* supports 1..32, 64, or 128 Unicast filter entries for it's Unicast filter * logic. This function validates a valid, supported configuration is * selected, and defaults to 1 Unicast address if an unsupported * configuration is selected.
@@ -81,8 +81,7 @@ static int dwmac1000_validate_ucast_entries(int ucast_entries)int x = ucast_entries;switch (x) { -case 1 : -case 32 : + case 1 ... 32:case 64 :case 128 :break ;
drivers/net/team/team.c +5 -0
@@ -1142,6 +1142,11 @@ static int team_port_add(struct team *team, struct net_device *port_dev)return -EBUSY ; } +if (dev == port_dev) { +netdev_err (dev,"Cannot enslave team device to itself\n" ); +return -EINVAL ; + } +if (port_dev->features &NETIF_F_VLAN_CHALLENGED &&vlan_uses_dev (dev)) { netdev_err(dev, "Device %s is VLAN challenged and team device has VLAN set up\n",
drivers/net/usb/smsc75xx.c +1 -0
@@ -1506,6 +1506,7 @@ static void smsc75xx_unbind(struct usbnet *dev, struct usb_interface *intf) {struct smsc75xx_priv *pdata = (struct smsc75xx_priv *)(dev->data[0 ]);if (pdata) { +cancel_work_sync (&pdata->set_multicast);netif_dbg (dev, ifdown, dev->net,"free pdata\n" );kfree (pdata); pdata =NULL ;
drivers/usb/gadget/function/u_serial.c +1 -1
@@ -518,7 +518,7 @@ static void gs_rx_push(unsigned long _port) }/* push data to (open) tty */ -if (req->actual) { +if (req->actual && tty) {char *packet = req->buf;unsigned size = req->actual;unsigned n;
drivers/usb/host/xhci-hub.c +9 -9
@@ -1048,17 +1048,17 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, temp =readl (port_array[wIndex]);break ; } - -/* Software should not attempt to set -* port link state above '3' (U3) and the port -* must be enabled. -*/ -if ((temp &PORT_PE ) ==0 || - (link_state >USB_SS_PORT_LS_U3 )) { -xhci_warn (xhci,"Cannot set link state.\n" ); +/* Port must be enabled */ +if (!(temp &PORT_PE )) { + retval = -ENODEV ; +break ; + } +/* Can't set port link state above '3' (U3) */ +if (link_state >USB_SS_PORT_LS_U3 ) { +xhci_warn (xhci,"Cannot set port %d link state %d\n" , + wIndex, link_state); goto error; } -if (link_state ==USB_SS_PORT_LS_U3 ) { slot_id =xhci_find_slot_id_by_port (hcd, xhci, wIndex +1 );
drivers/video/fbdev/aty/atyfb.h +2 -1
@@ -332,6 +332,8 @@ extern const struct aty_pll_ops aty_pll_ct; /* Integrated */extern void aty_set_pll_ct (const struct fb_info *info,const union aty_pll *pll);extern u8 aty_ld_pll_ct (int offset,const struct atyfb_par *par); +extern const u8 aty_postdividers[8 ]; +/* * Hardware cursor support
@@ -358,7 +360,6 @@ static inline void wait_for_idle(struct atyfb_par *par)extern void aty_reset_engine (const struct atyfb_par *par);extern void aty_init_engine (struct atyfb_par *par,struct fb_info *info); -extern u8 aty_ld_pll_ct (int offset,const struct atyfb_par *par);void atyfb_copyarea (struct fb_info *info,const struct fb_copyarea *area);void atyfb_fillrect (struct fb_info *info,const struct fb_fillrect *rect);
drivers/video/fbdev/aty/atyfb_base.c +4 -3
@@ -3093,17 +3093,18 @@ static int atyfb_setup_sparc(struct pci_dev *pdev, struct fb_info *info,/* * PLL Reference Divider M: */ -M = pll_regs[2 ]; +M = pll_regs[PLL_REF_DIV ];/* * PLL Feedback Divider N (Dependent on CLOCK_CNTL): */ -N = pll_regs[7 + (clock_cntl &3 )]; +N = pll_regs[VCLK0_FB_DIV + (clock_cntl &3 )];/* * PLL Post Divider P (Dependent on CLOCK_CNTL): */ -P =1 << (pll_regs[6 ] >> ((clock_cntl &3 ) <<1 )); +P = aty_postdividers[((pll_regs[VCLK_POST_DIV ] >> ((clock_cntl &3 ) <<1 )) &3 ) | + ((pll_regs[PLL_EXT_CNTL ] >> (2 + (clock_cntl &3 ))) &4 )];/* * PLL Divider Q:
drivers/video/fbdev/aty/mach64_ct.c +5 -5
@@ -114,7 +114,7 @@ static void aty_st_pll_ct(int offset, u8 val, const struct atyfb_par *par)*/ #define Maximum_DSP_PRECISION 7 -static u8 postdividers[] = {1 ,2 ,4 ,8 ,3 }; +const u8 aty_postdividers[8 ] = {1 ,2 ,4 ,8 ,3 ,5 ,6 ,12 };static int aty_dsp_gt (const struct fb_info *info,u32 bpp,struct pll_ct *pll) {
@@ -221,7 +221,7 @@ static int aty_valid_pll_ct(const struct fb_info *info, u32 vclk_per, struct pll pll->vclk_post_div += (q <64 *8 ); pll->vclk_post_div += (q <32 *8 ); } - pll->vclk_post_div_real = postdividers[pll->vclk_post_div]; + pll->vclk_post_div_real = aty_postdividers[pll->vclk_post_div];// pll->vclk_post_div <<= 6; pll->vclk_fb_div = q * pll->vclk_post_div_real /8 ; pllvclk = (1000000 * 2 * pll->vclk_fb_div) /
@@ -512,7 +512,7 @@ static int aty_init_pll_ct(const struct fb_info *info, union aty_pll *pll)u8 mclk_fb_div, pll_ext_cntl; pll->ct.pll_ref_div =aty_ld_pll_ct (PLL_REF_DIV , par); pll_ext_cntl =aty_ld_pll_ct (PLL_EXT_CNTL , par); - pll->ct.xclk_post_div_real = postdividers[pll_ext_cntl &0x07 ]; + pll->ct.xclk_post_div_real = aty_postdividers[pll_ext_cntl &0x07 ]; mclk_fb_div =aty_ld_pll_ct (MCLK_FB_DIV , par);if (pll_ext_cntl &PLL_MFB_TIMES_4_2B ) mclk_fb_div <<=1 ;
@@ -534,7 +534,7 @@ static int aty_init_pll_ct(const struct fb_info *info, union aty_pll *pll) xpost_div += (q <64 *8 ); xpost_div += (q <32 *8 ); } - pll->ct.xclk_post_div_real = postdividers[xpost_div]; + pll->ct.xclk_post_div_real = aty_postdividers[xpost_div]; pll->ct.mclk_fb_div = q * pll->ct.xclk_post_div_real /8 ;#ifdef CONFIG_PPC
@@ -583,7 +583,7 @@ static int aty_init_pll_ct(const struct fb_info *info, union aty_pll *pll) mpost_div += (q <64 *8 ); mpost_div += (q <32 *8 ); } - sclk_post_div_real = postdividers[mpost_div]; + sclk_post_div_real = aty_postdividers[mpost_div]; pll->ct.sclk_fb_div = q * sclk_post_div_real /8 ; pll->ct.spll_cntl2 = mpost_div <<4 ;#ifdef DEBUG
fs/ext4/xattr.c +14 -8
@@ -638,14 +638,20 @@ static size_t ext4_xattr_free_space(struct ext4_xattr_entry *last, }static int -ext4_xattr_set_entry (struct ext4_xattr_info *i,struct ext4_xattr_search *s) +ext4_xattr_set_entry (struct ext4_xattr_info *i,struct ext4_xattr_search *s, +struct inode *inode) { -struct ext4_xattr_entry *last; +struct ext4_xattr_entry *last, *next;size_t free, min_offs = s->end - s->base, name_len =strlen (i->name);/* Compute min_offs and last. */ last = s->first; -for (; !IS_LAST_ENTRY (last); last =EXT4_XATTR_NEXT (last)) { +for (; !IS_LAST_ENTRY (last); last = next) { + next =EXT4_XATTR_NEXT (last); +if ((void *)next >= s->end) { +EXT4_ERROR_INODE (inode,"corrupted xattr entries" ); +return -EFSCORRUPTED ; + }if (!last->e_value_block && last->e_value_size) {size_t offs =le16_to_cpu (last->e_value_offs);if (offs < min_offs)
@@ -825,7 +831,7 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode, ce =NULL ; }ea_bdebug (bs->bh,"modifying in-place" ); - error =ext4_xattr_set_entry (i, s); + error =ext4_xattr_set_entry (i, s, inode);if (!error) {if (!IS_LAST_ENTRY (s->first)) ext4_xattr_rehash(header(s->base),
@@ -875,7 +881,7 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode, s->end = s->base + sb->s_blocksize; } - error =ext4_xattr_set_entry (i, s); + error =ext4_xattr_set_entry (i, s, inode);if (error == -EFSCORRUPTED ) goto bad_block;if (error)
@@ -1037,7 +1043,7 @@ int ext4_xattr_ibody_inline_set(handle_t *handle, struct inode *inode,if (EXT4_I (inode)->i_extra_isize ==0 )return -ENOSPC ; - error =ext4_xattr_set_entry (i, s); + error =ext4_xattr_set_entry (i, s, inode);if (error) {if (error == -ENOSPC &&ext4_has_inline_data (inode)) {
@@ -1049,7 +1055,7 @@ int ext4_xattr_ibody_inline_set(handle_t *handle, struct inode *inode, error =ext4_xattr_ibody_find (inode, i, is);if (error)return error; - error =ext4_xattr_set_entry (i, s); + error =ext4_xattr_set_entry (i, s, inode); }if (error)return error;
@@ -1075,7 +1081,7 @@ static int ext4_xattr_ibody_set(handle_t *handle, struct inode *inode,if (EXT4_I (inode)->i_extra_isize ==0 )return -ENOSPC ; - error =ext4_xattr_set_entry (i, s); + error =ext4_xattr_set_entry (i, s, inode);if (error)return error; header =IHDR (inode,ext4_raw_inode (&is->iloc));
fs/jffs2/xattr.c +4 -2
@@ -1004,12 +1004,14 @@ ssize_t jffs2_listxattr(struct dentry *dentry, char *buffer, size_t size) rc = xhandle->list (xhandle, dentry, buffer + len, size - len, xd->xname, xd->name_len); +if (rc > size - len) { + rc = -ERANGE ; + goto out; + } }else { rc = xhandle->list (xhandle, dentry,NULL ,0 , xd->xname, xd->name_len); } -if (rc <0 ) - goto out; len += rc; } rc = len;
include/linux/hyperv.h +1 -0
@@ -1179,6 +1179,7 @@ int vmbus_allocate_mmio(struct resource **new, struct hv_device *device_obj,struct hv_util_service {u8 *recv_buffer; +void *channel;void (*util_cb)(void *);int (*util_init)(struct hv_util_service *);void (*util_deinit)(void );
include/linux/netdevice.h +7 -0
@@ -2168,6 +2168,13 @@ struct netdev_notifier_info {struct net_device *dev; }; +struct netdev_notifier_info_ext { +struct netdev_notifier_info info;/* must be first */ +union { +u32 mtu; + } ext; +}; +struct netdev_notifier_change_info {struct netdev_notifier_info info;/* must be first */ unsigned int flags_changed;
include/net/bonding.h +1 -6
@@ -146,12 +146,6 @@ struct bond_parm_tbl {int mode; }; -struct netdev_notify_work { -struct delayed_work work; -struct net_device *dev; -struct netdev_bonding_info bonding_info; -}; -struct slave {struct net_device *dev;/* first - useful for panic debug */ struct bonding *bond;/* our master */
@@ -177,6 +171,7 @@ struct slave {#ifdef CONFIG_NET_POLL_CONTROLLER struct netpoll *np;#endif +struct delayed_work notify_work;struct kobject kobj;struct rtnl_link_stats64 slave_stats; };
include/net/ip_fib.h +1 -0
@@ -322,6 +322,7 @@ int ip_fib_check_default(__be32 gw, struct net_device *dev);int fib_sync_down_dev (struct net_device *dev,unsigned long event,bool force);int fib_sync_down_addr (struct net *net,__be32 local);int fib_sync_up (struct net_device *dev,unsigned int nh_flags); +void fib_sync_mtu (struct net_device *dev,u32 orig_mtu);extern u32 fib_multipath_secret__read_mostly ;
mm/vmstat.c +0 -1
@@ -869,7 +869,6 @@ const char * const vmstat_text[] = {#ifdef CONFIG_DEBUG_VM_VMACACHE "vmacache_find_calls", "vmacache_find_hits", - "vmacache_full_flushes",#endif #endif /* CONFIG_VM_EVENTS_COUNTERS */ };
net/core/dev.c +26 -2
@@ -1660,6 +1660,28 @@ int call_netdevice_notifiers(unsigned long val, struct net_device *dev) }EXPORT_SYMBOL (call_netdevice_notifiers); +/** +* call_netdevice_notifiers_mtu - call all network notifier blocks +* @val: value passed unmodified to notifier function +* @dev: net_device pointer passed unmodified to notifier function +* @arg: additional u32 argument passed to the notifier function +* +* Call all network notifier blocks. Parameters and return value +* are as for raw_notifier_call_chain(). +*/ +static int call_netdevice_notifiers_mtu (unsigned long val, +struct net_device *dev,u32 arg) +{ +struct netdev_notifier_info_ext info = { + .info.dev = dev, + .ext.mtu = arg, + }; + +BUILD_BUG_ON (offsetof(struct netdev_notifier_info_ext , info) !=0 ); + +return call_netdevice_notifiers_info (val, dev, &info.info); +} +#ifdef CONFIG_NET_INGRESS static struct static_key ingress_needed__read_mostly ;
@@ -6134,14 +6156,16 @@ int dev_set_mtu(struct net_device *dev, int new_mtu) err =__dev_set_mtu (dev, new_mtu);if (!err) { - err =call_netdevice_notifiers (NETDEV_CHANGEMTU , dev); + err =call_netdevice_notifiers_mtu (NETDEV_CHANGEMTU , dev, + orig_mtu); err =notifier_to_errno (err);if (err) {/* setting mtu back and notifying everyone again, * so that they have a chance to revert changes. */ __dev_set_mtu (dev, orig_mtu); -call_netdevice_notifiers (NETDEV_CHANGEMTU , dev); +call_netdevice_notifiers_mtu (NETDEV_CHANGEMTU , dev, + new_mtu); } }return err;
net/core/rtnetlink.c +6 -0
@@ -2116,6 +2116,12 @@ struct net_device *rtnl_create_link(struct net *net,else if (ops->get_num_rx_queues) num_rx_queues = ops->get_num_rx_queues (); +if (num_tx_queues <1 || num_tx_queues >4096 ) +return ERR_PTR (-EINVAL ); + +if (num_rx_queues <1 || num_rx_queues >4096 ) +return ERR_PTR (-EINVAL ); + err = -ENOMEM ; dev =alloc_netdev_mqs (ops->priv_size, ifname, name_assign_type, ops->setup, num_tx_queues, num_rx_queues);
net/ipv4/fib_frontend.c +8 -4
@@ -1170,7 +1170,8 @@ static int fib_inetaddr_event(struct notifier_block *this, unsigned long event,static int fib_netdev_event (struct notifier_block *this,unsigned long event,void *ptr) {struct net_device *dev =netdev_notifier_info_to_dev (ptr); -struct netdev_notifier_changeupper_info *info; +struct netdev_notifier_changeupper_info *upper_info = ptr; +struct netdev_notifier_info_ext *info_ext = ptr;struct in_device *in_dev;struct net *net =dev_net (dev);unsigned int flags;
@@ -1205,16 +1206,19 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vofib_sync_up (dev,RTNH_F_LINKDOWN ); elsefib_sync_down_dev (dev ,event ,false ); -/* fall through */ +rt_cache_flush (net); +break ;case NETDEV_CHANGEMTU : +fib_sync_mtu (dev, info_ext->ext.mtu);rt_cache_flush (net);break ;case NETDEV_CHANGEUPPER : - info = ptr; + upper_info = ptr;/* flush all routes if dev is linked to or unlinked from * an L3 master device (e.g., VRF) */ -if (info->upper_dev &&netif_is_l3_master (info->upper_dev)) +if (upper_info->upper_dev && +netif_is_l3_master (upper_info->upper_dev))fib_disable_ip (dev,NETDEV_DOWN , true);break ; }
net/ipv4/fib_semantics.c +50 -0
56 lines not on this page · raw message
net/ipv4/ip_sockglue.c +1 -2
@@ -134,7 +134,6 @@ static void ip_cmsg_recv_security(struct msghdr *msg, struct sk_buff *skb)static void ip_cmsg_recv_dstaddr (struct msghdr *msg,struct sk_buff *skb) {struct sockaddr_in sin; -const struct iphdr *iph =ip_hdr (skb);__be16 *ports;int end;
@@ -149,7 +148,7 @@ static void ip_cmsg_recv_dstaddr(struct msghdr *msg, struct sk_buff *skb) ports = (__be16 *)skb_transport_header (skb); sin.sin_family =AF_INET ; - sin.sin_addr.s_addr = iph->daddr; + sin.sin_addr.s_addr =ip_hdr (skb)->daddr; sin.sin_port = ports[1 ];memset (sin.sin_zero,0 ,sizeof (sin.sin_zero));
net/ipv4/ip_tunnel.c +9 -0
@@ -597,6 +597,7 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev, const struct iphdr *tnl_params, u8 protocol) {struct ip_tunnel *tunnel =netdev_priv (dev); +unsigned int inner_nhdr_len =0 ;const struct iphdr *inner_iph;struct flowi4 fl4;u8 tos, ttl;
@@ -607,6 +608,14 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,int err;bool connected; +/* ensure we can access the inner net header, for several users below */ +if (skb->protocol ==htons (ETH_P_IP )) + inner_nhdr_len =sizeof (struct iphdr ); +else if (skb->protocol ==htons (ETH_P_IPV6 )) + inner_nhdr_len =sizeof (struct ipv6hdr ); +if (unlikely (!pskb_may_pull (skb, inner_nhdr_len))) + goto tx_error; + inner_iph = (const struct iphdr *)skb_inner_network_header (skb); connected = (tunnel->parms.iph.daddr !=0 );
net/ipv6/addrconf.c +1 -3
@@ -3786,7 +3786,6 @@ static struct inet6_ifaddr *if6_get_first(struct seq_file *seq, loff_t pos) p++;continue ; } - state->offset++;return ifa; }
@@ -3810,13 +3809,12 @@ static struct inet6_ifaddr *if6_get_next(struct seq_file *seq,return ifa; } + state->offset =0 ;while (++state->bucket <IN6_ADDR_HSIZE ) { - state->offset =0 ;hlist_for_each_entry_rcu_bh (ifa, &inet6_addr_lst[state->bucket], addr_lst) {if (!net_eq (dev_net (ifa->idev->dev), net))continue ; - state->offset++;return ifa; } }
net/ipv6/ip6_tunnel.c +11 -2
@@ -1096,7 +1096,7 @@ static inline int ip4ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev) { struct ip6_tnl *t = netdev_priv(dev); -const struct iphdr *iph =ip_hdr (skb); +const struct iphdr *iph;int encap_limit =-1 ;struct flowi6 fl6;__u8 dsfield;
@@ -1104,6 +1104,11 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)u8 tproto;int err; +/* ensure we can access the full inner ip header */ +if (!pskb_may_pull (skb,sizeof (struct iphdr ))) +return -1 ; + + iph =ip_hdr (skb);memset (&(IPCB (skb)->opt),0 ,sizeof (IPCB (skb)->opt)); tproto =ACCESS_ONCE (t->parms.proto);
@@ -1140,7 +1145,7 @@ static inline int ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev) { struct ip6_tnl *t = netdev_priv(dev); -struct ipv6hdr *ipv6h =ipv6_hdr (skb); +struct ipv6hdr *ipv6h;int encap_limit =-1 ;__u16 offset;struct flowi6 fl6;
@@ -1149,6 +1154,10 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)u8 tproto;int err; +if (unlikely (!pskb_may_pull (skb,sizeof (*ipv6h)))) +return -1 ; + + ipv6h =ipv6_hdr (skb); tproto =ACCESS_ONCE (t->parms.proto);if ((tproto !=IPPROTO_IPV6 && tproto !=0 ) ||ip6_tnl_addr_conflict (t, ipv6h))
net/netlabel/netlabel_unlabeled.c +2 -1
@@ -787,7 +787,8 @@ static int netlbl_unlabel_addrinfo_get(struct genl_info *info, {u32 addr_len; -if (info->attrs[NLBL_UNLABEL_A_IPV4ADDR ]) { +if (info->attrs[NLBL_UNLABEL_A_IPV4ADDR ] && + info->attrs[NLBL_UNLABEL_A_IPV4MASK ]) { addr_len =nla_len (info->attrs[NLBL_UNLABEL_A_IPV4ADDR ]);if (addr_len !=sizeof (struct in_addr ) && addr_len !=nla_len (info->attrs[NLBL_UNLABEL_A_IPV4MASK ]))
sound/hda/hdac_controller.c +6 -2
@@ -40,6 +40,8 @@ static void azx_clear_corbrp(struct hdac_bus *bus)*/ void snd_hdac_bus_init_cmd_io (struct hdac_bus *bus) { +WARN_ON_ONCE (!bus->rb.area); +spin_lock_irq (&bus->reg_lock);/* CORB set up */ bus->corb.addr = bus->rb.addr;
@@ -377,13 +379,15 @@ bool snd_hdac_bus_init_chip(struct hdac_bus *bus, bool full_reset)/* reset controller */ azx_reset (bus, full_reset); -/* initialize interrupts */ +/* clear interrupts */ azx_int_clear (bus); -azx_int_enable (bus);/* initialize the codec command I/O */ snd_hdac_bus_init_cmd_io (bus); +/* enable interrupts after CORB/RIRB buffers are initialized above */ +azx_int_enable (bus); +/* program the position buffer */ if (bus->use_posbuf && bus->posbuf.addr) {snd_hdac_chip_writel (bus,DPLBASE , (u32 )bus->posbuf.addr);
sound/soc/codecs/sigmadsp.c +1 -2
@@ -117,8 +117,7 @@ static int sigmadsp_ctrl_write(struct sigmadsp *sigmadsp, struct sigmadsp_control *ctrl, void *data) {/* safeload loads up to 20 bytes in a atomic operation */ -if (ctrl->num_bytes >4 && ctrl->num_bytes <=20 && sigmadsp->ops && - sigmadsp->ops->safeload) +if (ctrl->num_bytes <=20 && sigmadsp->ops && sigmadsp->ops->safeload)return sigmadsp->ops->safeload (sigmadsp, ctrl->addr, data, ctrl->num_bytes);else
sound/soc/codecs/wm8804-i2c.c +14 -1
@@ -13,6 +13,7 @@#include <linux/init.h> #include <linux/module.h> #include <linux/i2c.h> +#include <linux/acpi.h> #include "wm8804.h"
@@ -40,17 +41,29 @@ static const struct i2c_device_id wm8804_i2c_id[] = { };MODULE_DEVICE_TABLE (i2c, wm8804_i2c_id); +#if defined(CONFIG_OF )static const struct of_device_id wm8804_of_match[] = { { .compatible ="wlf,wm8804" , }, { } };MODULE_DEVICE_TABLE (of, wm8804_of_match); +#endif + +#ifdef CONFIG_ACPI +static const struct acpi_device_id wm8804_acpi_match[] = { + {"1AEC8804" ,0 },/* Wolfson PCI ID + part ID */ + {"10138804" ,0 },/* Cirrus Logic PCI ID + part ID */ + { }, +}; +MODULE_DEVICE_TABLE (acpi, wm8804_acpi_match); +#endif static struct i2c_driver wm8804_i2c_driver = { .driver = { .name ="wm8804" , .pm = &wm8804_pm, - .of_match_table = wm8804_of_match, + .of_match_table =of_match_ptr (wm8804_of_match), + .acpi_match_table =ACPI_PTR (wm8804_acpi_match), }, .probe = wm8804_i2c_probe, .remove = wm8804_i2c_remove,
tools/perf/scripts/python/export-to-postgresql.py +9 -0
@@ -205,14 +205,23 @@ from ctypes import * libpq = CDLL("libpq.so.5") PQconnectdb = libpq.PQconnectdb PQconnectdb.restype = c_void_p +PQconnectdb.argtypes = [ c_char_p ] PQfinish = libpq.PQfinish +PQfinish.argtypes = [ c_void_p ] PQstatus = libpq.PQstatus +PQstatus.restype = c_int +PQstatus.argtypes = [ c_void_p ] PQexec = libpq.PQexec PQexec.restype = c_void_p +PQexec.argtypes = [ c_void_p, c_char_p ] PQresultStatus = libpq.PQresultStatus +PQresultStatus.restype = c_int +PQresultStatus.argtypes = [ c_void_p ] PQputCopyData = libpq.PQputCopyData +PQputCopyData.restype = c_int PQputCopyData.argtypes = [ c_void_p, c_void_p, c_int ] PQputCopyEnd = libpq.PQputCopyEnd +PQputCopyEnd.restype = c_int PQputCopyEnd.argtypes = [ c_void_p, c_void_p ] sys.path.append(os.environ['PERF_EXEC_PATH'] + \
tools/testing/selftests/efivarfs/config new file +1 -0
@@ -0,0 +1 @@ +CONFIG_EFIVAR_FS=y