diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/arm/boot/dts/exynos5250.dtsi linux-libre-3.18-rc7-gnu/arch/arm/boot/dts/exynos5250.dtsi
--- linux-libre-3.18-rc6-gnu/arch/arm/boot/dts/exynos5250.dtsi	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/arm/boot/dts/exynos5250.dtsi	2014-11-30 19:42:27.000000000 -0500
@@ -555,7 +555,7 @@
 		#size-cells = <1>;
 		ranges;
 
-		dwc3 {
+		usbdrd_dwc3: dwc3 {
 			compatible = "synopsys,dwc3";
 			reg = <0x12000000 0x10000>;
 			interrupts = <0 72 0>;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/arm/boot/dts/exynos5250-snow.dts linux-libre-3.18-rc7-gnu/arch/arm/boot/dts/exynos5250-snow.dts
--- linux-libre-3.18-rc6-gnu/arch/arm/boot/dts/exynos5250-snow.dts	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/arm/boot/dts/exynos5250-snow.dts	2014-11-30 19:42:27.000000000 -0500
@@ -624,4 +624,8 @@
 	num-cs = <1>;
 };
 
+&usbdrd_dwc3 {
+	dr_mode = "host";
+};
+
 #include "cros-ec-keyboard.dtsi"
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/arm/configs/exynos_defconfig linux-libre-3.18-rc7-gnu/arch/arm/configs/exynos_defconfig
--- linux-libre-3.18-rc6-gnu/arch/arm/configs/exynos_defconfig	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/arm/configs/exynos_defconfig	2014-11-30 19:42:27.000000000 -0500
@@ -142,11 +142,13 @@ CONFIG_MMC_DW_IDMAC=y
 CONFIG_MMC_DW_EXYNOS=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_MAX77686=y
+CONFIG_RTC_DRV_MAX77802=y
 CONFIG_RTC_DRV_S5M=y
 CONFIG_RTC_DRV_S3C=y
 CONFIG_DMADEVICES=y
 CONFIG_PL330_DMA=y
 CONFIG_COMMON_CLK_MAX77686=y
+CONFIG_COMMON_CLK_MAX77802=y
 CONFIG_COMMON_CLK_S2MPS11=y
 CONFIG_EXYNOS_IOMMU=y
 CONFIG_IIO=y
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/arm/include/asm/thread_info.h linux-libre-3.18-rc7-gnu/arch/arm/include/asm/thread_info.h
--- linux-libre-3.18-rc6-gnu/arch/arm/include/asm/thread_info.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/arm/include/asm/thread_info.h	2014-11-30 19:42:27.000000000 -0500
@@ -44,16 +44,6 @@ struct cpu_context_save {
 	__u32	extra[2];		/* Xscale 'acc' register, etc */
 };
 
-struct arm_restart_block {
-	union {
-		/* For user cache flushing */
-		struct {
-			unsigned long start;
-			unsigned long end;
-		} cache;
-	};
-};
-
 /*
  * low level task data that entry.S needs immediate access to.
  * __switch_to() assumes cpu_context follows immediately after cpu_domain.
@@ -79,7 +69,6 @@ struct thread_info {
 	unsigned long		thumbee_state;	/* ThumbEE Handler Base register */
 #endif
 	struct restart_block	restart_block;
-	struct arm_restart_block	arm_restart_block;
 };
 
 #define INIT_THREAD_INFO(tsk)						\
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/arm/kernel/traps.c linux-libre-3.18-rc7-gnu/arch/arm/kernel/traps.c
--- linux-libre-3.18-rc6-gnu/arch/arm/kernel/traps.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/arm/kernel/traps.c	2014-11-30 19:42:27.000000000 -0500
@@ -533,8 +533,6 @@ static int bad_syscall(int n, struct pt_
 	return regs->ARM_r0;
 }
 
-static long do_cache_op_restart(struct restart_block *);
-
 static inline int
 __do_cache_op(unsigned long start, unsigned long end)
 {
@@ -543,24 +541,8 @@ __do_cache_op(unsigned long start, unsig
 	do {
 		unsigned long chunk = min(PAGE_SIZE, end - start);
 
-		if (signal_pending(current)) {
-			struct thread_info *ti = current_thread_info();
-
-			ti->restart_block = (struct restart_block) {
-				.fn	= do_cache_op_restart,
-			};
-
-			ti->arm_restart_block = (struct arm_restart_block) {
-				{
-					.cache = {
-						.start	= start,
-						.end	= end,
-					},
-				},
-			};
-
-			return -ERESTART_RESTARTBLOCK;
-		}
+		if (fatal_signal_pending(current))
+			return 0;
 
 		ret = flush_cache_user_range(start, start + chunk);
 		if (ret)
@@ -573,15 +555,6 @@ __do_cache_op(unsigned long start, unsig
 	return 0;
 }
 
-static long do_cache_op_restart(struct restart_block *unused)
-{
-	struct arm_restart_block *restart_block;
-
-	restart_block = &current_thread_info()->arm_restart_block;
-	return __do_cache_op(restart_block->cache.start,
-			     restart_block->cache.end);
-}
-
 static inline int
 do_cache_op(unsigned long start, unsigned long end, int flags)
 {
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/arm/kvm/mmu.c linux-libre-3.18-rc7-gnu/arch/arm/kvm/mmu.c
--- linux-libre-3.18-rc6-gnu/arch/arm/kvm/mmu.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/arm/kvm/mmu.c	2014-11-30 19:42:27.000000000 -0500
@@ -197,7 +197,8 @@ static void unmap_range(struct kvm *kvm,
 	pgd = pgdp + pgd_index(addr);
 	do {
 		next = kvm_pgd_addr_end(addr, end);
-		unmap_puds(kvm, pgd, addr, next);
+		if (!pgd_none(*pgd))
+			unmap_puds(kvm, pgd, addr, next);
 	} while (pgd++, addr = next, addr != end);
 }
 
@@ -834,6 +835,11 @@ static bool kvm_is_write_fault(struct kv
 	return kvm_vcpu_dabt_iswrite(vcpu);
 }
 
+static bool kvm_is_device_pfn(unsigned long pfn)
+{
+	return !pfn_valid(pfn);
+}
+
 static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
 			  struct kvm_memory_slot *memslot, unsigned long hva,
 			  unsigned long fault_status)
@@ -904,7 +910,7 @@ static int user_mem_abort(struct kvm_vcp
 	if (is_error_pfn(pfn))
 		return -EFAULT;
 
-	if (kvm_is_mmio_pfn(pfn))
+	if (kvm_is_device_pfn(pfn))
 		mem_type = PAGE_S2_DEVICE;
 
 	spin_lock(&kvm->mmu_lock);
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/arm/mach-mvebu/coherency.c linux-libre-3.18-rc7-gnu/arch/arm/mach-mvebu/coherency.c
--- linux-libre-3.18-rc6-gnu/arch/arm/mach-mvebu/coherency.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/arm/mach-mvebu/coherency.c	2014-11-30 19:42:27.000000000 -0500
@@ -400,6 +400,8 @@ int __init coherency_init(void)
 		 type == COHERENCY_FABRIC_TYPE_ARMADA_380)
 		armada_375_380_coherency_init(np);
 
+	of_node_put(np);
+
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/arm/mach-tegra/irq.c linux-libre-3.18-rc7-gnu/arch/arm/mach-tegra/irq.c
--- linux-libre-3.18-rc6-gnu/arch/arm/mach-tegra/irq.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/arm/mach-tegra/irq.c	2014-11-30 19:42:27.000000000 -0500
@@ -99,42 +99,42 @@ static inline void tegra_irq_write_mask(
 
 static void tegra_mask(struct irq_data *d)
 {
-	if (d->irq < FIRST_LEGACY_IRQ)
+	if (d->hwirq < FIRST_LEGACY_IRQ)
 		return;
 
-	tegra_irq_write_mask(d->irq, ICTLR_CPU_IER_CLR);
+	tegra_irq_write_mask(d->hwirq, ICTLR_CPU_IER_CLR);
 }
 
 static void tegra_unmask(struct irq_data *d)
 {
-	if (d->irq < FIRST_LEGACY_IRQ)
+	if (d->hwirq < FIRST_LEGACY_IRQ)
 		return;
 
-	tegra_irq_write_mask(d->irq, ICTLR_CPU_IER_SET);
+	tegra_irq_write_mask(d->hwirq, ICTLR_CPU_IER_SET);
 }
 
 static void tegra_ack(struct irq_data *d)
 {
-	if (d->irq < FIRST_LEGACY_IRQ)
+	if (d->hwirq < FIRST_LEGACY_IRQ)
 		return;
 
-	tegra_irq_write_mask(d->irq, ICTLR_CPU_IEP_FIR_CLR);
+	tegra_irq_write_mask(d->hwirq, ICTLR_CPU_IEP_FIR_CLR);
 }
 
 static void tegra_eoi(struct irq_data *d)
 {
-	if (d->irq < FIRST_LEGACY_IRQ)
+	if (d->hwirq < FIRST_LEGACY_IRQ)
 		return;
 
-	tegra_irq_write_mask(d->irq, ICTLR_CPU_IEP_FIR_CLR);
+	tegra_irq_write_mask(d->hwirq, ICTLR_CPU_IEP_FIR_CLR);
 }
 
 static int tegra_retrigger(struct irq_data *d)
 {
-	if (d->irq < FIRST_LEGACY_IRQ)
+	if (d->hwirq < FIRST_LEGACY_IRQ)
 		return 0;
 
-	tegra_irq_write_mask(d->irq, ICTLR_CPU_IEP_FIR_SET);
+	tegra_irq_write_mask(d->hwirq, ICTLR_CPU_IEP_FIR_SET);
 
 	return 1;
 }
@@ -142,7 +142,7 @@ static int tegra_retrigger(struct irq_da
 #ifdef CONFIG_PM_SLEEP
 static int tegra_set_wake(struct irq_data *d, unsigned int enable)
 {
-	u32 irq = d->irq;
+	u32 irq = d->hwirq;
 	u32 index, mask;
 
 	if (irq < FIRST_LEGACY_IRQ ||
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/arm/mm/proc-v7.S linux-libre-3.18-rc7-gnu/arch/arm/mm/proc-v7.S
--- linux-libre-3.18-rc6-gnu/arch/arm/mm/proc-v7.S	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/arm/mm/proc-v7.S	2014-11-30 19:42:27.000000000 -0500
@@ -270,7 +270,6 @@ __v7_pj4b_setup:
 /* Auxiliary Debug Modes Control 1 Register */
 #define PJ4B_STATIC_BP (1 << 2) /* Enable Static BP */
 #define PJ4B_INTER_PARITY (1 << 8) /* Disable Internal Parity Handling */
-#define PJ4B_BCK_OFF_STREX (1 << 5) /* Enable the back off of STREX instr */
 #define PJ4B_CLEAN_LINE (1 << 16) /* Disable data transfer for clean line */
 
 /* Auxiliary Debug Modes Control 2 Register */
@@ -293,7 +292,6 @@ __v7_pj4b_setup:
 	/* Auxiliary Debug Modes Control 1 Register */
 	mrc	p15, 1,	r0, c15, c1, 1
 	orr     r0, r0, #PJ4B_CLEAN_LINE
-	orr     r0, r0, #PJ4B_BCK_OFF_STREX
 	orr     r0, r0, #PJ4B_INTER_PARITY
 	bic	r0, r0, #PJ4B_STATIC_BP
 	mcr	p15, 1,	r0, c15, c1, 1
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/arm/mm/proc-xscale.S linux-libre-3.18-rc7-gnu/arch/arm/mm/proc-xscale.S
--- linux-libre-3.18-rc6-gnu/arch/arm/mm/proc-xscale.S	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/arm/mm/proc-xscale.S	2014-11-30 19:42:27.000000000 -0500
@@ -535,7 +535,7 @@ ENTRY(cpu_xscale_do_suspend)
 	mrc	p15, 0, r5, c15, c1, 0	@ CP access reg
 	mrc	p15, 0, r6, c13, c0, 0	@ PID
 	mrc	p15, 0, r7, c3, c0, 0	@ domain ID
-	mrc	p15, 0, r8, c1, c1, 0	@ auxiliary control reg
+	mrc	p15, 0, r8, c1, c0, 1	@ auxiliary control reg
 	mrc	p15, 0, r9, c1, c0, 0	@ control reg
 	bic	r4, r4, #2		@ clear frequency change bit
 	stmia	r0, {r4 - r9}		@ store cp regs
@@ -552,7 +552,7 @@ ENTRY(cpu_xscale_do_resume)
 	mcr	p15, 0, r6, c13, c0, 0	@ PID
 	mcr	p15, 0, r7, c3, c0, 0	@ domain ID
 	mcr	p15, 0, r1, c2, c0, 0	@ translation table base addr
-	mcr	p15, 0, r8, c1, c1, 0	@ auxiliary control reg
+	mcr	p15, 0, r8, c1, c0, 1	@ auxiliary control reg
 	mov	r0, r9			@ control register
 	b	cpu_resume_mmu
 ENDPROC(cpu_xscale_do_resume)
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/arm64/kvm/sys_regs.c linux-libre-3.18-rc7-gnu/arch/arm64/kvm/sys_regs.c
--- linux-libre-3.18-rc6-gnu/arch/arm64/kvm/sys_regs.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/arm64/kvm/sys_regs.c	2014-11-30 19:42:27.000000000 -0500
@@ -424,6 +424,11 @@ static const struct sys_reg_desc sys_reg
 	/* VBAR_EL1 */
 	{ Op0(0b11), Op1(0b000), CRn(0b1100), CRm(0b0000), Op2(0b000),
 	  NULL, reset_val, VBAR_EL1, 0 },
+
+	/* ICC_SRE_EL1 */
+	{ Op0(0b11), Op1(0b000), CRn(0b1100), CRm(0b1100), Op2(0b101),
+	  trap_raz_wi },
+
 	/* CONTEXTIDR_EL1 */
 	{ Op0(0b11), Op1(0b000), CRn(0b1101), CRm(0b0000), Op2(0b001),
 	  access_vm_reg, reset_val, CONTEXTIDR_EL1, 0 },
@@ -690,6 +695,10 @@ static const struct sys_reg_desc cp15_re
 	{ Op1( 0), CRn(10), CRm( 2), Op2( 1), access_vm_reg, NULL, c10_NMRR },
 	{ Op1( 0), CRn(10), CRm( 3), Op2( 0), access_vm_reg, NULL, c10_AMAIR0 },
 	{ Op1( 0), CRn(10), CRm( 3), Op2( 1), access_vm_reg, NULL, c10_AMAIR1 },
+
+	/* ICC_SRE */
+	{ Op1( 0), CRn(12), CRm(12), Op2( 5), trap_raz_wi },
+
 	{ Op1( 0), CRn(13), CRm( 0), Op2( 1), access_vm_reg, NULL, c13_CID },
 };
 
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/ia64/kvm/kvm-ia64.c linux-libre-3.18-rc7-gnu/arch/ia64/kvm/kvm-ia64.c
--- linux-libre-3.18-rc6-gnu/arch/ia64/kvm/kvm-ia64.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/ia64/kvm/kvm-ia64.c	2014-11-30 19:42:27.000000000 -0500
@@ -1563,7 +1563,7 @@ int kvm_arch_prepare_memory_region(struc
 
 	for (i = 0; i < npages; i++) {
 		pfn = gfn_to_pfn(kvm, base_gfn + i);
-		if (!kvm_is_mmio_pfn(pfn)) {
+		if (!kvm_is_reserved_pfn(pfn)) {
 			kvm_set_pmt_entry(kvm, base_gfn + i,
 					pfn << PAGE_SHIFT,
 				_PAGE_AR_RWX | _PAGE_MA_WB);
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/mips/include/asm/mipsregs.h linux-libre-3.18-rc7-gnu/arch/mips/include/asm/mipsregs.h
--- linux-libre-3.18-rc6-gnu/arch/mips/include/asm/mipsregs.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/mips/include/asm/mipsregs.h	2014-11-30 19:42:27.000000000 -0500
@@ -661,6 +661,8 @@
 #define MIPS_CONF6_SYND		(_ULCAST_(1) << 13)
 /* proAptiv FTLB on/off bit */
 #define MIPS_CONF6_FTLBEN	(_ULCAST_(1) << 15)
+/* FTLB probability bits */
+#define MIPS_CONF6_FTLBP_SHIFT	(16)
 
 #define MIPS_CONF7_WII		(_ULCAST_(1) << 31)
 
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/mips/include/asm/r4kcache.h linux-libre-3.18-rc7-gnu/arch/mips/include/asm/r4kcache.h
--- linux-libre-3.18-rc6-gnu/arch/mips/include/asm/r4kcache.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/mips/include/asm/r4kcache.h	2014-11-30 19:42:27.000000000 -0500
@@ -257,7 +257,11 @@ static inline void protected_flush_icach
  */
 static inline void protected_writeback_dcache_line(unsigned long addr)
 {
+#ifdef CONFIG_EVA
+	protected_cachee_op(Hit_Writeback_Inv_D, addr);
+#else
 	protected_cache_op(Hit_Writeback_Inv_D, addr);
+#endif
 }
 
 static inline void protected_writeback_scache_line(unsigned long addr)
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/mips/include/asm/uaccess.h linux-libre-3.18-rc7-gnu/arch/mips/include/asm/uaccess.h
--- linux-libre-3.18-rc6-gnu/arch/mips/include/asm/uaccess.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/mips/include/asm/uaccess.h	2014-11-30 19:42:27.000000000 -0500
@@ -1422,7 +1422,7 @@ static inline long __strnlen_user(const
 }
 
 /*
- * strlen_user: - Get the size of a string in user space.
+ * strnlen_user: - Get the size of a string in user space.
  * @str: The string to measure.
  *
  * Context: User context only.	This function may sleep.
@@ -1431,9 +1431,7 @@ static inline long __strnlen_user(const
  *
  * Returns the size of the string INCLUDING the terminating NUL.
  * On exception, returns 0.
- *
- * If there is a limit on the length of a valid string, you may wish to
- * consider using strnlen_user() instead.
+ * If the string is too long, returns a value greater than @n.
  */
 static inline long strnlen_user(const char __user *s, long n)
 {
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/mips/include/uapi/asm/unistd.h linux-libre-3.18-rc7-gnu/arch/mips/include/uapi/asm/unistd.h
--- linux-libre-3.18-rc6-gnu/arch/mips/include/uapi/asm/unistd.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/mips/include/uapi/asm/unistd.h	2014-11-30 19:42:27.000000000 -0500
@@ -1045,7 +1045,7 @@
 #define __NR_seccomp			(__NR_Linux + 316)
 #define __NR_getrandom			(__NR_Linux + 317)
 #define __NR_memfd_create		(__NR_Linux + 318)
-#define __NR_memfd_create		(__NR_Linux + 319)
+#define __NR_bpf			(__NR_Linux + 319)
 
 /*
  * Offset of the last N32 flavoured syscall
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/mips/Kconfig linux-libre-3.18-rc7-gnu/arch/mips/Kconfig
--- linux-libre-3.18-rc6-gnu/arch/mips/Kconfig	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/mips/Kconfig	2014-11-30 19:42:27.000000000 -0500
@@ -2101,9 +2101,17 @@ config 64BIT_PHYS_ADDR
 config ARCH_PHYS_ADDR_T_64BIT
        def_bool 64BIT_PHYS_ADDR
 
+choice
+	prompt "SmartMIPS or microMIPS ASE support"
+
+config CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS
+	bool "None"
+	help
+	  Select this if you want neither microMIPS nor SmartMIPS support
+
 config CPU_HAS_SMARTMIPS
 	depends on SYS_SUPPORTS_SMARTMIPS
-	bool "Support for the SmartMIPS ASE"
+	bool "SmartMIPS"
 	help
 	  SmartMIPS is a extension of the MIPS32 architecture aimed at
 	  increased security at both hardware and software level for
@@ -2115,11 +2123,13 @@ config CPU_HAS_SMARTMIPS
 
 config CPU_MICROMIPS
 	depends on SYS_SUPPORTS_MICROMIPS
-	bool "Build kernel using microMIPS ISA"
+	bool "microMIPS"
 	help
 	  When this option is enabled the kernel will be built using the
 	  microMIPS ISA
 
+endchoice
+
 config CPU_HAS_MSA
 	bool "Support for the MIPS SIMD Architecture (EXPERIMENTAL)"
 	depends on CPU_SUPPORTS_MSA
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/mips/kernel/bmips_vec.S linux-libre-3.18-rc7-gnu/arch/mips/kernel/bmips_vec.S
--- linux-libre-3.18-rc6-gnu/arch/mips/kernel/bmips_vec.S	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/mips/kernel/bmips_vec.S	2014-11-30 19:42:27.000000000 -0500
@@ -208,7 +208,6 @@ bmips_reset_nmi_vec_end:
 END(bmips_reset_nmi_vec)
 
 	.set	pop
-	.previous
 
 /***********************************************************************
  * CPU1 warm restart vector (used for second and subsequent boots).
@@ -281,5 +280,3 @@ LEAF(bmips_enable_xks01)
 	jr	ra
 
 END(bmips_enable_xks01)
-
-	.previous
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/mips/kernel/cps-vec.S linux-libre-3.18-rc7-gnu/arch/mips/kernel/cps-vec.S
--- linux-libre-3.18-rc6-gnu/arch/mips/kernel/cps-vec.S	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/mips/kernel/cps-vec.S	2014-11-30 19:42:27.000000000 -0500
@@ -229,6 +229,7 @@ LEAF(mips_cps_core_init)
 	 nop
 
 	.set	push
+	.set	mips32r2
 	.set	mt
 
 	/* Only allow 1 TC per VPE to execute... */
@@ -345,6 +346,7 @@ LEAF(mips_cps_boot_vpes)
 	 nop
 
 	.set	push
+	.set	mips32r2
 	.set	mt
 
 1:	/* Enter VPE configuration state */
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/mips/kernel/cpu-probe.c linux-libre-3.18-rc7-gnu/arch/mips/kernel/cpu-probe.c
--- linux-libre-3.18-rc6-gnu/arch/mips/kernel/cpu-probe.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/mips/kernel/cpu-probe.c	2014-11-30 19:42:27.000000000 -0500
@@ -193,6 +193,32 @@ static void set_isa(struct cpuinfo_mips
 static char unknown_isa[] = KERN_ERR \
 	"Unsupported ISA type, c0.config0: %d.";
 
+static unsigned int calculate_ftlb_probability(struct cpuinfo_mips *c)
+{
+
+	unsigned int probability = c->tlbsize / c->tlbsizevtlb;
+
+	/*
+	 * 0 = All TLBWR instructions go to FTLB
+	 * 1 = 15:1: For every 16 TBLWR instructions, 15 go to the
+	 * FTLB and 1 goes to the VTLB.
+	 * 2 = 7:1: As above with 7:1 ratio.
+	 * 3 = 3:1: As above with 3:1 ratio.
+	 *
+	 * Use the linear midpoint as the probability threshold.
+	 */
+	if (probability >= 12)
+		return 1;
+	else if (probability >= 6)
+		return 2;
+	else
+		/*
+		 * So FTLB is less than 4 times bigger than VTLB.
+		 * A 3:1 ratio can still be useful though.
+		 */
+		return 3;
+}
+
 static void set_ftlb_enable(struct cpuinfo_mips *c, int enable)
 {
 	unsigned int config6;
@@ -203,9 +229,14 @@ static void set_ftlb_enable(struct cpuin
 	case CPU_P5600:
 		/* proAptiv & related cores use Config6 to enable the FTLB */
 		config6 = read_c0_config6();
+		/* Clear the old probability value */
+		config6 &= ~(3 << MIPS_CONF6_FTLBP_SHIFT);
 		if (enable)
 			/* Enable FTLB */
-			write_c0_config6(config6 | MIPS_CONF6_FTLBEN);
+			write_c0_config6(config6 |
+					 (calculate_ftlb_probability(c)
+					  << MIPS_CONF6_FTLBP_SHIFT)
+					 | MIPS_CONF6_FTLBEN);
 		else
 			/* Disable FTLB */
 			write_c0_config6(config6 &  ~MIPS_CONF6_FTLBEN);
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/mips/kernel/rtlx.c linux-libre-3.18-rc7-gnu/arch/mips/kernel/rtlx.c
--- linux-libre-3.18-rc6-gnu/arch/mips/kernel/rtlx.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/mips/kernel/rtlx.c	2014-11-30 19:42:27.000000000 -0500
@@ -94,12 +94,12 @@ int rtlx_open(int index, int can_sleep)
 	int ret = 0;
 
 	if (index >= RTLX_CHANNELS) {
-		pr_debug(KERN_DEBUG "rtlx_open index out of range\n");
+		pr_debug("rtlx_open index out of range\n");
 		return -ENOSYS;
 	}
 
 	if (atomic_inc_return(&channel_wqs[index].in_open) > 1) {
-		pr_debug(KERN_DEBUG "rtlx_open channel %d already opened\n", index);
+		pr_debug("rtlx_open channel %d already opened\n", index);
 		ret = -EBUSY;
 		goto out_fail;
 	}
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/mips/kernel/setup.c linux-libre-3.18-rc7-gnu/arch/mips/kernel/setup.c
--- linux-libre-3.18-rc6-gnu/arch/mips/kernel/setup.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/mips/kernel/setup.c	2014-11-30 19:42:27.000000000 -0500
@@ -485,7 +485,7 @@ static void __init bootmem_init(void)
  * NOTE: historically plat_mem_setup did the entire platform initialization.
  *	 This was rather impractical because it meant plat_mem_setup had to
  * get away without any kind of memory allocator.  To keep old code from
- * breaking plat_setup was just renamed to plat_setup and a second platform
+ * breaking plat_setup was just renamed to plat_mem_setup and a second platform
  * initialization hook for anything else was introduced.
  */
 
@@ -493,7 +493,7 @@ static int usermem __initdata;
 
 static int __init early_parse_mem(char *p)
 {
-	unsigned long start, size;
+	phys_t start, size;
 
 	/*
 	 * If a user specifies memory size, we
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/mips/kernel/signal.c linux-libre-3.18-rc7-gnu/arch/mips/kernel/signal.c
--- linux-libre-3.18-rc6-gnu/arch/mips/kernel/signal.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/mips/kernel/signal.c	2014-11-30 19:42:27.000000000 -0500
@@ -658,13 +658,13 @@ static int signal_setup(void)
 		save_fp_context = _save_fp_context;
 		restore_fp_context = _restore_fp_context;
 	} else {
-		save_fp_context = copy_fp_from_sigcontext;
-		restore_fp_context = copy_fp_to_sigcontext;
+		save_fp_context = copy_fp_to_sigcontext;
+		restore_fp_context = copy_fp_from_sigcontext;
 	}
 #endif /* CONFIG_SMP */
 #else
-	save_fp_context = copy_fp_from_sigcontext;;
-	restore_fp_context = copy_fp_to_sigcontext;
+	save_fp_context = copy_fp_to_sigcontext;
+	restore_fp_context = copy_fp_from_sigcontext;
 #endif
 
 	return 0;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/mips/loongson/common/Makefile linux-libre-3.18-rc7-gnu/arch/mips/loongson/common/Makefile
--- linux-libre-3.18-rc6-gnu/arch/mips/loongson/common/Makefile	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/mips/loongson/common/Makefile	2014-11-30 19:42:27.000000000 -0500
@@ -11,7 +11,8 @@ obj-$(CONFIG_PCI) += pci.o
 # Serial port support
 #
 obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
-obj-$(CONFIG_SERIAL_8250) += serial.o
+loongson-serial-$(CONFIG_SERIAL_8250) := serial.o
+obj-y += $(loongson-serial-m) $(loongson-serial-y)
 obj-$(CONFIG_LOONGSON_UART_BASE) += uart_base.o
 obj-$(CONFIG_LOONGSON_MC146818) += rtc.o
 
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/mips/mm/tlbex.c linux-libre-3.18-rc7-gnu/arch/mips/mm/tlbex.c
--- linux-libre-3.18-rc6-gnu/arch/mips/mm/tlbex.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/mips/mm/tlbex.c	2014-11-30 19:42:27.000000000 -0500
@@ -1872,8 +1872,16 @@ build_r4000_tlbchange_handler_head(u32 *
 	uasm_l_smp_pgtable_change(l, *p);
 #endif
 	iPTE_LW(p, wr.r1, wr.r2); /* get even pte */
-	if (!m4kc_tlbp_war())
+	if (!m4kc_tlbp_war()) {
 		build_tlb_probe_entry(p);
+		if (cpu_has_htw) {
+			/* race condition happens, leaving */
+			uasm_i_ehb(p);
+			uasm_i_mfc0(p, wr.r3, C0_INDEX);
+			uasm_il_bltz(p, r, wr.r3, label_leave);
+			uasm_i_nop(p);
+		}
+	}
 	return wr;
 }
 
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/mips/mti-sead3/sead3-leds.c linux-libre-3.18-rc7-gnu/arch/mips/mti-sead3/sead3-leds.c
--- linux-libre-3.18-rc6-gnu/arch/mips/mti-sead3/sead3-leds.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/mips/mti-sead3/sead3-leds.c	2014-11-30 19:42:27.000000000 -0500
@@ -5,7 +5,7 @@
  *
  * Copyright (C) 2012 MIPS Technologies, Inc.  All rights reserved.
  */
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/leds.h>
 #include <linux/platform_device.h>
 
@@ -76,8 +76,4 @@ static int __init led_init(void)
 	return platform_device_register(&fled_device);
 }
 
-module_init(led_init);
-
-MODULE_AUTHOR("Chris Dearman <chris@mips.com>");
-MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("LED probe driver for SEAD-3");
+device_initcall(led_init);
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/mips/netlogic/xlp/Makefile linux-libre-3.18-rc7-gnu/arch/mips/netlogic/xlp/Makefile
--- linux-libre-3.18-rc6-gnu/arch/mips/netlogic/xlp/Makefile	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/mips/netlogic/xlp/Makefile	2014-11-30 19:42:27.000000000 -0500
@@ -1,6 +1,10 @@
 obj-y				+= setup.o nlm_hal.o cop2-ex.o dt.o
 obj-$(CONFIG_SMP)		+= wakeup.o
-obj-$(CONFIG_USB)		+= usb-init.o
-obj-$(CONFIG_USB)		+= usb-init-xlp2.o
-obj-$(CONFIG_SATA_AHCI)		+= ahci-init.o
-obj-$(CONFIG_SATA_AHCI)		+= ahci-init-xlp2.o
+ifdef CONFIG_USB
+obj-y				+= usb-init.o
+obj-y				+= usb-init-xlp2.o
+endif
+ifdef CONFIG_SATA_AHCI
+obj-y				+= ahci-init.o
+obj-y				+= ahci-init-xlp2.o
+endif
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/powerpc/include/asm/pci-bridge.h linux-libre-3.18-rc7-gnu/arch/powerpc/include/asm/pci-bridge.h
--- linux-libre-3.18-rc6-gnu/arch/powerpc/include/asm/pci-bridge.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/powerpc/include/asm/pci-bridge.h	2014-11-30 19:42:27.000000000 -0500
@@ -159,8 +159,6 @@ struct pci_dn {
 
 	int	pci_ext_config_space;	/* for pci devices */
 
-	bool	force_32bit_msi;
-
 	struct	pci_dev *pcidev;	/* back-pointer to the pci device */
 #ifdef CONFIG_EEH
 	struct eeh_dev *edev;		/* eeh device */
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/powerpc/kernel/eeh_sysfs.c linux-libre-3.18-rc7-gnu/arch/powerpc/kernel/eeh_sysfs.c
--- linux-libre-3.18-rc6-gnu/arch/powerpc/kernel/eeh_sysfs.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/powerpc/kernel/eeh_sysfs.c	2014-11-30 19:42:27.000000000 -0500
@@ -65,7 +65,7 @@ static ssize_t eeh_pe_state_show(struct
 		return -ENODEV;
 
 	state = eeh_ops->get_state(edev->pe, NULL);
-	return sprintf(buf, "%0x08x %0x08x\n",
+	return sprintf(buf, "0x%08x 0x%08x\n",
 		       state, edev->pe->state);
 }
 
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/powerpc/kernel/pci_64.c linux-libre-3.18-rc7-gnu/arch/powerpc/kernel/pci_64.c
--- linux-libre-3.18-rc6-gnu/arch/powerpc/kernel/pci_64.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/powerpc/kernel/pci_64.c	2014-11-30 19:42:27.000000000 -0500
@@ -266,13 +266,3 @@ int pcibus_to_node(struct pci_bus *bus)
 }
 EXPORT_SYMBOL(pcibus_to_node);
 #endif
-
-static void quirk_radeon_32bit_msi(struct pci_dev *dev)
-{
-	struct pci_dn *pdn = pci_get_pdn(dev);
-
-	if (pdn)
-		pdn->force_32bit_msi = true;
-}
-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x68f2, quirk_radeon_32bit_msi);
-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0xaa68, quirk_radeon_32bit_msi);
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/powerpc/kernel/vdso32/getcpu.S linux-libre-3.18-rc7-gnu/arch/powerpc/kernel/vdso32/getcpu.S
--- linux-libre-3.18-rc6-gnu/arch/powerpc/kernel/vdso32/getcpu.S	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/powerpc/kernel/vdso32/getcpu.S	2014-11-30 19:42:27.000000000 -0500
@@ -30,8 +30,8 @@
 V_FUNCTION_BEGIN(__kernel_getcpu)
   .cfi_startproc
 	mfspr	r5,SPRN_SPRG_VDSO_READ
-	cmpdi	cr0,r3,0
-	cmpdi	cr1,r4,0
+	cmpwi	cr0,r3,0
+	cmpwi	cr1,r4,0
 	clrlwi  r6,r5,16
 	rlwinm  r7,r5,16,31-15,31-0
 	beq	cr0,1f
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/powerpc/platforms/powernv/opal-hmi.c linux-libre-3.18-rc7-gnu/arch/powerpc/platforms/powernv/opal-hmi.c
--- linux-libre-3.18-rc6-gnu/arch/powerpc/platforms/powernv/opal-hmi.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/powerpc/platforms/powernv/opal-hmi.c	2014-11-30 19:42:27.000000000 -0500
@@ -57,7 +57,7 @@ static void print_hmi_event_info(struct
 	};
 
 	/* Print things out */
-	if (hmi_evt->version != OpalHMIEvt_V1) {
+	if (hmi_evt->version < OpalHMIEvt_V1) {
 		pr_err("HMI Interrupt, Unknown event version %d !\n",
 			hmi_evt->version);
 		return;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/powerpc/platforms/powernv/pci.c linux-libre-3.18-rc7-gnu/arch/powerpc/platforms/powernv/pci.c
--- linux-libre-3.18-rc6-gnu/arch/powerpc/platforms/powernv/pci.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/powerpc/platforms/powernv/pci.c	2014-11-30 19:42:27.000000000 -0500
@@ -50,7 +50,6 @@ static int pnv_setup_msi_irqs(struct pci
 {
 	struct pci_controller *hose = pci_bus_to_host(pdev->bus);
 	struct pnv_phb *phb = hose->private_data;
-	struct pci_dn *pdn = pci_get_pdn(pdev);
 	struct msi_desc *entry;
 	struct msi_msg msg;
 	int hwirq;
@@ -60,7 +59,7 @@ static int pnv_setup_msi_irqs(struct pci
 	if (WARN_ON(!phb) || !phb->msi_bmp.bitmap)
 		return -ENODEV;
 
-	if (pdn && pdn->force_32bit_msi && !phb->msi32_support)
+	if (pdev->no_64bit_msi && !phb->msi32_support)
 		return -ENODEV;
 
 	list_for_each_entry(entry, &pdev->msi_list, list) {
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/powerpc/platforms/powernv/pci-ioda.c linux-libre-3.18-rc7-gnu/arch/powerpc/platforms/powernv/pci-ioda.c
--- linux-libre-3.18-rc6-gnu/arch/powerpc/platforms/powernv/pci-ioda.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/powerpc/platforms/powernv/pci-ioda.c	2014-11-30 19:42:27.000000000 -0500
@@ -1509,7 +1509,6 @@ static int pnv_pci_ioda_msi_setup(struct
 				  unsigned int is_64, struct msi_msg *msg)
 {
 	struct pnv_ioda_pe *pe = pnv_ioda_get_pe(dev);
-	struct pci_dn *pdn = pci_get_pdn(dev);
 	unsigned int xive_num = hwirq - phb->msi_base;
 	__be32 data;
 	int rc;
@@ -1523,7 +1522,7 @@ static int pnv_pci_ioda_msi_setup(struct
 		return -ENXIO;
 
 	/* Force 32-bit MSI on some broken devices */
-	if (pdn && pdn->force_32bit_msi)
+	if (dev->no_64bit_msi)
 		is_64 = 0;
 
 	/* Assign XIVE to PE */
@@ -1997,7 +1996,7 @@ static void __init pnv_pci_init_ioda_phb
 	if (is_kdump_kernel()) {
 		pr_info("  Issue PHB reset ...\n");
 		ioda_eeh_phb_reset(hose, EEH_RESET_FUNDAMENTAL);
-		ioda_eeh_phb_reset(hose, OPAL_DEASSERT_RESET);
+		ioda_eeh_phb_reset(hose, EEH_RESET_DEACTIVATE);
 	}
 
 	/* Configure M64 window */
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/powerpc/platforms/pseries/msi.c linux-libre-3.18-rc7-gnu/arch/powerpc/platforms/pseries/msi.c
--- linux-libre-3.18-rc6-gnu/arch/powerpc/platforms/pseries/msi.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/powerpc/platforms/pseries/msi.c	2014-11-30 19:42:27.000000000 -0500
@@ -420,7 +420,7 @@ static int rtas_setup_msi_irqs(struct pc
 	 */
 again:
 	if (type == PCI_CAP_ID_MSI) {
-		if (pdn->force_32bit_msi) {
+		if (pdev->no_64bit_msi) {
 			rc = rtas_change_msi(pdn, RTAS_CHANGE_32MSI_FN, nvec);
 			if (rc < 0) {
 				/*
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/powerpc/xmon/xmon.c linux-libre-3.18-rc7-gnu/arch/powerpc/xmon/xmon.c
--- linux-libre-3.18-rc6-gnu/arch/powerpc/xmon/xmon.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/powerpc/xmon/xmon.c	2014-11-30 19:42:27.000000000 -0500
@@ -293,10 +293,10 @@ static inline void disable_surveillance(
 	args.token = rtas_token("set-indicator");
 	if (args.token == RTAS_UNKNOWN_SERVICE)
 		return;
-	args.nargs = 3;
-	args.nret = 1;
+	args.nargs = cpu_to_be32(3);
+	args.nret = cpu_to_be32(1);
 	args.rets = &args.args[3];
-	args.args[0] = SURVEILLANCE_TOKEN;
+	args.args[0] = cpu_to_be32(SURVEILLANCE_TOKEN);
 	args.args[1] = 0;
 	args.args[2] = 0;
 	enter_rtas(__pa(&args));
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/sparc/include/asm/dma-mapping.h linux-libre-3.18-rc7-gnu/arch/sparc/include/asm/dma-mapping.h
--- linux-libre-3.18-rc6-gnu/arch/sparc/include/asm/dma-mapping.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/sparc/include/asm/dma-mapping.h	2014-11-30 19:42:27.000000000 -0500
@@ -12,6 +12,14 @@ int dma_supported(struct device *dev, u6
 #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
 #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
 
+static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
+				  enum dma_data_direction dir)
+{
+	/* Since dma_{alloc,free}_noncoherent() allocated coherent memory, this
+	 * routine can be a nop.
+	 */
+}
+
 extern struct dma_map_ops *dma_ops;
 extern struct dma_map_ops *leon_dma_ops;
 extern struct dma_map_ops pci32_dma_ops;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/arch/x86/kvm/mmu.c linux-libre-3.18-rc7-gnu/arch/x86/kvm/mmu.c
--- linux-libre-3.18-rc6-gnu/arch/x86/kvm/mmu.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/arch/x86/kvm/mmu.c	2014-11-30 19:42:27.000000000 -0500
@@ -630,7 +630,7 @@ static int mmu_spte_clear_track_bits(u64
 	 * kvm mmu, before reclaiming the page, we should
 	 * unmap it from mmu first.
 	 */
-	WARN_ON(!kvm_is_mmio_pfn(pfn) && !page_count(pfn_to_page(pfn)));
+	WARN_ON(!kvm_is_reserved_pfn(pfn) && !page_count(pfn_to_page(pfn)));
 
 	if (!shadow_accessed_mask || old_spte & shadow_accessed_mask)
 		kvm_set_pfn_accessed(pfn);
@@ -2461,7 +2461,7 @@ static int set_spte(struct kvm_vcpu *vcp
 		spte |= PT_PAGE_SIZE_MASK;
 	if (tdp_enabled)
 		spte |= kvm_x86_ops->get_mt_mask(vcpu, gfn,
-			kvm_is_mmio_pfn(pfn));
+			kvm_is_reserved_pfn(pfn));
 
 	if (host_writable)
 		spte |= SPTE_HOST_WRITEABLE;
@@ -2737,7 +2737,7 @@ static void transparent_hugepage_adjust(
 	 * PT_PAGE_TABLE_LEVEL and there would be no adjustment done
 	 * here.
 	 */
-	if (!is_error_noslot_pfn(pfn) && !kvm_is_mmio_pfn(pfn) &&
+	if (!is_error_noslot_pfn(pfn) && !kvm_is_reserved_pfn(pfn) &&
 	    level == PT_PAGE_TABLE_LEVEL &&
 	    PageTransCompound(pfn_to_page(pfn)) &&
 	    !has_wrprotected_page(vcpu->kvm, gfn, PT_DIRECTORY_LEVEL)) {
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/Documentation/networking/timestamping.txt linux-libre-3.18-rc7-gnu/Documentation/networking/timestamping.txt
--- linux-libre-3.18-rc6-gnu/Documentation/networking/timestamping.txt	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/Documentation/networking/timestamping.txt	2014-11-30 19:42:27.000000000 -0500
@@ -136,7 +136,7 @@ SOF_TIMESTAMPING_OPT_ID:
 
   This option is implemented only for transmit timestamps. There, the
   timestamp is always looped along with a struct sock_extended_err.
-  The option modifies field ee_info to pass an id that is unique
+  The option modifies field ee_data to pass an id that is unique
   among all possibly concurrently outstanding timestamp requests for
   that socket. In practice, it is a monotonically increasing u32
   (that wraps).
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/atm/solos-pci.c linux-libre-3.18-rc7-gnu/drivers/atm/solos-pci.c
--- linux-libre-3.18-rc6-gnu/drivers/atm/solos-pci.c	2014-11-25 20:48:14.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/atm/solos-pci.c	2014-11-30 23:00:14.000000000 -0500
@@ -1223,11 +1223,13 @@ static int fpga_probe(struct pci_dev *de
 	card->config_regs = pci_iomap(dev, 0, CONFIG_RAM_SIZE);
 	if (!card->config_regs) {
 		dev_warn(&dev->dev, "Failed to ioremap config registers\n");
+		err = -ENOMEM;
 		goto out_release_regions;
 	}
 	card->buffers = pci_iomap(dev, 1, DATA_RAM_SIZE);
 	if (!card->buffers) {
 		dev_warn(&dev->dev, "Failed to ioremap data buffers\n");
+		err = -ENOMEM;
 		goto out_unmap_config;
 	}
 
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/clk/at91/clk-usb.c linux-libre-3.18-rc7-gnu/drivers/clk/at91/clk-usb.c
--- linux-libre-3.18-rc6-gnu/drivers/clk/at91/clk-usb.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/clk/at91/clk-usb.c	2014-11-30 19:42:27.000000000 -0500
@@ -52,29 +52,26 @@ static unsigned long at91sam9x5_clk_usb_
 
 	tmp = pmc_read(pmc, AT91_PMC_USB);
 	usbdiv = (tmp & AT91_PMC_OHCIUSBDIV) >> SAM9X5_USB_DIV_SHIFT;
-	return parent_rate / (usbdiv + 1);
+
+	return DIV_ROUND_CLOSEST(parent_rate, (usbdiv + 1));
 }
 
 static long at91sam9x5_clk_usb_round_rate(struct clk_hw *hw, unsigned long rate,
 					  unsigned long *parent_rate)
 {
 	unsigned long div;
-	unsigned long bestrate;
-	unsigned long tmp;
+
+	if (!rate)
+		return -EINVAL;
 
 	if (rate >= *parent_rate)
 		return *parent_rate;
 
-	div = *parent_rate / rate;
-	if (div >= SAM9X5_USB_MAX_DIV)
-		return *parent_rate / (SAM9X5_USB_MAX_DIV + 1);
-
-	bestrate = *parent_rate / div;
-	tmp = *parent_rate / (div + 1);
-	if (bestrate - rate > rate - tmp)
-		bestrate = tmp;
+	div = DIV_ROUND_CLOSEST(*parent_rate, rate);
+	if (div > SAM9X5_USB_MAX_DIV + 1)
+		div = SAM9X5_USB_MAX_DIV + 1;
 
-	return bestrate;
+	return DIV_ROUND_CLOSEST(*parent_rate, div);
 }
 
 static int at91sam9x5_clk_usb_set_parent(struct clk_hw *hw, u8 index)
@@ -106,9 +103,13 @@ static int at91sam9x5_clk_usb_set_rate(s
 	u32 tmp;
 	struct at91sam9x5_clk_usb *usb = to_at91sam9x5_clk_usb(hw);
 	struct at91_pmc *pmc = usb->pmc;
-	unsigned long div = parent_rate / rate;
+	unsigned long div;
 
-	if (parent_rate % rate || div < 1 || div >= SAM9X5_USB_MAX_DIV)
+	if (!rate)
+		return -EINVAL;
+
+	div = DIV_ROUND_CLOSEST(parent_rate, rate);
+	if (div > SAM9X5_USB_MAX_DIV + 1 || !div)
 		return -EINVAL;
 
 	tmp = pmc_read(pmc, AT91_PMC_USB) & ~AT91_PMC_OHCIUSBDIV;
@@ -253,7 +254,7 @@ static long at91rm9200_clk_usb_round_rat
 
 		tmp_parent_rate = rate * usb->divisors[i];
 		tmp_parent_rate = __clk_round_rate(parent, tmp_parent_rate);
-		tmprate = tmp_parent_rate / usb->divisors[i];
+		tmprate = DIV_ROUND_CLOSEST(tmp_parent_rate, usb->divisors[i]);
 		if (tmprate < rate)
 			tmpdiff = rate - tmprate;
 		else
@@ -281,10 +282,10 @@ static int at91rm9200_clk_usb_set_rate(s
 	struct at91_pmc *pmc = usb->pmc;
 	unsigned long div;
 
-	if (!rate || parent_rate % rate)
+	if (!rate)
 		return -EINVAL;
 
-	div = parent_rate / rate;
+	div = DIV_ROUND_CLOSEST(parent_rate, rate);
 
 	for (i = 0; i < RM9200_USB_DIV_TAB_SIZE; i++) {
 		if (usb->divisors[i] == div) {
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/clk/clk-divider.c linux-libre-3.18-rc7-gnu/drivers/clk/clk-divider.c
--- linux-libre-3.18-rc6-gnu/drivers/clk/clk-divider.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/clk/clk-divider.c	2014-11-30 19:42:27.000000000 -0500
@@ -263,6 +263,14 @@ static int clk_divider_bestdiv(struct cl
 	if (!rate)
 		rate = 1;
 
+	/* if read only, just return current value */
+	if (divider->flags & CLK_DIVIDER_READ_ONLY) {
+		bestdiv = readl(divider->reg) >> divider->shift;
+		bestdiv &= div_mask(divider);
+		bestdiv = _get_div(divider, bestdiv);
+		return bestdiv;
+	}
+
 	maxdiv = _get_maxdiv(divider);
 
 	if (!(__clk_get_flags(hw->clk) & CLK_SET_RATE_PARENT)) {
@@ -361,11 +369,6 @@ const struct clk_ops clk_divider_ops = {
 };
 EXPORT_SYMBOL_GPL(clk_divider_ops);
 
-const struct clk_ops clk_divider_ro_ops = {
-	.recalc_rate = clk_divider_recalc_rate,
-};
-EXPORT_SYMBOL_GPL(clk_divider_ro_ops);
-
 static struct clk *_register_divider(struct device *dev, const char *name,
 		const char *parent_name, unsigned long flags,
 		void __iomem *reg, u8 shift, u8 width,
@@ -391,10 +394,7 @@ static struct clk *_register_divider(str
 	}
 
 	init.name = name;
-	if (clk_divider_flags & CLK_DIVIDER_READ_ONLY)
-		init.ops = &clk_divider_ro_ops;
-	else
-		init.ops = &clk_divider_ops;
+	init.ops = &clk_divider_ops;
 	init.flags = flags | CLK_IS_BASIC;
 	init.parent_names = (parent_name ? &parent_name: NULL);
 	init.num_parents = (parent_name ? 1 : 0);
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/clk/pxa/clk-pxa27x.c linux-libre-3.18-rc7-gnu/drivers/clk/pxa/clk-pxa27x.c
--- linux-libre-3.18-rc6-gnu/drivers/clk/pxa/clk-pxa27x.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/clk/pxa/clk-pxa27x.c	2014-11-30 19:42:27.000000000 -0500
@@ -322,7 +322,7 @@ static unsigned long clk_pxa27x_memory_g
 	unsigned long ccsr = CCSR;
 
 	osc_forced = ccsr & (1 << CCCR_CPDIS_BIT);
-	a = cccr & CCCR_A_BIT;
+	a = cccr & (1 << CCCR_A_BIT);
 	l  = ccsr & CCSR_L_MASK;
 
 	if (osc_forced || a)
@@ -341,7 +341,7 @@ static u8 clk_pxa27x_memory_get_parent(s
 	unsigned long ccsr = CCSR;
 
 	osc_forced = ccsr & (1 << CCCR_CPDIS_BIT);
-	a = cccr & CCCR_A_BIT;
+	a = cccr & (1 << CCCR_A_BIT);
 	if (osc_forced)
 		return PXA_MEM_13Mhz;
 	if (a)
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/clk/qcom/mmcc-apq8084.c linux-libre-3.18-rc7-gnu/drivers/clk/qcom/mmcc-apq8084.c
--- linux-libre-3.18-rc6-gnu/drivers/clk/qcom/mmcc-apq8084.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/clk/qcom/mmcc-apq8084.c	2014-11-30 19:42:27.000000000 -0500
@@ -3122,7 +3122,7 @@ static struct clk_regmap *mmcc_apq8084_c
 	[ESC1_CLK_SRC] = &esc1_clk_src.clkr,
 	[HDMI_CLK_SRC] = &hdmi_clk_src.clkr,
 	[VSYNC_CLK_SRC] = &vsync_clk_src.clkr,
-	[RBCPR_CLK_SRC] = &rbcpr_clk_src.clkr,
+	[MMSS_RBCPR_CLK_SRC] = &rbcpr_clk_src.clkr,
 	[RBBMTIMER_CLK_SRC] = &rbbmtimer_clk_src.clkr,
 	[MAPLE_CLK_SRC] = &maple_clk_src.clkr,
 	[VDP_CLK_SRC] = &vdp_clk_src.clkr,
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/clk/rockchip/clk.c linux-libre-3.18-rc7-gnu/drivers/clk/rockchip/clk.c
--- linux-libre-3.18-rc6-gnu/drivers/clk/rockchip/clk.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/clk/rockchip/clk.c	2014-11-30 19:42:27.000000000 -0500
@@ -90,9 +90,7 @@ static struct clk *rockchip_clk_register
 		div->width = div_width;
 		div->lock = lock;
 		div->table = div_table;
-		div_ops = (div_flags & CLK_DIVIDER_READ_ONLY)
-						? &clk_divider_ro_ops
-						: &clk_divider_ops;
+		div_ops = &clk_divider_ops;
 	}
 
 	clk = clk_register_composite(NULL, name, parent_names, num_parents,
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/gpu/drm/i915/intel_display.c linux-libre-3.18-rc7-gnu/drivers/gpu/drm/i915/intel_display.c
--- linux-libre-3.18-rc6-gnu/drivers/gpu/drm/i915/intel_display.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/gpu/drm/i915/intel_display.c	2014-11-30 19:42:27.000000000 -0500
@@ -9408,6 +9408,10 @@ static bool page_flip_finished(struct in
 	struct drm_device *dev = crtc->base.dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 
+	if (i915_reset_in_progress(&dev_priv->gpu_error) ||
+	    crtc->reset_counter != atomic_read(&dev_priv->gpu_error.reset_counter))
+		return true;
+
 	/*
 	 * The relevant registers doen't exist on pre-ctg.
 	 * As the flip done interrupt doesn't trigger for mmio
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/gpu/drm/i915/intel_dp.c linux-libre-3.18-rc7-gnu/drivers/gpu/drm/i915/intel_dp.c
--- linux-libre-3.18-rc6-gnu/drivers/gpu/drm/i915/intel_dp.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/gpu/drm/i915/intel_dp.c	2014-11-30 19:42:27.000000000 -0500
@@ -4450,6 +4450,7 @@ static void intel_dp_encoder_suspend(str
 	 * vdd might still be enabled do to the delayed vdd off.
 	 * Make sure vdd is actually turned off here.
 	 */
+	cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
 	pps_lock(intel_dp);
 	edp_panel_vdd_off_sync(intel_dp);
 	pps_unlock(intel_dp);
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/gpu/drm/radeon/radeon_connectors.c linux-libre-3.18-rc7-gnu/drivers/gpu/drm/radeon/radeon_connectors.c
--- linux-libre-3.18-rc6-gnu/drivers/gpu/drm/radeon/radeon_connectors.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/gpu/drm/radeon/radeon_connectors.c	2014-11-30 19:42:27.000000000 -0500
@@ -322,6 +322,12 @@ static void radeon_connector_get_edid(st
 	}
 
 	if (!radeon_connector->edid) {
+		/* don't fetch the edid from the vbios if ddc fails and runpm is
+		 * enabled so we report disconnected.
+		 */
+		if ((rdev->flags & RADEON_IS_PX) && (radeon_runtime_pm != 0))
+			return;
+
 		if (rdev->is_atom_bios) {
 			/* some laptops provide a hardcoded edid in rom for LCDs */
 			if (((connector->connector_type == DRM_MODE_CONNECTOR_LVDS) ||
@@ -826,6 +832,8 @@ static int radeon_lvds_mode_valid(struct
 static enum drm_connector_status
 radeon_lvds_detect(struct drm_connector *connector, bool force)
 {
+	struct drm_device *dev = connector->dev;
+	struct radeon_device *rdev = dev->dev_private;
 	struct radeon_connector *radeon_connector = to_radeon_connector(connector);
 	struct drm_encoder *encoder = radeon_best_single_encoder(connector);
 	enum drm_connector_status ret = connector_status_disconnected;
@@ -842,7 +850,11 @@ radeon_lvds_detect(struct drm_connector
 		/* check if panel is valid */
 		if (native_mode->hdisplay >= 320 && native_mode->vdisplay >= 240)
 			ret = connector_status_connected;
-
+		/* don't fetch the edid from the vbios if ddc fails and runpm is
+		 * enabled so we report disconnected.
+		 */
+		if ((rdev->flags & RADEON_IS_PX) && (radeon_runtime_pm != 0))
+			ret = connector_status_disconnected;
 	}
 
 	/* check for edid as well */
@@ -1589,6 +1601,11 @@ radeon_dp_detect(struct drm_connector *c
 			/* check if panel is valid */
 			if (native_mode->hdisplay >= 320 && native_mode->vdisplay >= 240)
 				ret = connector_status_connected;
+			/* don't fetch the edid from the vbios if ddc fails and runpm is
+			 * enabled so we report disconnected.
+			 */
+			if ((rdev->flags & RADEON_IS_PX) && (radeon_runtime_pm != 0))
+				ret = connector_status_disconnected;
 		}
 		/* eDP is always DP */
 		radeon_dig_connector->dp_sink_type = CONNECTOR_OBJECT_ID_DISPLAYPORT;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/gpu/drm/radeon/radeon_irq_kms.c linux-libre-3.18-rc7-gnu/drivers/gpu/drm/radeon/radeon_irq_kms.c
--- linux-libre-3.18-rc6-gnu/drivers/gpu/drm/radeon/radeon_irq_kms.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/gpu/drm/radeon/radeon_irq_kms.c	2014-11-30 19:42:27.000000000 -0500
@@ -185,6 +185,16 @@ static bool radeon_msi_ok(struct radeon_
 	if (rdev->flags & RADEON_IS_AGP)
 		return false;
 
+	/*
+	 * Older chips have a HW limitation, they can only generate 40 bits
+	 * of address for "64-bit" MSIs which breaks on some platforms, notably
+	 * IBM POWER servers, so we limit them
+	 */
+	if (rdev->family < CHIP_BONAIRE) {
+		dev_info(rdev->dev, "radeon: MSI limited to 32-bit\n");
+		rdev->pdev->no_64bit_msi = 1;
+	}
+
 	/* force MSI on */
 	if (radeon_msi == 1)
 		return true;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/hwmon/g762.c linux-libre-3.18-rc7-gnu/drivers/hwmon/g762.c
--- linux-libre-3.18-rc6-gnu/drivers/hwmon/g762.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/hwmon/g762.c	2014-11-30 19:42:27.000000000 -0500
@@ -1084,10 +1084,8 @@ static int g762_probe(struct i2c_client
 	if (ret)
 		goto clock_dis;
 
-	data->hwmon_dev = devm_hwmon_device_register_with_groups(dev,
-								 client->name,
-								 data,
-								 g762_groups);
+	data->hwmon_dev = hwmon_device_register_with_groups(dev, client->name,
+							    data, g762_groups);
 	if (IS_ERR(data->hwmon_dev)) {
 		ret = PTR_ERR(data->hwmon_dev);
 		goto clock_dis;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/iio/accel/bmc150-accel.c linux-libre-3.18-rc7-gnu/drivers/iio/accel/bmc150-accel.c
--- linux-libre-3.18-rc6-gnu/drivers/iio/accel/bmc150-accel.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/iio/accel/bmc150-accel.c	2014-11-30 19:42:27.000000000 -0500
@@ -44,6 +44,9 @@
 
 #define BMC150_ACCEL_REG_INT_STATUS_2		0x0B
 #define BMC150_ACCEL_ANY_MOTION_MASK		0x07
+#define BMC150_ACCEL_ANY_MOTION_BIT_X		BIT(0)
+#define BMC150_ACCEL_ANY_MOTION_BIT_Y		BIT(1)
+#define BMC150_ACCEL_ANY_MOTION_BIT_Z		BIT(2)
 #define BMC150_ACCEL_ANY_MOTION_BIT_SIGN	BIT(3)
 
 #define BMC150_ACCEL_REG_PMU_LPW		0x11
@@ -92,9 +95,9 @@
 #define BMC150_ACCEL_SLOPE_THRES_MASK		0xFF
 
 /* Slope duration in terms of number of samples */
-#define BMC150_ACCEL_DEF_SLOPE_DURATION	2
+#define BMC150_ACCEL_DEF_SLOPE_DURATION		1
 /* in terms of multiples of g's/LSB, based on range */
-#define BMC150_ACCEL_DEF_SLOPE_THRESHOLD	5
+#define BMC150_ACCEL_DEF_SLOPE_THRESHOLD	1
 
 #define BMC150_ACCEL_REG_XOUT_L		0x02
 
@@ -536,6 +539,9 @@ static int bmc150_accel_set_power_state(
 	if (ret < 0) {
 		dev_err(&data->client->dev,
 			"Failed: bmc150_accel_set_power_state for %d\n", on);
+		if (on)
+			pm_runtime_put_noidle(&data->client->dev);
+
 		return ret;
 	}
 
@@ -811,6 +817,7 @@ static int bmc150_accel_write_event_conf
 
 	ret =  bmc150_accel_setup_any_motion_interrupt(data, state);
 	if (ret < 0) {
+		bmc150_accel_set_power_state(data, false);
 		mutex_unlock(&data->mutex);
 		return ret;
 	}
@@ -846,7 +853,7 @@ static const struct attribute_group bmc1
 
 static const struct iio_event_spec bmc150_accel_event = {
 		.type = IIO_EV_TYPE_ROC,
-		.dir = IIO_EV_DIR_RISING | IIO_EV_DIR_FALLING,
+		.dir = IIO_EV_DIR_EITHER,
 		.mask_separate = BIT(IIO_EV_INFO_VALUE) |
 				 BIT(IIO_EV_INFO_ENABLE) |
 				 BIT(IIO_EV_INFO_PERIOD)
@@ -1054,6 +1061,7 @@ static int bmc150_accel_data_rdy_trigger
 	else
 		ret = bmc150_accel_setup_new_data_interrupt(data, state);
 	if (ret < 0) {
+		bmc150_accel_set_power_state(data, false);
 		mutex_unlock(&data->mutex);
 		return ret;
 	}
@@ -1092,12 +1100,26 @@ static irqreturn_t bmc150_accel_event_ha
 	else
 		dir = IIO_EV_DIR_RISING;
 
-	if (ret & BMC150_ACCEL_ANY_MOTION_MASK)
+	if (ret & BMC150_ACCEL_ANY_MOTION_BIT_X)
 		iio_push_event(indio_dev, IIO_MOD_EVENT_CODE(IIO_ACCEL,
 							0,
-							IIO_MOD_X_OR_Y_OR_Z,
+							IIO_MOD_X,
 							IIO_EV_TYPE_ROC,
-							IIO_EV_DIR_EITHER),
+							dir),
+							data->timestamp);
+	if (ret & BMC150_ACCEL_ANY_MOTION_BIT_Y)
+		iio_push_event(indio_dev, IIO_MOD_EVENT_CODE(IIO_ACCEL,
+							0,
+							IIO_MOD_Y,
+							IIO_EV_TYPE_ROC,
+							dir),
+							data->timestamp);
+	if (ret & BMC150_ACCEL_ANY_MOTION_BIT_Z)
+		iio_push_event(indio_dev, IIO_MOD_EVENT_CODE(IIO_ACCEL,
+							0,
+							IIO_MOD_Z,
+							IIO_EV_TYPE_ROC,
+							dir),
 							data->timestamp);
 ack_intr_status:
 	if (!data->dready_trigger_on)
@@ -1354,10 +1376,14 @@ static int bmc150_accel_runtime_suspend(
 {
 	struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
 	struct bmc150_accel_data *data = iio_priv(indio_dev);
+	int ret;
 
 	dev_dbg(&data->client->dev,  __func__);
+	ret = bmc150_accel_set_mode(data, BMC150_ACCEL_SLEEP_MODE_SUSPEND, 0);
+	if (ret < 0)
+		return -EAGAIN;
 
-	return bmc150_accel_set_mode(data, BMC150_ACCEL_SLEEP_MODE_SUSPEND, 0);
+	return 0;
 }
 
 static int bmc150_accel_runtime_resume(struct device *dev)
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/iio/accel/kxcjk-1013.c linux-libre-3.18-rc7-gnu/drivers/iio/accel/kxcjk-1013.c
--- linux-libre-3.18-rc6-gnu/drivers/iio/accel/kxcjk-1013.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/iio/accel/kxcjk-1013.c	2014-11-30 19:42:27.000000000 -0500
@@ -269,6 +269,8 @@ static int kxcjk1013_set_range(struct kx
 		return ret;
 	}
 
+	ret &= ~(KXCJK1013_REG_CTRL1_BIT_GSEL0 |
+		 KXCJK1013_REG_CTRL1_BIT_GSEL1);
 	ret |= (KXCJK1013_scale_table[range_index].gsel_0 << 3);
 	ret |= (KXCJK1013_scale_table[range_index].gsel_1 << 4);
 
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/iio/adc/men_z188_adc.c linux-libre-3.18-rc7-gnu/drivers/iio/adc/men_z188_adc.c
--- linux-libre-3.18-rc6-gnu/drivers/iio/adc/men_z188_adc.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/iio/adc/men_z188_adc.c	2014-11-30 19:42:27.000000000 -0500
@@ -152,6 +152,7 @@ static void men_z188_remove(struct mcb_d
 
 static const struct mcb_device_id men_z188_ids[] = {
 	{ .device = 0xbc },
+	{ }
 };
 MODULE_DEVICE_TABLE(mcb, men_z188_ids);
 
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/iio/gyro/bmg160.c linux-libre-3.18-rc7-gnu/drivers/iio/gyro/bmg160.c
--- linux-libre-3.18-rc6-gnu/drivers/iio/gyro/bmg160.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/iio/gyro/bmg160.c	2014-11-30 19:42:27.000000000 -0500
@@ -67,6 +67,9 @@
 #define BMG160_REG_INT_EN_0		0x15
 #define BMG160_DATA_ENABLE_INT		BIT(7)
 
+#define BMG160_REG_INT_EN_1		0x16
+#define BMG160_INT1_BIT_OD		BIT(1)
+
 #define BMG160_REG_XOUT_L		0x02
 #define BMG160_AXIS_TO_REG(axis)	(BMG160_REG_XOUT_L + (axis * 2))
 
@@ -82,6 +85,9 @@
 
 #define BMG160_REG_INT_STATUS_2	0x0B
 #define BMG160_ANY_MOTION_MASK		0x07
+#define BMG160_ANY_MOTION_BIT_X		BIT(0)
+#define BMG160_ANY_MOTION_BIT_Y		BIT(1)
+#define BMG160_ANY_MOTION_BIT_Z		BIT(2)
 
 #define BMG160_REG_TEMP		0x08
 #define BMG160_TEMP_CENTER_VAL		23
@@ -222,6 +228,19 @@ static int bmg160_chip_init(struct bmg16
 	data->slope_thres = ret;
 
 	/* Set default interrupt mode */
+	ret = i2c_smbus_read_byte_data(data->client, BMG160_REG_INT_EN_1);
+	if (ret < 0) {
+		dev_err(&data->client->dev, "Error reading reg_int_en_1\n");
+		return ret;
+	}
+	ret &= ~BMG160_INT1_BIT_OD;
+	ret = i2c_smbus_write_byte_data(data->client,
+					BMG160_REG_INT_EN_1, ret);
+	if (ret < 0) {
+		dev_err(&data->client->dev, "Error writing reg_int_en_1\n");
+		return ret;
+	}
+
 	ret = i2c_smbus_write_byte_data(data->client,
 					BMG160_REG_INT_RST_LATCH,
 					BMG160_INT_MODE_LATCH_INT |
@@ -250,6 +269,9 @@ static int bmg160_set_power_state(struct
 	if (ret < 0) {
 		dev_err(&data->client->dev,
 			"Failed: bmg160_set_power_state for %d\n", on);
+		if (on)
+			pm_runtime_put_noidle(&data->client->dev);
+
 		return ret;
 	}
 #endif
@@ -705,6 +727,7 @@ static int bmg160_write_event_config(str
 
 	ret =  bmg160_setup_any_motion_interrupt(data, state);
 	if (ret < 0) {
+		bmg160_set_power_state(data, false);
 		mutex_unlock(&data->mutex);
 		return ret;
 	}
@@ -743,7 +766,7 @@ static const struct attribute_group bmg1
 
 static const struct iio_event_spec bmg160_event = {
 		.type = IIO_EV_TYPE_ROC,
-		.dir = IIO_EV_DIR_RISING | IIO_EV_DIR_FALLING,
+		.dir = IIO_EV_DIR_EITHER,
 		.mask_shared_by_type = BIT(IIO_EV_INFO_VALUE) |
 				       BIT(IIO_EV_INFO_ENABLE)
 };
@@ -871,6 +894,7 @@ static int bmg160_data_rdy_trigger_set_s
 	else
 		ret = bmg160_setup_new_data_interrupt(data, state);
 	if (ret < 0) {
+		bmg160_set_power_state(data, false);
 		mutex_unlock(&data->mutex);
 		return ret;
 	}
@@ -908,10 +932,24 @@ static irqreturn_t bmg160_event_handler(
 	else
 		dir = IIO_EV_DIR_FALLING;
 
-	if (ret & BMG160_ANY_MOTION_MASK)
+	if (ret & BMG160_ANY_MOTION_BIT_X)
 		iio_push_event(indio_dev, IIO_MOD_EVENT_CODE(IIO_ANGL_VEL,
 							0,
-							IIO_MOD_X_OR_Y_OR_Z,
+							IIO_MOD_X,
+							IIO_EV_TYPE_ROC,
+							dir),
+							data->timestamp);
+	if (ret & BMG160_ANY_MOTION_BIT_Y)
+		iio_push_event(indio_dev, IIO_MOD_EVENT_CODE(IIO_ANGL_VEL,
+							0,
+							IIO_MOD_Y,
+							IIO_EV_TYPE_ROC,
+							dir),
+							data->timestamp);
+	if (ret & BMG160_ANY_MOTION_BIT_Z)
+		iio_push_event(indio_dev, IIO_MOD_EVENT_CODE(IIO_ANGL_VEL,
+							0,
+							IIO_MOD_Z,
 							IIO_EV_TYPE_ROC,
 							dir),
 							data->timestamp);
@@ -1169,8 +1207,15 @@ static int bmg160_runtime_suspend(struct
 {
 	struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
 	struct bmg160_data *data = iio_priv(indio_dev);
+	int ret;
 
-	return bmg160_set_mode(data, BMG160_MODE_SUSPEND);
+	ret = bmg160_set_mode(data, BMG160_MODE_SUSPEND);
+	if (ret < 0) {
+		dev_err(&data->client->dev, "set mode failed\n");
+		return -EAGAIN;
+	}
+
+	return 0;
 }
 
 static int bmg160_runtime_resume(struct device *dev)
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/input/joystick/xpad.c linux-libre-3.18-rc7-gnu/drivers/input/joystick/xpad.c
--- linux-libre-3.18-rc6-gnu/drivers/input/joystick/xpad.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/input/joystick/xpad.c	2014-11-30 19:42:27.000000000 -0500
@@ -1179,9 +1179,19 @@ static int xpad_probe(struct usb_interfa
 		}
 
 		ep_irq_in = &intf->cur_altsetting->endpoint[1].desc;
-		usb_fill_bulk_urb(xpad->bulk_out, udev,
-				usb_sndbulkpipe(udev, ep_irq_in->bEndpointAddress),
-				xpad->bdata, XPAD_PKT_LEN, xpad_bulk_out, xpad);
+		if (usb_endpoint_is_bulk_out(ep_irq_in)) {
+			usb_fill_bulk_urb(xpad->bulk_out, udev,
+					  usb_sndbulkpipe(udev,
+							  ep_irq_in->bEndpointAddress),
+					  xpad->bdata, XPAD_PKT_LEN,
+					  xpad_bulk_out, xpad);
+		} else {
+			usb_fill_int_urb(xpad->bulk_out, udev,
+					 usb_sndintpipe(udev,
+							ep_irq_in->bEndpointAddress),
+					 xpad->bdata, XPAD_PKT_LEN,
+					 xpad_bulk_out, xpad, 0);
+		}
 
 		/*
 		 * Submit the int URB immediately rather than waiting for open
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/input/mouse/elantech.c linux-libre-3.18-rc7-gnu/drivers/input/mouse/elantech.c
--- linux-libre-3.18-rc6-gnu/drivers/input/mouse/elantech.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/input/mouse/elantech.c	2014-11-30 19:42:27.000000000 -0500
@@ -428,14 +428,6 @@ static void elantech_report_trackpoint(s
 	int x, y;
 	u32 t;
 
-	if (dev_WARN_ONCE(&psmouse->ps2dev.serio->dev,
-			  !tp_dev,
-			  psmouse_fmt("Unexpected trackpoint message\n"))) {
-		if (etd->debug == 1)
-			elantech_packet_dump(psmouse);
-		return;
-	}
-
 	t = get_unaligned_le32(&packet[0]);
 
 	switch (t & ~7U) {
@@ -793,7 +785,7 @@ static int elantech_packet_check_v4(stru
 	unsigned char packet_type = packet[3] & 0x03;
 	bool sanity_check;
 
-	if ((packet[3] & 0x0f) == 0x06)
+	if (etd->tp_dev && (packet[3] & 0x0f) == 0x06)
 		return PACKET_TRACKPOINT;
 
 	/*
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/input/mouse/synaptics.c linux-libre-3.18-rc7-gnu/drivers/input/mouse/synaptics.c
--- linux-libre-3.18-rc6-gnu/drivers/input/mouse/synaptics.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/input/mouse/synaptics.c	2014-11-30 19:42:27.000000000 -0500
@@ -143,6 +143,10 @@ static const struct min_max_quirk min_ma
 		(const char * const []){"LEN2001", NULL},
 		1024, 5022, 2508, 4832
 	},
+	{
+		(const char * const []){"LEN2006", NULL},
+		1264, 5675, 1171, 4688
+	},
 	{ }
 };
 
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/irqchip/irq-atmel-aic-common.c linux-libre-3.18-rc7-gnu/drivers/irqchip/irq-atmel-aic-common.c
--- linux-libre-3.18-rc6-gnu/drivers/irqchip/irq-atmel-aic-common.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/irqchip/irq-atmel-aic-common.c	2014-11-30 19:42:27.000000000 -0500
@@ -217,8 +217,9 @@ struct irq_domain *__init aic_common_of_
 	}
 
 	ret = irq_alloc_domain_generic_chips(domain, 32, 1, name,
-					     handle_level_irq, 0, 0,
-					     IRQCHIP_SKIP_SET_WAKE);
+					     handle_fasteoi_irq,
+					     IRQ_NOREQUEST | IRQ_NOPROBE |
+					     IRQ_NOAUTOEN, 0, 0);
 	if (ret)
 		goto err_domain_remove;
 
@@ -230,7 +231,6 @@ struct irq_domain *__init aic_common_of_
 		gc->unused = 0;
 		gc->wake_enabled = ~0;
 		gc->chip_types[0].type = IRQ_TYPE_SENSE_MASK;
-		gc->chip_types[0].handler = handle_fasteoi_irq;
 		gc->chip_types[0].chip.irq_eoi = irq_gc_eoi;
 		gc->chip_types[0].chip.irq_set_wake = irq_gc_set_wake;
 		gc->chip_types[0].chip.irq_shutdown = aic_common_shutdown;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/irqchip/irq-bcm7120-l2.c linux-libre-3.18-rc7-gnu/drivers/irqchip/irq-bcm7120-l2.c
--- linux-libre-3.18-rc6-gnu/drivers/irqchip/irq-bcm7120-l2.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/irqchip/irq-bcm7120-l2.c	2014-11-30 19:42:27.000000000 -0500
@@ -101,9 +101,9 @@ static int bcm7120_l2_intc_init_one(stru
 	int parent_irq;
 
 	parent_irq = irq_of_parse_and_map(dn, irq);
-	if (parent_irq < 0) {
+	if (!parent_irq) {
 		pr_err("failed to map interrupt %d\n", irq);
-		return parent_irq;
+		return -EINVAL;
 	}
 
 	data->irq_map_mask |= be32_to_cpup(map_mask + irq);
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/irqchip/irq-brcmstb-l2.c linux-libre-3.18-rc7-gnu/drivers/irqchip/irq-brcmstb-l2.c
--- linux-libre-3.18-rc6-gnu/drivers/irqchip/irq-brcmstb-l2.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/irqchip/irq-brcmstb-l2.c	2014-11-30 19:42:27.000000000 -0500
@@ -135,9 +135,9 @@ int __init brcmstb_l2_intc_of_init(struc
 	__raw_writel(0xffffffff, data->base + CPU_CLEAR);
 
 	data->parent_irq = irq_of_parse_and_map(np, 0);
-	if (data->parent_irq < 0) {
+	if (!data->parent_irq) {
 		pr_err("failed to find parent interrupt\n");
-		ret = data->parent_irq;
+		ret = -EINVAL;
 		goto out_unmap;
 	}
 
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/net/dsa/bcm_sf2.c linux-libre-3.18-rc7-gnu/drivers/net/dsa/bcm_sf2.c
--- linux-libre-3.18-rc6-gnu/drivers/net/dsa/bcm_sf2.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/net/dsa/bcm_sf2.c	2014-11-30 19:42:27.000000000 -0500
@@ -377,6 +377,29 @@ static irqreturn_t bcm_sf2_switch_1_isr(
 	return IRQ_HANDLED;
 }
 
+static int bcm_sf2_sw_rst(struct bcm_sf2_priv *priv)
+{
+	unsigned int timeout = 1000;
+	u32 reg;
+
+	reg = core_readl(priv, CORE_WATCHDOG_CTRL);
+	reg |= SOFTWARE_RESET | EN_CHIP_RST | EN_SW_RESET;
+	core_writel(priv, reg, CORE_WATCHDOG_CTRL);
+
+	do {
+		reg = core_readl(priv, CORE_WATCHDOG_CTRL);
+		if (!(reg & SOFTWARE_RESET))
+			break;
+
+		usleep_range(1000, 2000);
+	} while (timeout-- > 0);
+
+	if (timeout == 0)
+		return -ETIMEDOUT;
+
+	return 0;
+}
+
 static int bcm_sf2_sw_setup(struct dsa_switch *ds)
 {
 	const char *reg_names[BCM_SF2_REGS_NUM] = BCM_SF2_REGS_NAME;
@@ -404,11 +427,18 @@ static int bcm_sf2_sw_setup(struct dsa_s
 		*base = of_iomap(dn, i);
 		if (*base == NULL) {
 			pr_err("unable to find register: %s\n", reg_names[i]);
-			return -ENODEV;
+			ret = -ENOMEM;
+			goto out_unmap;
 		}
 		base++;
 	}
 
+	ret = bcm_sf2_sw_rst(priv);
+	if (ret) {
+		pr_err("unable to software reset switch: %d\n", ret);
+		goto out_unmap;
+	}
+
 	/* Disable all interrupts and request them */
 	intrl2_0_writel(priv, 0xffffffff, INTRL2_CPU_MASK_SET);
 	intrl2_0_writel(priv, 0xffffffff, INTRL2_CPU_CLEAR);
@@ -484,7 +514,8 @@ out_free_irq0:
 out_unmap:
 	base = &priv->core;
 	for (i = 0; i < BCM_SF2_REGS_NUM; i++) {
-		iounmap(*base);
+		if (*base)
+			iounmap(*base);
 		base++;
 	}
 	return ret;
@@ -732,29 +763,6 @@ static int bcm_sf2_sw_suspend(struct dsa
 
 	return 0;
 }
-
-static int bcm_sf2_sw_rst(struct bcm_sf2_priv *priv)
-{
-	unsigned int timeout = 1000;
-	u32 reg;
-
-	reg = core_readl(priv, CORE_WATCHDOG_CTRL);
-	reg |= SOFTWARE_RESET | EN_CHIP_RST | EN_SW_RESET;
-	core_writel(priv, reg, CORE_WATCHDOG_CTRL);
-
-	do {
-		reg = core_readl(priv, CORE_WATCHDOG_CTRL);
-		if (!(reg & SOFTWARE_RESET))
-			break;
-
-		usleep_range(1000, 2000);
-	} while (timeout-- > 0);
-
-	if (timeout == 0)
-		return -ETIMEDOUT;
-
-	return 0;
-}
 
 static int bcm_sf2_sw_resume(struct dsa_switch *ds)
 {
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/net/ethernet/broadcom/tg3.c linux-libre-3.18-rc7-gnu/drivers/net/ethernet/broadcom/tg3.c
--- linux-libre-3.18-rc6-gnu/drivers/net/ethernet/broadcom/tg3.c	2014-11-25 20:56:11.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/net/ethernet/broadcom/tg3.c	2014-11-30 23:08:14.000000000 -0500
@@ -8554,7 +8554,8 @@ static int tg3_init_rings(struct tg3 *tp
 		if (tnapi->rx_rcb)
 			memset(tnapi->rx_rcb, 0, TG3_RX_RCB_RING_BYTES(tp));
 
-		if (tg3_rx_prodring_alloc(tp, &tnapi->prodring)) {
+		if (tnapi->prodring.rx_std &&
+		    tg3_rx_prodring_alloc(tp, &tnapi->prodring)) {
 			tg3_free_rings(tp);
 			return -ENOMEM;
 		}
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/net/ethernet/emulex/benet/be_main.c linux-libre-3.18-rc7-gnu/drivers/net/ethernet/emulex/benet/be_main.c
--- linux-libre-3.18-rc6-gnu/drivers/net/ethernet/emulex/benet/be_main.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/net/ethernet/emulex/benet/be_main.c	2014-11-30 19:42:27.000000000 -0500
@@ -4309,11 +4309,16 @@ static int be_ndo_bridge_setlink(struct
 		return -EOPNOTSUPP;
 
 	br_spec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_AF_SPEC);
+	if (!br_spec)
+		return -EINVAL;
 
 	nla_for_each_nested(attr, br_spec, rem) {
 		if (nla_type(attr) != IFLA_BRIDGE_MODE)
 			continue;
 
+		if (nla_len(attr) < sizeof(mode))
+			return -EINVAL;
+
 		mode = nla_get_u16(attr);
 		if (mode != BRIDGE_MODE_VEPA && mode != BRIDGE_MODE_VEB)
 			return -EINVAL;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/net/ethernet/intel/igb/igb_main.c linux-libre-3.18-rc7-gnu/drivers/net/ethernet/intel/igb/igb_main.c
--- linux-libre-3.18-rc6-gnu/drivers/net/ethernet/intel/igb/igb_main.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/net/ethernet/intel/igb/igb_main.c	2014-11-30 19:42:27.000000000 -0500
@@ -1012,7 +1012,8 @@ static void igb_free_q_vector(struct igb
 	/* igb_get_stats64() might access the rings on this vector,
 	 * we must wait a grace period before freeing it.
 	 */
-	kfree_rcu(q_vector, rcu);
+	if (q_vector)
+		kfree_rcu(q_vector, rcu);
 }
 
 /**
@@ -1792,8 +1793,10 @@ void igb_down(struct igb_adapter *adapte
 	adapter->flags &= ~IGB_FLAG_NEED_LINK_UPDATE;
 
 	for (i = 0; i < adapter->num_q_vectors; i++) {
-		napi_synchronize(&(adapter->q_vector[i]->napi));
-		napi_disable(&(adapter->q_vector[i]->napi));
+		if (adapter->q_vector[i]) {
+			napi_synchronize(&adapter->q_vector[i]->napi);
+			napi_disable(&adapter->q_vector[i]->napi);
+		}
 	}
 
 
@@ -3717,7 +3720,8 @@ static void igb_free_all_tx_resources(st
 	int i;
 
 	for (i = 0; i < adapter->num_tx_queues; i++)
-		igb_free_tx_resources(adapter->tx_ring[i]);
+		if (adapter->tx_ring[i])
+			igb_free_tx_resources(adapter->tx_ring[i]);
 }
 
 void igb_unmap_and_free_tx_resource(struct igb_ring *ring,
@@ -3782,7 +3786,8 @@ static void igb_clean_all_tx_rings(struc
 	int i;
 
 	for (i = 0; i < adapter->num_tx_queues; i++)
-		igb_clean_tx_ring(adapter->tx_ring[i]);
+		if (adapter->tx_ring[i])
+			igb_clean_tx_ring(adapter->tx_ring[i]);
 }
 
 /**
@@ -3819,7 +3824,8 @@ static void igb_free_all_rx_resources(st
 	int i;
 
 	for (i = 0; i < adapter->num_rx_queues; i++)
-		igb_free_rx_resources(adapter->rx_ring[i]);
+		if (adapter->rx_ring[i])
+			igb_free_rx_resources(adapter->rx_ring[i]);
 }
 
 /**
@@ -3874,7 +3880,8 @@ static void igb_clean_all_rx_rings(struc
 	int i;
 
 	for (i = 0; i < adapter->num_rx_queues; i++)
-		igb_clean_rx_ring(adapter->rx_ring[i]);
+		if (adapter->rx_ring[i])
+			igb_clean_rx_ring(adapter->rx_ring[i]);
 }
 
 /**
@@ -7404,6 +7411,8 @@ static int igb_resume(struct device *dev
 	pci_restore_state(pdev);
 	pci_save_state(pdev);
 
+	if (!pci_device_is_present(pdev))
+		return -ENODEV;
 	err = pci_enable_device_mem(pdev);
 	if (err) {
 		dev_err(&pdev->dev,
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c linux-libre-3.18-rc7-gnu/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
--- linux-libre-3.18-rc6-gnu/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c	2014-11-30 19:42:27.000000000 -0500
@@ -3936,8 +3936,8 @@ void ixgbe_set_rx_mode(struct net_device
 		 * if SR-IOV and VMDQ are disabled - otherwise ensure
 		 * that hardware VLAN filters remain enabled.
 		 */
-		if (!(adapter->flags & (IXGBE_FLAG_VMDQ_ENABLED |
-					IXGBE_FLAG_SRIOV_ENABLED)))
+		if (adapter->flags & (IXGBE_FLAG_VMDQ_ENABLED |
+				      IXGBE_FLAG_SRIOV_ENABLED))
 			vlnctrl |= (IXGBE_VLNCTRL_VFE | IXGBE_VLNCTRL_CFIEN);
 	} else {
 		if (netdev->flags & IFF_ALLMULTI) {
@@ -7669,6 +7669,8 @@ static int ixgbe_ndo_bridge_setlink(stru
 		return -EOPNOTSUPP;
 
 	br_spec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_AF_SPEC);
+	if (!br_spec)
+		return -EINVAL;
 
 	nla_for_each_nested(attr, br_spec, rem) {
 		__u16 mode;
@@ -7677,6 +7679,9 @@ static int ixgbe_ndo_bridge_setlink(stru
 		if (nla_type(attr) != IFLA_BRIDGE_MODE)
 			continue;
 
+		if (nla_len(attr) < sizeof(mode))
+			return -EINVAL;
+
 		mode = nla_get_u16(attr);
 		if (mode == BRIDGE_MODE_VEPA) {
 			reg = 0;
@@ -7979,6 +7984,7 @@ static int ixgbe_probe(struct pci_dev *p
 	int i, err, pci_using_dac, expected_gts;
 	unsigned int indices = MAX_TX_QUEUES;
 	u8 part_str[IXGBE_PBANUM_LENGTH];
+	bool disable_dev = false;
 #ifdef IXGBE_FCOE
 	u16 device_caps;
 #endif
@@ -8369,13 +8375,14 @@ err_sw_init:
 	iounmap(adapter->io_addr);
 	kfree(adapter->mac_table);
 err_ioremap:
+	disable_dev = !test_and_set_bit(__IXGBE_DISABLED, &adapter->state);
 	free_netdev(netdev);
 err_alloc_etherdev:
 	pci_release_selected_regions(pdev,
 				     pci_select_bars(pdev, IORESOURCE_MEM));
 err_pci_reg:
 err_dma:
-	if (!adapter || !test_and_set_bit(__IXGBE_DISABLED, &adapter->state))
+	if (!adapter || disable_dev)
 		pci_disable_device(pdev);
 	return err;
 }
@@ -8393,6 +8400,7 @@ static void ixgbe_remove(struct pci_dev
 {
 	struct ixgbe_adapter *adapter = pci_get_drvdata(pdev);
 	struct net_device *netdev = adapter->netdev;
+	bool disable_dev;
 
 	ixgbe_dbg_adapter_exit(adapter);
 
@@ -8442,11 +8450,12 @@ static void ixgbe_remove(struct pci_dev
 	e_dev_info("complete\n");
 
 	kfree(adapter->mac_table);
+	disable_dev = !test_and_set_bit(__IXGBE_DISABLED, &adapter->state);
 	free_netdev(netdev);
 
 	pci_disable_pcie_error_reporting(pdev);
 
-	if (!test_and_set_bit(__IXGBE_DISABLED, &adapter->state))
+	if (disable_dev)
 		pci_disable_device(pdev);
 }
 
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c linux-libre-3.18-rc7-gnu/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
--- linux-libre-3.18-rc6-gnu/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c	2014-11-30 19:42:27.000000000 -0500
@@ -1546,7 +1546,7 @@ static int qp_alloc_res(struct mlx4_dev
 
 	switch (op) {
 	case RES_OP_RESERVE:
-		count = get_param_l(&in_param);
+		count = get_param_l(&in_param) & 0xffffff;
 		align = get_param_h(&in_param);
 		err = mlx4_grant_resource(dev, slave, RES_QP, count, 0);
 		if (err)
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c linux-libre-3.18-rc7-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
--- linux-libre-3.18-rc6-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c	2014-11-30 19:42:27.000000000 -0500
@@ -177,12 +177,6 @@ static int stmmac_probe_config_dt(struct
 	 */
 	plat->maxmtu = JUMBO_LEN;
 
-	/* Set default value for multicast hash bins */
-	plat->multicast_filter_bins = HASH_TABLE_SIZE;
-
-	/* Set default value for unicast filter entries */
-	plat->unicast_filter_entries = 1;
-
 	/*
 	 * Currently only the properties needed on SPEAr600
 	 * are provided. All other properties should be added
@@ -270,6 +264,13 @@ static int stmmac_pltfr_probe(struct pla
 		return PTR_ERR(addr);
 
 	plat_dat = dev_get_platdata(&pdev->dev);
+
+	/* Set default value for multicast hash bins */
+	plat_dat->multicast_filter_bins = HASH_TABLE_SIZE;
+
+	/* Set default value for unicast filter entries */
+	plat_dat->unicast_filter_entries = 1;
+
 	if (pdev->dev.of_node) {
 		if (!plat_dat)
 			plat_dat = devm_kzalloc(&pdev->dev,
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/net/vxlan.c linux-libre-3.18-rc7-gnu/drivers/net/vxlan.c
--- linux-libre-3.18-rc6-gnu/drivers/net/vxlan.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/net/vxlan.c	2014-11-30 19:42:27.000000000 -0500
@@ -2306,9 +2306,9 @@ static struct socket *vxlan_create_sock(
 	if (ipv6) {
 		udp_conf.family = AF_INET6;
 		udp_conf.use_udp6_tx_checksums =
-		    !!(flags & VXLAN_F_UDP_ZERO_CSUM6_TX);
+		    !(flags & VXLAN_F_UDP_ZERO_CSUM6_TX);
 		udp_conf.use_udp6_rx_checksums =
-		    !!(flags & VXLAN_F_UDP_ZERO_CSUM6_RX);
+		    !(flags & VXLAN_F_UDP_ZERO_CSUM6_RX);
 	} else {
 		udp_conf.family = AF_INET;
 		udp_conf.local_ip.s_addr = INADDR_ANY;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/net/wireless/iwlwifi/iwl-fw.h linux-libre-3.18-rc7-gnu/drivers/net/wireless/iwlwifi/iwl-fw.h
--- linux-libre-3.18-rc6-gnu/drivers/net/wireless/iwlwifi/iwl-fw.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/net/wireless/iwlwifi/iwl-fw.h	2014-11-30 19:42:27.000000000 -0500
@@ -155,6 +155,7 @@ enum iwl_ucode_tlv_api {
  * @IWL_UCODE_TLV_CAPA_QUIET_PERIOD_SUPPORT: supports Quiet Period requests
  * @IWL_UCODE_TLV_CAPA_DQA_SUPPORT: supports dynamic queue allocation (DQA),
  *	which also implies support for the scheduler configuration command
+ * @IWL_UCODE_TLV_CAPA_HOTSPOT_SUPPORT: supports Hot Spot Command
  */
 enum iwl_ucode_tlv_capa {
 	IWL_UCODE_TLV_CAPA_D0I3_SUPPORT			= BIT(0),
@@ -163,6 +164,7 @@ enum iwl_ucode_tlv_capa {
 	IWL_UCODE_TLV_CAPA_WFA_TPC_REP_IE_SUPPORT	= BIT(10),
 	IWL_UCODE_TLV_CAPA_QUIET_PERIOD_SUPPORT		= BIT(11),
 	IWL_UCODE_TLV_CAPA_DQA_SUPPORT			= BIT(12),
+	IWL_UCODE_TLV_CAPA_HOTSPOT_SUPPORT		= BIT(18),
 };
 
 /* The default calibrate table size if not specified by firmware file */
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/net/wireless/iwlwifi/mvm/mac80211.c linux-libre-3.18-rc7-gnu/drivers/net/wireless/iwlwifi/mvm/mac80211.c
--- linux-libre-3.18-rc6-gnu/drivers/net/wireless/iwlwifi/mvm/mac80211.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/net/wireless/iwlwifi/mvm/mac80211.c	2014-11-30 19:42:27.000000000 -0500
@@ -2448,9 +2448,15 @@ static int iwl_mvm_roc(struct ieee80211_
 
 	switch (vif->type) {
 	case NL80211_IFTYPE_STATION:
-		/* Use aux roc framework (HS20) */
-		ret = iwl_mvm_send_aux_roc_cmd(mvm, channel,
-					       vif, duration);
+		if (mvm->fw->ucode_capa.capa[0] &
+		    IWL_UCODE_TLV_CAPA_HOTSPOT_SUPPORT) {
+			/* Use aux roc framework (HS20) */
+			ret = iwl_mvm_send_aux_roc_cmd(mvm, channel,
+						       vif, duration);
+			goto out_unlock;
+		}
+		IWL_ERR(mvm, "hotspot not supported\n");
+		ret = -EINVAL;
 		goto out_unlock;
 	case NL80211_IFTYPE_P2P_DEVICE:
 		/* handle below */
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/net/wireless/rtlwifi/pci.c linux-libre-3.18-rc7-gnu/drivers/net/wireless/rtlwifi/pci.c
--- linux-libre-3.18-rc6-gnu/drivers/net/wireless/rtlwifi/pci.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/net/wireless/rtlwifi/pci.c	2014-11-30 19:42:27.000000000 -0500
@@ -2249,6 +2249,16 @@ int rtl_pci_probe(struct pci_dev *pdev,
 	/*like read eeprom and so on */
 	rtlpriv->cfg->ops->read_eeprom_info(hw);
 
+	if (rtlpriv->cfg->ops->init_sw_vars(hw)) {
+		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Can't init_sw_vars\n");
+		err = -ENODEV;
+		goto fail3;
+	}
+	rtlpriv->cfg->ops->init_sw_leds(hw);
+
+	/*aspm */
+	rtl_pci_init_aspm(hw);
+
 	/* Init mac80211 sw */
 	err = rtl_init_core(hw);
 	if (err) {
@@ -2264,16 +2274,6 @@ int rtl_pci_probe(struct pci_dev *pdev,
 		goto fail3;
 	}
 
-	if (rtlpriv->cfg->ops->init_sw_vars(hw)) {
-		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Can't init_sw_vars\n");
-		err = -ENODEV;
-		goto fail3;
-	}
-	rtlpriv->cfg->ops->init_sw_leds(hw);
-
-	/*aspm */
-	rtl_pci_init_aspm(hw);
-
 	err = ieee80211_register_hw(hw);
 	if (err) {
 		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/net/wireless/rtlwifi/rtl8821ae/hw.c linux-libre-3.18-rc7-gnu/drivers/net/wireless/rtlwifi/rtl8821ae/hw.c
--- linux-libre-3.18-rc6-gnu/drivers/net/wireless/rtlwifi/rtl8821ae/hw.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/net/wireless/rtlwifi/rtl8821ae/hw.c	2014-11-30 19:42:27.000000000 -0500
@@ -3672,8 +3672,9 @@ static void rtl8821ae_update_hal_rate_ma
 		mac->opmode == NL80211_IFTYPE_ADHOC)
 		macid = sta->aid + 1;
 	if (wirelessmode == WIRELESS_MODE_N_5G ||
-	    wirelessmode == WIRELESS_MODE_AC_5G)
-		ratr_bitmap = sta->supp_rates[NL80211_BAND_5GHZ];
+	    wirelessmode == WIRELESS_MODE_AC_5G ||
+	    wirelessmode == WIRELESS_MODE_A)
+		ratr_bitmap = sta->supp_rates[NL80211_BAND_5GHZ] << 4;
 	else
 		ratr_bitmap = sta->supp_rates[NL80211_BAND_2GHZ];
 
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/net/xen-netback/xenbus.c linux-libre-3.18-rc7-gnu/drivers/net/xen-netback/xenbus.c
--- linux-libre-3.18-rc6-gnu/drivers/net/xen-netback/xenbus.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/net/xen-netback/xenbus.c	2014-11-30 19:42:27.000000000 -0500
@@ -39,7 +39,7 @@ struct backend_info {
 static int connect_rings(struct backend_info *be, struct xenvif_queue *queue);
 static void connect(struct backend_info *be);
 static int read_xenbus_vif_flags(struct backend_info *be);
-static void backend_create_xenvif(struct backend_info *be);
+static int backend_create_xenvif(struct backend_info *be);
 static void unregister_hotplug_status_watch(struct backend_info *be);
 static void set_backend_state(struct backend_info *be,
 			      enum xenbus_state state);
@@ -352,7 +352,9 @@ static int netback_probe(struct xenbus_d
 	be->state = XenbusStateInitWait;
 
 	/* This kicks hotplug scripts, so do it immediately. */
-	backend_create_xenvif(be);
+	err = backend_create_xenvif(be);
+	if (err)
+		goto fail;
 
 	return 0;
 
@@ -397,19 +399,19 @@ static int netback_uevent(struct xenbus_
 }
 
 
-static void backend_create_xenvif(struct backend_info *be)
+static int backend_create_xenvif(struct backend_info *be)
 {
 	int err;
 	long handle;
 	struct xenbus_device *dev = be->dev;
 
 	if (be->vif != NULL)
-		return;
+		return 0;
 
 	err = xenbus_scanf(XBT_NIL, dev->nodename, "handle", "%li", &handle);
 	if (err != 1) {
 		xenbus_dev_fatal(dev, err, "reading handle");
-		return;
+		return (err < 0) ? err : -EINVAL;
 	}
 
 	be->vif = xenvif_alloc(&dev->dev, dev->otherend_id, handle);
@@ -417,10 +419,11 @@ static void backend_create_xenvif(struct
 		err = PTR_ERR(be->vif);
 		be->vif = NULL;
 		xenbus_dev_fatal(dev, err, "creating interface");
-		return;
+		return err;
 	}
 
 	kobject_uevent(&dev->dev.kobj, KOBJ_ONLINE);
+	return 0;
 }
 
 static void backend_disconnect(struct backend_info *be)
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/pci/msi.c linux-libre-3.18-rc7-gnu/drivers/pci/msi.c
--- linux-libre-3.18-rc6-gnu/drivers/pci/msi.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/pci/msi.c	2014-11-30 19:42:27.000000000 -0500
@@ -590,6 +590,20 @@ static struct msi_desc *msi_setup_entry(
 	return entry;
 }
 
+static int msi_verify_entries(struct pci_dev *dev)
+{
+	struct msi_desc *entry;
+
+	list_for_each_entry(entry, &dev->msi_list, list) {
+		if (!dev->no_64bit_msi || !entry->msg.address_hi)
+			continue;
+		dev_err(&dev->dev, "Device has broken 64-bit MSI but arch"
+			" tried to assign one above 4G\n");
+		return -EIO;
+	}
+	return 0;
+}
+
 /**
  * msi_capability_init - configure device's MSI capability structure
  * @dev: pointer to the pci_dev data structure of MSI device function
@@ -627,6 +641,13 @@ static int msi_capability_init(struct pc
 		return ret;
 	}
 
+	ret = msi_verify_entries(dev);
+	if (ret) {
+		msi_mask_irq(entry, mask, ~mask);
+		free_msi_irqs(dev);
+		return ret;
+	}
+
 	ret = populate_msi_sysfs(dev);
 	if (ret) {
 		msi_mask_irq(entry, mask, ~mask);
@@ -739,6 +760,11 @@ static int msix_capability_init(struct p
 	if (ret)
 		goto out_avail;
 
+	/* Check if all MSI entries honor device restrictions */
+	ret = msi_verify_entries(dev);
+	if (ret)
+		goto out_free;
+
 	/*
 	 * Some devices require MSI-X to be enabled before we can touch the
 	 * MSI-X registers.  We need to mask all the vectors to prevent
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/scsi/bnx2fc/bnx2fc_fcoe.c linux-libre-3.18-rc7-gnu/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
--- linux-libre-3.18-rc6-gnu/drivers/scsi/bnx2fc/bnx2fc_fcoe.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/scsi/bnx2fc/bnx2fc_fcoe.c	2014-11-30 19:42:27.000000000 -0500
@@ -412,6 +412,7 @@ static int bnx2fc_rcv(struct sk_buff *sk
 	struct fc_frame_header *fh;
 	struct fcoe_rcv_info *fr;
 	struct fcoe_percpu_s *bg;
+	struct sk_buff *tmp_skb;
 	unsigned short oxid;
 
 	interface = container_of(ptype, struct bnx2fc_interface,
@@ -424,6 +425,12 @@ static int bnx2fc_rcv(struct sk_buff *sk
 		goto err;
 	}
 
+	tmp_skb = skb_share_check(skb, GFP_ATOMIC);
+	if (!tmp_skb)
+		goto err;
+
+	skb = tmp_skb;
+
 	if (unlikely(eth_hdr(skb)->h_proto != htons(ETH_P_FCOE))) {
 		printk(KERN_ERR PFX "bnx2fc_rcv: Wrong FC type frame\n");
 		goto err;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/scsi/scsi_devinfo.c linux-libre-3.18-rc7-gnu/drivers/scsi/scsi_devinfo.c
--- linux-libre-3.18-rc6-gnu/drivers/scsi/scsi_devinfo.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/scsi/scsi_devinfo.c	2014-11-30 19:42:27.000000000 -0500
@@ -202,6 +202,7 @@ static struct {
 	{"IOMEGA", "Io20S         *F", NULL, BLIST_KEY},
 	{"INSITE", "Floptical   F*8I", NULL, BLIST_KEY},
 	{"INSITE", "I325VM", NULL, BLIST_KEY},
+	{"Intel", "Multi-Flex", NULL, BLIST_NO_RSOC},
 	{"iRiver", "iFP Mass Driver", NULL, BLIST_NOT_LOCKABLE | BLIST_INQUIRY_36},
 	{"LASOUND", "CDX7405", "3.10", BLIST_MAX5LUN | BLIST_SINGLELUN},
 	{"MATSHITA", "PD-1", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/scsi/ufs/ufshcd.c linux-libre-3.18-rc7-gnu/drivers/scsi/ufs/ufshcd.c
--- linux-libre-3.18-rc6-gnu/drivers/scsi/ufs/ufshcd.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/scsi/ufs/ufshcd.c	2014-11-30 19:42:27.000000000 -0500
@@ -744,6 +744,8 @@ static void ufshcd_exit_clk_gating(struc
 	if (!ufshcd_is_clkgating_allowed(hba))
 		return;
 	device_remove_file(hba->dev, &hba->clk_gating.delay_attr);
+	cancel_work_sync(&hba->clk_gating.ungate_work);
+	cancel_delayed_work_sync(&hba->clk_gating.gate_work);
 }
 
 /* Must be called with host lock acquired */
@@ -2246,6 +2248,22 @@ static int ufshcd_uic_hibern8_exit(struc
 	return ret;
 }
 
+ /**
+ * ufshcd_init_pwr_info - setting the POR (power on reset)
+ * values in hba power info
+ * @hba: per-adapter instance
+ */
+static void ufshcd_init_pwr_info(struct ufs_hba *hba)
+{
+	hba->pwr_info.gear_rx = UFS_PWM_G1;
+	hba->pwr_info.gear_tx = UFS_PWM_G1;
+	hba->pwr_info.lane_rx = 1;
+	hba->pwr_info.lane_tx = 1;
+	hba->pwr_info.pwr_rx = SLOWAUTO_MODE;
+	hba->pwr_info.pwr_tx = SLOWAUTO_MODE;
+	hba->pwr_info.hs_rate = 0;
+}
+
 /**
  * ufshcd_get_max_pwr_mode - reads the max power mode negotiated with device
  * @hba: per-adapter instance
@@ -2844,8 +2862,13 @@ static void ufshcd_slave_destroy(struct
 	hba = shost_priv(sdev->host);
 	scsi_deactivate_tcq(sdev, hba->nutrs);
 	/* Drop the reference as it won't be needed anymore */
-	if (ufshcd_scsi_to_upiu_lun(sdev->lun) == UFS_UPIU_UFS_DEVICE_WLUN)
+	if (ufshcd_scsi_to_upiu_lun(sdev->lun) == UFS_UPIU_UFS_DEVICE_WLUN) {
+		unsigned long flags;
+
+		spin_lock_irqsave(hba->host->host_lock, flags);
 		hba->sdev_ufs_device = NULL;
+		spin_unlock_irqrestore(hba->host->host_lock, flags);
+	}
 }
 
 /**
@@ -4062,6 +4085,8 @@ static void ufshcd_init_icc_levels(struc
 static int ufshcd_scsi_add_wlus(struct ufs_hba *hba)
 {
 	int ret = 0;
+	struct scsi_device *sdev_rpmb;
+	struct scsi_device *sdev_boot;
 
 	hba->sdev_ufs_device = __scsi_add_device(hba->host, 0, 0,
 		ufshcd_upiu_wlun_to_scsi_wlun(UFS_UPIU_UFS_DEVICE_WLUN), NULL);
@@ -4070,26 +4095,27 @@ static int ufshcd_scsi_add_wlus(struct u
 		hba->sdev_ufs_device = NULL;
 		goto out;
 	}
+	scsi_device_put(hba->sdev_ufs_device);
 
-	hba->sdev_boot = __scsi_add_device(hba->host, 0, 0,
+	sdev_boot = __scsi_add_device(hba->host, 0, 0,
 		ufshcd_upiu_wlun_to_scsi_wlun(UFS_UPIU_BOOT_WLUN), NULL);
-	if (IS_ERR(hba->sdev_boot)) {
-		ret = PTR_ERR(hba->sdev_boot);
-		hba->sdev_boot = NULL;
+	if (IS_ERR(sdev_boot)) {
+		ret = PTR_ERR(sdev_boot);
 		goto remove_sdev_ufs_device;
 	}
+	scsi_device_put(sdev_boot);
 
-	hba->sdev_rpmb = __scsi_add_device(hba->host, 0, 0,
+	sdev_rpmb = __scsi_add_device(hba->host, 0, 0,
 		ufshcd_upiu_wlun_to_scsi_wlun(UFS_UPIU_RPMB_WLUN), NULL);
-	if (IS_ERR(hba->sdev_rpmb)) {
-		ret = PTR_ERR(hba->sdev_rpmb);
-		hba->sdev_rpmb = NULL;
+	if (IS_ERR(sdev_rpmb)) {
+		ret = PTR_ERR(sdev_rpmb);
 		goto remove_sdev_boot;
 	}
+	scsi_device_put(sdev_rpmb);
 	goto out;
 
 remove_sdev_boot:
-	scsi_remove_device(hba->sdev_boot);
+	scsi_remove_device(sdev_boot);
 remove_sdev_ufs_device:
 	scsi_remove_device(hba->sdev_ufs_device);
 out:
@@ -4097,30 +4123,6 @@ out:
 }
 
 /**
- * ufshcd_scsi_remove_wlus - Removes the W-LUs which were added by
- *			     ufshcd_scsi_add_wlus()
- * @hba: per-adapter instance
- *
- */
-static void ufshcd_scsi_remove_wlus(struct ufs_hba *hba)
-{
-	if (hba->sdev_ufs_device) {
-		scsi_remove_device(hba->sdev_ufs_device);
-		hba->sdev_ufs_device = NULL;
-	}
-
-	if (hba->sdev_boot) {
-		scsi_remove_device(hba->sdev_boot);
-		hba->sdev_boot = NULL;
-	}
-
-	if (hba->sdev_rpmb) {
-		scsi_remove_device(hba->sdev_rpmb);
-		hba->sdev_rpmb = NULL;
-	}
-}
-
-/**
  * ufshcd_probe_hba - probe hba to detect device and initialize
  * @hba: per-adapter instance
  *
@@ -4134,6 +4136,8 @@ static int ufshcd_probe_hba(struct ufs_h
 	if (ret)
 		goto out;
 
+	ufshcd_init_pwr_info(hba);
+
 	/* UniPro link is active now */
 	ufshcd_set_link_active(hba);
 
@@ -4264,12 +4268,18 @@ static int ufshcd_config_vreg_load(struc
 static inline int ufshcd_config_vreg_lpm(struct ufs_hba *hba,
 					 struct ufs_vreg *vreg)
 {
+	if (!vreg)
+		return 0;
+
 	return ufshcd_config_vreg_load(hba->dev, vreg, UFS_VREG_LPM_LOAD_UA);
 }
 
 static inline int ufshcd_config_vreg_hpm(struct ufs_hba *hba,
 					 struct ufs_vreg *vreg)
 {
+	if (!vreg)
+		return 0;
+
 	return ufshcd_config_vreg_load(hba->dev, vreg, vreg->max_uA);
 }
 
@@ -4471,7 +4481,7 @@ out:
 			if (!IS_ERR_OR_NULL(clki->clk) && clki->enabled)
 				clk_disable_unprepare(clki->clk);
 		}
-	} else if (!ret && on) {
+	} else if (on) {
 		spin_lock_irqsave(hba->host->host_lock, flags);
 		hba->clk_gating.state = CLKS_ON;
 		spin_unlock_irqrestore(hba->host->host_lock, flags);
@@ -4675,11 +4685,25 @@ static int ufshcd_set_dev_pwr_mode(struc
 {
 	unsigned char cmd[6] = { START_STOP };
 	struct scsi_sense_hdr sshdr;
-	struct scsi_device *sdp = hba->sdev_ufs_device;
+	struct scsi_device *sdp;
+	unsigned long flags;
 	int ret;
 
-	if (!sdp || !scsi_device_online(sdp))
-		return -ENODEV;
+	spin_lock_irqsave(hba->host->host_lock, flags);
+	sdp = hba->sdev_ufs_device;
+	if (sdp) {
+		ret = scsi_device_get(sdp);
+		if (!ret && !scsi_device_online(sdp)) {
+			ret = -ENODEV;
+			scsi_device_put(sdp);
+		}
+	} else {
+		ret = -ENODEV;
+	}
+	spin_unlock_irqrestore(hba->host->host_lock, flags);
+
+	if (ret)
+		return ret;
 
 	/*
 	 * If scsi commands fail, the scsi mid-layer schedules scsi error-
@@ -4718,6 +4742,7 @@ static int ufshcd_set_dev_pwr_mode(struc
 	if (!ret)
 		hba->curr_dev_pwr_mode = pwr_mode;
 out:
+	scsi_device_put(sdp);
 	hba->host->eh_noresume = 0;
 	return ret;
 }
@@ -5087,7 +5112,7 @@ int ufshcd_system_suspend(struct ufs_hba
 	int ret = 0;
 
 	if (!hba || !hba->is_powered)
-		goto out;
+		return 0;
 
 	if (pm_runtime_suspended(hba->dev)) {
 		if (hba->rpm_lvl == hba->spm_lvl)
@@ -5231,7 +5256,6 @@ EXPORT_SYMBOL(ufshcd_shutdown);
 void ufshcd_remove(struct ufs_hba *hba)
 {
 	scsi_remove_host(hba->host);
-	ufshcd_scsi_remove_wlus(hba);
 	/* disable interrupts */
 	ufshcd_disable_intr(hba, hba->intr_mask);
 	ufshcd_hba_stop(hba);
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/scsi/ufs/ufshcd.h linux-libre-3.18-rc7-gnu/drivers/scsi/ufs/ufshcd.h
--- linux-libre-3.18-rc6-gnu/drivers/scsi/ufs/ufshcd.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/scsi/ufs/ufshcd.h	2014-11-30 19:42:27.000000000 -0500
@@ -392,8 +392,6 @@ struct ufs_hba {
 	 * "UFS device" W-LU.
 	 */
 	struct scsi_device *sdev_ufs_device;
-	struct scsi_device *sdev_rpmb;
-	struct scsi_device *sdev_boot;
 
 	enum ufs_dev_pwr_mode curr_dev_pwr_mode;
 	enum uic_link_state uic_link_state;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/scsi/ufs/ufshcd-pltfrm.c linux-libre-3.18-rc7-gnu/drivers/scsi/ufs/ufshcd-pltfrm.c
--- linux-libre-3.18-rc6-gnu/drivers/scsi/ufs/ufshcd-pltfrm.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/scsi/ufs/ufshcd-pltfrm.c	2014-11-30 19:42:27.000000000 -0500
@@ -102,7 +102,6 @@ static int ufshcd_parse_clock_info(struc
 	clkfreq = devm_kzalloc(dev, sz * sizeof(*clkfreq),
 			GFP_KERNEL);
 	if (!clkfreq) {
-		dev_err(dev, "%s: no memory\n", "freq-table-hz");
 		ret = -ENOMEM;
 		goto out;
 	}
@@ -112,19 +111,19 @@ static int ufshcd_parse_clock_info(struc
 	if (ret && (ret != -EINVAL)) {
 		dev_err(dev, "%s: error reading array %d\n",
 				"freq-table-hz", ret);
-		goto free_clkfreq;
+		return ret;
 	}
 
 	for (i = 0; i < sz; i += 2) {
 		ret = of_property_read_string_index(np,
 				"clock-names", i/2, (const char **)&name);
 		if (ret)
-			goto free_clkfreq;
+			goto out;
 
 		clki = devm_kzalloc(dev, sizeof(*clki), GFP_KERNEL);
 		if (!clki) {
 			ret = -ENOMEM;
-			goto free_clkfreq;
+			goto out;
 		}
 
 		clki->min_freq = clkfreq[i];
@@ -134,8 +133,6 @@ static int ufshcd_parse_clock_info(struc
 				clki->min_freq, clki->max_freq, clki->name);
 		list_add_tail(&clki->list, &hba->clk_list_head);
 	}
-free_clkfreq:
-	kfree(clkfreq);
 out:
 	return ret;
 }
@@ -162,10 +159,8 @@ static int ufshcd_populate_vreg(struct d
 	}
 
 	vreg = devm_kzalloc(dev, sizeof(*vreg), GFP_KERNEL);
-	if (!vreg) {
-		dev_err(dev, "No memory for %s regulator\n", name);
-		goto out;
-	}
+	if (!vreg)
+		return -ENOMEM;
 
 	vreg->name = kstrdup(name, GFP_KERNEL);
 
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/spi/spi.c linux-libre-3.18-rc7-gnu/drivers/spi/spi.c
--- linux-libre-3.18-rc6-gnu/drivers/spi/spi.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/spi/spi.c	2014-11-30 19:42:27.000000000 -0500
@@ -615,13 +615,13 @@ static int spi_map_buf(struct spi_master
 				sg_free_table(sgt);
 				return -ENOMEM;
 			}
-			sg_buf = page_address(vm_page) +
-				((size_t)buf & ~PAGE_MASK);
+			sg_set_page(&sgt->sgl[i], vm_page,
+				    min, offset_in_page(buf));
 		} else {
 			sg_buf = buf;
+			sg_set_buf(&sgt->sgl[i], sg_buf, min);
 		}
 
-		sg_set_buf(&sgt->sgl[i], sg_buf, min);
 
 		buf += min;
 		len -= min;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/spi/spi-dw.c linux-libre-3.18-rc7-gnu/drivers/spi/spi-dw.c
--- linux-libre-3.18-rc6-gnu/drivers/spi/spi-dw.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/spi/spi-dw.c	2014-11-30 19:42:27.000000000 -0500
@@ -376,9 +376,6 @@ static void pump_transfers(unsigned long
 	chip = dws->cur_chip;
 	spi = message->spi;
 
-	if (unlikely(!chip->clk_div))
-		chip->clk_div = dws->max_freq / chip->speed_hz;
-
 	if (message->state == ERROR_STATE) {
 		message->status = -EIO;
 		goto early_exit;
@@ -419,7 +416,7 @@ static void pump_transfers(unsigned long
 	if (transfer->speed_hz) {
 		speed = chip->speed_hz;
 
-		if (transfer->speed_hz != speed) {
+		if ((transfer->speed_hz != speed) || (!chip->clk_div)) {
 			speed = transfer->speed_hz;
 
 			/* clk_div doesn't support odd number */
@@ -581,7 +578,6 @@ static int dw_spi_setup(struct spi_devic
 		dev_err(&spi->dev, "No max speed HZ parameter\n");
 		return -EINVAL;
 	}
-	chip->speed_hz = spi->max_speed_hz;
 
 	chip->tmode = 0; /* Tx & Rx */
 	/* Default SPI mode is SCPOL = 0, SCPH = 0 */
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/spi/spi-sirf.c linux-libre-3.18-rc7-gnu/drivers/spi/spi-sirf.c
--- linux-libre-3.18-rc6-gnu/drivers/spi/spi-sirf.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/spi/spi-sirf.c	2014-11-30 19:42:27.000000000 -0500
@@ -562,9 +562,9 @@ spi_sirfsoc_setup_transfer(struct spi_de
 
 	sspi->word_width = DIV_ROUND_UP(bits_per_word, 8);
 	txfifo_ctrl = SIRFSOC_SPI_FIFO_THD(SIRFSOC_SPI_FIFO_SIZE / 2) |
-					   sspi->word_width;
+					   (sspi->word_width >> 1);
 	rxfifo_ctrl = SIRFSOC_SPI_FIFO_THD(SIRFSOC_SPI_FIFO_SIZE / 2) |
-					   sspi->word_width;
+					   (sspi->word_width >> 1);
 
 	if (!(spi->mode & SPI_CS_HIGH))
 		regval |= SIRFSOC_SPI_CS_IDLE_STAT;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/staging/rtl8188eu/core/rtw_cmd.c linux-libre-3.18-rc7-gnu/drivers/staging/rtl8188eu/core/rtw_cmd.c
--- linux-libre-3.18-rc6-gnu/drivers/staging/rtl8188eu/core/rtw_cmd.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/staging/rtl8188eu/core/rtw_cmd.c	2014-11-30 19:42:27.000000000 -0500
@@ -275,11 +275,11 @@ u8 rtw_sitesurvey_cmd(struct adapter  *p
 	if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
 		rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_SCAN, 1);
 
-	ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
+	ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
 	if (ph2c == NULL)
 		return _FAIL;
 
-	psurveyPara = kzalloc(sizeof(struct sitesurvey_parm), GFP_KERNEL);
+	psurveyPara = kzalloc(sizeof(struct sitesurvey_parm), GFP_ATOMIC);
 	if (psurveyPara == NULL) {
 		kfree(ph2c);
 		return _FAIL;
@@ -405,7 +405,7 @@ u8 rtw_joinbss_cmd(struct adapter  *pada
 	else
 		RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+Join cmd: SSid =[%s]\n", pmlmepriv->assoc_ssid.Ssid));
 
-	pcmd = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
+	pcmd = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
 	if (pcmd == NULL) {
 		res = _FAIL;
 		RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("rtw_joinbss_cmd: memory allocate for cmd_obj fail!!!\n"));
@@ -755,13 +755,13 @@ u8 rtw_dynamic_chk_wk_cmd(struct adapter
 	u8	res = _SUCCESS;
 
 
-	ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
+	ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
 	if (ph2c == NULL) {
 		res = _FAIL;
 		goto exit;
 	}
 
-	pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_KERNEL);
+	pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_ATOMIC);
 	if (pdrvextra_cmd_parm == NULL) {
 		kfree(ph2c);
 		res = _FAIL;
@@ -967,13 +967,13 @@ u8 rtw_lps_ctrl_wk_cmd(struct adapter *p
 	u8	res = _SUCCESS;
 
 	if (enqueue) {
-		ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
+		ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
 		if (ph2c == NULL) {
 			res = _FAIL;
 			goto exit;
 		}
 
-		pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_KERNEL);
+		pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_ATOMIC);
 		if (pdrvextra_cmd_parm == NULL) {
 			kfree(ph2c);
 			res = _FAIL;
@@ -1010,13 +1010,13 @@ u8 rtw_rpt_timer_cfg_cmd(struct adapter
 
 	u8	res = _SUCCESS;
 
-	ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
+	ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
 	if (ph2c == NULL) {
 		res = _FAIL;
 		goto exit;
 	}
 
-	pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_KERNEL);
+	pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_ATOMIC);
 	if (pdrvextra_cmd_parm == NULL) {
 		kfree(ph2c);
 		res = _FAIL;
@@ -1088,13 +1088,13 @@ u8 rtw_ps_cmd(struct adapter *padapter)
 
 	u8	res = _SUCCESS;
 
-	ppscmd = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
+	ppscmd = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
 	if (ppscmd == NULL) {
 		res = _FAIL;
 		goto exit;
 	}
 
-	pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_KERNEL);
+	pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_ATOMIC);
 	if (pdrvextra_cmd_parm == NULL) {
 		kfree(ppscmd);
 		res = _FAIL;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c linux-libre-3.18-rc7-gnu/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
--- linux-libre-3.18-rc6-gnu/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c	2014-11-30 19:42:27.000000000 -0500
@@ -4241,12 +4241,12 @@ void report_survey_event(struct adapter
 	pcmdpriv = &padapter->cmdpriv;
 
 
-	pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
+	pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
 	if (pcmd_obj == NULL)
 		return;
 
 	cmdsz = (sizeof(struct survey_event) + sizeof(struct C2HEvent_Header));
-	pevtcmd = kzalloc(cmdsz, GFP_KERNEL);
+	pevtcmd = kzalloc(cmdsz, GFP_ATOMIC);
 	if (pevtcmd == NULL) {
 		kfree(pcmd_obj);
 		return;
@@ -4339,12 +4339,12 @@ void report_join_res(struct adapter *pad
 	struct mlme_ext_info	*pmlmeinfo = &(pmlmeext->mlmext_info);
 	struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
 
-	pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
+	pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
 	if (pcmd_obj == NULL)
 		return;
 
 	cmdsz = (sizeof(struct joinbss_event) + sizeof(struct C2HEvent_Header));
-	pevtcmd = kzalloc(cmdsz, GFP_KERNEL);
+	pevtcmd = kzalloc(cmdsz, GFP_ATOMIC);
 	if (pevtcmd == NULL) {
 		kfree(pcmd_obj);
 		return;
@@ -4854,11 +4854,11 @@ void survey_timer_hdl(void *function_con
 			pmlmeext->scan_abort = false;/* reset */
 		}
 
-		ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
+		ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
 		if (ph2c == NULL)
 			goto exit_survey_timer_hdl;
 
-		psurveyPara = kzalloc(sizeof(struct sitesurvey_parm), GFP_KERNEL);
+		psurveyPara = kzalloc(sizeof(struct sitesurvey_parm), GFP_ATOMIC);
 		if (psurveyPara == NULL) {
 			kfree(ph2c);
 			goto exit_survey_timer_hdl;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/staging/rtl8188eu/core/rtw_wlan_util.c linux-libre-3.18-rc7-gnu/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
--- linux-libre-3.18-rc6-gnu/drivers/staging/rtl8188eu/core/rtw_wlan_util.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/staging/rtl8188eu/core/rtw_wlan_util.c	2014-11-30 19:42:27.000000000 -0500
@@ -935,7 +935,7 @@ int rtw_check_bcn_info(struct adapter  *
 		return true;
 	}
 
-	bssid = kzalloc(sizeof(struct wlan_bssid_ex), GFP_KERNEL);
+	bssid = kzalloc(sizeof(struct wlan_bssid_ex), GFP_ATOMIC);
 
 	subtype = GetFrameSubType(pframe) >> 4;
 
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/staging/rtl8188eu/os_dep/usb_intf.c linux-libre-3.18-rc7-gnu/drivers/staging/rtl8188eu/os_dep/usb_intf.c
--- linux-libre-3.18-rc6-gnu/drivers/staging/rtl8188eu/os_dep/usb_intf.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/staging/rtl8188eu/os_dep/usb_intf.c	2014-11-30 19:42:27.000000000 -0500
@@ -47,6 +47,7 @@ static struct usb_device_id rtw_usb_id_t
 	{USB_DEVICE(0x07b8, 0x8179)}, /* Abocom - Abocom */
 	{USB_DEVICE(0x2001, 0x330F)}, /* DLink DWA-125 REV D1 */
 	{USB_DEVICE(0x2001, 0x3310)}, /* Dlink DWA-123 REV D1 */
+	{USB_DEVICE(0x2001, 0x3311)}, /* DLink GO-USB-N150 REV B1 */
 	{USB_DEVICE(0x0df6, 0x0076)}, /* Sitecom N150 v2 */
 	{}	/* Terminating entry */
 };
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/thermal/cpu_cooling.c linux-libre-3.18-rc7-gnu/drivers/thermal/cpu_cooling.c
--- linux-libre-3.18-rc6-gnu/drivers/thermal/cpu_cooling.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/thermal/cpu_cooling.c	2014-11-30 19:42:27.000000000 -0500
@@ -50,15 +50,14 @@ struct cpufreq_cooling_device {
 	unsigned int cpufreq_state;
 	unsigned int cpufreq_val;
 	struct cpumask allowed_cpus;
+	struct list_head node;
 };
 static DEFINE_IDR(cpufreq_idr);
 static DEFINE_MUTEX(cooling_cpufreq_lock);
 
 static unsigned int cpufreq_dev_count;
 
-/* notify_table passes value to the CPUFREQ_ADJUST callback function. */
-#define NOTIFY_INVALID NULL
-static struct cpufreq_cooling_device *notify_device;
+static LIST_HEAD(cpufreq_dev_list);
 
 /**
  * get_idr - function to get a unique id.
@@ -287,15 +286,12 @@ static int cpufreq_apply_cooling(struct
 
 	cpufreq_device->cpufreq_state = cooling_state;
 	cpufreq_device->cpufreq_val = clip_freq;
-	notify_device = cpufreq_device;
 
 	for_each_cpu(cpuid, mask) {
 		if (is_cpufreq_valid(cpuid))
 			cpufreq_update_policy(cpuid);
 	}
 
-	notify_device = NOTIFY_INVALID;
-
 	return 0;
 }
 
@@ -316,21 +312,28 @@ static int cpufreq_thermal_notifier(stru
 {
 	struct cpufreq_policy *policy = data;
 	unsigned long max_freq = 0;
+	struct cpufreq_cooling_device *cpufreq_dev;
 
-	if (event != CPUFREQ_ADJUST || notify_device == NOTIFY_INVALID)
+	if (event != CPUFREQ_ADJUST)
 		return 0;
 
-	if (cpumask_test_cpu(policy->cpu, &notify_device->allowed_cpus))
-		max_freq = notify_device->cpufreq_val;
-	else
-		return 0;
+	mutex_lock(&cooling_cpufreq_lock);
+	list_for_each_entry(cpufreq_dev, &cpufreq_dev_list, node) {
+		if (!cpumask_test_cpu(policy->cpu,
+					&cpufreq_dev->allowed_cpus))
+			continue;
 
-	/* Never exceed user_policy.max */
-	if (max_freq > policy->user_policy.max)
-		max_freq = policy->user_policy.max;
+		if (!cpufreq_dev->cpufreq_val)
+			cpufreq_dev->cpufreq_val = get_cpu_frequency(
+					cpumask_any(&cpufreq_dev->allowed_cpus),
+					cpufreq_dev->cpufreq_state);
 
-	if (policy->max != max_freq)
-		cpufreq_verify_within_limits(policy, 0, max_freq);
+		max_freq = cpufreq_dev->cpufreq_val;
+
+		if (policy->max != max_freq)
+			cpufreq_verify_within_limits(policy, 0, max_freq);
+	}
+	mutex_unlock(&cooling_cpufreq_lock);
 
 	return 0;
 }
@@ -486,6 +489,7 @@ __cpufreq_cooling_register(struct device
 		cpufreq_register_notifier(&thermal_cpufreq_notifier_block,
 					  CPUFREQ_POLICY_NOTIFIER);
 	cpufreq_dev_count++;
+	list_add(&cpufreq_dev->node, &cpufreq_dev_list);
 
 	mutex_unlock(&cooling_cpufreq_lock);
 
@@ -549,6 +553,7 @@ void cpufreq_cooling_unregister(struct t
 
 	cpufreq_dev = cdev->devdata;
 	mutex_lock(&cooling_cpufreq_lock);
+	list_del(&cpufreq_dev->node);
 	cpufreq_dev_count--;
 
 	/* Unregister the notifier for the last cpufreq cooling device */
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/thermal/samsung/exynos_thermal_common.c linux-libre-3.18-rc7-gnu/drivers/thermal/samsung/exynos_thermal_common.c
--- linux-libre-3.18-rc6-gnu/drivers/thermal/samsung/exynos_thermal_common.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/thermal/samsung/exynos_thermal_common.c	2014-11-30 19:42:27.000000000 -0500
@@ -417,13 +417,10 @@ void exynos_unregister_thermal(struct th
 
 	th_zone = sensor_conf->pzone_data;
 
-	if (th_zone->therm_dev)
-		thermal_zone_device_unregister(th_zone->therm_dev);
+	thermal_zone_device_unregister(th_zone->therm_dev);
 
-	for (i = 0; i < th_zone->cool_dev_size; i++) {
-		if (th_zone->cool_dev[i])
-			cpufreq_cooling_unregister(th_zone->cool_dev[i]);
-	}
+	for (i = 0; i < th_zone->cool_dev_size; ++i)
+		cpufreq_cooling_unregister(th_zone->cool_dev[i]);
 
 	dev_info(sensor_conf->dev,
 		"Exynos: Kernel Thermal management unregistered\n");
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/thermal/st/st_thermal.c linux-libre-3.18-rc7-gnu/drivers/thermal/st/st_thermal.c
--- linux-libre-3.18-rc6-gnu/drivers/thermal/st/st_thermal.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/thermal/st/st_thermal.c	2014-11-30 19:42:27.000000000 -0500
@@ -275,6 +275,7 @@ int st_thermal_unregister(struct platfor
 }
 EXPORT_SYMBOL_GPL(st_thermal_unregister);
 
+#ifdef CONFIG_PM_SLEEP
 static int st_thermal_suspend(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
@@ -305,6 +306,8 @@ static int st_thermal_resume(struct devi
 
 	return 0;
 }
+#endif
+
 SIMPLE_DEV_PM_OPS(st_thermal_pm_ops, st_thermal_suspend, st_thermal_resume);
 EXPORT_SYMBOL_GPL(st_thermal_pm_ops);
 
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/tty/serial/of_serial.c linux-libre-3.18-rc7-gnu/drivers/tty/serial/of_serial.c
--- linux-libre-3.18-rc6-gnu/drivers/tty/serial/of_serial.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/tty/serial/of_serial.c	2014-11-30 19:42:27.000000000 -0500
@@ -240,32 +240,6 @@ static int of_platform_serial_remove(str
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
-static int of_serial_suspend(struct device *dev)
-{
-	struct of_serial_info *info = dev_get_drvdata(dev);
-
-	serial8250_suspend_port(info->line);
-	if (info->clk)
-		clk_disable_unprepare(info->clk);
-
-	return 0;
-}
-
-static int of_serial_resume(struct device *dev)
-{
-	struct of_serial_info *info = dev_get_drvdata(dev);
-
-	if (info->clk)
-		clk_prepare_enable(info->clk);
-
-	serial8250_resume_port(info->line);
-
-	return 0;
-}
-#endif
-static SIMPLE_DEV_PM_OPS(of_serial_pm_ops, of_serial_suspend, of_serial_resume);
-
 /*
  * A few common types, add more as needed.
  */
@@ -297,7 +271,6 @@ static struct platform_driver of_platfor
 		.name = "of_serial",
 		.owner = THIS_MODULE,
 		.of_match_table = of_platform_serial_table,
-		.pm = &of_serial_pm_ops,
 	},
 	.probe = of_platform_serial_probe,
 	.remove = of_platform_serial_remove,
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/usb/core/quirks.c linux-libre-3.18-rc7-gnu/drivers/usb/core/quirks.c
--- linux-libre-3.18-rc6-gnu/drivers/usb/core/quirks.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/usb/core/quirks.c	2014-11-30 19:42:27.000000000 -0500
@@ -44,6 +44,9 @@ static const struct usb_device_id usb_qu
 	/* Creative SB Audigy 2 NX */
 	{ USB_DEVICE(0x041e, 0x3020), .driver_info = USB_QUIRK_RESET_RESUME },
 
+	/* Microsoft Wireless Laser Mouse 6000 Receiver */
+	{ USB_DEVICE(0x045e, 0x00e1), .driver_info = USB_QUIRK_RESET_RESUME },
+
 	/* Microsoft LifeCam-VX700 v2.0 */
 	{ USB_DEVICE(0x045e, 0x0770), .driver_info = USB_QUIRK_RESET_RESUME },
 
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/usb/dwc3/ep0.c linux-libre-3.18-rc7-gnu/drivers/usb/dwc3/ep0.c
--- linux-libre-3.18-rc6-gnu/drivers/usb/dwc3/ep0.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/usb/dwc3/ep0.c	2014-11-30 19:42:27.000000000 -0500
@@ -791,6 +791,10 @@ static void dwc3_ep0_complete_data(struc
 
 	trb = dwc->ep0_trb;
 
+	r = next_request(&ep0->request_list);
+	if (!r)
+		return;
+
 	status = DWC3_TRB_SIZE_TRBSTS(trb->size);
 	if (status == DWC3_TRBSTS_SETUP_PENDING) {
 		dwc3_trace(trace_dwc3_ep0, "Setup Pending received");
@@ -801,10 +805,6 @@ static void dwc3_ep0_complete_data(struc
 		return;
 	}
 
-	r = next_request(&ep0->request_list);
-	if (!r)
-		return;
-
 	ur = &r->request;
 
 	length = trb->size & DWC3_TRB_SIZE_MASK;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/usb/host/xhci.c linux-libre-3.18-rc7-gnu/drivers/usb/host/xhci.c
--- linux-libre-3.18-rc6-gnu/drivers/usb/host/xhci.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/usb/host/xhci.c	2014-11-30 19:42:27.000000000 -0500
@@ -35,6 +35,8 @@
 #define DRIVER_AUTHOR "Sarah Sharp"
 #define DRIVER_DESC "'eXtensible' Host Controller (xHC) Driver"
 
+#define	PORT_WAKE_BITS	(PORT_WKOC_E | PORT_WKDISC_E | PORT_WKCONN_E)
+
 /* Some 0.95 hardware can't handle the chain bit on a Link TRB being cleared */
 static int link_quirk;
 module_param(link_quirk, int, S_IRUGO | S_IWUSR);
@@ -851,13 +853,47 @@ static void xhci_clear_command_ring(stru
 	xhci_set_cmd_ring_deq(xhci);
 }
 
+static void xhci_disable_port_wake_on_bits(struct xhci_hcd *xhci)
+{
+	int port_index;
+	__le32 __iomem **port_array;
+	unsigned long flags;
+	u32 t1, t2;
+
+	spin_lock_irqsave(&xhci->lock, flags);
+
+	/* disble usb3 ports Wake bits*/
+	port_index = xhci->num_usb3_ports;
+	port_array = xhci->usb3_ports;
+	while (port_index--) {
+		t1 = readl(port_array[port_index]);
+		t1 = xhci_port_state_to_neutral(t1);
+		t2 = t1 & ~PORT_WAKE_BITS;
+		if (t1 != t2)
+			writel(t2, port_array[port_index]);
+	}
+
+	/* disble usb2 ports Wake bits*/
+	port_index = xhci->num_usb2_ports;
+	port_array = xhci->usb2_ports;
+	while (port_index--) {
+		t1 = readl(port_array[port_index]);
+		t1 = xhci_port_state_to_neutral(t1);
+		t2 = t1 & ~PORT_WAKE_BITS;
+		if (t1 != t2)
+			writel(t2, port_array[port_index]);
+	}
+
+	spin_unlock_irqrestore(&xhci->lock, flags);
+}
+
 /*
  * Stop HC (not bus-specific)
  *
  * This is called when the machine transition into S3/S4 mode.
  *
  */
-int xhci_suspend(struct xhci_hcd *xhci)
+int xhci_suspend(struct xhci_hcd *xhci, bool do_wakeup)
 {
 	int			rc = 0;
 	unsigned int		delay = XHCI_MAX_HALT_USEC;
@@ -868,6 +904,10 @@ int xhci_suspend(struct xhci_hcd *xhci)
 			xhci->shared_hcd->state != HC_STATE_SUSPENDED)
 		return -EINVAL;
 
+	/* Clear root port wake on bits if wakeup not allowed. */
+	if (!do_wakeup)
+		xhci_disable_port_wake_on_bits(xhci);
+
 	/* Don't poll the roothubs on bus suspend. */
 	xhci_dbg(xhci, "%s: stopping port polling.\n", __func__);
 	clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
@@ -2912,68 +2952,33 @@ void xhci_cleanup_stalled_ring(struct xh
 	}
 }
 
-/* Deal with stalled endpoints.  The core should have sent the control message
- * to clear the halt condition.  However, we need to make the xHCI hardware
- * reset its sequence number, since a device will expect a sequence number of
- * zero after the halt condition is cleared.
+/* Called when clearing halted device. The core should have sent the control
+ * message to clear the device halt condition. The host side of the halt should
+ * already be cleared with a reset endpoint command issued when the STALL tx
+ * event was received.
+ *
  * Context: in_interrupt
  */
+
 void xhci_endpoint_reset(struct usb_hcd *hcd,
 		struct usb_host_endpoint *ep)
 {
 	struct xhci_hcd *xhci;
-	struct usb_device *udev;
-	unsigned int ep_index;
-	unsigned long flags;
-	int ret;
-	struct xhci_virt_ep *virt_ep;
-	struct xhci_command *command;
 
 	xhci = hcd_to_xhci(hcd);
-	udev = (struct usb_device *) ep->hcpriv;
-	/* Called with a root hub endpoint (or an endpoint that wasn't added
-	 * with xhci_add_endpoint()
-	 */
-	if (!ep->hcpriv)
-		return;
-	ep_index = xhci_get_endpoint_index(&ep->desc);
-	virt_ep = &xhci->devs[udev->slot_id]->eps[ep_index];
-	if (!virt_ep->stopped_td) {
-		xhci_dbg_trace(xhci, trace_xhci_dbg_reset_ep,
-			"Endpoint 0x%x not halted, refusing to reset.",
-			ep->desc.bEndpointAddress);
-		return;
-	}
-	if (usb_endpoint_xfer_control(&ep->desc)) {
-		xhci_dbg_trace(xhci, trace_xhci_dbg_reset_ep,
-				"Control endpoint stall already handled.");
-		return;
-	}
-
-	command = xhci_alloc_command(xhci, false, false, GFP_ATOMIC);
-	if (!command)
-		return;
 
-	xhci_dbg_trace(xhci, trace_xhci_dbg_reset_ep,
-			"Queueing reset endpoint command");
-	spin_lock_irqsave(&xhci->lock, flags);
-	ret = xhci_queue_reset_ep(xhci, command, udev->slot_id, ep_index);
 	/*
-	 * Can't change the ring dequeue pointer until it's transitioned to the
-	 * stopped state, which is only upon a successful reset endpoint
-	 * command.  Better hope that last command worked!
+	 * We might need to implement the config ep cmd in xhci 4.8.1 note:
+	 * The Reset Endpoint Command may only be issued to endpoints in the
+	 * Halted state. If software wishes reset the Data Toggle or Sequence
+	 * Number of an endpoint that isn't in the Halted state, then software
+	 * may issue a Configure Endpoint Command with the Drop and Add bits set
+	 * for the target endpoint. that is in the Stopped state.
 	 */
-	if (!ret) {
-		xhci_cleanup_stalled_ring(xhci, udev, ep_index);
-		kfree(virt_ep->stopped_td);
-		xhci_ring_cmd_db(xhci);
-	}
-	virt_ep->stopped_td = NULL;
-	virt_ep->stopped_stream = 0;
-	spin_unlock_irqrestore(&xhci->lock, flags);
 
-	if (ret)
-		xhci_warn(xhci, "FIXME allocate a new ring segment\n");
+	/* For now just print debug to follow the situation */
+	xhci_dbg(xhci, "Endpoint 0x%x ep reset callback called\n",
+		 ep->desc.bEndpointAddress);
 }
 
 static int xhci_check_streams_endpoint(struct xhci_hcd *xhci,
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/usb/host/xhci.h linux-libre-3.18-rc7-gnu/drivers/usb/host/xhci.h
--- linux-libre-3.18-rc6-gnu/drivers/usb/host/xhci.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/usb/host/xhci.h	2014-11-30 19:42:27.000000000 -0500
@@ -1746,7 +1746,7 @@ int xhci_gen_setup(struct usb_hcd *hcd,
 void xhci_init_driver(struct hc_driver *drv, int (*setup_fn)(struct usb_hcd *));
 
 #ifdef	CONFIG_PM
-int xhci_suspend(struct xhci_hcd *xhci);
+int xhci_suspend(struct xhci_hcd *xhci, bool do_wakeup);
 int xhci_resume(struct xhci_hcd *xhci, bool hibernated);
 #else
 #define	xhci_suspend	NULL
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/usb/host/xhci-hub.c linux-libre-3.18-rc7-gnu/drivers/usb/host/xhci-hub.c
--- linux-libre-3.18-rc6-gnu/drivers/usb/host/xhci-hub.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/usb/host/xhci-hub.c	2014-11-30 19:42:27.000000000 -0500
@@ -22,7 +22,6 @@
 
 
 #include <linux/slab.h>
-#include <linux/device.h>
 #include <asm/unaligned.h>
 
 #include "xhci.h"
@@ -1149,9 +1148,7 @@ int xhci_bus_suspend(struct usb_hcd *hcd
 		 * including the USB 3.0 roothub, but only if CONFIG_PM_RUNTIME
 		 * is enabled, so also enable remote wake here.
 		 */
-		if (hcd->self.root_hub->do_remote_wakeup
-				&& device_may_wakeup(hcd->self.controller)) {
-
+		if (hcd->self.root_hub->do_remote_wakeup) {
 			if (t1 & PORT_CONNECT) {
 				t2 |= PORT_WKOC_E | PORT_WKDISC_E;
 				t2 &= ~PORT_WKCONN_E;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/usb/host/xhci-pci.c linux-libre-3.18-rc7-gnu/drivers/usb/host/xhci-pci.c
--- linux-libre-3.18-rc6-gnu/drivers/usb/host/xhci-pci.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/usb/host/xhci-pci.c	2014-11-30 19:42:27.000000000 -0500
@@ -281,7 +281,7 @@ static int xhci_pci_suspend(struct usb_h
 	if (xhci->quirks & XHCI_COMP_MODE_QUIRK)
 		pdev->no_d3cold = true;
 
-	return xhci_suspend(xhci);
+	return xhci_suspend(xhci, do_wakeup);
 }
 
 static int xhci_pci_resume(struct usb_hcd *hcd, bool hibernated)
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/usb/host/xhci-plat.c linux-libre-3.18-rc7-gnu/drivers/usb/host/xhci-plat.c
--- linux-libre-3.18-rc6-gnu/drivers/usb/host/xhci-plat.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/usb/host/xhci-plat.c	2014-11-30 19:42:27.000000000 -0500
@@ -204,7 +204,15 @@ static int xhci_plat_suspend(struct devi
 	struct usb_hcd	*hcd = dev_get_drvdata(dev);
 	struct xhci_hcd	*xhci = hcd_to_xhci(hcd);
 
-	return xhci_suspend(xhci);
+	/*
+	 * xhci_suspend() needs `do_wakeup` to know whether host is allowed
+	 * to do wakeup during suspend. Since xhci_plat_suspend is currently
+	 * only designed for system suspend, device_may_wakeup() is enough
+	 * to dertermine whether host is allowed to do wakeup. Need to
+	 * reconsider this when xhci_plat_suspend enlarges its scope, e.g.,
+	 * also applies to runtime suspend.
+	 */
+	return xhci_suspend(xhci, device_may_wakeup(dev));
 }
 
 static int xhci_plat_resume(struct device *dev)
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/usb/host/xhci-ring.c linux-libre-3.18-rc7-gnu/drivers/usb/host/xhci-ring.c
--- linux-libre-3.18-rc6-gnu/drivers/usb/host/xhci-ring.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/usb/host/xhci-ring.c	2014-11-30 19:42:27.000000000 -0500
@@ -1067,9 +1067,8 @@ static void xhci_handle_cmd_reset_ep(str
 				false);
 		xhci_ring_cmd_db(xhci);
 	} else {
-		/* Clear our internal halted state and restart the ring(s) */
+		/* Clear our internal halted state */
 		xhci->devs[slot_id]->eps[ep_index].ep_state &= ~EP_HALTED;
-		ring_doorbell_for_active_rings(xhci, slot_id, ep_index);
 	}
 }
 
@@ -1823,22 +1822,13 @@ static int finish_td(struct xhci_hcd *xh
 		ep->stopped_td = td;
 		return 0;
 	} else {
-		if (trb_comp_code == COMP_STALL) {
-			/* The transfer is completed from the driver's
-			 * perspective, but we need to issue a set dequeue
-			 * command for this stalled endpoint to move the dequeue
-			 * pointer past the TD.  We can't do that here because
-			 * the halt condition must be cleared first.  Let the
-			 * USB class driver clear the stall later.
-			 */
-			ep->stopped_td = td;
-			ep->stopped_stream = ep_ring->stream_id;
-		} else if (xhci_requires_manual_halt_cleanup(xhci,
-					ep_ctx, trb_comp_code)) {
-			/* Other types of errors halt the endpoint, but the
-			 * class driver doesn't call usb_reset_endpoint() unless
-			 * the error is -EPIPE.  Clear the halted status in the
-			 * xHCI hardware manually.
+		if (trb_comp_code == COMP_STALL ||
+		    xhci_requires_manual_halt_cleanup(xhci, ep_ctx,
+						      trb_comp_code)) {
+			/* Issue a reset endpoint command to clear the host side
+			 * halt, followed by a set dequeue command to move the
+			 * dequeue pointer past the TD.
+			 * The class driver clears the device side halt later.
 			 */
 			xhci_cleanup_halted_endpoint(xhci,
 					slot_id, ep_index, ep_ring->stream_id,
@@ -1958,9 +1948,7 @@ static int process_ctrl_td(struct xhci_h
 		else
 			td->urb->actual_length = 0;
 
-		xhci_cleanup_halted_endpoint(xhci,
-			slot_id, ep_index, 0, td, event_trb);
-		return finish_td(xhci, td, event_trb, event, ep, status, true);
+		return finish_td(xhci, td, event_trb, event, ep, status, false);
 	}
 	/*
 	 * Did we transfer any data, despite the errors that might have
@@ -2519,17 +2507,8 @@ cleanup:
 		if (ret) {
 			urb = td->urb;
 			urb_priv = urb->hcpriv;
-			/* Leave the TD around for the reset endpoint function
-			 * to use(but only if it's not a control endpoint,
-			 * since we already queued the Set TR dequeue pointer
-			 * command for stalled control endpoints).
-			 */
-			if (usb_endpoint_xfer_control(&urb->ep->desc) ||
-				(trb_comp_code != COMP_STALL &&
-					trb_comp_code != COMP_BABBLE))
-				xhci_urb_free_priv(xhci, urb_priv);
-			else
-				kfree(urb_priv);
+
+			xhci_urb_free_priv(xhci, urb_priv);
 
 			usb_hcd_unlink_urb_from_ep(bus_to_hcd(urb->dev->bus), urb);
 			if ((urb->actual_length != urb->transfer_buffer_length &&
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/usb/serial/cp210x.c linux-libre-3.18-rc7-gnu/drivers/usb/serial/cp210x.c
--- linux-libre-3.18-rc6-gnu/drivers/usb/serial/cp210x.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/usb/serial/cp210x.c	2014-11-30 19:42:27.000000000 -0500
@@ -120,6 +120,7 @@ static const struct usb_device_id id_tab
 	{ USB_DEVICE(0x10C4, 0x85F8) }, /* Virtenio Preon32 */
 	{ USB_DEVICE(0x10C4, 0x8664) }, /* AC-Services CAN-IF */
 	{ USB_DEVICE(0x10C4, 0x8665) }, /* AC-Services OBD-IF */
+	{ USB_DEVICE(0x10C4, 0x8875) }, /* CEL MeshConnect USB Stick */
 	{ USB_DEVICE(0x10C4, 0x88A4) }, /* MMB Networks ZigBee USB Device */
 	{ USB_DEVICE(0x10C4, 0x88A5) }, /* Planet Innovation Ingeni ZigBee USB Device */
 	{ USB_DEVICE(0x10C4, 0x8946) }, /* Ketra N1 Wireless Interface */
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/usb/serial/ftdi_sio.c linux-libre-3.18-rc7-gnu/drivers/usb/serial/ftdi_sio.c
--- linux-libre-3.18-rc6-gnu/drivers/usb/serial/ftdi_sio.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/usb/serial/ftdi_sio.c	2014-11-30 19:42:27.000000000 -0500
@@ -470,6 +470,39 @@ static const struct usb_device_id id_tab
 	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_01FD_PID) },
 	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_01FE_PID) },
 	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_01FF_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_4701_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9300_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9301_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9302_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9303_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9304_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9305_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9306_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9307_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9308_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9309_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_930A_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_930B_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_930C_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_930D_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_930E_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_930F_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9310_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9311_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9312_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9313_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9314_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9315_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9316_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9317_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9318_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9319_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_931A_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_931B_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_931C_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_931D_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_931E_PID) },
+	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_931F_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_PIEGROUP_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_TNC_X_PID) },
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/usb/serial/ftdi_sio_ids.h linux-libre-3.18-rc7-gnu/drivers/usb/serial/ftdi_sio_ids.h
--- linux-libre-3.18-rc6-gnu/drivers/usb/serial/ftdi_sio_ids.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/usb/serial/ftdi_sio_ids.h	2014-11-30 19:42:27.000000000 -0500
@@ -926,8 +926,8 @@
 #define BAYER_CONTOUR_CABLE_PID        0x6001
 
 /*
- * The following are the values for the Matrix Orbital FTDI Range
- * Anything in this range will use an FT232RL.
+ * Matrix Orbital Intelligent USB displays.
+ * http://www.matrixorbital.com
  */
 #define MTXORB_VID			0x1B3D
 #define MTXORB_FTDI_RANGE_0100_PID	0x0100
@@ -1186,8 +1186,39 @@
 #define MTXORB_FTDI_RANGE_01FD_PID	0x01FD
 #define MTXORB_FTDI_RANGE_01FE_PID	0x01FE
 #define MTXORB_FTDI_RANGE_01FF_PID	0x01FF
-
-
+#define MTXORB_FTDI_RANGE_4701_PID	0x4701
+#define MTXORB_FTDI_RANGE_9300_PID	0x9300
+#define MTXORB_FTDI_RANGE_9301_PID	0x9301
+#define MTXORB_FTDI_RANGE_9302_PID	0x9302
+#define MTXORB_FTDI_RANGE_9303_PID	0x9303
+#define MTXORB_FTDI_RANGE_9304_PID	0x9304
+#define MTXORB_FTDI_RANGE_9305_PID	0x9305
+#define MTXORB_FTDI_RANGE_9306_PID	0x9306
+#define MTXORB_FTDI_RANGE_9307_PID	0x9307
+#define MTXORB_FTDI_RANGE_9308_PID	0x9308
+#define MTXORB_FTDI_RANGE_9309_PID	0x9309
+#define MTXORB_FTDI_RANGE_930A_PID	0x930A
+#define MTXORB_FTDI_RANGE_930B_PID	0x930B
+#define MTXORB_FTDI_RANGE_930C_PID	0x930C
+#define MTXORB_FTDI_RANGE_930D_PID	0x930D
+#define MTXORB_FTDI_RANGE_930E_PID	0x930E
+#define MTXORB_FTDI_RANGE_930F_PID	0x930F
+#define MTXORB_FTDI_RANGE_9310_PID	0x9310
+#define MTXORB_FTDI_RANGE_9311_PID	0x9311
+#define MTXORB_FTDI_RANGE_9312_PID	0x9312
+#define MTXORB_FTDI_RANGE_9313_PID	0x9313
+#define MTXORB_FTDI_RANGE_9314_PID	0x9314
+#define MTXORB_FTDI_RANGE_9315_PID	0x9315
+#define MTXORB_FTDI_RANGE_9316_PID	0x9316
+#define MTXORB_FTDI_RANGE_9317_PID	0x9317
+#define MTXORB_FTDI_RANGE_9318_PID	0x9318
+#define MTXORB_FTDI_RANGE_9319_PID	0x9319
+#define MTXORB_FTDI_RANGE_931A_PID	0x931A
+#define MTXORB_FTDI_RANGE_931B_PID	0x931B
+#define MTXORB_FTDI_RANGE_931C_PID	0x931C
+#define MTXORB_FTDI_RANGE_931D_PID	0x931D
+#define MTXORB_FTDI_RANGE_931E_PID	0x931E
+#define MTXORB_FTDI_RANGE_931F_PID	0x931F
 
 /*
  * The Mobility Lab (TML)
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/usb/serial/keyspan.c linux-libre-3.18-rc7-gnu/drivers/usb/serial/keyspan.c
--- linux-libre-3.18-rc6-gnu/drivers/usb/serial/keyspan.c	2014-11-25 21:03:28.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/usb/serial/keyspan.c	2014-11-30 23:15:35.000000000 -0500
@@ -311,24 +311,30 @@ static void	usa26_indat_callback(struct
 		if ((data[0] & 0x80) == 0) {
 			/* no errors on individual bytes, only
 			   possible overrun err */
-			if (data[0] & RXERROR_OVERRUN)
-				err = TTY_OVERRUN;
-			else
-				err = 0;
+			if (data[0] & RXERROR_OVERRUN) {
+				tty_insert_flip_char(&port->port, 0,
+								TTY_OVERRUN);
+			}
 			for (i = 1; i < urb->actual_length ; ++i)
-				tty_insert_flip_char(&port->port, data[i], err);
+				tty_insert_flip_char(&port->port, data[i],
+								TTY_NORMAL);
 		} else {
 			/* some bytes had errors, every byte has status */
 			dev_dbg(&port->dev, "%s - RX error!!!!\n", __func__);
 			for (i = 0; i + 1 < urb->actual_length; i += 2) {
-				int stat = data[i], flag = 0;
-				if (stat & RXERROR_OVERRUN)
-					flag |= TTY_OVERRUN;
-				if (stat & RXERROR_FRAMING)
-					flag |= TTY_FRAME;
-				if (stat & RXERROR_PARITY)
-					flag |= TTY_PARITY;
+				int stat = data[i];
+				int flag = TTY_NORMAL;
+
+				if (stat & RXERROR_OVERRUN) {
+					tty_insert_flip_char(&port->port, 0,
+								TTY_OVERRUN);
+				}
 				/* XXX should handle break (0x10) */
+				if (stat & RXERROR_PARITY)
+					flag = TTY_PARITY;
+				else if (stat & RXERROR_FRAMING)
+					flag = TTY_FRAME;
+
 				tty_insert_flip_char(&port->port, data[i+1],
 						flag);
 			}
@@ -649,14 +655,19 @@ static void	usa49_indat_callback(struct
 		} else {
 			/* some bytes had errors, every byte has status */
 			for (i = 0; i + 1 < urb->actual_length; i += 2) {
-				int stat = data[i], flag = 0;
-				if (stat & RXERROR_OVERRUN)
-					flag |= TTY_OVERRUN;
-				if (stat & RXERROR_FRAMING)
-					flag |= TTY_FRAME;
-				if (stat & RXERROR_PARITY)
-					flag |= TTY_PARITY;
+				int stat = data[i];
+				int flag = TTY_NORMAL;
+
+				if (stat & RXERROR_OVERRUN) {
+					tty_insert_flip_char(&port->port, 0,
+								TTY_OVERRUN);
+				}
 				/* XXX should handle break (0x10) */
+				if (stat & RXERROR_PARITY)
+					flag = TTY_PARITY;
+				else if (stat & RXERROR_FRAMING)
+					flag = TTY_FRAME;
+
 				tty_insert_flip_char(&port->port, data[i+1],
 						flag);
 			}
@@ -713,15 +724,19 @@ static void usa49wg_indat_callback(struc
 			 */
 			for (x = 0; x + 1 < len &&
 				    i + 1 < urb->actual_length; x += 2) {
-				int stat = data[i], flag = 0;
+				int stat = data[i];
+				int flag = TTY_NORMAL;
 
-				if (stat & RXERROR_OVERRUN)
-					flag |= TTY_OVERRUN;
-				if (stat & RXERROR_FRAMING)
-					flag |= TTY_FRAME;
-				if (stat & RXERROR_PARITY)
-					flag |= TTY_PARITY;
+				if (stat & RXERROR_OVERRUN) {
+					tty_insert_flip_char(&port->port, 0,
+								TTY_OVERRUN);
+				}
 				/* XXX should handle break (0x10) */
+				if (stat & RXERROR_PARITY)
+					flag = TTY_PARITY;
+				else if (stat & RXERROR_FRAMING)
+					flag = TTY_FRAME;
+
 				tty_insert_flip_char(&port->port, data[i+1],
 						     flag);
 				i += 2;
@@ -773,25 +788,31 @@ static void usa90_indat_callback(struct
 			if ((data[0] & 0x80) == 0) {
 				/* no errors on individual bytes, only
 				   possible overrun err*/
-				if (data[0] & RXERROR_OVERRUN)
-					err = TTY_OVERRUN;
-				else
-					err = 0;
+				if (data[0] & RXERROR_OVERRUN) {
+					tty_insert_flip_char(&port->port, 0,
+								TTY_OVERRUN);
+				}
 				for (i = 1; i < urb->actual_length ; ++i)
 					tty_insert_flip_char(&port->port,
-							data[i], err);
+							data[i], TTY_NORMAL);
 			}  else {
 			/* some bytes had errors, every byte has status */
 				dev_dbg(&port->dev, "%s - RX error!!!!\n", __func__);
 				for (i = 0; i + 1 < urb->actual_length; i += 2) {
-					int stat = data[i], flag = 0;
-					if (stat & RXERROR_OVERRUN)
-						flag |= TTY_OVERRUN;
-					if (stat & RXERROR_FRAMING)
-						flag |= TTY_FRAME;
-					if (stat & RXERROR_PARITY)
-						flag |= TTY_PARITY;
+					int stat = data[i];
+					int flag = TTY_NORMAL;
+
+					if (stat & RXERROR_OVERRUN) {
+						tty_insert_flip_char(
+								&port->port, 0,
+								TTY_OVERRUN);
+					}
 					/* XXX should handle break (0x10) */
+					if (stat & RXERROR_PARITY)
+						flag = TTY_PARITY;
+					else if (stat & RXERROR_FRAMING)
+						flag = TTY_FRAME;
+
 					tty_insert_flip_char(&port->port,
 							data[i+1], flag);
 				}
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/usb/serial/ssu100.c linux-libre-3.18-rc7-gnu/drivers/usb/serial/ssu100.c
--- linux-libre-3.18-rc6-gnu/drivers/usb/serial/ssu100.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/usb/serial/ssu100.c	2014-11-30 19:42:27.000000000 -0500
@@ -490,10 +490,9 @@ static void ssu100_update_lsr(struct usb
 			if (*tty_flag == TTY_NORMAL)
 				*tty_flag = TTY_FRAME;
 		}
-		if (lsr & UART_LSR_OE){
+		if (lsr & UART_LSR_OE) {
 			port->icount.overrun++;
-			if (*tty_flag == TTY_NORMAL)
-				*tty_flag = TTY_OVERRUN;
+			tty_insert_flip_char(&port->port, 0, TTY_OVERRUN);
 		}
 	}
 
@@ -511,12 +510,8 @@ static void ssu100_process_read_urb(stru
 	if ((len >= 4) &&
 	    (packet[0] == 0x1b) && (packet[1] == 0x1b) &&
 	    ((packet[2] == 0x00) || (packet[2] == 0x01))) {
-		if (packet[2] == 0x00) {
+		if (packet[2] == 0x00)
 			ssu100_update_lsr(port, packet[3], &flag);
-			if (flag == TTY_OVERRUN)
-				tty_insert_flip_char(&port->port, 0,
-						TTY_OVERRUN);
-		}
 		if (packet[2] == 0x01)
 			ssu100_update_msr(port, packet[3]);
 
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/drivers/usb/storage/unusual_uas.h linux-libre-3.18-rc7-gnu/drivers/usb/storage/unusual_uas.h
--- linux-libre-3.18-rc6-gnu/drivers/usb/storage/unusual_uas.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/drivers/usb/storage/unusual_uas.h	2014-11-30 19:42:27.000000000 -0500
@@ -103,3 +103,10 @@ UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x99
 		"VL711",
 		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
 		US_FL_NO_ATA_1X),
+
+/* Reported-by: Hans de Goede <hdegoede@redhat.com> */
+UNUSUAL_DEV(0x4971, 0x1012, 0x0000, 0x9999,
+		"Hitachi",
+		"External HDD",
+		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+		US_FL_IGNORE_UAS),
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/fs/aio.c linux-libre-3.18-rc7-gnu/fs/aio.c
--- linux-libre-3.18-rc6-gnu/fs/aio.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/fs/aio.c	2014-11-30 19:42:27.000000000 -0500
@@ -165,6 +165,15 @@ static struct vfsmount *aio_mnt;
 static const struct file_operations aio_ring_fops;
 static const struct address_space_operations aio_ctx_aops;
 
+/* Backing dev info for aio fs.
+ * -no dirty page accounting or writeback happens
+ */
+static struct backing_dev_info aio_fs_backing_dev_info = {
+	.name           = "aiofs",
+	.state          = 0,
+	.capabilities   = BDI_CAP_NO_ACCT_AND_WRITEBACK | BDI_CAP_MAP_COPY,
+};
+
 static struct file *aio_private_file(struct kioctx *ctx, loff_t nr_pages)
 {
 	struct qstr this = QSTR_INIT("[aio]", 5);
@@ -176,6 +185,7 @@ static struct file *aio_private_file(str
 
 	inode->i_mapping->a_ops = &aio_ctx_aops;
 	inode->i_mapping->private_data = ctx;
+	inode->i_mapping->backing_dev_info = &aio_fs_backing_dev_info;
 	inode->i_size = PAGE_SIZE * nr_pages;
 
 	path.dentry = d_alloc_pseudo(aio_mnt->mnt_sb, &this);
@@ -220,6 +230,9 @@ static int __init aio_setup(void)
 	if (IS_ERR(aio_mnt))
 		panic("Failed to create aio fs mount.");
 
+	if (bdi_init(&aio_fs_backing_dev_info))
+		panic("Failed to init aio fs backing dev info.");
+
 	kiocb_cachep = KMEM_CACHE(kiocb, SLAB_HWCACHE_ALIGN|SLAB_PANIC);
 	kioctx_cachep = KMEM_CACHE(kioctx,SLAB_HWCACHE_ALIGN|SLAB_PANIC);
 
@@ -281,11 +294,6 @@ static const struct file_operations aio_
 	.mmap = aio_ring_mmap,
 };
 
-static int aio_set_page_dirty(struct page *page)
-{
-	return 0;
-}
-
 #if IS_ENABLED(CONFIG_MIGRATION)
 static int aio_migratepage(struct address_space *mapping, struct page *new,
 			struct page *old, enum migrate_mode mode)
@@ -357,7 +365,7 @@ out:
 #endif
 
 static const struct address_space_operations aio_ctx_aops = {
-	.set_page_dirty = aio_set_page_dirty,
+	.set_page_dirty = __set_page_dirty_no_writeback,
 #if IS_ENABLED(CONFIG_MIGRATION)
 	.migratepage	= aio_migratepage,
 #endif
@@ -412,7 +420,6 @@ static int aio_setup_ring(struct kioctx
 		pr_debug("pid(%d) page[%d]->count=%d\n",
 			 current->pid, i, page_count(page));
 		SetPageUptodate(page);
-		SetPageDirty(page);
 		unlock_page(page);
 
 		ctx->ring_pages[i] = page;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/fs/btrfs/compression.c linux-libre-3.18-rc7-gnu/fs/btrfs/compression.c
--- linux-libre-3.18-rc6-gnu/fs/btrfs/compression.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/fs/btrfs/compression.c	2014-11-30 19:42:27.000000000 -0500
@@ -1011,8 +1011,6 @@ int btrfs_decompress_buf2page(char *buf,
 		bytes = min(bytes, working_bytes);
 		kaddr = kmap_atomic(page_out);
 		memcpy(kaddr + *pg_offset, buf + buf_offset, bytes);
-		if (*pg_index == (vcnt - 1) && *pg_offset == 0)
-			memset(kaddr + bytes, 0, PAGE_CACHE_SIZE - bytes);
 		kunmap_atomic(kaddr);
 		flush_dcache_page(page_out);
 
@@ -1054,3 +1052,34 @@ int btrfs_decompress_buf2page(char *buf,
 
 	return 1;
 }
+
+/*
+ * When uncompressing data, we need to make sure and zero any parts of
+ * the biovec that were not filled in by the decompression code.  pg_index
+ * and pg_offset indicate the last page and the last offset of that page
+ * that have been filled in.  This will zero everything remaining in the
+ * biovec.
+ */
+void btrfs_clear_biovec_end(struct bio_vec *bvec, int vcnt,
+				   unsigned long pg_index,
+				   unsigned long pg_offset)
+{
+	while (pg_index < vcnt) {
+		struct page *page = bvec[pg_index].bv_page;
+		unsigned long off = bvec[pg_index].bv_offset;
+		unsigned long len = bvec[pg_index].bv_len;
+
+		if (pg_offset < off)
+			pg_offset = off;
+		if (pg_offset < off + len) {
+			unsigned long bytes = off + len - pg_offset;
+			char *kaddr;
+
+			kaddr = kmap_atomic(page);
+			memset(kaddr + pg_offset, 0, bytes);
+			kunmap_atomic(kaddr);
+		}
+		pg_index++;
+		pg_offset = 0;
+	}
+}
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/fs/btrfs/compression.h linux-libre-3.18-rc7-gnu/fs/btrfs/compression.h
--- linux-libre-3.18-rc6-gnu/fs/btrfs/compression.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/fs/btrfs/compression.h	2014-11-30 19:42:27.000000000 -0500
@@ -45,7 +45,9 @@ int btrfs_submit_compressed_write(struct
 				  unsigned long nr_pages);
 int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
 				 int mirror_num, unsigned long bio_flags);
-
+void btrfs_clear_biovec_end(struct bio_vec *bvec, int vcnt,
+				   unsigned long pg_index,
+				   unsigned long pg_offset);
 struct btrfs_compress_op {
 	struct list_head *(*alloc_workspace)(void);
 
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/fs/btrfs/lzo.c linux-libre-3.18-rc7-gnu/fs/btrfs/lzo.c
--- linux-libre-3.18-rc6-gnu/fs/btrfs/lzo.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/fs/btrfs/lzo.c	2014-11-30 19:42:27.000000000 -0500
@@ -373,6 +373,8 @@ cont:
 	}
 done:
 	kunmap(pages_in[page_in_index]);
+	if (!ret)
+		btrfs_clear_biovec_end(bvec, vcnt, page_out_index, pg_offset);
 	return ret;
 }
 
@@ -410,10 +412,23 @@ static int lzo_decompress(struct list_he
 		goto out;
 	}
 
+	/*
+	 * the caller is already checking against PAGE_SIZE, but lets
+	 * move this check closer to the memcpy/memset
+	 */
+	destlen = min_t(unsigned long, destlen, PAGE_SIZE);
 	bytes = min_t(unsigned long, destlen, out_len - start_byte);
 
 	kaddr = kmap_atomic(dest_page);
 	memcpy(kaddr, workspace->buf + start_byte, bytes);
+
+	/*
+	 * btrfs_getblock is doing a zero on the tail of the page too,
+	 * but this will cover anything missing from the decompressed
+	 * data.
+	 */
+	if (bytes < destlen)
+		memset(kaddr+bytes, 0, destlen-bytes);
 	kunmap_atomic(kaddr);
 out:
 	return ret;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/fs/btrfs/zlib.c linux-libre-3.18-rc7-gnu/fs/btrfs/zlib.c
--- linux-libre-3.18-rc6-gnu/fs/btrfs/zlib.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/fs/btrfs/zlib.c	2014-11-30 19:42:27.000000000 -0500
@@ -299,6 +299,8 @@ done:
 	zlib_inflateEnd(&workspace->strm);
 	if (data_in)
 		kunmap(pages_in[page_in_index]);
+	if (!ret)
+		btrfs_clear_biovec_end(bvec, vcnt, page_out_index, pg_offset);
 	return ret;
 }
 
@@ -310,10 +312,14 @@ static int zlib_decompress(struct list_h
 	struct workspace *workspace = list_entry(ws, struct workspace, list);
 	int ret = 0;
 	int wbits = MAX_WBITS;
-	unsigned long bytes_left = destlen;
+	unsigned long bytes_left;
 	unsigned long total_out = 0;
+	unsigned long pg_offset = 0;
 	char *kaddr;
 
+	destlen = min_t(unsigned long, destlen, PAGE_SIZE);
+	bytes_left = destlen;
+
 	workspace->strm.next_in = data_in;
 	workspace->strm.avail_in = srclen;
 	workspace->strm.total_in = 0;
@@ -341,7 +347,6 @@ static int zlib_decompress(struct list_h
 		unsigned long buf_start;
 		unsigned long buf_offset;
 		unsigned long bytes;
-		unsigned long pg_offset = 0;
 
 		ret = zlib_inflate(&workspace->strm, Z_NO_FLUSH);
 		if (ret != Z_OK && ret != Z_STREAM_END)
@@ -384,6 +389,17 @@ next:
 		ret = 0;
 
 	zlib_inflateEnd(&workspace->strm);
+
+	/*
+	 * this should only happen if zlib returned fewer bytes than we
+	 * expected.  btrfs_get_block is responsible for zeroing from the
+	 * end of the inline extent (destlen) to the end of the page
+	 */
+	if (pg_offset < destlen) {
+		kaddr = kmap_atomic(dest_page);
+		memset(kaddr + pg_offset, 0, destlen - pg_offset);
+		kunmap_atomic(kaddr);
+	}
 	return ret;
 }
 
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/fs/nfsd/nfs4callback.c linux-libre-3.18-rc7-gnu/fs/nfsd/nfs4callback.c
--- linux-libre-3.18-rc6-gnu/fs/nfsd/nfs4callback.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/fs/nfsd/nfs4callback.c	2014-11-30 19:42:27.000000000 -0500
@@ -774,8 +774,12 @@ static bool nfsd41_cb_get_slot(struct nf
 {
 	if (test_and_set_bit(0, &clp->cl_cb_slot_busy) != 0) {
 		rpc_sleep_on(&clp->cl_cb_waitq, task, NULL);
-		dprintk("%s slot is busy\n", __func__);
-		return false;
+		/* Race breaker */
+		if (test_and_set_bit(0, &clp->cl_cb_slot_busy) != 0) {
+			dprintk("%s slot is busy\n", __func__);
+			return false;
+		}
+		rpc_wake_up_queued_task(&clp->cl_cb_waitq, task);
 	}
 	return true;
 }
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/fs/nfsd/nfsd.h linux-libre-3.18-rc7-gnu/fs/nfsd/nfsd.h
--- linux-libre-3.18-rc6-gnu/fs/nfsd/nfsd.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/fs/nfsd/nfsd.h	2014-11-30 19:42:27.000000000 -0500
@@ -335,12 +335,15 @@ void		nfsd_lockd_shutdown(void);
 	(NFSD4_SUPPORTED_ATTRS_WORD2 | FATTR4_WORD2_SUPPATTR_EXCLCREAT)
 
 #ifdef CONFIG_NFSD_V4_SECURITY_LABEL
-#define NFSD4_2_SUPPORTED_ATTRS_WORD2 \
-	(NFSD4_1_SUPPORTED_ATTRS_WORD2 | FATTR4_WORD2_SECURITY_LABEL)
+#define NFSD4_2_SECURITY_ATTRS		FATTR4_WORD2_SECURITY_LABEL
 #else
-#define NFSD4_2_SUPPORTED_ATTRS_WORD2 0
+#define NFSD4_2_SECURITY_ATTRS		0
 #endif
 
+#define NFSD4_2_SUPPORTED_ATTRS_WORD2 \
+	(NFSD4_1_SUPPORTED_ATTRS_WORD2 | \
+	NFSD4_2_SECURITY_ATTRS)
+
 static inline u32 nfsd_suppattrs0(u32 minorversion)
 {
 	return minorversion ? NFSD4_1_SUPPORTED_ATTRS_WORD0
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/include/dt-bindings/clock/qcom,mmcc-apq8084.h linux-libre-3.18-rc7-gnu/include/dt-bindings/clock/qcom,mmcc-apq8084.h
--- linux-libre-3.18-rc6-gnu/include/dt-bindings/clock/qcom,mmcc-apq8084.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/include/dt-bindings/clock/qcom,mmcc-apq8084.h	2014-11-30 19:42:27.000000000 -0500
@@ -60,7 +60,7 @@
 #define ESC1_CLK_SRC			43
 #define HDMI_CLK_SRC			44
 #define VSYNC_CLK_SRC			45
-#define RBCPR_CLK_SRC			46
+#define MMSS_RBCPR_CLK_SRC		46
 #define RBBMTIMER_CLK_SRC		47
 #define MAPLE_CLK_SRC			48
 #define VDP_CLK_SRC			49
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/include/linux/clk-provider.h linux-libre-3.18-rc7-gnu/include/linux/clk-provider.h
--- linux-libre-3.18-rc6-gnu/include/linux/clk-provider.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/include/linux/clk-provider.h	2014-11-30 19:42:27.000000000 -0500
@@ -352,7 +352,6 @@ struct clk_divider {
 #define CLK_DIVIDER_READ_ONLY		BIT(5)
 
 extern const struct clk_ops clk_divider_ops;
-extern const struct clk_ops clk_divider_ro_ops;
 struct clk *clk_register_divider(struct device *dev, const char *name,
 		const char *parent_name, unsigned long flags,
 		void __iomem *reg, u8 shift, u8 width,
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/include/linux/iio/events.h linux-libre-3.18-rc7-gnu/include/linux/iio/events.h
--- linux-libre-3.18-rc6-gnu/include/linux/iio/events.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/include/linux/iio/events.h	2014-11-30 19:42:27.000000000 -0500
@@ -72,7 +72,7 @@ struct iio_event_data {
 
 #define IIO_EVENT_CODE_EXTRACT_TYPE(mask) ((mask >> 56) & 0xFF)
 
-#define IIO_EVENT_CODE_EXTRACT_DIR(mask) ((mask >> 48) & 0xCF)
+#define IIO_EVENT_CODE_EXTRACT_DIR(mask) ((mask >> 48) & 0x7F)
 
 #define IIO_EVENT_CODE_EXTRACT_CHAN_TYPE(mask) ((mask >> 32) & 0xFF)
 
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/include/linux/kvm_host.h linux-libre-3.18-rc7-gnu/include/linux/kvm_host.h
--- linux-libre-3.18-rc6-gnu/include/linux/kvm_host.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/include/linux/kvm_host.h	2014-11-30 19:42:27.000000000 -0500
@@ -703,7 +703,7 @@ void kvm_arch_sync_events(struct kvm *kv
 int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu);
 void kvm_vcpu_kick(struct kvm_vcpu *vcpu);
 
-bool kvm_is_mmio_pfn(pfn_t pfn);
+bool kvm_is_reserved_pfn(pfn_t pfn);
 
 struct kvm_irq_ack_notifier {
 	struct hlist_node link;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/include/linux/pci.h linux-libre-3.18-rc7-gnu/include/linux/pci.h
--- linux-libre-3.18-rc6-gnu/include/linux/pci.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/include/linux/pci.h	2014-11-30 19:42:27.000000000 -0500
@@ -331,6 +331,7 @@ struct pci_dev {
 	unsigned int	is_added:1;
 	unsigned int	is_busmaster:1; /* device is busmaster */
 	unsigned int	no_msi:1;	/* device may not use msi */
+	unsigned int	no_64bit_msi:1; /* device may only use 32-bit MSIs */
 	unsigned int	block_cfg_access:1;	/* config space access is blocked */
 	unsigned int	broken_parity_status:1;	/* Device generates false positive parity */
 	unsigned int	irq_reroute_variant:2;	/* device needs IRQ rerouting variant */
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/include/net/inet_common.h linux-libre-3.18-rc7-gnu/include/net/inet_common.h
--- linux-libre-3.18-rc6-gnu/include/net/inet_common.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/include/net/inet_common.h	2014-11-30 19:42:27.000000000 -0500
@@ -37,6 +37,8 @@ int inet_ioctl(struct socket *sock, unsi
 int inet_ctl_sock_create(struct sock **sk, unsigned short family,
 			 unsigned short type, unsigned char protocol,
 			 struct net *net);
+int inet_recv_error(struct sock *sk, struct msghdr *msg, int len,
+		    int *addr_len);
 
 static inline void inet_ctl_sock_destroy(struct sock *sk)
 {
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/include/sound/pcm.h linux-libre-3.18-rc7-gnu/include/sound/pcm.h
--- linux-libre-3.18-rc6-gnu/include/sound/pcm.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/include/sound/pcm.h	2014-11-30 19:42:27.000000000 -0500
@@ -184,6 +184,8 @@ struct snd_pcm_ops {
 #define SNDRV_PCM_FMTBIT_DSD_U8		_SNDRV_PCM_FMTBIT(DSD_U8)
 #define SNDRV_PCM_FMTBIT_DSD_U16_LE	_SNDRV_PCM_FMTBIT(DSD_U16_LE)
 #define SNDRV_PCM_FMTBIT_DSD_U32_LE	_SNDRV_PCM_FMTBIT(DSD_U32_LE)
+#define SNDRV_PCM_FMTBIT_DSD_U16_BE	_SNDRV_PCM_FMTBIT(DSD_U16_BE)
+#define SNDRV_PCM_FMTBIT_DSD_U32_BE	_SNDRV_PCM_FMTBIT(DSD_U32_BE)
 
 #ifdef SNDRV_LITTLE_ENDIAN
 #define SNDRV_PCM_FMTBIT_S16		SNDRV_PCM_FMTBIT_S16_LE
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/include/uapi/sound/asound.h linux-libre-3.18-rc7-gnu/include/uapi/sound/asound.h
--- linux-libre-3.18-rc6-gnu/include/uapi/sound/asound.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/include/uapi/sound/asound.h	2014-11-30 19:42:27.000000000 -0500
@@ -220,7 +220,9 @@ typedef int __bitwise snd_pcm_format_t;
 #define	SNDRV_PCM_FORMAT_DSD_U8		((__force snd_pcm_format_t) 48) /* DSD, 1-byte samples DSD (x8) */
 #define	SNDRV_PCM_FORMAT_DSD_U16_LE	((__force snd_pcm_format_t) 49) /* DSD, 2-byte samples DSD (x16), little endian */
 #define	SNDRV_PCM_FORMAT_DSD_U32_LE	((__force snd_pcm_format_t) 50) /* DSD, 4-byte samples DSD (x32), little endian */
-#define	SNDRV_PCM_FORMAT_LAST		SNDRV_PCM_FORMAT_DSD_U32_LE
+#define	SNDRV_PCM_FORMAT_DSD_U16_BE	((__force snd_pcm_format_t) 51) /* DSD, 2-byte samples DSD (x16), big endian */
+#define	SNDRV_PCM_FORMAT_DSD_U32_BE	((__force snd_pcm_format_t) 52) /* DSD, 4-byte samples DSD (x32), big endian */
+#define	SNDRV_PCM_FORMAT_LAST		SNDRV_PCM_FORMAT_DSD_U32_BE
 
 #ifdef SNDRV_LITTLE_ENDIAN
 #define	SNDRV_PCM_FORMAT_S16		SNDRV_PCM_FORMAT_S16_LE
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/Makefile linux-libre-3.18-rc7-gnu/Makefile
--- linux-libre-3.18-rc6-gnu/Makefile	2014-11-25 20:47:27.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/Makefile	2014-11-30 22:59:21.000000000 -0500
@@ -1,7 +1,7 @@
 VERSION = 3
 PATCHLEVEL = 18
 SUBLEVEL = 0
-EXTRAVERSION = -rc6-gnu
+EXTRAVERSION = -rc7-gnu
 NAME = Diseased Newt
 
 # *DOCUMENTATION*
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/net/bridge/br_netlink.c linux-libre-3.18-rc7-gnu/net/bridge/br_netlink.c
--- linux-libre-3.18-rc6-gnu/net/bridge/br_netlink.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/net/bridge/br_netlink.c	2014-11-30 19:42:27.000000000 -0500
@@ -280,6 +280,7 @@ static const struct nla_policy br_port_p
 	[IFLA_BRPORT_MODE]	= { .type = NLA_U8 },
 	[IFLA_BRPORT_GUARD]	= { .type = NLA_U8 },
 	[IFLA_BRPORT_PROTECT]	= { .type = NLA_U8 },
+	[IFLA_BRPORT_FAST_LEAVE]= { .type = NLA_U8 },
 	[IFLA_BRPORT_LEARNING]	= { .type = NLA_U8 },
 	[IFLA_BRPORT_UNICAST_FLOOD] = { .type = NLA_U8 },
 };
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/net/core/rtnetlink.c linux-libre-3.18-rc7-gnu/net/core/rtnetlink.c
--- linux-libre-3.18-rc6-gnu/net/core/rtnetlink.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/net/core/rtnetlink.c	2014-11-30 19:42:27.000000000 -0500
@@ -2685,13 +2685,20 @@ static int rtnl_bridge_getlink(struct sk
 	int idx = 0;
 	u32 portid = NETLINK_CB(cb->skb).portid;
 	u32 seq = cb->nlh->nlmsg_seq;
-	struct nlattr *extfilt;
 	u32 filter_mask = 0;
 
-	extfilt = nlmsg_find_attr(cb->nlh, sizeof(struct ifinfomsg),
-				  IFLA_EXT_MASK);
-	if (extfilt)
-		filter_mask = nla_get_u32(extfilt);
+	if (nlmsg_len(cb->nlh) > sizeof(struct ifinfomsg)) {
+		struct nlattr *extfilt;
+
+		extfilt = nlmsg_find_attr(cb->nlh, sizeof(struct ifinfomsg),
+					  IFLA_EXT_MASK);
+		if (extfilt) {
+			if (nla_len(extfilt) < sizeof(filter_mask))
+				return -EINVAL;
+
+			filter_mask = nla_get_u32(extfilt);
+		}
+	}
 
 	rcu_read_lock();
 	for_each_netdev_rcu(net, dev) {
@@ -2798,6 +2805,9 @@ static int rtnl_bridge_setlink(struct sk
 	if (br_spec) {
 		nla_for_each_nested(attr, br_spec, rem) {
 			if (nla_type(attr) == IFLA_BRIDGE_FLAGS) {
+				if (nla_len(attr) < sizeof(flags))
+					return -EINVAL;
+
 				have_flags = true;
 				flags = nla_get_u16(attr);
 				break;
@@ -2868,6 +2878,9 @@ static int rtnl_bridge_dellink(struct sk
 	if (br_spec) {
 		nla_for_each_nested(attr, br_spec, rem) {
 			if (nla_type(attr) == IFLA_BRIDGE_FLAGS) {
+				if (nla_len(attr) < sizeof(flags))
+					return -EINVAL;
+
 				have_flags = true;
 				flags = nla_get_u16(attr);
 				break;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/net/ipv4/af_inet.c linux-libre-3.18-rc7-gnu/net/ipv4/af_inet.c
--- linux-libre-3.18-rc6-gnu/net/ipv4/af_inet.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/net/ipv4/af_inet.c	2014-11-30 19:42:27.000000000 -0500
@@ -1386,6 +1386,17 @@ out:
 	return pp;
 }
 
+int inet_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len)
+{
+	if (sk->sk_family == AF_INET)
+		return ip_recv_error(sk, msg, len, addr_len);
+#if IS_ENABLED(CONFIG_IPV6)
+	if (sk->sk_family == AF_INET6)
+		return pingv6_ops.ipv6_recv_error(sk, msg, len, addr_len);
+#endif
+	return -EINVAL;
+}
+
 static int inet_gro_complete(struct sk_buff *skb, int nhoff)
 {
 	__be16 newlen = htons(skb->len - nhoff);
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/net/ipv4/ip_vti.c linux-libre-3.18-rc7-gnu/net/ipv4/ip_vti.c
--- linux-libre-3.18-rc6-gnu/net/ipv4/ip_vti.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/net/ipv4/ip_vti.c	2014-11-30 19:42:27.000000000 -0500
@@ -528,6 +528,7 @@ static struct rtnl_link_ops vti_link_ops
 	.validate	= vti_tunnel_validate,
 	.newlink	= vti_newlink,
 	.changelink	= vti_changelink,
+	.dellink        = ip_tunnel_dellink,
 	.get_size	= vti_get_size,
 	.fill_info	= vti_fill_info,
 };
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/net/ipv4/ping.c linux-libre-3.18-rc7-gnu/net/ipv4/ping.c
--- linux-libre-3.18-rc6-gnu/net/ipv4/ping.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/net/ipv4/ping.c	2014-11-30 19:42:27.000000000 -0500
@@ -217,6 +217,8 @@ static struct sock *ping_lookup(struct n
 					     &ipv6_hdr(skb)->daddr))
 				continue;
 #endif
+		} else {
+			continue;
 		}
 
 		if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != dif)
@@ -853,16 +855,8 @@ int ping_recvmsg(struct kiocb *iocb, str
 	if (flags & MSG_OOB)
 		goto out;
 
-	if (flags & MSG_ERRQUEUE) {
-		if (family == AF_INET) {
-			return ip_recv_error(sk, msg, len, addr_len);
-#if IS_ENABLED(CONFIG_IPV6)
-		} else if (family == AF_INET6) {
-			return pingv6_ops.ipv6_recv_error(sk, msg, len,
-							  addr_len);
-#endif
-		}
-	}
+	if (flags & MSG_ERRQUEUE)
+		return inet_recv_error(sk, msg, len, addr_len);
 
 	skb = skb_recv_datagram(sk, flags, noblock, &err);
 	if (!skb)
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/net/ipv4/tcp.c linux-libre-3.18-rc7-gnu/net/ipv4/tcp.c
--- linux-libre-3.18-rc6-gnu/net/ipv4/tcp.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/net/ipv4/tcp.c	2014-11-30 19:42:27.000000000 -0500
@@ -1598,7 +1598,7 @@ int tcp_recvmsg(struct kiocb *iocb, stru
 	u32 urg_hole = 0;
 
 	if (unlikely(flags & MSG_ERRQUEUE))
-		return ip_recv_error(sk, msg, len, addr_len);
+		return inet_recv_error(sk, msg, len, addr_len);
 
 	if (sk_can_busy_loop(sk) && skb_queue_empty(&sk->sk_receive_queue) &&
 	    (sk->sk_state == TCP_ESTABLISHED))
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/net/ipv4/tcp_ipv4.c linux-libre-3.18-rc7-gnu/net/ipv4/tcp_ipv4.c
--- linux-libre-3.18-rc6-gnu/net/ipv4/tcp_ipv4.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/net/ipv4/tcp_ipv4.c	2014-11-30 19:42:27.000000000 -0500
@@ -598,7 +598,10 @@ static void tcp_v4_send_reset(struct soc
 	if (th->rst)
 		return;
 
-	if (skb_rtable(skb)->rt_type != RTN_LOCAL)
+	/* If sk not NULL, it means we did a successful lookup and incoming
+	 * route had to be correct. prequeue might have dropped our dst.
+	 */
+	if (!sk && skb_rtable(skb)->rt_type != RTN_LOCAL)
 		return;
 
 	/* Swap the send and the receive. */
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/net/ipv6/ip6_gre.c linux-libre-3.18-rc7-gnu/net/ipv6/ip6_gre.c
--- linux-libre-3.18-rc6-gnu/net/ipv6/ip6_gre.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/net/ipv6/ip6_gre.c	2014-11-30 19:42:27.000000000 -0500
@@ -502,11 +502,11 @@ static int ip6gre_rcv(struct sk_buff *sk
 
 		skb->protocol = gre_proto;
 		/* WCCP version 1 and 2 protocol decoding.
-		 * - Change protocol to IP
+		 * - Change protocol to IPv6
 		 * - When dealing with WCCPv2, Skip extra 4 bytes in GRE header
 		 */
 		if (flags == 0 && gre_proto == htons(ETH_P_WCCP)) {
-			skb->protocol = htons(ETH_P_IP);
+			skb->protocol = htons(ETH_P_IPV6);
 			if ((*(h + offset) & 0xF0) != 0x40)
 				offset += 4;
 		}
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/net/ipv6/ip6_offload.c linux-libre-3.18-rc7-gnu/net/ipv6/ip6_offload.c
--- linux-libre-3.18-rc6-gnu/net/ipv6/ip6_offload.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/net/ipv6/ip6_offload.c	2014-11-30 19:42:27.000000000 -0500
@@ -69,7 +69,8 @@ static struct sk_buff *ipv6_gso_segment(
 	int nhoff;
 
 	if (unlikely(skb_shinfo(skb)->gso_type &
-		     ~(SKB_GSO_UDP |
+		     ~(SKB_GSO_TCPV4 |
+		       SKB_GSO_UDP |
 		       SKB_GSO_DODGY |
 		       SKB_GSO_TCP_ECN |
 		       SKB_GSO_GRE |
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/net/ipv6/ip6_udp_tunnel.c linux-libre-3.18-rc7-gnu/net/ipv6/ip6_udp_tunnel.c
--- linux-libre-3.18-rc6-gnu/net/ipv6/ip6_udp_tunnel.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/net/ipv6/ip6_udp_tunnel.c	2014-11-30 19:42:27.000000000 -0500
@@ -79,15 +79,13 @@ int udp_tunnel6_xmit_skb(struct socket *
 	uh->source = src_port;
 
 	uh->len = htons(skb->len);
-	uh->check = 0;
 
 	memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
 	IPCB(skb)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE | IPSKB_XFRM_TRANSFORMED
 			    | IPSKB_REROUTED);
 	skb_dst_set(skb, dst);
 
-	udp6_set_csum(udp_get_no_check6_tx(sk), skb, &inet6_sk(sk)->saddr,
-		      &sk->sk_v6_daddr, skb->len);
+	udp6_set_csum(udp_get_no_check6_tx(sk), skb, saddr, daddr, skb->len);
 
 	__skb_push(skb, sizeof(*ip6h));
 	skb_reset_network_header(skb);
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/net/ipv6/ip6_vti.c linux-libre-3.18-rc7-gnu/net/ipv6/ip6_vti.c
--- linux-libre-3.18-rc6-gnu/net/ipv6/ip6_vti.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/net/ipv6/ip6_vti.c	2014-11-30 19:42:27.000000000 -0500
@@ -905,6 +905,15 @@ static int vti6_newlink(struct net *src_
 	return vti6_tnl_create2(dev);
 }
 
+static void vti6_dellink(struct net_device *dev, struct list_head *head)
+{
+	struct net *net = dev_net(dev);
+	struct vti6_net *ip6n = net_generic(net, vti6_net_id);
+
+	if (dev != ip6n->fb_tnl_dev)
+		unregister_netdevice_queue(dev, head);
+}
+
 static int vti6_changelink(struct net_device *dev, struct nlattr *tb[],
 			   struct nlattr *data[])
 {
@@ -980,6 +989,7 @@ static struct rtnl_link_ops vti6_link_op
 	.setup		= vti6_dev_setup,
 	.validate	= vti6_validate,
 	.newlink	= vti6_newlink,
+	.dellink	= vti6_dellink,
 	.changelink	= vti6_changelink,
 	.get_size	= vti6_get_size,
 	.fill_info	= vti6_fill_info,
@@ -1020,6 +1030,7 @@ static int __net_init vti6_init_net(stru
 	if (!ip6n->fb_tnl_dev)
 		goto err_alloc_dev;
 	dev_net_set(ip6n->fb_tnl_dev, net);
+	ip6n->fb_tnl_dev->rtnl_link_ops = &vti6_link_ops;
 
 	err = vti6_fb_tnl_dev_init(ip6n->fb_tnl_dev);
 	if (err < 0)
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/net/ipv6/tcp_ipv6.c linux-libre-3.18-rc7-gnu/net/ipv6/tcp_ipv6.c
--- linux-libre-3.18-rc6-gnu/net/ipv6/tcp_ipv6.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/net/ipv6/tcp_ipv6.c	2014-11-30 19:42:27.000000000 -0500
@@ -903,7 +903,10 @@ static void tcp_v6_send_reset(struct soc
 	if (th->rst)
 		return;
 
-	if (!ipv6_unicast_destination(skb))
+	/* If sk not NULL, it means we did a successful lookup and incoming
+	 * route had to be correct. prequeue might have dropped our dst.
+	 */
+	if (!sk && !ipv6_unicast_destination(skb))
 		return;
 
 #ifdef CONFIG_TCP_MD5SIG
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/net/netfilter/nf_conntrack_core.c linux-libre-3.18-rc7-gnu/net/netfilter/nf_conntrack_core.c
--- linux-libre-3.18-rc6-gnu/net/netfilter/nf_conntrack_core.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/net/netfilter/nf_conntrack_core.c	2014-11-30 19:42:27.000000000 -0500
@@ -611,16 +611,12 @@ __nf_conntrack_confirm(struct sk_buff *s
 	 */
 	NF_CT_ASSERT(!nf_ct_is_confirmed(ct));
 	pr_debug("Confirming conntrack %p\n", ct);
-
-	/* We have to check the DYING flag after unlink to prevent
-	 * a race against nf_ct_get_next_corpse() possibly called from
-	 * user context, else we insert an already 'dead' hash, blocking
-	 * further use of that particular connection -JM.
-	 */
-	nf_ct_del_from_dying_or_unconfirmed_list(ct);
+	/* We have to check the DYING flag inside the lock to prevent
+	   a race against nf_ct_get_next_corpse() possibly called from
+	   user context, else we insert an already 'dead' hash, blocking
+	   further use of that particular connection -JM */
 
 	if (unlikely(nf_ct_is_dying(ct))) {
-		nf_ct_add_to_dying_list(ct);
 		nf_conntrack_double_unlock(hash, reply_hash);
 		local_bh_enable();
 		return NF_ACCEPT;
@@ -640,6 +636,8 @@ __nf_conntrack_confirm(struct sk_buff *s
 		    zone == nf_ct_zone(nf_ct_tuplehash_to_ctrack(h)))
 			goto out;
 
+	nf_ct_del_from_dying_or_unconfirmed_list(ct);
+
 	/* Timer relative to confirmation time, not original
 	   setting time, otherwise we'd get timer wrap in
 	   weird delay cases. */
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/net/packet/af_packet.c linux-libre-3.18-rc7-gnu/net/packet/af_packet.c
--- linux-libre-3.18-rc6-gnu/net/packet/af_packet.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/net/packet/af_packet.c	2014-11-30 19:42:27.000000000 -0500
@@ -378,7 +378,7 @@ static void unregister_prot_hook(struct
 		__unregister_prot_hook(sk, sync);
 }
 
-static inline __pure struct page *pgv_to_page(void *addr)
+static inline struct page * __pure pgv_to_page(void *addr)
 {
 	if (is_vmalloc_addr(addr))
 		return vmalloc_to_page(addr);
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/net/sunrpc/svcsock.c linux-libre-3.18-rc7-gnu/net/sunrpc/svcsock.c
--- linux-libre-3.18-rc6-gnu/net/sunrpc/svcsock.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/net/sunrpc/svcsock.c	2014-11-30 19:42:27.000000000 -0500
@@ -1019,17 +1019,12 @@ static int receive_cb_reply(struct svc_s
 	xid = *p++;
 	calldir = *p;
 
-	if (bc_xprt)
-		req = xprt_lookup_rqst(bc_xprt, xid);
-
-	if (!req) {
-		printk(KERN_NOTICE
-			"%s: Got unrecognized reply: "
-			"calldir 0x%x xpt_bc_xprt %p xid %08x\n",
-			__func__, ntohl(calldir),
-			bc_xprt, ntohl(xid));
+	if (!bc_xprt)
 		return -EAGAIN;
-	}
+	spin_lock_bh(&bc_xprt->transport_lock);
+	req = xprt_lookup_rqst(bc_xprt, xid);
+	if (!req)
+		goto unlock_notfound;
 
 	memcpy(&req->rq_private_buf, &req->rq_rcv_buf, sizeof(struct xdr_buf));
 	/*
@@ -1040,11 +1035,21 @@ static int receive_cb_reply(struct svc_s
 	dst = &req->rq_private_buf.head[0];
 	src = &rqstp->rq_arg.head[0];
 	if (dst->iov_len < src->iov_len)
-		return -EAGAIN; /* whatever; just giving up. */
+		goto unlock_eagain; /* whatever; just giving up. */
 	memcpy(dst->iov_base, src->iov_base, src->iov_len);
 	xprt_complete_rqst(req->rq_task, rqstp->rq_arg.len);
 	rqstp->rq_arg.len = 0;
+	spin_unlock_bh(&bc_xprt->transport_lock);
 	return 0;
+unlock_notfound:
+	printk(KERN_NOTICE
+		"%s: Got unrecognized reply: "
+		"calldir 0x%x xpt_bc_xprt %p xid %08x\n",
+		__func__, ntohl(calldir),
+		bc_xprt, ntohl(xid));
+unlock_eagain:
+	spin_unlock_bh(&bc_xprt->transport_lock);
+	return -EAGAIN;
 }
 
 static int copy_pages_to_kvecs(struct kvec *vec, struct page **pages, int len)
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/sound/core/pcm.c linux-libre-3.18-rc7-gnu/sound/core/pcm.c
--- linux-libre-3.18-rc6-gnu/sound/core/pcm.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/sound/core/pcm.c	2014-11-30 19:42:27.000000000 -0500
@@ -216,6 +216,8 @@ static char *snd_pcm_format_names[] = {
 	FORMAT(DSD_U8),
 	FORMAT(DSD_U16_LE),
 	FORMAT(DSD_U32_LE),
+	FORMAT(DSD_U16_BE),
+	FORMAT(DSD_U32_BE),
 };
 
 const char *snd_pcm_format_name(snd_pcm_format_t format)
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/sound/core/pcm_misc.c linux-libre-3.18-rc7-gnu/sound/core/pcm_misc.c
--- linux-libre-3.18-rc6-gnu/sound/core/pcm_misc.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/sound/core/pcm_misc.c	2014-11-30 19:42:27.000000000 -0500
@@ -152,6 +152,14 @@ static struct pcm_format_data pcm_format
 		.width = 32, .phys = 32, .le = 1, .signd = 0,
 		.silence = { 0x69, 0x69, 0x69, 0x69 },
 	},
+	[SNDRV_PCM_FORMAT_DSD_U16_BE] = {
+		.width = 16, .phys = 16, .le = 0, .signd = 0,
+		.silence = { 0x69, 0x69 },
+	},
+	[SNDRV_PCM_FORMAT_DSD_U32_BE] = {
+		.width = 32, .phys = 32, .le = 0, .signd = 0,
+		.silence = { 0x69, 0x69, 0x69, 0x69 },
+	},
 	/* FIXME: the following three formats are not defined properly yet */
 	[SNDRV_PCM_FORMAT_MPEG] = {
 		.le = -1, .signd = -1,
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/sound/pci/hda/hda_intel.c linux-libre-3.18-rc7-gnu/sound/pci/hda/hda_intel.c
--- linux-libre-3.18-rc6-gnu/sound/pci/hda/hda_intel.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/sound/pci/hda/hda_intel.c	2014-11-30 19:42:27.000000000 -0500
@@ -298,7 +298,8 @@ enum {
 
 /* quirks for ATI/AMD HDMI */
 #define AZX_DCAPS_PRESET_ATI_HDMI \
-	(AZX_DCAPS_NO_TCSEL | AZX_DCAPS_SYNC_WRITE | AZX_DCAPS_POSFIX_LPIB)
+	(AZX_DCAPS_NO_TCSEL | AZX_DCAPS_SYNC_WRITE | AZX_DCAPS_POSFIX_LPIB|\
+	 AZX_DCAPS_NO_MSI64)
 
 /* quirks for Nvidia */
 #define AZX_DCAPS_PRESET_NVIDIA \
@@ -1486,6 +1487,7 @@ static int azx_first_init(struct azx *ch
 	struct snd_card *card = chip->card;
 	int err;
 	unsigned short gcap;
+	unsigned int dma_bits = 64;
 
 #if BITS_PER_LONG != 64
 	/* Fix up base address on ULI M5461 */
@@ -1509,9 +1511,14 @@ static int azx_first_init(struct azx *ch
 		return -ENXIO;
 	}
 
-	if (chip->msi)
+	if (chip->msi) {
+		if (chip->driver_caps & AZX_DCAPS_NO_MSI64) {
+			dev_dbg(card->dev, "Disabling 64bit MSI\n");
+			pci->no_64bit_msi = true;
+		}
 		if (pci_enable_msi(pci) < 0)
 			chip->msi = 0;
+	}
 
 	if (azx_acquire_irq(chip, 0) < 0)
 		return -EBUSY;
@@ -1522,9 +1529,14 @@ static int azx_first_init(struct azx *ch
 	gcap = azx_readw(chip, GCAP);
 	dev_dbg(card->dev, "chipset global capabilities = 0x%x\n", gcap);
 
+	/* AMD devices support 40 or 48bit DMA, take the safe one */
+	if (chip->pci->vendor == PCI_VENDOR_ID_AMD)
+		dma_bits = 40;
+
 	/* disable SB600 64bit support for safety */
 	if (chip->pci->vendor == PCI_VENDOR_ID_ATI) {
 		struct pci_dev *p_smbus;
+		dma_bits = 40;
 		p_smbus = pci_get_device(PCI_VENDOR_ID_ATI,
 					 PCI_DEVICE_ID_ATI_SBX00_SMBUS,
 					 NULL);
@@ -1554,9 +1566,11 @@ static int azx_first_init(struct azx *ch
 	}
 
 	/* allow 64bit DMA address if supported by H/W */
-	if ((gcap & AZX_GCAP_64OK) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64)))
-		pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(64));
-	else {
+	if (!(gcap & AZX_GCAP_64OK))
+		dma_bits = 32;
+	if (!pci_set_dma_mask(pci, DMA_BIT_MASK(dma_bits))) {
+		pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(dma_bits));
+	} else {
 		pci_set_dma_mask(pci, DMA_BIT_MASK(32));
 		pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32));
 	}
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/sound/pci/hda/hda_priv.h linux-libre-3.18-rc7-gnu/sound/pci/hda/hda_priv.h
--- linux-libre-3.18-rc6-gnu/sound/pci/hda/hda_priv.h	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/sound/pci/hda/hda_priv.h	2014-11-30 19:42:27.000000000 -0500
@@ -171,6 +171,7 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO
 #define AZX_DCAPS_PM_RUNTIME	(1 << 26)	/* runtime PM support */
 #define AZX_DCAPS_I915_POWERWELL (1 << 27)	/* HSW i915 powerwell support */
 #define AZX_DCAPS_CORBRP_SELF_CLEAR (1 << 28)	/* CORBRP clears itself after reset */
+#define AZX_DCAPS_NO_MSI64      (1 << 29)	/* Stick to 32-bit MSIs */
 
 /* HD Audio class code */
 #define PCI_CLASS_MULTIMEDIA_HD_AUDIO	0x0403
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/sound/pci/hda/patch_realtek.c linux-libre-3.18-rc7-gnu/sound/pci/hda/patch_realtek.c
--- linux-libre-3.18-rc6-gnu/sound/pci/hda/patch_realtek.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/sound/pci/hda/patch_realtek.c	2014-11-30 19:42:27.000000000 -0500
@@ -4818,7 +4818,6 @@ static const struct snd_pci_quirk alc269
 	SND_PCI_QUIRK(0x103c, 0x221b, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
 	SND_PCI_QUIRK(0x103c, 0x2221, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
 	SND_PCI_QUIRK(0x103c, 0x2225, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
-	SND_PCI_QUIRK(0x103c, 0x2246, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
 	SND_PCI_QUIRK(0x103c, 0x2253, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
 	SND_PCI_QUIRK(0x103c, 0x2254, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
 	SND_PCI_QUIRK(0x103c, 0x2255, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED),
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/sound/usb/mixer_quirks.c linux-libre-3.18-rc7-gnu/sound/usb/mixer_quirks.c
--- linux-libre-3.18-rc6-gnu/sound/usb/mixer_quirks.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/sound/usb/mixer_quirks.c	2014-11-30 19:42:27.000000000 -0500
@@ -593,10 +593,10 @@ static int snd_nativeinstruments_control
 	if (mixer->chip->shutdown)
 		ret = -ENODEV;
 	else
-		ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), bRequest,
+		ret = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), bRequest,
 				  USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
 				  0, wIndex,
-				  &tmp, sizeof(tmp), 1000);
+				  &tmp, sizeof(tmp));
 	up_read(&mixer->chip->shutdown_rwsem);
 
 	if (ret < 0) {
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/sound/usb/quirks.c linux-libre-3.18-rc7-gnu/sound/usb/quirks.c
--- linux-libre-3.18-rc6-gnu/sound/usb/quirks.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/sound/usb/quirks.c	2014-11-30 19:42:27.000000000 -0500
@@ -1193,12 +1193,12 @@ u64 snd_usb_interface_dsd_format_quirks(
 	/* iFi Audio micro/nano iDSD */
 	case USB_ID(0x20b1, 0x3008):
 		if (fp->altsetting == 2)
-			return SNDRV_PCM_FMTBIT_DSD_U32_LE;
+			return SNDRV_PCM_FMTBIT_DSD_U32_BE;
 		break;
 	/* DIYINHK DSD DXD 384kHz USB to I2S/DSD */
 	case USB_ID(0x20b1, 0x2009):
 		if (fp->altsetting == 3)
-			return SNDRV_PCM_FMTBIT_DSD_U32_LE;
+			return SNDRV_PCM_FMTBIT_DSD_U32_BE;
 		break;
 	default:
 		break;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/virt/kvm/arm/vgic.c linux-libre-3.18-rc7-gnu/virt/kvm/arm/vgic.c
--- linux-libre-3.18-rc6-gnu/virt/kvm/arm/vgic.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/virt/kvm/arm/vgic.c	2014-11-30 19:42:27.000000000 -0500
@@ -1933,7 +1933,7 @@ out:
 
 int kvm_vgic_create(struct kvm *kvm)
 {
-	int i, vcpu_lock_idx = -1, ret = 0;
+	int i, vcpu_lock_idx = -1, ret;
 	struct kvm_vcpu *vcpu;
 
 	mutex_lock(&kvm->lock);
@@ -1948,6 +1948,7 @@ int kvm_vgic_create(struct kvm *kvm)
 	 * vcpu->mutex.  By grabbing the vcpu->mutex of all VCPUs we ensure
 	 * that no other VCPUs are run while we create the vgic.
 	 */
+	ret = -EBUSY;
 	kvm_for_each_vcpu(i, vcpu, kvm) {
 		if (!mutex_trylock(&vcpu->mutex))
 			goto out_unlock;
@@ -1955,11 +1956,10 @@ int kvm_vgic_create(struct kvm *kvm)
 	}
 
 	kvm_for_each_vcpu(i, vcpu, kvm) {
-		if (vcpu->arch.has_run_once) {
-			ret = -EBUSY;
+		if (vcpu->arch.has_run_once)
 			goto out_unlock;
-		}
 	}
+	ret = 0;
 
 	spin_lock_init(&kvm->arch.vgic.lock);
 	kvm->arch.vgic.in_kernel = true;
diff -druNp --no-dereference linux-libre-3.18-rc6-gnu/virt/kvm/kvm_main.c linux-libre-3.18-rc7-gnu/virt/kvm/kvm_main.c
--- linux-libre-3.18-rc6-gnu/virt/kvm/kvm_main.c	2014-11-23 18:25:20.000000000 -0500
+++ linux-libre-3.18-rc7-gnu/virt/kvm/kvm_main.c	2014-11-30 19:42:27.000000000 -0500
@@ -107,10 +107,10 @@ EXPORT_SYMBOL_GPL(kvm_rebooting);
 
 static bool largepages_enabled = true;
 
-bool kvm_is_mmio_pfn(pfn_t pfn)
+bool kvm_is_reserved_pfn(pfn_t pfn)
 {
 	if (pfn_valid(pfn))
-		return !is_zero_pfn(pfn) && PageReserved(pfn_to_page(pfn));
+		return PageReserved(pfn_to_page(pfn));
 
 	return true;
 }
@@ -1321,7 +1321,7 @@ static pfn_t hva_to_pfn(unsigned long ad
 	else if ((vma->vm_flags & VM_PFNMAP)) {
 		pfn = ((addr - vma->vm_start) >> PAGE_SHIFT) +
 			vma->vm_pgoff;
-		BUG_ON(!kvm_is_mmio_pfn(pfn));
+		BUG_ON(!kvm_is_reserved_pfn(pfn));
 	} else {
 		if (async && vma_is_valid(vma, write_fault))
 			*async = true;
@@ -1427,7 +1427,7 @@ static struct page *kvm_pfn_to_page(pfn_
 	if (is_error_noslot_pfn(pfn))
 		return KVM_ERR_PTR_BAD_PAGE;
 
-	if (kvm_is_mmio_pfn(pfn)) {
+	if (kvm_is_reserved_pfn(pfn)) {
 		WARN_ON(1);
 		return KVM_ERR_PTR_BAD_PAGE;
 	}
@@ -1456,7 +1456,7 @@ EXPORT_SYMBOL_GPL(kvm_release_page_clean
 
 void kvm_release_pfn_clean(pfn_t pfn)
 {
-	if (!is_error_noslot_pfn(pfn) && !kvm_is_mmio_pfn(pfn))
+	if (!is_error_noslot_pfn(pfn) && !kvm_is_reserved_pfn(pfn))
 		put_page(pfn_to_page(pfn));
 }
 EXPORT_SYMBOL_GPL(kvm_release_pfn_clean);
@@ -1477,7 +1477,7 @@ static void kvm_release_pfn_dirty(pfn_t
 
 void kvm_set_pfn_dirty(pfn_t pfn)
 {
-	if (!kvm_is_mmio_pfn(pfn)) {
+	if (!kvm_is_reserved_pfn(pfn)) {
 		struct page *page = pfn_to_page(pfn);
 		if (!PageReserved(page))
 			SetPageDirty(page);
@@ -1487,14 +1487,14 @@ EXPORT_SYMBOL_GPL(kvm_set_pfn_dirty);
 
 void kvm_set_pfn_accessed(pfn_t pfn)
 {
-	if (!kvm_is_mmio_pfn(pfn))
+	if (!kvm_is_reserved_pfn(pfn))
 		mark_page_accessed(pfn_to_page(pfn));
 }
 EXPORT_SYMBOL_GPL(kvm_set_pfn_accessed);
 
 void kvm_get_pfn(pfn_t pfn)
 {
-	if (!kvm_is_mmio_pfn(pfn))
+	if (!kvm_is_reserved_pfn(pfn))
 		get_page(pfn_to_page(pfn));
 }
 EXPORT_SYMBOL_GPL(kvm_get_pfn);
