diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/arm/boot/dts/lpc3250-phy3250.dts linux-libre-4.9.212-gnu/arch/arm/boot/dts/lpc3250-phy3250.dts
--- linux-libre-4.9.211-gnu/arch/arm/boot/dts/lpc3250-phy3250.dts	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/arm/boot/dts/lpc3250-phy3250.dts	2020-01-29 04:24:41.000000000 -0500
@@ -49,8 +49,8 @@
 		sd_reg: regulator@2 {
 			compatible = "regulator-fixed";
 			regulator-name = "sd_reg";
-			regulator-min-microvolt = <1800000>;
-			regulator-max-microvolt = <1800000>;
+			regulator-min-microvolt = <3300000>;
+			regulator-max-microvolt = <3300000>;
 			gpio = <&gpio 5 5 0>;
 			enable-active-high;
 		};
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/arm/boot/dts/lpc32xx.dtsi linux-libre-4.9.212-gnu/arch/arm/boot/dts/lpc32xx.dtsi
--- linux-libre-4.9.211-gnu/arch/arm/boot/dts/lpc32xx.dtsi	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/arm/boot/dts/lpc32xx.dtsi	2020-01-29 04:24:41.000000000 -0500
@@ -139,11 +139,11 @@
 		};
 
 		clcd: clcd@31040000 {
-			compatible = "arm,pl110", "arm,primecell";
+			compatible = "arm,pl111", "arm,primecell";
 			reg = <0x31040000 0x1000>;
 			interrupts = <14 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&clk LPC32XX_CLK_LCD>;
-			clock-names = "apb_pclk";
+			clocks = <&clk LPC32XX_CLK_LCD>, <&clk LPC32XX_CLK_LCD>;
+			clock-names = "clcdclk", "apb_pclk";
 			status = "disabled";
 		};
 
@@ -462,7 +462,9 @@
 			key: key@40050000 {
 				compatible = "nxp,lpc3220-key";
 				reg = <0x40050000 0x1000>;
-				interrupts = <54 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&clk LPC32XX_CLK_KEY>;
+				interrupt-parent = <&sic1>;
+				interrupts = <22 IRQ_TYPE_LEVEL_HIGH>;
 				status = "disabled";
 			};
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/arm/boot/dts/ls1021a.dtsi linux-libre-4.9.212-gnu/arch/arm/boot/dts/ls1021a.dtsi
--- linux-libre-4.9.211-gnu/arch/arm/boot/dts/ls1021a.dtsi	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/arm/boot/dts/ls1021a.dtsi	2020-01-29 04:24:41.000000000 -0500
@@ -505,13 +505,22 @@
 		};
 
 		mdio0: mdio@2d24000 {
-			compatible = "gianfar";
+			compatible = "fsl,etsec2-mdio";
 			device_type = "mdio";
 			#address-cells = <1>;
 			#size-cells = <0>;
 			reg = <0x0 0x2d24000 0x0 0x4000>;
 		};
 
+		mdio1: mdio@2d64000 {
+			compatible = "fsl,etsec2-mdio";
+			device_type = "mdio";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0x0 0x2d64000 0x0 0x4000>,
+			      <0x0 0x2d50030 0x0 0x4>;
+		};
+
 		ptp_clock@2d10e00 {
 			compatible = "fsl,etsec-ptp";
 			reg = <0x0 0x2d10e00 0x0 0xb0>;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/arm/boot/dts/ls1021a-twr.dts linux-libre-4.9.212-gnu/arch/arm/boot/dts/ls1021a-twr.dts
--- linux-libre-4.9.211-gnu/arch/arm/boot/dts/ls1021a-twr.dts	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/arm/boot/dts/ls1021a-twr.dts	2020-01-29 04:24:41.000000000 -0500
@@ -143,7 +143,7 @@
 };
 
 &enet0 {
-	tbi-handle = <&tbi1>;
+	tbi-handle = <&tbi0>;
 	phy-handle = <&sgmii_phy2>;
 	phy-connection-type = "sgmii";
 	status = "okay";
@@ -222,6 +222,13 @@
 	sgmii_phy2: ethernet-phy@2 {
 		reg = <0x2>;
 	};
+	tbi0: tbi-phy@1f {
+		reg = <0x1f>;
+		device_type = "tbi-phy";
+	};
+};
+
+&mdio1 {
 	tbi1: tbi-phy@1f {
 		reg = <0x1f>;
 		device_type = "tbi-phy";
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/arm/common/mcpm_entry.c linux-libre-4.9.212-gnu/arch/arm/common/mcpm_entry.c
--- linux-libre-4.9.211-gnu/arch/arm/common/mcpm_entry.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/arm/common/mcpm_entry.c	2020-01-29 04:24:41.000000000 -0500
@@ -379,7 +379,7 @@ static int __init nocache_trampoline(uns
 	unsigned int cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
 	phys_reset_t phys_reset;
 
-	mcpm_set_entry_vector(cpu, cluster, cpu_resume);
+	mcpm_set_entry_vector(cpu, cluster, cpu_resume_no_hyp);
 	setup_mm_for_reboot();
 
 	__mcpm_cpu_going_down(cpu, cluster);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/arm/include/asm/suspend.h linux-libre-4.9.212-gnu/arch/arm/include/asm/suspend.h
--- linux-libre-4.9.211-gnu/arch/arm/include/asm/suspend.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/arm/include/asm/suspend.h	2020-01-29 04:24:41.000000000 -0500
@@ -7,6 +7,7 @@ struct sleep_save_sp {
 };
 
 extern void cpu_resume(void);
+extern void cpu_resume_no_hyp(void);
 extern void cpu_resume_arm(void);
 extern int cpu_suspend(unsigned long, int (*)(unsigned long));
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/arm/kernel/hyp-stub.S linux-libre-4.9.212-gnu/arch/arm/kernel/hyp-stub.S
--- linux-libre-4.9.211-gnu/arch/arm/kernel/hyp-stub.S	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/arm/kernel/hyp-stub.S	2020-01-29 04:24:41.000000000 -0500
@@ -179,8 +179,8 @@ ARM_BE8(orr	r7, r7, #(1 << 25))     @ HS
 	@ Check whether GICv3 system registers are available
 	mrc	p15, 0, r7, c0, c1, 1	@ ID_PFR1
 	ubfx	r7, r7, #28, #4
-	cmp	r7, #1
-	bne	2f
+	teq	r7, #0
+	beq	2f
 
 	@ Enable system register accesses
 	mrc	p15, 4, r7, c12, c9, 5	@ ICC_HSRE
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/arm/kernel/sleep.S linux-libre-4.9.212-gnu/arch/arm/kernel/sleep.S
--- linux-libre-4.9.211-gnu/arch/arm/kernel/sleep.S	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/arm/kernel/sleep.S	2020-01-29 04:24:41.000000000 -0500
@@ -119,6 +119,14 @@ ENDPROC(cpu_resume_after_mmu)
 	.text
 	.align
 
+#ifdef CONFIG_MCPM
+	.arm
+THUMB(	.thumb			)
+ENTRY(cpu_resume_no_hyp)
+ARM_BE8(setend be)			@ ensure we are in BE mode
+	b	no_hyp
+#endif
+
 #ifdef CONFIG_MMU
 	.arm
 ENTRY(cpu_resume_arm)
@@ -134,6 +142,7 @@ ARM_BE8(setend be)			@ ensure we are in
 	bl	__hyp_stub_install_secondary
 #endif
 	safe_svcmode_maskall r1
+no_hyp:
 	mov	r1, #0
 	ALT_SMP(mrc p15, 0, r0, c0, c0, 5)
 	ALT_UP_B(1f)
@@ -163,6 +172,9 @@ ENDPROC(cpu_resume)
 #ifdef CONFIG_MMU
 ENDPROC(cpu_resume_arm)
 #endif
+#ifdef CONFIG_MCPM
+ENDPROC(cpu_resume_no_hyp)
+#endif
 
 	.align 2
 _sleep_save_sp:
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/arm/mach-omap2/omap_hwmod.c linux-libre-4.9.212-gnu/arch/arm/mach-omap2/omap_hwmod.c
--- linux-libre-4.9.211-gnu/arch/arm/mach-omap2/omap_hwmod.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/arm/mach-omap2/omap_hwmod.c	2020-01-29 04:24:41.000000000 -0500
@@ -2588,7 +2588,7 @@ static void _setup_iclk_autoidle(struct
  */
 static int _setup_reset(struct omap_hwmod *oh)
 {
-	int r;
+	int r = 0;
 
 	if (oh->_state != _HWMOD_STATE_INITIALIZED)
 		return -EINVAL;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/arm/mach-rpc/irq.c linux-libre-4.9.212-gnu/arch/arm/mach-rpc/irq.c
--- linux-libre-4.9.211-gnu/arch/arm/mach-rpc/irq.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/arm/mach-rpc/irq.c	2020-01-29 04:24:41.000000000 -0500
@@ -117,7 +117,7 @@ extern unsigned char rpc_default_fiq_sta
 
 void __init rpc_init_irq(void)
 {
-	unsigned int irq, clr, set = 0;
+	unsigned int irq, clr, set;
 
 	iomd_writeb(0, IOMD_IRQMASKA);
 	iomd_writeb(0, IOMD_IRQMASKB);
@@ -129,6 +129,7 @@ void __init rpc_init_irq(void)
 
 	for (irq = 0; irq < NR_IRQS; irq++) {
 		clr = IRQ_NOREQUEST;
+		set = 0;
 
 		if (irq <= 6 || (irq >= 9 && irq <= 15))
 			clr |= IRQ_NOPROBE;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/arm/plat-pxa/ssp.c linux-libre-4.9.212-gnu/arch/arm/plat-pxa/ssp.c
--- linux-libre-4.9.211-gnu/arch/arm/plat-pxa/ssp.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/arm/plat-pxa/ssp.c	2020-01-29 04:24:41.000000000 -0500
@@ -230,18 +230,12 @@ static int pxa_ssp_probe(struct platform
 
 static int pxa_ssp_remove(struct platform_device *pdev)
 {
-	struct resource *res;
 	struct ssp_device *ssp;
 
 	ssp = platform_get_drvdata(pdev);
 	if (ssp == NULL)
 		return -ENODEV;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	release_mem_region(res->start, resource_size(res));
-
-	clk_put(ssp->clk);
-
 	mutex_lock(&ssp_lock);
 	list_del(&ssp->node);
 	mutex_unlock(&ssp_lock);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/arm64/boot/dts/arm/juno-clocks.dtsi linux-libre-4.9.212-gnu/arch/arm64/boot/dts/arm/juno-clocks.dtsi
--- linux-libre-4.9.211-gnu/arch/arm64/boot/dts/arm/juno-clocks.dtsi	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/arm64/boot/dts/arm/juno-clocks.dtsi	2020-01-29 04:24:41.000000000 -0500
@@ -8,10 +8,10 @@
  */
 
 	/* SoC fixed clocks */
-	soc_uartclk: refclk7273800hz {
+	soc_uartclk: refclk7372800hz {
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
-		clock-frequency = <7273800>;
+		clock-frequency = <7372800>;
 		clock-output-names = "juno:uartclk";
 	};
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi linux-libre-4.9.212-gnu/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
--- linux-libre-4.9.211-gnu/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi	2020-01-29 04:24:41.000000000 -0500
@@ -355,6 +355,8 @@
 	l11 {
 		regulator-min-microvolt = <1750000>;
 		regulator-max-microvolt = <3337000>;
+		regulator-allow-set-load;
+		regulator-system-load = <200000>;
 	};
 
 	l12 {
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/arm64/kernel/cpufeature.c linux-libre-4.9.212-gnu/arch/arm64/kernel/cpufeature.c
--- linux-libre-4.9.211-gnu/arch/arm64/kernel/cpufeature.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/arm64/kernel/cpufeature.c	2020-01-29 04:24:41.000000000 -0500
@@ -789,6 +789,11 @@ static bool unmap_kernel_at_el0(const st
 	switch (read_cpuid_id() & MIDR_CPU_MODEL_MASK) {
 	case MIDR_CAVIUM_THUNDERX2:
 	case MIDR_BRCM_VULCAN:
+	case MIDR_CORTEX_A53:
+	case MIDR_CORTEX_A55:
+	case MIDR_CORTEX_A57:
+	case MIDR_CORTEX_A72:
+	case MIDR_CORTEX_A73:
 		return false;
 	}
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/m68k/amiga/cia.c linux-libre-4.9.212-gnu/arch/m68k/amiga/cia.c
--- linux-libre-4.9.211-gnu/arch/m68k/amiga/cia.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/m68k/amiga/cia.c	2020-01-29 04:24:41.000000000 -0500
@@ -88,10 +88,19 @@ static irqreturn_t cia_handler(int irq,
 	struct ciabase *base = dev_id;
 	int mach_irq;
 	unsigned char ints;
+	unsigned long flags;
 
+	/* Interrupts get disabled while the timer irq flag is cleared and
+	 * the timer interrupt serviced.
+	 */
 	mach_irq = base->cia_irq;
+	local_irq_save(flags);
 	ints = cia_set_irq(base, CIA_ICR_ALL);
 	amiga_custom.intreq = base->int_mask;
+	if (ints & 1)
+		generic_handle_irq(mach_irq);
+	local_irq_restore(flags);
+	mach_irq++, ints >>= 1;
 	for (; ints; mach_irq++, ints >>= 1) {
 		if (ints & 1)
 			generic_handle_irq(mach_irq);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/m68k/atari/ataints.c linux-libre-4.9.212-gnu/arch/m68k/atari/ataints.c
--- linux-libre-4.9.211-gnu/arch/m68k/atari/ataints.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/m68k/atari/ataints.c	2020-01-29 04:24:41.000000000 -0500
@@ -142,7 +142,7 @@ struct mfptimerbase {
 	.name		= "MFP Timer D"
 };
 
-static irqreturn_t mfptimer_handler(int irq, void *dev_id)
+static irqreturn_t mfp_timer_d_handler(int irq, void *dev_id)
 {
 	struct mfptimerbase *base = dev_id;
 	int mach_irq;
@@ -344,7 +344,7 @@ void __init atari_init_IRQ(void)
 	st_mfp.tim_ct_cd = (st_mfp.tim_ct_cd & 0xf0) | 0x6;
 
 	/* request timer D dispatch handler */
-	if (request_irq(IRQ_MFP_TIMD, mfptimer_handler, IRQF_SHARED,
+	if (request_irq(IRQ_MFP_TIMD, mfp_timer_d_handler, IRQF_SHARED,
 			stmfp_base.name, &stmfp_base))
 		pr_err("Couldn't register %s interrupt\n", stmfp_base.name);
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/m68k/atari/time.c linux-libre-4.9.212-gnu/arch/m68k/atari/time.c
--- linux-libre-4.9.211-gnu/arch/m68k/atari/time.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/m68k/atari/time.c	2020-01-29 04:24:41.000000000 -0500
@@ -24,6 +24,18 @@
 DEFINE_SPINLOCK(rtc_lock);
 EXPORT_SYMBOL_GPL(rtc_lock);
 
+static irqreturn_t mfp_timer_c_handler(int irq, void *dev_id)
+{
+	irq_handler_t timer_routine = dev_id;
+	unsigned long flags;
+
+	local_irq_save(flags);
+	timer_routine(0, NULL);
+	local_irq_restore(flags);
+
+	return IRQ_HANDLED;
+}
+
 void __init
 atari_sched_init(irq_handler_t timer_routine)
 {
@@ -32,7 +44,8 @@ atari_sched_init(irq_handler_t timer_rou
     /* start timer C, div = 1:100 */
     st_mfp.tim_ct_cd = (st_mfp.tim_ct_cd & 15) | 0x60;
     /* install interrupt service routine for MFP Timer C */
-    if (request_irq(IRQ_MFP_TIMC, timer_routine, 0, "timer", timer_routine))
+    if (request_irq(IRQ_MFP_TIMC, mfp_timer_c_handler, 0, "timer",
+                    timer_routine))
 	pr_err("Couldn't register timer interrupt\n");
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/m68k/bvme6000/config.c linux-libre-4.9.212-gnu/arch/m68k/bvme6000/config.c
--- linux-libre-4.9.211-gnu/arch/m68k/bvme6000/config.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/m68k/bvme6000/config.c	2020-01-29 04:24:41.000000000 -0500
@@ -45,11 +45,6 @@ extern int bvme6000_set_clock_mmss (unsi
 extern void bvme6000_reset (void);
 void bvme6000_set_vectors (void);
 
-/* Save tick handler routine pointer, will point to xtime_update() in
- * kernel/timer/timekeeping.c, called via bvme6000_process_int() */
-
-static irq_handler_t tick_handler;
-
 
 int __init bvme6000_parse_bootinfo(const struct bi_record *bi)
 {
@@ -159,12 +154,18 @@ irqreturn_t bvme6000_abort_int (int irq,
 
 static irqreturn_t bvme6000_timer_int (int irq, void *dev_id)
 {
+    irq_handler_t timer_routine = dev_id;
+    unsigned long flags;
     volatile RtcPtr_t rtc = (RtcPtr_t)BVME_RTC_BASE;
-    unsigned char msr = rtc->msr & 0xc0;
+    unsigned char msr;
 
+    local_irq_save(flags);
+    msr = rtc->msr & 0xc0;
     rtc->msr = msr | 0x20;		/* Ack the interrupt */
+    timer_routine(0, NULL);
+    local_irq_restore(flags);
 
-    return tick_handler(irq, dev_id);
+    return IRQ_HANDLED;
 }
 
 /*
@@ -183,9 +184,8 @@ void bvme6000_sched_init (irq_handler_t
 
     rtc->msr = 0;	/* Ensure timer registers accessible */
 
-    tick_handler = timer_routine;
-    if (request_irq(BVME_IRQ_RTC, bvme6000_timer_int, 0,
-				"timer", bvme6000_timer_int))
+    if (request_irq(BVME_IRQ_RTC, bvme6000_timer_int, 0, "timer",
+                    timer_routine))
 	panic ("Couldn't register timer int");
 
     rtc->t1cr_omr = 0x04;	/* Mode 2, ext clk */
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/m68k/hp300/time.c linux-libre-4.9.212-gnu/arch/m68k/hp300/time.c
--- linux-libre-4.9.211-gnu/arch/m68k/hp300/time.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/m68k/hp300/time.c	2020-01-29 04:24:41.000000000 -0500
@@ -37,13 +37,19 @@
 
 static irqreturn_t hp300_tick(int irq, void *dev_id)
 {
+	irq_handler_t timer_routine = dev_id;
+	unsigned long flags;
 	unsigned long tmp;
-	irq_handler_t vector = dev_id;
+
+	local_irq_save(flags);
 	in_8(CLOCKBASE + CLKSR);
 	asm volatile ("movpw %1@(5),%0" : "=d" (tmp) : "a" (CLOCKBASE));
+	timer_routine(0, NULL);
+	local_irq_restore(flags);
+
 	/* Turn off the network and SCSI leds */
 	blinken_leds(0, 0xe0);
-	return vector(irq, NULL);
+	return IRQ_HANDLED;
 }
 
 u32 hp300_gettimeoffset(void)
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/m68k/mac/via.c linux-libre-4.9.212-gnu/arch/m68k/mac/via.c
--- linux-libre-4.9.211-gnu/arch/m68k/mac/via.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/m68k/mac/via.c	2020-01-29 04:24:41.000000000 -0500
@@ -54,16 +54,6 @@ static __u8 rbv_clear;
 static int gIER,gIFR,gBufA,gBufB;
 
 /*
- * Timer defs.
- */
-
-#define TICK_SIZE		10000
-#define MAC_CLOCK_TICK		(783300/HZ)		/* ticks per HZ */
-#define MAC_CLOCK_LOW		(MAC_CLOCK_TICK&0xFF)
-#define MAC_CLOCK_HIGH		(MAC_CLOCK_TICK>>8)
-
-
-/*
  * On Macs with a genuine VIA chip there is no way to mask an individual slot
  * interrupt. This limitation also seems to apply to VIA clone logic cores in
  * Quadra-like ASICs. (RBV and OSS machines don't have this limitation.)
@@ -278,22 +268,6 @@ void __init via_init(void)
 }
 
 /*
- * Start the 100 Hz clock
- */
-
-void __init via_init_clock(irq_handler_t func)
-{
-	via1[vACR] |= 0x40;
-	via1[vT1LL] = MAC_CLOCK_LOW;
-	via1[vT1LH] = MAC_CLOCK_HIGH;
-	via1[vT1CL] = MAC_CLOCK_LOW;
-	via1[vT1CH] = MAC_CLOCK_HIGH;
-
-	if (request_irq(IRQ_MAC_TIMER_1, func, 0, "timer", func))
-		pr_err("Couldn't register %s interrupt\n", "timer");
-}
-
-/*
  * Debugging dump, used in various places to see what's going on.
  */
 
@@ -321,29 +295,6 @@ void via_debug_dump(void)
 }
 
 /*
- * This is always executed with interrupts disabled.
- *
- * TBI: get time offset between scheduling timer ticks
- */
-
-u32 mac_gettimeoffset(void)
-{
-	unsigned long ticks, offset = 0;
-
-	/* read VIA1 timer 2 current value */
-	ticks = via1[vT1CL] | (via1[vT1CH] << 8);
-	/* The probability of underflow is less than 2% */
-	if (ticks > MAC_CLOCK_TICK - MAC_CLOCK_TICK / 50)
-		/* Check for pending timer interrupt in VIA1 IFR */
-		if (via1[vIFR] & 0x40) offset = TICK_SIZE;
-
-	ticks = MAC_CLOCK_TICK - ticks;
-	ticks = ticks * 10000L / MAC_CLOCK_TICK;
-
-	return (ticks + offset) * 1000;
-}
-
-/*
  * Flush the L2 cache on Macs that have it by flipping
  * the system into 24-bit mode for an instant.
  */
@@ -446,6 +397,8 @@ void via_nubus_irq_shutdown(int irq)
  * via6522.c :-), disable/pending masks added.
  */
 
+#define VIA_TIMER_1_INT BIT(6)
+
 void via1_irq(struct irq_desc *desc)
 {
 	int irq_num;
@@ -455,6 +408,21 @@ void via1_irq(struct irq_desc *desc)
 	if (!events)
 		return;
 
+	irq_num = IRQ_MAC_TIMER_1;
+	irq_bit = VIA_TIMER_1_INT;
+	if (events & irq_bit) {
+		unsigned long flags;
+
+		local_irq_save(flags);
+		via1[vIFR] = irq_bit;
+		generic_handle_irq(irq_num);
+		local_irq_restore(flags);
+
+		events &= ~irq_bit;
+		if (!events)
+			return;
+	}
+
 	irq_num = VIA1_SOURCE_BASE;
 	irq_bit = 1;
 	do {
@@ -619,3 +587,56 @@ int via2_scsi_drq_pending(void)
 	return via2[gIFR] & (1 << IRQ_IDX(IRQ_MAC_SCSIDRQ));
 }
 EXPORT_SYMBOL(via2_scsi_drq_pending);
+
+/* timer and clock source */
+
+#define VIA_CLOCK_FREQ     783360                /* VIA "phase 2" clock in Hz */
+#define VIA_TIMER_INTERVAL (1000000 / HZ)        /* microseconds per jiffy */
+#define VIA_TIMER_CYCLES   (VIA_CLOCK_FREQ / HZ) /* clock cycles per jiffy */
+
+#define VIA_TC             (VIA_TIMER_CYCLES - 2) /* including 0 and -1 */
+#define VIA_TC_LOW         (VIA_TC & 0xFF)
+#define VIA_TC_HIGH        (VIA_TC >> 8)
+
+void __init via_init_clock(irq_handler_t timer_routine)
+{
+	if (request_irq(IRQ_MAC_TIMER_1, timer_routine, 0, "timer", NULL)) {
+		pr_err("Couldn't register %s interrupt\n", "timer");
+		return;
+	}
+
+	via1[vT1LL] = VIA_TC_LOW;
+	via1[vT1LH] = VIA_TC_HIGH;
+	via1[vT1CL] = VIA_TC_LOW;
+	via1[vT1CH] = VIA_TC_HIGH;
+	via1[vACR] |= 0x40;
+}
+
+u32 mac_gettimeoffset(void)
+{
+	unsigned long flags;
+	u8 count_high;
+	u16 count, offset = 0;
+
+	/*
+	 * Timer counter wrap-around is detected with the timer interrupt flag
+	 * but reading the counter low byte (vT1CL) would reset the flag.
+	 * Also, accessing both counter registers is essentially a data race.
+	 * These problems are avoided by ignoring the low byte. Clock accuracy
+	 * is 256 times worse (error can reach 0.327 ms) but CPU overhead is
+	 * reduced by avoiding slow VIA register accesses.
+	 */
+
+	local_irq_save(flags);
+	count_high = via1[vT1CH];
+	if (count_high == 0xFF)
+		count_high = 0;
+	if (count_high > 0 && (via1[vIFR] & VIA_TIMER_1_INT))
+		offset = VIA_TIMER_CYCLES;
+	local_irq_restore(flags);
+
+	count = count_high << 8;
+	count = VIA_TIMER_CYCLES - count + offset;
+
+	return ((count * VIA_TIMER_INTERVAL) / VIA_TIMER_CYCLES) * 1000;
+}
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/m68k/mvme147/config.c linux-libre-4.9.212-gnu/arch/m68k/mvme147/config.c
--- linux-libre-4.9.211-gnu/arch/m68k/mvme147/config.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/m68k/mvme147/config.c	2020-01-29 04:24:41.000000000 -0500
@@ -46,11 +46,6 @@ extern void mvme147_reset (void);
 
 static int bcd2int (unsigned char b);
 
-/* Save tick handler routine pointer, will point to xtime_update() in
- * kernel/time/timekeeping.c, called via mvme147_process_int() */
-
-irq_handler_t tick_handler;
-
 
 int __init mvme147_parse_bootinfo(const struct bi_record *bi)
 {
@@ -106,16 +101,23 @@ void __init config_mvme147(void)
 
 static irqreturn_t mvme147_timer_int (int irq, void *dev_id)
 {
+	irq_handler_t timer_routine = dev_id;
+	unsigned long flags;
+
+	local_irq_save(flags);
 	m147_pcc->t1_int_cntrl = PCC_TIMER_INT_CLR;
 	m147_pcc->t1_int_cntrl = PCC_INT_ENAB|PCC_LEVEL_TIMER1;
-	return tick_handler(irq, dev_id);
+	timer_routine(0, NULL);
+	local_irq_restore(flags);
+
+	return IRQ_HANDLED;
 }
 
 
 void mvme147_sched_init (irq_handler_t timer_routine)
 {
-	tick_handler = timer_routine;
-	if (request_irq(PCC_IRQ_TIMER1, mvme147_timer_int, 0, "timer 1", NULL))
+	if (request_irq(PCC_IRQ_TIMER1, mvme147_timer_int, 0, "timer 1",
+			timer_routine))
 		pr_err("Couldn't register timer interrupt\n");
 
 	/* Init the clock with a value */
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/m68k/mvme16x/config.c linux-libre-4.9.212-gnu/arch/m68k/mvme16x/config.c
--- linux-libre-4.9.211-gnu/arch/m68k/mvme16x/config.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/m68k/mvme16x/config.c	2020-01-29 04:24:41.000000000 -0500
@@ -51,11 +51,6 @@ extern void mvme16x_reset (void);
 
 int bcd2int (unsigned char b);
 
-/* Save tick handler routine pointer, will point to xtime_update() in
- * kernel/time/timekeeping.c, called via mvme16x_process_int() */
-
-static irq_handler_t tick_handler;
-
 
 unsigned short mvme16x_config;
 EXPORT_SYMBOL(mvme16x_config);
@@ -354,8 +349,15 @@ static irqreturn_t mvme16x_abort_int (in
 
 static irqreturn_t mvme16x_timer_int (int irq, void *dev_id)
 {
-    *(volatile unsigned char *)0xfff4201b |= 8;
-    return tick_handler(irq, dev_id);
+	irq_handler_t timer_routine = dev_id;
+	unsigned long flags;
+
+	local_irq_save(flags);
+	*(volatile unsigned char *)0xfff4201b |= 8;
+	timer_routine(0, NULL);
+	local_irq_restore(flags);
+
+	return IRQ_HANDLED;
 }
 
 void mvme16x_sched_init (irq_handler_t timer_routine)
@@ -363,14 +365,13 @@ void mvme16x_sched_init (irq_handler_t t
     uint16_t brdno = be16_to_cpu(mvme_bdid.brdno);
     int irq;
 
-    tick_handler = timer_routine;
     /* Using PCCchip2 or MC2 chip tick timer 1 */
     *(volatile unsigned long *)0xfff42008 = 0;
     *(volatile unsigned long *)0xfff42004 = 10000;	/* 10ms */
     *(volatile unsigned char *)0xfff42017 |= 3;
     *(volatile unsigned char *)0xfff4201b = 0x16;
-    if (request_irq(MVME16x_IRQ_TIMER, mvme16x_timer_int, 0,
-				"timer", mvme16x_timer_int))
+    if (request_irq(MVME16x_IRQ_TIMER, mvme16x_timer_int, 0, "timer",
+                    timer_routine))
 	panic ("Couldn't register timer int");
 
     if (brdno == 0x0162 || brdno == 0x172)
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/m68k/q40/q40ints.c linux-libre-4.9.212-gnu/arch/m68k/q40/q40ints.c
--- linux-libre-4.9.211-gnu/arch/m68k/q40/q40ints.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/m68k/q40/q40ints.c	2020-01-29 04:24:41.000000000 -0500
@@ -126,10 +126,10 @@ void q40_mksound(unsigned int hz, unsign
 	sound_ticks = ticks << 1;
 }
 
-static irq_handler_t q40_timer_routine;
-
-static irqreturn_t q40_timer_int (int irq, void * dev)
+static irqreturn_t q40_timer_int(int irq, void *dev_id)
 {
+	irq_handler_t timer_routine = dev_id;
+
 	ql_ticks = ql_ticks ? 0 : 1;
 	if (sound_ticks) {
 		unsigned char sval=(sound_ticks & 1) ? 128-SVOL : 128+SVOL;
@@ -138,8 +138,13 @@ static irqreturn_t q40_timer_int (int ir
 		*DAC_RIGHT=sval;
 	}
 
-	if (!ql_ticks)
-		q40_timer_routine(irq, dev);
+	if (!ql_ticks) {
+		unsigned long flags;
+
+		local_irq_save(flags);
+		timer_routine(0, NULL);
+		local_irq_restore(flags);
+	}
 	return IRQ_HANDLED;
 }
 
@@ -147,11 +152,9 @@ void q40_sched_init (irq_handler_t timer
 {
 	int timer_irq;
 
-	q40_timer_routine = timer_routine;
 	timer_irq = Q40_IRQ_FRAME;
 
-	if (request_irq(timer_irq, q40_timer_int, 0,
-				"timer", q40_timer_int))
+	if (request_irq(timer_irq, q40_timer_int, 0, "timer", timer_routine))
 		panic("Couldn't register timer int");
 
 	master_outb(-1, FRAME_CLEAR_REG);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/m68k/sun3/sun3ints.c linux-libre-4.9.212-gnu/arch/m68k/sun3/sun3ints.c
--- linux-libre-4.9.211-gnu/arch/m68k/sun3/sun3ints.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/m68k/sun3/sun3ints.c	2020-01-29 04:24:41.000000000 -0500
@@ -61,8 +61,10 @@ static irqreturn_t sun3_int7(int irq, vo
 
 static irqreturn_t sun3_int5(int irq, void *dev_id)
 {
+	unsigned long flags;
 	unsigned int cnt;
 
+	local_irq_save(flags);
 #ifdef CONFIG_SUN3
 	intersil_clear();
 #endif
@@ -76,6 +78,7 @@ static irqreturn_t sun3_int5(int irq, vo
 	cnt = kstat_irqs_cpu(irq, 0);
 	if (!(cnt % 20))
 		sun3_leds(led_pattern[cnt % 160 / 20]);
+	local_irq_restore(flags);
 	return IRQ_HANDLED;
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/m68k/sun3x/time.c linux-libre-4.9.212-gnu/arch/m68k/sun3x/time.c
--- linux-libre-4.9.211-gnu/arch/m68k/sun3x/time.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/m68k/sun3x/time.c	2020-01-29 04:24:41.000000000 -0500
@@ -77,15 +77,19 @@ u32 sun3x_gettimeoffset(void)
 }
 
 #if 0
-static void sun3x_timer_tick(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t sun3x_timer_tick(int irq, void *dev_id)
 {
-    void (*vector)(int, void *, struct pt_regs *) = dev_id;
+	irq_handler_t timer_routine = dev_id;
+	unsigned long flags;
 
-    /* Clear the pending interrupt - pulse the enable line low */
-    disable_irq(5);
-    enable_irq(5);
+	local_irq_save(flags);
+	/* Clear the pending interrupt - pulse the enable line low */
+	disable_irq(5);
+	enable_irq(5);
+	timer_routine(0, NULL);
+	local_irq_restore(flags);
 
-    vector(irq, NULL, regs);
+	return IRQ_HANDLED;
 }
 #endif
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/mips/include/asm/io.h linux-libre-4.9.212-gnu/arch/mips/include/asm/io.h
--- linux-libre-4.9.211-gnu/arch/mips/include/asm/io.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/mips/include/asm/io.h	2020-01-29 04:24:41.000000000 -0500
@@ -60,21 +60,11 @@
  * instruction, so the lower 16 bits must be zero.  Should be true on
  * on any sane architecture; generic code does not use this assumption.
  */
-extern const unsigned long mips_io_port_base;
+extern unsigned long mips_io_port_base;
 
-/*
- * Gcc will generate code to load the value of mips_io_port_base after each
- * function call which may be fairly wasteful in some cases.  So we don't
- * play quite by the book.  We tell gcc mips_io_port_base is a long variable
- * which solves the code generation issue.  Now we need to violate the
- * aliasing rules a little to make initialization possible and finally we
- * will need the barrier() to fight side effects of the aliasing chat.
- * This trickery will eventually collapse under gcc's optimizer.  Oh well.
- */
 static inline void set_io_port_base(unsigned long base)
 {
-	* (unsigned long *) &mips_io_port_base = base;
-	barrier();
+	mips_io_port_base = base;
 }
 
 /*
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/mips/kernel/setup.c linux-libre-4.9.212-gnu/arch/mips/kernel/setup.c
--- linux-libre-4.9.211-gnu/arch/mips/kernel/setup.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/mips/kernel/setup.c	2020-01-29 04:24:41.000000000 -0500
@@ -74,7 +74,7 @@ static char __initdata builtin_cmdline[C
  * mips_io_port_base is the begin of the address space to which x86 style
  * I/O ports are mapped.
  */
-const unsigned long mips_io_port_base = -1;
+unsigned long mips_io_port_base = -1;
 EXPORT_SYMBOL(mips_io_port_base);
 
 static struct resource code_resource = { .name = "Kernel code", };
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/nios2/kernel/nios2_ksyms.c linux-libre-4.9.212-gnu/arch/nios2/kernel/nios2_ksyms.c
--- linux-libre-4.9.211-gnu/arch/nios2/kernel/nios2_ksyms.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/nios2/kernel/nios2_ksyms.c	2020-01-29 04:24:41.000000000 -0500
@@ -9,12 +9,20 @@
 #include <linux/export.h>
 #include <linux/string.h>
 
+#include <asm/cacheflush.h>
+#include <asm/pgtable.h>
+
 /* string functions */
 
 EXPORT_SYMBOL(memcpy);
 EXPORT_SYMBOL(memset);
 EXPORT_SYMBOL(memmove);
 
+/* memory management */
+
+EXPORT_SYMBOL(empty_zero_page);
+EXPORT_SYMBOL(flush_icache_range);
+
 /*
  * libgcc functions - functions that are used internally by the
  * compiler...  (prototypes are not correct though, but that
@@ -31,3 +39,7 @@ DECLARE_EXPORT(__udivsi3);
 DECLARE_EXPORT(__umoddi3);
 DECLARE_EXPORT(__umodsi3);
 DECLARE_EXPORT(__muldi3);
+DECLARE_EXPORT(__ucmpdi2);
+DECLARE_EXPORT(__lshrdi3);
+DECLARE_EXPORT(__ashldi3);
+DECLARE_EXPORT(__ashrdi3);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/powerpc/include/asm/archrandom.h linux-libre-4.9.212-gnu/arch/powerpc/include/asm/archrandom.h
--- linux-libre-4.9.211-gnu/arch/powerpc/include/asm/archrandom.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/powerpc/include/asm/archrandom.h	2020-01-29 04:24:41.000000000 -0500
@@ -27,7 +27,7 @@ static inline int arch_get_random_seed_i
 	unsigned long val;
 	int rc;
 
-	rc = arch_get_random_long(&val);
+	rc = arch_get_random_seed_long(&val);
 	if (rc)
 		*v = val;
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/powerpc/kernel/cacheinfo.c linux-libre-4.9.212-gnu/arch/powerpc/kernel/cacheinfo.c
--- linux-libre-4.9.211-gnu/arch/powerpc/kernel/cacheinfo.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/powerpc/kernel/cacheinfo.c	2020-01-29 04:24:41.000000000 -0500
@@ -867,4 +867,21 @@ void cacheinfo_cpu_offline(unsigned int
 	if (cache)
 		cache_cpu_clear(cache, cpu_id);
 }
+
+void cacheinfo_teardown(void)
+{
+	unsigned int cpu;
+
+	for_each_online_cpu(cpu)
+		cacheinfo_cpu_offline(cpu);
+}
+
+void cacheinfo_rebuild(void)
+{
+	unsigned int cpu;
+
+	for_each_online_cpu(cpu)
+		cacheinfo_cpu_online(cpu);
+}
+
 #endif /* (CONFIG_PPC_PSERIES && CONFIG_SUSPEND) || CONFIG_HOTPLUG_CPU */
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/powerpc/kernel/cacheinfo.h linux-libre-4.9.212-gnu/arch/powerpc/kernel/cacheinfo.h
--- linux-libre-4.9.211-gnu/arch/powerpc/kernel/cacheinfo.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/powerpc/kernel/cacheinfo.h	2020-01-29 04:24:41.000000000 -0500
@@ -5,4 +5,8 @@
 extern void cacheinfo_cpu_online(unsigned int cpu_id);
 extern void cacheinfo_cpu_offline(unsigned int cpu_id);
 
+/* Allow migration/suspend to tear down and rebuild the hierarchy. */
+extern void cacheinfo_teardown(void);
+extern void cacheinfo_rebuild(void);
+
 #endif /* _PPC_CACHEINFO_H */
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/powerpc/Makefile linux-libre-4.9.212-gnu/arch/powerpc/Makefile
--- linux-libre-4.9.211-gnu/arch/powerpc/Makefile	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/powerpc/Makefile	2020-01-29 04:24:41.000000000 -0500
@@ -373,7 +373,9 @@ vdso_install:
 ifeq ($(CONFIG_PPC64),y)
 	$(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso64 $@
 endif
+ifdef CONFIG_VDSO32
 	$(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso32 $@
+endif
 
 archclean:
 	$(Q)$(MAKE) $(clean)=$(boot)
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/x86/Kconfig.debug linux-libre-4.9.212-gnu/arch/x86/Kconfig.debug
--- linux-libre-4.9.211-gnu/arch/x86/Kconfig.debug	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/x86/Kconfig.debug	2020-01-29 04:24:41.000000000 -0500
@@ -192,7 +192,7 @@ config HAVE_MMIOTRACE_SUPPORT
 
 config X86_DECODER_SELFTEST
 	bool "x86 instruction decoder selftest"
-	depends on DEBUG_KERNEL && KPROBES
+	depends on DEBUG_KERNEL && INSTRUCTION_DECODER
 	depends on !COMPILE_TEST
 	---help---
 	 Perform x86 instruction decoder selftests at build time.
diff -druNp --no-dereference linux-libre-4.9.211-gnu/arch/x86/kernel/kgdb.c linux-libre-4.9.212-gnu/arch/x86/kernel/kgdb.c
--- linux-libre-4.9.211-gnu/arch/x86/kernel/kgdb.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/arch/x86/kernel/kgdb.c	2020-01-29 04:24:41.000000000 -0500
@@ -438,7 +438,7 @@ static void kgdb_disable_hw_debug(struct
  */
 void kgdb_roundup_cpus(unsigned long flags)
 {
-	apic->send_IPI_allbutself(APIC_DM_NMI);
+	apic->send_IPI_allbutself(NMI_VECTOR);
 }
 #endif
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/block/blk-merge.c linux-libre-4.9.212-gnu/block/blk-merge.c
--- linux-libre-4.9.211-gnu/block/blk-merge.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/block/blk-merge.c	2020-01-29 04:24:41.000000000 -0500
@@ -305,13 +305,7 @@ void blk_recalc_rq_segments(struct reque
 
 void blk_recount_segments(struct request_queue *q, struct bio *bio)
 {
-	unsigned short seg_cnt;
-
-	/* estimate segment number by bi_vcnt for non-cloned bio */
-	if (bio_flagged(bio, BIO_CLONED))
-		seg_cnt = bio_segments(bio);
-	else
-		seg_cnt = bio->bi_vcnt;
+	unsigned short seg_cnt = bio_segments(bio);
 
 	if (test_bit(QUEUE_FLAG_NO_SG_MERGE, &q->queue_flags) &&
 			(seg_cnt < queue_max_segments(q)))
diff -druNp --no-dereference linux-libre-4.9.211-gnu/crypto/pcrypt.c linux-libre-4.9.212-gnu/crypto/pcrypt.c
--- linux-libre-4.9.211-gnu/crypto/pcrypt.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/crypto/pcrypt.c	2020-01-29 04:24:41.000000000 -0500
@@ -394,7 +394,7 @@ static int pcrypt_sysfs_add(struct padat
 	int ret;
 
 	pinst->kobj.kset = pcrypt_kset;
-	ret = kobject_add(&pinst->kobj, NULL, name);
+	ret = kobject_add(&pinst->kobj, NULL, "%s", name);
 	if (!ret)
 		kobject_uevent(&pinst->kobj, KOBJ_ADD);
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/crypto/tgr192.c linux-libre-4.9.212-gnu/crypto/tgr192.c
--- linux-libre-4.9.211-gnu/crypto/tgr192.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/crypto/tgr192.c	2020-01-29 04:24:41.000000000 -0500
@@ -25,8 +25,9 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
-#include <asm/byteorder.h>
 #include <linux/types.h>
+#include <asm/byteorder.h>
+#include <asm/unaligned.h>
 
 #define TGR192_DIGEST_SIZE 24
 #define TGR160_DIGEST_SIZE 20
@@ -468,10 +469,9 @@ static void tgr192_transform(struct tgr1
 	u64 a, b, c, aa, bb, cc;
 	u64 x[8];
 	int i;
-	const __le64 *ptr = (const __le64 *)data;
 
 	for (i = 0; i < 8; i++)
-		x[i] = le64_to_cpu(ptr[i]);
+		x[i] = get_unaligned_le64(data + i * sizeof(__le64));
 
 	/* save */
 	a = aa = tctx->a;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/Documentation/kernel-parameters.txt linux-libre-4.9.212-gnu/Documentation/kernel-parameters.txt
--- linux-libre-4.9.211-gnu/Documentation/kernel-parameters.txt	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/Documentation/kernel-parameters.txt	2020-01-29 04:24:41.000000000 -0500
@@ -1965,6 +1965,12 @@ bytes respectively. Such letter suffixes
 			kmemcheck=2 (one-shot mode)
 			Default: 2 (one-shot mode)
 
+	kpti=		[ARM64] Control page table isolation of user
+			and kernel address spaces.
+			Default: enabled on cores which need mitigation.
+			0: force disabled
+			1: force enabled
+
 	kstack=N	[X86] Print N words from the kernel stack
 			in oops dumps.
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/ata/libahci.c linux-libre-4.9.212-gnu/drivers/ata/libahci.c
--- linux-libre-4.9.211-gnu/drivers/ata/libahci.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/ata/libahci.c	2020-01-29 04:24:41.000000000 -0500
@@ -190,7 +190,6 @@ struct ata_port_operations ahci_pmp_retr
 EXPORT_SYMBOL_GPL(ahci_pmp_retry_srst_ops);
 
 static bool ahci_em_messages __read_mostly = true;
-EXPORT_SYMBOL_GPL(ahci_em_messages);
 module_param(ahci_em_messages, bool, 0444);
 /* add other LED protocol types when they become supported */
 MODULE_PARM_DESC(ahci_em_messages,
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/atm/firestream.c linux-libre-4.9.212-gnu/drivers/atm/firestream.c
--- linux-libre-4.9.211-gnu/drivers/atm/firestream.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/atm/firestream.c	2020-01-29 04:24:41.000000000 -0500
@@ -927,6 +927,7 @@ static int fs_open(struct atm_vcc *atm_v
 			}
 			if (!to) {
 				printk ("No more free channels for FS50..\n");
+				kfree(vcc);
 				return -EBUSY;
 			}
 			vcc->channo = dev->channo;
@@ -937,6 +938,7 @@ static int fs_open(struct atm_vcc *atm_v
 			if (((DO_DIRECTION(rxtp) && dev->atm_vccs[vcc->channo])) ||
 			    ( DO_DIRECTION(txtp) && test_bit (vcc->channo, dev->tx_inuse))) {
 				printk ("Channel is in use for FS155.\n");
+				kfree(vcc);
 				return -EBUSY;
 			}
 		}
@@ -950,6 +952,7 @@ static int fs_open(struct atm_vcc *atm_v
 			    tc, sizeof (struct fs_transmit_config));
 		if (!tc) {
 			fs_dprintk (FS_DEBUG_OPEN, "fs: can't alloc transmit_config.\n");
+			kfree(vcc);
 			return -ENOMEM;
 		}
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/bcma/driver_pci.c linux-libre-4.9.212-gnu/drivers/bcma/driver_pci.c
--- linux-libre-4.9.211-gnu/drivers/bcma/driver_pci.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/bcma/driver_pci.c	2020-01-29 04:24:41.000000000 -0500
@@ -78,7 +78,7 @@ static u16 bcma_pcie_mdio_read(struct bc
 		v |= (address << BCMA_CORE_PCI_MDIODATA_REGADDR_SHF_OLD);
 	}
 
-	v = BCMA_CORE_PCI_MDIODATA_START;
+	v |= BCMA_CORE_PCI_MDIODATA_START;
 	v |= BCMA_CORE_PCI_MDIODATA_READ;
 	v |= BCMA_CORE_PCI_MDIODATA_TA;
 
@@ -121,7 +121,7 @@ static void bcma_pcie_mdio_write(struct
 		v |= (address << BCMA_CORE_PCI_MDIODATA_REGADDR_SHF_OLD);
 	}
 
-	v = BCMA_CORE_PCI_MDIODATA_START;
+	v |= BCMA_CORE_PCI_MDIODATA_START;
 	v |= BCMA_CORE_PCI_MDIODATA_WRITE;
 	v |= BCMA_CORE_PCI_MDIODATA_TA;
 	v |= data;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/block/drbd/drbd_main.c linux-libre-4.9.212-gnu/drivers/block/drbd/drbd_main.c
--- linux-libre-4.9.211-gnu/drivers/block/drbd/drbd_main.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/block/drbd/drbd_main.c	2020-01-29 04:24:41.000000000 -0500
@@ -332,6 +332,8 @@ static int drbd_thread_setup(void *arg)
 		 thi->name[0],
 		 resource->name);
 
+	allow_kernel_signal(DRBD_SIGKILL);
+	allow_kernel_signal(SIGXCPU);
 restart:
 	retval = thi->function(thi);
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/clk/clk-highbank.c linux-libre-4.9.212-gnu/drivers/clk/clk-highbank.c
--- linux-libre-4.9.211-gnu/drivers/clk/clk-highbank.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/clk/clk-highbank.c	2020-01-29 04:24:41.000000000 -0500
@@ -293,6 +293,7 @@ static __init struct clk *hb_clk_init(st
 	/* Map system registers */
 	srnp = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs");
 	hb_clk->reg = of_iomap(srnp, 0);
+	of_node_put(srnp);
 	BUG_ON(!hb_clk->reg);
 	hb_clk->reg += reg;
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/clk/clk-qoriq.c linux-libre-4.9.212-gnu/drivers/clk/clk-qoriq.c
--- linux-libre-4.9.211-gnu/drivers/clk/clk-qoriq.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/clk/clk-qoriq.c	2020-01-29 04:24:41.000000000 -0500
@@ -1245,6 +1245,7 @@ static void __init clockgen_init(struct
 				pr_err("%s: Couldn't map %s regs\n", __func__,
 				       guts->full_name);
 			}
+			of_node_put(guts);
 		}
 
 	}
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/clk/imx/clk-imx6q.c linux-libre-4.9.212-gnu/drivers/clk/imx/clk-imx6q.c
--- linux-libre-4.9.211-gnu/drivers/clk/imx/clk-imx6q.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/clk/imx/clk-imx6q.c	2020-01-29 04:24:41.000000000 -0500
@@ -174,6 +174,7 @@ static void __init imx6q_clocks_init(str
 	np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop");
 	base = of_iomap(np, 0);
 	WARN_ON(!base);
+	of_node_put(np);
 
 	/* Audio/video PLL post dividers do not work on i.MX6q revision 1.0 */
 	if (clk_on_imx6q() && imx_get_soc_revision() == IMX_CHIP_REVISION_1_0) {
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/clk/imx/clk-imx6sx.c linux-libre-4.9.212-gnu/drivers/clk/imx/clk-imx6sx.c
--- linux-libre-4.9.211-gnu/drivers/clk/imx/clk-imx6sx.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/clk/imx/clk-imx6sx.c	2020-01-29 04:24:41.000000000 -0500
@@ -164,6 +164,7 @@ static void __init imx6sx_clocks_init(st
 	np = of_find_compatible_node(NULL, NULL, "fsl,imx6sx-anatop");
 	base = of_iomap(np, 0);
 	WARN_ON(!base);
+	of_node_put(np);
 
 	clks[IMX6SX_PLL1_BYPASS_SRC] = imx_clk_mux("pll1_bypass_src", base + 0x00, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels));
 	clks[IMX6SX_PLL2_BYPASS_SRC] = imx_clk_mux("pll2_bypass_src", base + 0x30, 14, 1, pll_bypass_src_sels, ARRAY_SIZE(pll_bypass_src_sels));
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/clk/imx/clk-imx7d.c linux-libre-4.9.212-gnu/drivers/clk/imx/clk-imx7d.c
--- linux-libre-4.9.211-gnu/drivers/clk/imx/clk-imx7d.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/clk/imx/clk-imx7d.c	2020-01-29 04:24:41.000000000 -0500
@@ -415,6 +415,7 @@ static void __init imx7d_clocks_init(str
 	np = of_find_compatible_node(NULL, NULL, "fsl,imx7d-anatop");
 	base = of_iomap(np, 0);
 	WARN_ON(!base);
+	of_node_put(np);
 
 	clks[IMX7D_PLL_ARM_MAIN_SRC]  = imx_clk_mux("pll_arm_main_src", base + 0x60, 14, 2, pll_bypass_src_sel, ARRAY_SIZE(pll_bypass_src_sel));
 	clks[IMX7D_PLL_DRAM_MAIN_SRC] = imx_clk_mux("pll_dram_main_src", base + 0x70, 14, 2, pll_bypass_src_sel, ARRAY_SIZE(pll_bypass_src_sel));
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/clk/imx/clk-vf610.c linux-libre-4.9.212-gnu/drivers/clk/imx/clk-vf610.c
--- linux-libre-4.9.211-gnu/drivers/clk/imx/clk-vf610.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/clk/imx/clk-vf610.c	2020-01-29 04:24:41.000000000 -0500
@@ -203,6 +203,7 @@ static void __init vf610_clocks_init(str
 	np = of_find_compatible_node(NULL, NULL, "fsl,vf610-anatop");
 	anatop_base = of_iomap(np, 0);
 	BUG_ON(!anatop_base);
+	of_node_put(np);
 
 	np = ccm_node;
 	ccm_base = of_iomap(np, 0);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/clk/mvebu/armada-370.c linux-libre-4.9.212-gnu/drivers/clk/mvebu/armada-370.c
--- linux-libre-4.9.211-gnu/drivers/clk/mvebu/armada-370.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/clk/mvebu/armada-370.c	2020-01-29 04:24:41.000000000 -0500
@@ -177,8 +177,10 @@ static void __init a370_clk_init(struct
 
 	mvebu_coreclk_setup(np, &a370_coreclks);
 
-	if (cgnp)
+	if (cgnp) {
 		mvebu_clk_gating_setup(cgnp, a370_gating_desc);
+		of_node_put(cgnp);
+	}
 }
 CLK_OF_DECLARE(a370_clk, "marvell,armada-370-core-clock", a370_clk_init);
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/clk/mvebu/armada-xp.c linux-libre-4.9.212-gnu/drivers/clk/mvebu/armada-xp.c
--- linux-libre-4.9.211-gnu/drivers/clk/mvebu/armada-xp.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/clk/mvebu/armada-xp.c	2020-01-29 04:24:41.000000000 -0500
@@ -202,7 +202,9 @@ static void __init axp_clk_init(struct d
 
 	mvebu_coreclk_setup(np, &axp_coreclks);
 
-	if (cgnp)
+	if (cgnp) {
 		mvebu_clk_gating_setup(cgnp, axp_gating_desc);
+		of_node_put(cgnp);
+	}
 }
 CLK_OF_DECLARE(axp_clk, "marvell,armada-xp-core-clock", axp_clk_init);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/clk/mvebu/dove.c linux-libre-4.9.212-gnu/drivers/clk/mvebu/dove.c
--- linux-libre-4.9.211-gnu/drivers/clk/mvebu/dove.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/clk/mvebu/dove.c	2020-01-29 04:24:41.000000000 -0500
@@ -190,10 +190,14 @@ static void __init dove_clk_init(struct
 
 	mvebu_coreclk_setup(np, &dove_coreclks);
 
-	if (ddnp)
+	if (ddnp) {
 		dove_divider_clk_init(ddnp);
+		of_node_put(ddnp);
+	}
 
-	if (cgnp)
+	if (cgnp) {
 		mvebu_clk_gating_setup(cgnp, dove_gating_desc);
+		of_node_put(cgnp);
+	}
 }
 CLK_OF_DECLARE(dove_clk, "marvell,dove-core-clock", dove_clk_init);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/clk/mvebu/kirkwood.c linux-libre-4.9.212-gnu/drivers/clk/mvebu/kirkwood.c
--- linux-libre-4.9.211-gnu/drivers/clk/mvebu/kirkwood.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/clk/mvebu/kirkwood.c	2020-01-29 04:24:41.000000000 -0500
@@ -333,6 +333,8 @@ static void __init kirkwood_clk_init(str
 	if (cgnp) {
 		mvebu_clk_gating_setup(cgnp, kirkwood_gating_desc);
 		kirkwood_clk_muxing_setup(cgnp, kirkwood_mux_desc);
+
+		of_node_put(cgnp);
 	}
 }
 CLK_OF_DECLARE(kirkwood_clk, "marvell,kirkwood-core-clock",
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/clk/qcom/gcc-msm8996.c linux-libre-4.9.212-gnu/drivers/clk/qcom/gcc-msm8996.c
--- linux-libre-4.9.211-gnu/drivers/clk/qcom/gcc-msm8996.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/clk/qcom/gcc-msm8996.c	2020-01-29 04:24:41.000000000 -0500
@@ -140,22 +140,6 @@ static const char * const gcc_xo_gpll0_g
 	"gpll0_early_div"
 };
 
-static const struct parent_map gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div_map[] = {
-	{ P_XO, 0 },
-	{ P_GPLL0, 1 },
-	{ P_GPLL2, 2 },
-	{ P_GPLL3, 3 },
-	{ P_GPLL0_EARLY_DIV, 6 }
-};
-
-static const char * const gcc_xo_gpll0_gpll2_gpll3_gpll0_early_div[] = {
-	"xo",
-	"gpll0",
-	"gpll2",
-	"gpll3",
-	"gpll0_early_div"
-};
-
 static const struct parent_map gcc_xo_gpll0_gpll1_early_div_gpll1_gpll4_gpll0_early_div_map[] = {
 	{ P_XO, 0 },
 	{ P_GPLL0, 1 },
@@ -194,26 +178,6 @@ static const char * const gcc_xo_gpll0_g
 	"gpll0_early_div"
 };
 
-static const struct parent_map gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div_map[] = {
-	{ P_XO, 0 },
-	{ P_GPLL0, 1 },
-	{ P_GPLL2, 2 },
-	{ P_GPLL3, 3 },
-	{ P_GPLL1, 4 },
-	{ P_GPLL4, 5 },
-	{ P_GPLL0_EARLY_DIV, 6 }
-};
-
-static const char * const gcc_xo_gpll0_gpll2_gpll3_gpll1_gpll4_gpll0_early_div[] = {
-	"xo",
-	"gpll0",
-	"gpll2",
-	"gpll3",
-	"gpll1",
-	"gpll4",
-	"gpll0_early_div"
-};
-
 static struct clk_fixed_factor xo = {
 	.mult = 1,
 	.div = 1,
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/clk/samsung/clk-exynos4.c linux-libre-4.9.212-gnu/drivers/clk/samsung/clk-exynos4.c
--- linux-libre-4.9.211-gnu/drivers/clk/samsung/clk-exynos4.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/clk/samsung/clk-exynos4.c	2020-01-29 04:24:41.000000000 -0500
@@ -1225,6 +1225,7 @@ static unsigned long __init exynos4_get_
 			xom = readl(chipid_base + 8);
 
 		iounmap(chipid_base);
+		of_node_put(np);
 	}
 
 	return xom;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/clk/socfpga/clk-pll-a10.c linux-libre-4.9.212-gnu/drivers/clk/socfpga/clk-pll-a10.c
--- linux-libre-4.9.211-gnu/drivers/clk/socfpga/clk-pll-a10.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/clk/socfpga/clk-pll-a10.c	2020-01-29 04:24:41.000000000 -0500
@@ -95,6 +95,7 @@ static struct clk * __init __socfpga_pll
 
 	clkmgr_np = of_find_compatible_node(NULL, NULL, "altr,clk-mgr");
 	clk_mgr_a10_base_addr = of_iomap(clkmgr_np, 0);
+	of_node_put(clkmgr_np);
 	BUG_ON(!clk_mgr_a10_base_addr);
 	pll_clk->hw.reg = clk_mgr_a10_base_addr + reg;
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/clk/socfpga/clk-pll.c linux-libre-4.9.212-gnu/drivers/clk/socfpga/clk-pll.c
--- linux-libre-4.9.211-gnu/drivers/clk/socfpga/clk-pll.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/clk/socfpga/clk-pll.c	2020-01-29 04:24:41.000000000 -0500
@@ -100,6 +100,7 @@ static __init struct clk *__socfpga_pll_
 
 	clkmgr_np = of_find_compatible_node(NULL, NULL, "altr,clk-mgr");
 	clk_mgr_base_addr = of_iomap(clkmgr_np, 0);
+	of_node_put(clkmgr_np);
 	BUG_ON(!clk_mgr_base_addr);
 	pll_clk->hw.reg = clk_mgr_base_addr + reg;
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/clk/sunxi-ng/ccu-sun8i-a23.c linux-libre-4.9.212-gnu/drivers/clk/sunxi-ng/ccu-sun8i-a23.c
--- linux-libre-4.9.211-gnu/drivers/clk/sunxi-ng/ccu-sun8i-a23.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/clk/sunxi-ng/ccu-sun8i-a23.c	2020-01-29 04:24:41.000000000 -0500
@@ -132,7 +132,7 @@ static SUNXI_CCU_NKM_WITH_GATE_LOCK(pll_
 				    8, 4,		/* N */
 				    4, 2,		/* K */
 				    0, 4,		/* M */
-				    BIT(31),		/* gate */
+				    BIT(31) | BIT(23) | BIT(22), /* gate */
 				    BIT(28),		/* lock */
 				    CLK_SET_RATE_UNGATE);
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/clocksource/exynos_mct.c linux-libre-4.9.212-gnu/drivers/clocksource/exynos_mct.c
--- linux-libre-4.9.211-gnu/drivers/clocksource/exynos_mct.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/clocksource/exynos_mct.c	2020-01-29 04:24:41.000000000 -0500
@@ -563,7 +563,19 @@ static int __init exynos4_timer_resource
 	return 0;
 
 out_irq:
-	free_percpu_irq(mct_irqs[MCT_L0_IRQ], &percpu_mct_tick);
+	if (mct_int_type == MCT_INT_PPI) {
+		free_percpu_irq(mct_irqs[MCT_L0_IRQ], &percpu_mct_tick);
+	} else {
+		for_each_possible_cpu(cpu) {
+			struct mct_clock_event_device *pcpu_mevt =
+				per_cpu_ptr(&percpu_mct_tick, cpu);
+
+			if (pcpu_mevt->evt.irq != -1) {
+				free_irq(pcpu_mevt->evt.irq, pcpu_mevt);
+				pcpu_mevt->evt.irq = -1;
+			}
+		}
+	}
 	return err;
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/clocksource/timer-sun5i.c linux-libre-4.9.212-gnu/drivers/clocksource/timer-sun5i.c
--- linux-libre-4.9.211-gnu/drivers/clocksource/timer-sun5i.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/clocksource/timer-sun5i.c	2020-01-29 04:24:41.000000000 -0500
@@ -201,6 +201,11 @@ static int __init sun5i_setup_clocksourc
 	}
 
 	rate = clk_get_rate(clk);
+	if (!rate) {
+		pr_err("Couldn't get parent clock rate\n");
+		ret = -EINVAL;
+		goto err_disable_clk;
+	}
 
 	cs->timer.base = base;
 	cs->timer.clk = clk;
@@ -274,6 +279,11 @@ static int __init sun5i_setup_clockevent
 	}
 
 	rate = clk_get_rate(clk);
+	if (!rate) {
+		pr_err("Couldn't get parent clock rate\n");
+		ret = -EINVAL;
+		goto err_disable_clk;
+	}
 
 	ce->timer.base = base;
 	ce->timer.ticks_per_jiffy = DIV_ROUND_UP(rate, HZ);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/crypto/amcc/crypto4xx_trng.h linux-libre-4.9.212-gnu/drivers/crypto/amcc/crypto4xx_trng.h
--- linux-libre-4.9.211-gnu/drivers/crypto/amcc/crypto4xx_trng.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/crypto/amcc/crypto4xx_trng.h	2020-01-29 04:24:41.000000000 -0500
@@ -26,9 +26,9 @@ void ppc4xx_trng_probe(struct crypto4xx_
 void ppc4xx_trng_remove(struct crypto4xx_core_device *core_dev);
 #else
 static inline void ppc4xx_trng_probe(
-	struct crypto4xx_device *dev __maybe_unused) { }
+	struct crypto4xx_core_device *dev __maybe_unused) { }
 static inline void ppc4xx_trng_remove(
-	struct crypto4xx_device *dev __maybe_unused) { }
+	struct crypto4xx_core_device *dev __maybe_unused) { }
 #endif
 
 #endif
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/crypto/caam/caamrng.c linux-libre-4.9.212-gnu/drivers/crypto/caam/caamrng.c
--- linux-libre-4.9.211-gnu/drivers/crypto/caam/caamrng.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/crypto/caam/caamrng.c	2020-01-29 04:24:41.000000000 -0500
@@ -361,7 +361,10 @@ static int __init caam_rng_init(void)
 		goto free_rng_ctx;
 
 	dev_info(dev, "registering rng-caam\n");
-	return hwrng_register(&caam_rng);
+
+	err = hwrng_register(&caam_rng);
+	if (!err)
+		return err;
 
 free_rng_ctx:
 	kfree(rng_ctx);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/crypto/ccp/ccp-crypto-aes.c linux-libre-4.9.212-gnu/drivers/crypto/ccp/ccp-crypto-aes.c
--- linux-libre-4.9.211-gnu/drivers/crypto/ccp/ccp-crypto-aes.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/crypto/ccp/ccp-crypto-aes.c	2020-01-29 04:24:41.000000000 -0500
@@ -1,7 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * AMD Cryptographic Coprocessor (CCP) AES crypto API support
  *
- * Copyright (C) 2013,2016 Advanced Micro Devices, Inc.
+ * Copyright (C) 2013-2019 Advanced Micro Devices, Inc.
  *
  * Author: Tom Lendacky <thomas.lendacky@amd.com>
  *
@@ -79,8 +80,7 @@ static int ccp_aes_crypt(struct ablkciph
 		return -EINVAL;
 
 	if (((ctx->u.aes.mode == CCP_AES_MODE_ECB) ||
-	     (ctx->u.aes.mode == CCP_AES_MODE_CBC) ||
-	     (ctx->u.aes.mode == CCP_AES_MODE_CFB)) &&
+	     (ctx->u.aes.mode == CCP_AES_MODE_CBC)) &&
 	    (req->nbytes & (AES_BLOCK_SIZE - 1)))
 		return -EINVAL;
 
@@ -291,7 +291,7 @@ static struct ccp_aes_def aes_algs[] = {
 		.version	= CCP_VERSION(3, 0),
 		.name		= "cfb(aes)",
 		.driver_name	= "cfb-aes-ccp",
-		.blocksize	= AES_BLOCK_SIZE,
+		.blocksize	= 1,
 		.ivsize		= AES_BLOCK_SIZE,
 		.alg_defaults	= &ccp_aes_defaults,
 	},
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/dma/dma-axi-dmac.c linux-libre-4.9.212-gnu/drivers/dma/dma-axi-dmac.c
--- linux-libre-4.9.211-gnu/drivers/dma/dma-axi-dmac.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/dma/dma-axi-dmac.c	2020-01-29 04:24:41.000000000 -0500
@@ -451,7 +451,7 @@ static struct dma_async_tx_descriptor *a
 
 	if (chan->hw_2d) {
 		if (!axi_dmac_check_len(chan, xt->sgl[0].size) ||
-		    !axi_dmac_check_len(chan, xt->numf))
+		    xt->numf == 0)
 			return NULL;
 		if (xt->sgl[0].size + dst_icg > chan->max_length ||
 		    xt->sgl[0].size + src_icg > chan->max_length)
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/dma/dw/platform.c linux-libre-4.9.212-gnu/drivers/dma/dw/platform.c
--- linux-libre-4.9.211-gnu/drivers/dma/dw/platform.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/dma/dw/platform.c	2020-01-29 04:24:41.000000000 -0500
@@ -87,13 +87,20 @@ static void dw_dma_acpi_controller_regis
 	dma_cap_set(DMA_SLAVE, info->dma_cap);
 	info->filter_fn = dw_dma_acpi_filter;
 
-	ret = devm_acpi_dma_controller_register(dev, acpi_dma_simple_xlate,
-						info);
+	ret = acpi_dma_controller_register(dev, acpi_dma_simple_xlate, info);
 	if (ret)
 		dev_err(dev, "could not register acpi_dma_controller\n");
 }
+
+static void dw_dma_acpi_controller_free(struct dw_dma *dw)
+{
+	struct device *dev = dw->dma.dev;
+
+	acpi_dma_controller_free(dev);
+}
 #else /* !CONFIG_ACPI */
 static inline void dw_dma_acpi_controller_register(struct dw_dma *dw) {}
+static inline void dw_dma_acpi_controller_free(struct dw_dma *dw) {}
 #endif /* !CONFIG_ACPI */
 
 #ifdef CONFIG_OF
@@ -226,6 +233,9 @@ static int dw_remove(struct platform_dev
 {
 	struct dw_dma_chip *chip = platform_get_drvdata(pdev);
 
+	if (ACPI_HANDLE(&pdev->dev))
+		dw_dma_acpi_controller_free(chip->dw);
+
 	if (pdev->dev.of_node)
 		of_dma_controller_free(pdev->dev.of_node);
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/dma/edma.c linux-libre-4.9.212-gnu/drivers/dma/edma.c
--- linux-libre-4.9.211-gnu/drivers/dma/edma.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/dma/edma.c	2020-01-29 04:24:41.000000000 -0500
@@ -2340,8 +2340,10 @@ static int edma_probe(struct platform_de
 
 		ecc->tc_list = devm_kcalloc(dev, ecc->num_tc,
 					    sizeof(*ecc->tc_list), GFP_KERNEL);
-		if (!ecc->tc_list)
-			return -ENOMEM;
+		if (!ecc->tc_list) {
+			ret = -ENOMEM;
+			goto err_reg1;
+		}
 
 		for (i = 0;; i++) {
 			ret = of_parse_phandle_with_fixed_args(node, "ti,tptcs",
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/dma/hsu/hsu.c linux-libre-4.9.212-gnu/drivers/dma/hsu/hsu.c
--- linux-libre-4.9.211-gnu/drivers/dma/hsu/hsu.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/dma/hsu/hsu.c	2020-01-29 04:24:41.000000000 -0500
@@ -64,10 +64,10 @@ static void hsu_dma_chan_start(struct hs
 
 	if (hsuc->direction == DMA_MEM_TO_DEV) {
 		bsr = config->dst_maxburst;
-		mtsr = config->src_addr_width;
+		mtsr = config->dst_addr_width;
 	} else if (hsuc->direction == DMA_DEV_TO_MEM) {
 		bsr = config->src_maxburst;
-		mtsr = config->dst_addr_width;
+		mtsr = config->src_addr_width;
 	}
 
 	hsu_chan_disable(hsuc);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/dma/imx-sdma.c linux-libre-4.9.212-gnu/drivers/dma/imx-sdma.c
--- linux-libre-4.9.211-gnu/drivers/dma/imx-sdma.c	2020-01-23 09:17:55.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/dma/imx-sdma.c	2020-01-29 05:14:49.000000000 -0500
@@ -1441,6 +1441,14 @@ static void sdma_add_scripts(struct sdma
 	if (!sdma->script_number)
 		sdma->script_number = SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1;
 
+	if (sdma->script_number > sizeof(struct sdma_script_start_addrs)
+				  / sizeof(s32)) {
+		dev_err(sdma->dev,
+			"SDMA script number %d not match with firmware.\n",
+			sdma->script_number);
+		return;
+	}
+
 	for (i = 0; i < sdma->script_number; i++)
 		if (addr_arr[i] > 0)
 			saddr_arr[i] = addr_arr[i];
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/dma/mv_xor.c linux-libre-4.9.212-gnu/drivers/dma/mv_xor.c
--- linux-libre-4.9.211-gnu/drivers/dma/mv_xor.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/dma/mv_xor.c	2020-01-29 04:24:41.000000000 -0500
@@ -1044,6 +1044,7 @@ mv_xor_channel_add(struct mv_xor_device
 		mv_chan->op_in_desc = XOR_MODE_IN_DESC;
 
 	dma_dev = &mv_chan->dmadev;
+	dma_dev->dev = &pdev->dev;
 	mv_chan->xordev = xordev;
 
 	/*
@@ -1076,7 +1077,6 @@ mv_xor_channel_add(struct mv_xor_device
 	dma_dev->device_free_chan_resources = mv_xor_free_chan_resources;
 	dma_dev->device_tx_status = mv_xor_status;
 	dma_dev->device_issue_pending = mv_xor_issue_pending;
-	dma_dev->dev = &pdev->dev;
 
 	/* set prep routines based on capability */
 	if (dma_has_cap(DMA_INTERRUPT, dma_dev->cap_mask))
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/dma/tegra210-adma.c linux-libre-4.9.212-gnu/drivers/dma/tegra210-adma.c
--- linux-libre-4.9.211-gnu/drivers/dma/tegra210-adma.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/dma/tegra210-adma.c	2020-01-29 04:24:41.000000000 -0500
@@ -98,6 +98,7 @@ struct tegra_adma_chan_regs {
 	unsigned int src_addr;
 	unsigned int trg_addr;
 	unsigned int fifo_ctrl;
+	unsigned int cmd;
 	unsigned int tc;
 };
 
@@ -127,6 +128,7 @@ struct tegra_adma_chan {
 	enum dma_transfer_direction	sreq_dir;
 	unsigned int			sreq_index;
 	bool				sreq_reserved;
+	struct tegra_adma_chan_regs	ch_regs;
 
 	/* Transfer count and position info */
 	unsigned int			tx_buf_count;
@@ -635,8 +637,30 @@ static struct dma_chan *tegra_dma_of_xla
 static int tegra_adma_runtime_suspend(struct device *dev)
 {
 	struct tegra_adma *tdma = dev_get_drvdata(dev);
+	struct tegra_adma_chan_regs *ch_reg;
+	struct tegra_adma_chan *tdc;
+	int i;
 
 	tdma->global_cmd = tdma_read(tdma, ADMA_GLOBAL_CMD);
+	if (!tdma->global_cmd)
+		goto clk_disable;
+
+	for (i = 0; i < tdma->nr_channels; i++) {
+		tdc = &tdma->channels[i];
+		ch_reg = &tdc->ch_regs;
+		ch_reg->cmd = tdma_ch_read(tdc, ADMA_CH_CMD);
+		/* skip if channel is not active */
+		if (!ch_reg->cmd)
+			continue;
+		ch_reg->tc = tdma_ch_read(tdc, ADMA_CH_TC);
+		ch_reg->src_addr = tdma_ch_read(tdc, ADMA_CH_LOWER_SRC_ADDR);
+		ch_reg->trg_addr = tdma_ch_read(tdc, ADMA_CH_LOWER_TRG_ADDR);
+		ch_reg->ctrl = tdma_ch_read(tdc, ADMA_CH_CTRL);
+		ch_reg->fifo_ctrl = tdma_ch_read(tdc, ADMA_CH_FIFO_CTRL);
+		ch_reg->config = tdma_ch_read(tdc, ADMA_CH_CONFIG);
+	}
+
+clk_disable:
 	clk_disable_unprepare(tdma->ahub_clk);
 
 	return 0;
@@ -645,7 +669,9 @@ static int tegra_adma_runtime_suspend(st
 static int tegra_adma_runtime_resume(struct device *dev)
 {
 	struct tegra_adma *tdma = dev_get_drvdata(dev);
-	int ret;
+	struct tegra_adma_chan_regs *ch_reg;
+	struct tegra_adma_chan *tdc;
+	int ret, i;
 
 	ret = clk_prepare_enable(tdma->ahub_clk);
 	if (ret) {
@@ -654,6 +680,24 @@ static int tegra_adma_runtime_resume(str
 	}
 	tdma_write(tdma, ADMA_GLOBAL_CMD, tdma->global_cmd);
 
+	if (!tdma->global_cmd)
+		return 0;
+
+	for (i = 0; i < tdma->nr_channels; i++) {
+		tdc = &tdma->channels[i];
+		ch_reg = &tdc->ch_regs;
+		/* skip if channel was not active earlier */
+		if (!ch_reg->cmd)
+			continue;
+		tdma_ch_write(tdc, ADMA_CH_TC, ch_reg->tc);
+		tdma_ch_write(tdc, ADMA_CH_LOWER_SRC_ADDR, ch_reg->src_addr);
+		tdma_ch_write(tdc, ADMA_CH_LOWER_TRG_ADDR, ch_reg->trg_addr);
+		tdma_ch_write(tdc, ADMA_CH_CTRL, ch_reg->ctrl);
+		tdma_ch_write(tdc, ADMA_CH_FIFO_CTRL, ch_reg->fifo_ctrl);
+		tdma_ch_write(tdc, ADMA_CH_CONFIG, ch_reg->config);
+		tdma_ch_write(tdc, ADMA_CH_CMD, ch_reg->cmd);
+	}
+
 	return 0;
 }
 
@@ -700,16 +744,6 @@ static int tegra_adma_probe(struct platf
 		return PTR_ERR(tdma->ahub_clk);
 	}
 
-	pm_runtime_enable(&pdev->dev);
-
-	ret = pm_runtime_get_sync(&pdev->dev);
-	if (ret < 0)
-		goto rpm_disable;
-
-	ret = tegra_adma_init(tdma);
-	if (ret)
-		goto rpm_put;
-
 	INIT_LIST_HEAD(&tdma->dma_dev.channels);
 	for (i = 0; i < tdma->nr_channels; i++) {
 		struct tegra_adma_chan *tdc = &tdma->channels[i];
@@ -727,6 +761,16 @@ static int tegra_adma_probe(struct platf
 		tdc->tdma = tdma;
 	}
 
+	pm_runtime_enable(&pdev->dev);
+
+	ret = pm_runtime_get_sync(&pdev->dev);
+	if (ret < 0)
+		goto rpm_disable;
+
+	ret = tegra_adma_init(tdma);
+	if (ret)
+		goto rpm_put;
+
 	dma_cap_set(DMA_SLAVE, tdma->dma_dev.cap_mask);
 	dma_cap_set(DMA_PRIVATE, tdma->dma_dev.cap_mask);
 	dma_cap_set(DMA_CYCLIC, tdma->dma_dev.cap_mask);
@@ -768,13 +812,13 @@ static int tegra_adma_probe(struct platf
 
 dma_remove:
 	dma_async_device_unregister(&tdma->dma_dev);
-irq_dispose:
-	while (--i >= 0)
-		irq_dispose_mapping(tdma->channels[i].irq);
 rpm_put:
 	pm_runtime_put_sync(&pdev->dev);
 rpm_disable:
 	pm_runtime_disable(&pdev->dev);
+irq_dispose:
+	while (--i >= 0)
+		irq_dispose_mapping(tdma->channels[i].irq);
 
 	return ret;
 }
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/gpu/drm/drm_dp_mst_topology.c linux-libre-4.9.212-gnu/drivers/gpu/drm/drm_dp_mst_topology.c
--- linux-libre-4.9.211-gnu/drivers/gpu/drm/drm_dp_mst_topology.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/gpu/drm/drm_dp_mst_topology.c	2020-01-29 04:24:41.000000000 -0500
@@ -980,9 +980,20 @@ static struct drm_dp_mst_port *drm_dp_ms
 static struct drm_dp_mst_port *drm_dp_get_validated_port_ref(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port)
 {
 	struct drm_dp_mst_port *rport = NULL;
+
 	mutex_lock(&mgr->lock);
-	if (mgr->mst_primary)
-		rport = drm_dp_mst_get_port_ref_locked(mgr->mst_primary, port);
+	/*
+	 * Port may or may not be 'valid' but we don't care about that when
+	 * destroying the port and we are guaranteed that the port pointer
+	 * will be valid until we've finished
+	 */
+	if (current_work() == &mgr->destroy_connector_work) {
+		kref_get(&port->kref);
+		rport = port;
+	} else if (mgr->mst_primary) {
+		rport = drm_dp_mst_get_port_ref_locked(mgr->mst_primary,
+						       port);
+	}
 	mutex_unlock(&mgr->lock);
 	return rport;
 }
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/gpu/drm/etnaviv/etnaviv_dump.c linux-libre-4.9.212-gnu/drivers/gpu/drm/etnaviv/etnaviv_dump.c
--- linux-libre-4.9.211-gnu/drivers/gpu/drm/etnaviv/etnaviv_dump.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/gpu/drm/etnaviv/etnaviv_dump.c	2020-01-29 04:24:41.000000000 -0500
@@ -206,7 +206,7 @@ void etnaviv_core_dump(struct etnaviv_gp
 		mutex_lock(&obj->lock);
 		pages = etnaviv_gem_get_pages(obj);
 		mutex_unlock(&obj->lock);
-		if (pages) {
+		if (!IS_ERR(pages)) {
 			int j;
 
 			iter.hdr->data[0] = bomap - bomap_start;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/gpu/drm/msm/adreno/a3xx_gpu.c linux-libre-4.9.212-gnu/drivers/gpu/drm/msm/adreno/a3xx_gpu.c
--- linux-libre-4.9.211-gnu/drivers/gpu/drm/msm/adreno/a3xx_gpu.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/gpu/drm/msm/adreno/a3xx_gpu.c	2020-01-29 04:24:41.000000000 -0500
@@ -383,19 +383,17 @@ static const unsigned int a3xx_registers
 	0x2200, 0x2212, 0x2214, 0x2217, 0x221a, 0x221a, 0x2240, 0x227e,
 	0x2280, 0x228b, 0x22c0, 0x22c0, 0x22c4, 0x22ce, 0x22d0, 0x22d8,
 	0x22df, 0x22e6, 0x22e8, 0x22e9, 0x22ec, 0x22ec, 0x22f0, 0x22f7,
-	0x22ff, 0x22ff, 0x2340, 0x2343, 0x2348, 0x2349, 0x2350, 0x2356,
-	0x2360, 0x2360, 0x2440, 0x2440, 0x2444, 0x2444, 0x2448, 0x244d,
-	0x2468, 0x2469, 0x246c, 0x246d, 0x2470, 0x2470, 0x2472, 0x2472,
-	0x2474, 0x2475, 0x2479, 0x247a, 0x24c0, 0x24d3, 0x24e4, 0x24ef,
-	0x2500, 0x2509, 0x250c, 0x250c, 0x250e, 0x250e, 0x2510, 0x2511,
-	0x2514, 0x2515, 0x25e4, 0x25e4, 0x25ea, 0x25ea, 0x25ec, 0x25ed,
-	0x25f0, 0x25f0, 0x2600, 0x2612, 0x2614, 0x2617, 0x261a, 0x261a,
-	0x2640, 0x267e, 0x2680, 0x268b, 0x26c0, 0x26c0, 0x26c4, 0x26ce,
-	0x26d0, 0x26d8, 0x26df, 0x26e6, 0x26e8, 0x26e9, 0x26ec, 0x26ec,
-	0x26f0, 0x26f7, 0x26ff, 0x26ff, 0x2740, 0x2743, 0x2748, 0x2749,
-	0x2750, 0x2756, 0x2760, 0x2760, 0x300c, 0x300e, 0x301c, 0x301d,
-	0x302a, 0x302a, 0x302c, 0x302d, 0x3030, 0x3031, 0x3034, 0x3036,
-	0x303c, 0x303c, 0x305e, 0x305f,
+	0x22ff, 0x22ff, 0x2340, 0x2343, 0x2440, 0x2440, 0x2444, 0x2444,
+	0x2448, 0x244d, 0x2468, 0x2469, 0x246c, 0x246d, 0x2470, 0x2470,
+	0x2472, 0x2472, 0x2474, 0x2475, 0x2479, 0x247a, 0x24c0, 0x24d3,
+	0x24e4, 0x24ef, 0x2500, 0x2509, 0x250c, 0x250c, 0x250e, 0x250e,
+	0x2510, 0x2511, 0x2514, 0x2515, 0x25e4, 0x25e4, 0x25ea, 0x25ea,
+	0x25ec, 0x25ed, 0x25f0, 0x25f0, 0x2600, 0x2612, 0x2614, 0x2617,
+	0x261a, 0x261a, 0x2640, 0x267e, 0x2680, 0x268b, 0x26c0, 0x26c0,
+	0x26c4, 0x26ce, 0x26d0, 0x26d8, 0x26df, 0x26e6, 0x26e8, 0x26e9,
+	0x26ec, 0x26ec, 0x26f0, 0x26f7, 0x26ff, 0x26ff, 0x2740, 0x2743,
+	0x300c, 0x300e, 0x301c, 0x301d, 0x302a, 0x302a, 0x302c, 0x302d,
+	0x3030, 0x3031, 0x3034, 0x3036, 0x303c, 0x303c, 0x305e, 0x305f,
 	~0   /* sentinel */
 };
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/gpu/drm/msm/dsi/dsi_host.c linux-libre-4.9.212-gnu/drivers/gpu/drm/msm/dsi/dsi_host.c
--- linux-libre-4.9.211-gnu/drivers/gpu/drm/msm/dsi/dsi_host.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/gpu/drm/msm/dsi/dsi_host.c	2020-01-29 04:24:41.000000000 -0500
@@ -33,6 +33,8 @@
 #include "sfpb.xml.h"
 #include "dsi_cfg.h"
 
+#define DSI_RESET_TOGGLE_DELAY_MS 20
+
 static int dsi_get_version(const void __iomem *base, u32 *major, u32 *minor)
 {
 	u32 ver;
@@ -909,7 +911,7 @@ static void dsi_sw_reset(struct msm_dsi_
 	wmb(); /* clocks need to be enabled before reset */
 
 	dsi_write(msm_host, REG_DSI_RESET, 1);
-	wmb(); /* make sure reset happen */
+	msleep(DSI_RESET_TOGGLE_DELAY_MS); /* make sure reset happen */
 	dsi_write(msm_host, REG_DSI_RESET, 0);
 }
 
@@ -1288,7 +1290,7 @@ static void dsi_sw_reset_restore(struct
 
 	/* dsi controller can only be reset while clocks are running */
 	dsi_write(msm_host, REG_DSI_RESET, 1);
-	wmb();	/* make sure reset happen */
+	msleep(DSI_RESET_TOGGLE_DELAY_MS); /* make sure reset happen */
 	dsi_write(msm_host, REG_DSI_RESET, 0);
 	wmb();	/* controller out of reset */
 	dsi_write(msm_host, REG_DSI_CTRL, data0);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c linux-libre-4.9.212-gnu/drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c
--- linux-libre-4.9.211-gnu/drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c	2020-01-29 04:24:41.000000000 -0500
@@ -542,7 +542,7 @@ fail:
 	if (cfg_handler)
 		mdp5_cfg_destroy(cfg_handler);
 
-	return NULL;
+	return ERR_PTR(ret);
 }
 
 static struct mdp5_cfg_platform *mdp5_get_config(struct platform_device *dev)
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gddr3.c linux-libre-4.9.212-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gddr3.c
--- linux-libre-4.9.211-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gddr3.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gddr3.c	2020-01-29 04:24:41.000000000 -0500
@@ -87,7 +87,7 @@ nvkm_gddr3_calc(struct nvkm_ram *ram)
 		WR  = (ram->next->bios.timing[2] & 0x007f0000) >> 16;
 		/* XXX: Get these values from the VBIOS instead */
 		DLL = !(ram->mr[1] & 0x1);
-		RON = !(ram->mr[1] & 0x300) >> 8;
+		RON = !((ram->mr[1] & 0x300) >> 8);
 		break;
 	default:
 		return -ENOSYS;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/memx.c linux-libre-4.9.212-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/memx.c
--- linux-libre-4.9.211-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/memx.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/memx.c	2020-01-29 04:24:41.000000000 -0500
@@ -87,10 +87,10 @@ nvkm_memx_fini(struct nvkm_memx **pmemx,
 	if (exec) {
 		nvkm_pmu_send(pmu, reply, PROC_MEMX, MEMX_MSG_EXEC,
 			      memx->base, finish);
+		nvkm_debug(subdev, "Exec took %uns, PMU_IN %08x\n",
+			   reply[0], reply[1]);
 	}
 
-	nvkm_debug(subdev, "Exec took %uns, PMU_IN %08x\n",
-		   reply[0], reply[1]);
 	kfree(memx);
 	return 0;
 }
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/gpu/drm/radeon/cik.c linux-libre-4.9.212-gnu/drivers/gpu/drm/radeon/cik.c
--- linux-libre-4.9.211-gnu/drivers/gpu/drm/radeon/cik.c	2020-01-23 09:17:37.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/gpu/drm/radeon/cik.c	2020-01-29 05:14:40.000000000 -0500
@@ -6945,8 +6945,8 @@ static int cik_irq_init(struct radeon_de
 	}
 
 	/* setup interrupt control */
-	/* XXX this should actually be a bus address, not an MC address. same on older asics */
-	WREG32(INTERRUPT_CNTL2, rdev->ih.gpu_addr >> 8);
+	/* set dummy read address to dummy page address */
+	WREG32(INTERRUPT_CNTL2, rdev->dummy_page.addr >> 8);
 	interrupt_cntl = RREG32(INTERRUPT_CNTL);
 	/* IH_DUMMY_RD_OVERRIDE=0 - dummy read disabled with msi, enabled without msi
 	 * IH_DUMMY_RD_OVERRIDE=1 - dummy read controlled by IH_DUMMY_RD_EN
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/gpu/drm/radeon/r600.c linux-libre-4.9.212-gnu/drivers/gpu/drm/radeon/r600.c
--- linux-libre-4.9.211-gnu/drivers/gpu/drm/radeon/r600.c	2020-01-23 09:17:10.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/gpu/drm/radeon/r600.c	2020-01-29 05:14:24.000000000 -0500
@@ -3649,8 +3649,8 @@ int r600_irq_init(struct radeon_device *
 	}
 
 	/* setup interrupt control */
-	/* set dummy read address to ring address */
-	WREG32(INTERRUPT_CNTL2, rdev->ih.gpu_addr >> 8);
+	/* set dummy read address to dummy page address */
+	WREG32(INTERRUPT_CNTL2, rdev->dummy_page.addr >> 8);
 	interrupt_cntl = RREG32(INTERRUPT_CNTL);
 	/* IH_DUMMY_RD_OVERRIDE=0 - dummy read disabled with msi, enabled without msi
 	 * IH_DUMMY_RD_OVERRIDE=1 - dummy read controlled by IH_DUMMY_RD_EN
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/gpu/drm/radeon/si.c linux-libre-4.9.212-gnu/drivers/gpu/drm/radeon/si.c
--- linux-libre-4.9.211-gnu/drivers/gpu/drm/radeon/si.c	2020-01-23 09:17:25.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/gpu/drm/radeon/si.c	2020-01-29 05:14:33.000000000 -0500
@@ -5939,8 +5939,8 @@ static int si_irq_init(struct radeon_dev
 	}
 
 	/* setup interrupt control */
-	/* set dummy read address to ring address */
-	WREG32(INTERRUPT_CNTL2, rdev->ih.gpu_addr >> 8);
+	/* set dummy read address to dummy page address */
+	WREG32(INTERRUPT_CNTL2, rdev->dummy_page.addr >> 8);
 	interrupt_cntl = RREG32(INTERRUPT_CNTL);
 	/* IH_DUMMY_RD_OVERRIDE=0 - dummy read disabled with msi, enabled without msi
 	 * IH_DUMMY_RD_OVERRIDE=1 - dummy read controlled by IH_DUMMY_RD_EN
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/gpu/drm/sti/sti_hda.c linux-libre-4.9.212-gnu/drivers/gpu/drm/sti/sti_hda.c
--- linux-libre-4.9.211-gnu/drivers/gpu/drm/sti/sti_hda.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/gpu/drm/sti/sti_hda.c	2020-01-29 04:24:41.000000000 -0500
@@ -740,7 +740,6 @@ static int sti_hda_bind(struct device *d
 	return 0;
 
 err_sysfs:
-	drm_bridge_remove(bridge);
 	return -EINVAL;
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/gpu/drm/sti/sti_hdmi.c linux-libre-4.9.212-gnu/drivers/gpu/drm/sti/sti_hdmi.c
--- linux-libre-4.9.211-gnu/drivers/gpu/drm/sti/sti_hdmi.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/gpu/drm/sti/sti_hdmi.c	2020-01-29 04:24:41.000000000 -0500
@@ -1352,7 +1352,6 @@ static int sti_hdmi_bind(struct device *
 	return 0;
 
 err_sysfs:
-	drm_bridge_remove(bridge);
 	hdmi->drm_connector = NULL;
 	return -EINVAL;
 }
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/gpu/drm/virtio/virtgpu_vq.c linux-libre-4.9.212-gnu/drivers/gpu/drm/virtio/virtgpu_vq.c
--- linux-libre-4.9.211-gnu/drivers/gpu/drm/virtio/virtgpu_vq.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/gpu/drm/virtio/virtgpu_vq.c	2020-01-29 04:24:41.000000000 -0500
@@ -681,11 +681,11 @@ int virtio_gpu_cmd_get_capset(struct vir
 {
 	struct virtio_gpu_get_capset *cmd_p;
 	struct virtio_gpu_vbuffer *vbuf;
-	int max_size = vgdev->capsets[idx].max_size;
+	int max_size;
 	struct virtio_gpu_drv_cap_cache *cache_ent;
 	void *resp_buf;
 
-	if (idx > vgdev->num_capsets)
+	if (idx >= vgdev->num_capsets)
 		return -EINVAL;
 
 	if (version > vgdev->capsets[idx].max_version)
@@ -695,6 +695,7 @@ int virtio_gpu_cmd_get_capset(struct vir
 	if (!cache_ent)
 		return -ENOMEM;
 
+	max_size = vgdev->capsets[idx].max_size;
 	cache_ent->caps_cache = kmalloc(max_size, GFP_KERNEL);
 	if (!cache_ent->caps_cache) {
 		kfree(cache_ent);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/hwmon/adt7475.c linux-libre-4.9.212-gnu/drivers/hwmon/adt7475.c
--- linux-libre-4.9.211-gnu/drivers/hwmon/adt7475.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/hwmon/adt7475.c	2020-01-29 04:24:41.000000000 -0500
@@ -268,9 +268,10 @@ static inline u16 volt2reg(int channel,
 	long reg;
 
 	if (bypass_attn & (1 << channel))
-		reg = (volt * 1024) / 2250;
+		reg = DIV_ROUND_CLOSEST(volt * 1024, 2250);
 	else
-		reg = (volt * r[1] * 1024) / ((r[0] + r[1]) * 2250);
+		reg = DIV_ROUND_CLOSEST(volt * r[1] * 1024,
+					(r[0] + r[1]) * 2250);
 	return clamp_val(reg, 0, 1023) & (0xff << 2);
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/hwmon/hwmon.c linux-libre-4.9.212-gnu/drivers/hwmon/hwmon.c
--- linux-libre-4.9.211-gnu/drivers/hwmon/hwmon.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/hwmon/hwmon.c	2020-01-29 04:24:41.000000000 -0500
@@ -38,16 +38,20 @@ struct hwmon_device {
 
 #define to_hwmon_device(d) container_of(d, struct hwmon_device, dev)
 
+#define MAX_SYSFS_ATTR_NAME_LENGTH	32
+
 struct hwmon_device_attribute {
 	struct device_attribute dev_attr;
 	const struct hwmon_ops *ops;
 	enum hwmon_sensor_types type;
 	u32 attr;
 	int index;
+	char name[MAX_SYSFS_ATTR_NAME_LENGTH];
 };
 
 #define to_hwmon_attr(d) \
 	container_of(d, struct hwmon_device_attribute, dev_attr)
+#define to_dev_attr(a) container_of(a, struct device_attribute, attr)
 
 /*
  * Thermal zone information
@@ -55,7 +59,7 @@ struct hwmon_device_attribute {
  * also provides the sensor index.
  */
 struct hwmon_thermal_data {
-	struct hwmon_device *hwdev;	/* Reference to hwmon device */
+	struct device *dev;		/* Reference to hwmon device */
 	int index;			/* sensor index */
 };
 
@@ -92,9 +96,27 @@ static const struct attribute_group *hwm
 	NULL
 };
 
+static void hwmon_free_attrs(struct attribute **attrs)
+{
+	int i;
+
+	for (i = 0; attrs[i]; i++) {
+		struct device_attribute *dattr = to_dev_attr(attrs[i]);
+		struct hwmon_device_attribute *hattr = to_hwmon_attr(dattr);
+
+		kfree(hattr);
+	}
+	kfree(attrs);
+}
+
 static void hwmon_dev_release(struct device *dev)
 {
-	kfree(to_hwmon_device(dev));
+	struct hwmon_device *hwdev = to_hwmon_device(dev);
+
+	if (hwdev->group.attrs)
+		hwmon_free_attrs(hwdev->group.attrs);
+	kfree(hwdev->groups);
+	kfree(hwdev);
 }
 
 static struct class hwmon_class = {
@@ -118,11 +140,11 @@ static DEFINE_IDA(hwmon_ida);
 static int hwmon_thermal_get_temp(void *data, int *temp)
 {
 	struct hwmon_thermal_data *tdata = data;
-	struct hwmon_device *hwdev = tdata->hwdev;
+	struct hwmon_device *hwdev = to_hwmon_device(tdata->dev);
 	int ret;
 	long t;
 
-	ret = hwdev->chip->ops->read(&hwdev->dev, hwmon_temp, hwmon_temp_input,
+	ret = hwdev->chip->ops->read(tdata->dev, hwmon_temp, hwmon_temp_input,
 				     tdata->index, &t);
 	if (ret < 0)
 		return ret;
@@ -136,26 +158,31 @@ static struct thermal_zone_of_device_ops
 	.get_temp = hwmon_thermal_get_temp,
 };
 
-static int hwmon_thermal_add_sensor(struct device *dev,
-				    struct hwmon_device *hwdev, int index)
+static int hwmon_thermal_add_sensor(struct device *dev, int index)
 {
 	struct hwmon_thermal_data *tdata;
+	struct thermal_zone_device *tzd;
 
 	tdata = devm_kzalloc(dev, sizeof(*tdata), GFP_KERNEL);
 	if (!tdata)
 		return -ENOMEM;
 
-	tdata->hwdev = hwdev;
+	tdata->dev = dev;
 	tdata->index = index;
 
-	devm_thermal_zone_of_sensor_register(&hwdev->dev, index, tdata,
-					     &hwmon_thermal_ops);
+	tzd = devm_thermal_zone_of_sensor_register(dev, index, tdata,
+						   &hwmon_thermal_ops);
+	/*
+	 * If CONFIG_THERMAL_OF is disabled, this returns -ENODEV,
+	 * so ignore that error but forward any other error.
+	 */
+	if (IS_ERR(tzd) && (PTR_ERR(tzd) != -ENODEV))
+		return PTR_ERR(tzd);
 
 	return 0;
 }
 #else
-static int hwmon_thermal_add_sensor(struct device *dev,
-				    struct hwmon_device *hwdev, int index)
+static int hwmon_thermal_add_sensor(struct device *dev, int index)
 {
 	return 0;
 }
@@ -205,8 +232,7 @@ static int hwmon_attr_base(enum hwmon_se
 	return 1;
 }
 
-static struct attribute *hwmon_genattr(struct device *dev,
-				       const void *drvdata,
+static struct attribute *hwmon_genattr(const void *drvdata,
 				       enum hwmon_sensor_types type,
 				       u32 attr,
 				       int index,
@@ -232,20 +258,18 @@ static struct attribute *hwmon_genattr(s
 	if ((mode & S_IWUGO) && !ops->write)
 		return ERR_PTR(-EINVAL);
 
+	hattr = kzalloc(sizeof(*hattr), GFP_KERNEL);
+	if (!hattr)
+		return ERR_PTR(-ENOMEM);
+
 	if (type == hwmon_chip) {
 		name = (char *)template;
 	} else {
-		name = devm_kzalloc(dev, strlen(template) + 16, GFP_KERNEL);
-		if (!name)
-			return ERR_PTR(-ENOMEM);
-		scnprintf(name, strlen(template) + 16, template,
+		scnprintf(hattr->name, sizeof(hattr->name), template,
 			  index + hwmon_attr_base(type));
+		name = hattr->name;
 	}
 
-	hattr = devm_kzalloc(dev, sizeof(*hattr), GFP_KERNEL);
-	if (!hattr)
-		return ERR_PTR(-ENOMEM);
-
 	hattr->type = type;
 	hattr->attr = attr;
 	hattr->index = index;
@@ -433,8 +457,7 @@ static int hwmon_num_channel_attrs(const
 	return n;
 }
 
-static int hwmon_genattrs(struct device *dev,
-			  const void *drvdata,
+static int hwmon_genattrs(const void *drvdata,
 			  struct attribute **attrs,
 			  const struct hwmon_ops *ops,
 			  const struct hwmon_channel_info *info)
@@ -460,7 +483,7 @@ static int hwmon_genattrs(struct device
 			attr_mask &= ~BIT(attr);
 			if (attr >= template_size)
 				return -EINVAL;
-			a = hwmon_genattr(dev, drvdata, info->type, attr, i,
+			a = hwmon_genattr(drvdata, info->type, attr, i,
 					  templates[attr], ops);
 			if (IS_ERR(a)) {
 				if (PTR_ERR(a) != -ENOENT)
@@ -474,8 +497,7 @@ static int hwmon_genattrs(struct device
 }
 
 static struct attribute **
-__hwmon_create_attrs(struct device *dev, const void *drvdata,
-		     const struct hwmon_chip_info *chip)
+__hwmon_create_attrs(const void *drvdata, const struct hwmon_chip_info *chip)
 {
 	int ret, i, aindex = 0, nattrs = 0;
 	struct attribute **attrs;
@@ -486,15 +508,17 @@ __hwmon_create_attrs(struct device *dev,
 	if (nattrs == 0)
 		return ERR_PTR(-EINVAL);
 
-	attrs = devm_kcalloc(dev, nattrs + 1, sizeof(*attrs), GFP_KERNEL);
+	attrs = kcalloc(nattrs + 1, sizeof(*attrs), GFP_KERNEL);
 	if (!attrs)
 		return ERR_PTR(-ENOMEM);
 
 	for (i = 0; chip->info[i]; i++) {
-		ret = hwmon_genattrs(dev, drvdata, &attrs[aindex], chip->ops,
+		ret = hwmon_genattrs(drvdata, &attrs[aindex], chip->ops,
 				     chip->info[i]);
-		if (ret < 0)
+		if (ret < 0) {
+			hwmon_free_attrs(attrs);
 			return ERR_PTR(ret);
+		}
 		aindex += ret;
 	}
 
@@ -534,14 +558,13 @@ __hwmon_device_register(struct device *d
 			for (i = 0; groups[i]; i++)
 				ngroups++;
 
-		hwdev->groups = devm_kcalloc(dev, ngroups, sizeof(*groups),
-					     GFP_KERNEL);
+		hwdev->groups = kcalloc(ngroups, sizeof(*groups), GFP_KERNEL);
 		if (!hwdev->groups) {
 			err = -ENOMEM;
 			goto free_hwmon;
 		}
 
-		attrs = __hwmon_create_attrs(dev, drvdata, chip);
+		attrs = __hwmon_create_attrs(drvdata, chip);
 		if (IS_ERR(attrs)) {
 			err = PTR_ERR(attrs);
 			goto free_hwmon;
@@ -585,8 +608,13 @@ __hwmon_device_register(struct device *d
 				if (!chip->ops->is_visible(drvdata, hwmon_temp,
 							   hwmon_temp_input, j))
 					continue;
-				if (info[i]->config[j] & HWMON_T_INPUT)
-					hwmon_thermal_add_sensor(dev, hwdev, j);
+				if (info[i]->config[j] & HWMON_T_INPUT) {
+					err = hwmon_thermal_add_sensor(hdev, j);
+					if (err) {
+						device_unregister(hdev);
+						goto ida_remove;
+					}
+				}
 			}
 		}
 	}
@@ -594,7 +622,7 @@ __hwmon_device_register(struct device *d
 	return hdev;
 
 free_hwmon:
-	kfree(hwdev);
+	hwmon_dev_release(hdev);
 ida_remove:
 	ida_simple_remove(&hwmon_ida, id);
 	return ERR_PTR(err);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/hwmon/lm75.c linux-libre-4.9.212-gnu/drivers/hwmon/lm75.c
--- linux-libre-4.9.211-gnu/drivers/hwmon/lm75.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/hwmon/lm75.c	2020-01-29 04:24:41.000000000 -0500
@@ -164,7 +164,7 @@ static int lm75_write(struct device *dev
 	temp = DIV_ROUND_CLOSEST(temp  << (resolution - 8),
 				 1000) << (16 - resolution);
 
-	return regmap_write(data->regmap, reg, temp);
+	return regmap_write(data->regmap, reg, (u16)temp);
 }
 
 static umode_t lm75_is_visible(const void *data, enum hwmon_sensor_types type,
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/hwmon/nct7802.c linux-libre-4.9.212-gnu/drivers/hwmon/nct7802.c
--- linux-libre-4.9.211-gnu/drivers/hwmon/nct7802.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/hwmon/nct7802.c	2020-01-29 04:24:41.000000000 -0500
@@ -32,8 +32,8 @@
 static const u8 REG_VOLTAGE[5] = { 0x09, 0x0a, 0x0c, 0x0d, 0x0e };
 
 static const u8 REG_VOLTAGE_LIMIT_LSB[2][5] = {
-	{ 0x40, 0x00, 0x42, 0x44, 0x46 },
-	{ 0x3f, 0x00, 0x41, 0x43, 0x45 },
+	{ 0x46, 0x00, 0x40, 0x42, 0x44 },
+	{ 0x45, 0x00, 0x3f, 0x41, 0x43 },
 };
 
 static const u8 REG_VOLTAGE_LIMIT_MSB[5] = { 0x48, 0x00, 0x47, 0x47, 0x48 };
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/hwmon/shtc1.c linux-libre-4.9.212-gnu/drivers/hwmon/shtc1.c
--- linux-libre-4.9.211-gnu/drivers/hwmon/shtc1.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/hwmon/shtc1.c	2020-01-29 04:24:41.000000000 -0500
@@ -38,7 +38,7 @@ static const unsigned char shtc1_cmd_rea
 
 /* constants for reading the ID register */
 #define SHTC1_ID	  0x07
-#define SHTC1_ID_REG_MASK 0x1f
+#define SHTC1_ID_REG_MASK 0x3f
 
 /* delays for non-blocking i2c commands, both in us */
 #define SHTC1_NONBLOCKING_WAIT_TIME_HPM  14400
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/hwmon/w83627hf.c linux-libre-4.9.212-gnu/drivers/hwmon/w83627hf.c
--- linux-libre-4.9.211-gnu/drivers/hwmon/w83627hf.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/hwmon/w83627hf.c	2020-01-29 04:24:41.000000000 -0500
@@ -130,17 +130,23 @@ superio_select(struct w83627hf_sio_data
 	outb(ld,  sio->sioaddr + 1);
 }
 
-static inline void
+static inline int
 superio_enter(struct w83627hf_sio_data *sio)
 {
+	if (!request_muxed_region(sio->sioaddr, 2, DRVNAME))
+		return -EBUSY;
+
 	outb(0x87, sio->sioaddr);
 	outb(0x87, sio->sioaddr);
+
+	return 0;
 }
 
 static inline void
 superio_exit(struct w83627hf_sio_data *sio)
 {
 	outb(0xAA, sio->sioaddr);
+	release_region(sio->sioaddr, 2);
 }
 
 #define W627_DEVID 0x52
@@ -1275,7 +1281,7 @@ static DEVICE_ATTR(name, S_IRUGO, show_n
 static int __init w83627hf_find(int sioaddr, unsigned short *addr,
 				struct w83627hf_sio_data *sio_data)
 {
-	int err = -ENODEV;
+	int err;
 	u16 val;
 
 	static __initconst char *const names[] = {
@@ -1287,7 +1293,11 @@ static int __init w83627hf_find(int sioa
 	};
 
 	sio_data->sioaddr = sioaddr;
-	superio_enter(sio_data);
+	err = superio_enter(sio_data);
+	if (err)
+		return err;
+
+	err = -ENODEV;
 	val = force_id ? force_id : superio_inb(sio_data, DEVID);
 	switch (val) {
 	case W627_DEVID:
@@ -1641,9 +1651,21 @@ static int w83627thf_read_gpio5(struct p
 	struct w83627hf_sio_data *sio_data = dev_get_platdata(&pdev->dev);
 	int res = 0xff, sel;
 
-	superio_enter(sio_data);
+	if (superio_enter(sio_data)) {
+		/*
+		 * Some other driver reserved the address space for itself.
+		 * We don't want to fail driver instantiation because of that,
+		 * so display a warning and keep going.
+		 */
+		dev_warn(&pdev->dev,
+			 "Can not read VID data: Failed to enable SuperIO access\n");
+		return res;
+	}
+
 	superio_select(sio_data, W83627HF_LD_GPIO5);
 
+	res = 0xff;
+
 	/* Make sure these GPIO pins are enabled */
 	if (!(superio_inb(sio_data, W83627THF_GPIO5_EN) & (1<<3))) {
 		dev_dbg(&pdev->dev, "GPIO5 disabled, no VID function\n");
@@ -1674,7 +1696,17 @@ static int w83687thf_read_vid(struct pla
 	struct w83627hf_sio_data *sio_data = dev_get_platdata(&pdev->dev);
 	int res = 0xff;
 
-	superio_enter(sio_data);
+	if (superio_enter(sio_data)) {
+		/*
+		 * Some other driver reserved the address space for itself.
+		 * We don't want to fail driver instantiation because of that,
+		 * so display a warning and keep going.
+		 */
+		dev_warn(&pdev->dev,
+			 "Can not read VID data: Failed to enable SuperIO access\n");
+		return res;
+	}
+
 	superio_select(sio_data, W83627HF_LD_HWM);
 
 	/* Make sure these GPIO pins are enabled */
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/hwtracing/coresight/coresight-etb10.c linux-libre-4.9.212-gnu/drivers/hwtracing/coresight/coresight-etb10.c
--- linux-libre-4.9.211-gnu/drivers/hwtracing/coresight/coresight-etb10.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/hwtracing/coresight/coresight-etb10.c	2020-01-29 04:24:41.000000000 -0500
@@ -279,9 +279,7 @@ static void *etb_alloc_buffer(struct cor
 	int node;
 	struct cs_buffers *buf;
 
-	if (cpu == -1)
-		cpu = smp_processor_id();
-	node = cpu_to_node(cpu);
+	node = (cpu == -1) ? NUMA_NO_NODE : cpu_to_node(cpu);
 
 	buf = kzalloc_node(sizeof(struct cs_buffers), GFP_KERNEL, node);
 	if (!buf)
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/hwtracing/coresight/coresight-tmc-etf.c linux-libre-4.9.212-gnu/drivers/hwtracing/coresight/coresight-tmc-etf.c
--- linux-libre-4.9.211-gnu/drivers/hwtracing/coresight/coresight-tmc-etf.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/hwtracing/coresight/coresight-tmc-etf.c	2020-01-29 04:24:41.000000000 -0500
@@ -292,9 +292,7 @@ static void *tmc_alloc_etf_buffer(struct
 	int node;
 	struct cs_buffers *buf;
 
-	if (cpu == -1)
-		cpu = smp_processor_id();
-	node = cpu_to_node(cpu);
+	node = (cpu == -1) ? NUMA_NO_NODE : cpu_to_node(cpu);
 
 	/* Allocate memory structure for interaction with Perf */
 	buf = kzalloc_node(sizeof(struct cs_buffers), GFP_KERNEL, node);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/iio/dac/ad5380.c linux-libre-4.9.212-gnu/drivers/iio/dac/ad5380.c
--- linux-libre-4.9.211-gnu/drivers/iio/dac/ad5380.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/iio/dac/ad5380.c	2020-01-29 04:24:41.000000000 -0500
@@ -221,7 +221,7 @@ static int ad5380_read_raw(struct iio_de
 		if (ret)
 			return ret;
 		*val >>= chan->scan_type.shift;
-		val -= (1 << chan->scan_type.realbits) / 2;
+		*val -= (1 << chan->scan_type.realbits) / 2;
 		return IIO_VAL_INT;
 	case IIO_CHAN_INFO_SCALE:
 		*val = 2 * st->vref;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/infiniband/hw/cxgb4/cm.c linux-libre-4.9.212-gnu/drivers/infiniband/hw/cxgb4/cm.c
--- linux-libre-4.9.211-gnu/drivers/infiniband/hw/cxgb4/cm.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/infiniband/hw/cxgb4/cm.c	2020-01-29 04:24:41.000000000 -0500
@@ -2044,7 +2044,7 @@ static int import_ep(struct c4iw_ep *ep,
 	} else {
 		pdev = get_real_dev(n->dev);
 		ep->l2t = cxgb4_l2t_get(cdev->rdev.lldi.l2t,
-					n, pdev, 0);
+					n, pdev, rt_tos2priority(tos));
 		if (!ep->l2t)
 			goto out;
 		ep->mtu = dst_mtu(dst);
@@ -2135,7 +2135,8 @@ static int c4iw_reconnect(struct c4iw_ep
 					   laddr6->sin6_addr.s6_addr,
 					   raddr6->sin6_addr.s6_addr,
 					   laddr6->sin6_port,
-					   raddr6->sin6_port, 0,
+					   raddr6->sin6_port,
+					   ep->com.cm_id->tos,
 					   raddr6->sin6_scope_id);
 		iptype = 6;
 		ra = (__u8 *)&raddr6->sin6_addr;
@@ -3278,7 +3279,7 @@ int c4iw_connect(struct iw_cm_id *cm_id,
 					   laddr6->sin6_addr.s6_addr,
 					   raddr6->sin6_addr.s6_addr,
 					   laddr6->sin6_port,
-					   raddr6->sin6_port, 0,
+					   raddr6->sin6_port, cm_id->tos,
 					   raddr6->sin6_scope_id);
 	}
 	if (!ep->dst) {
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/infiniband/hw/hns/hns_roce_qp.c linux-libre-4.9.212-gnu/drivers/infiniband/hw/hns/hns_roce_qp.c
--- linux-libre-4.9.211-gnu/drivers/infiniband/hw/hns/hns_roce_qp.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/infiniband/hw/hns/hns_roce_qp.c	2020-01-29 04:24:41.000000000 -0500
@@ -241,7 +241,6 @@ void hns_roce_qp_free(struct hns_roce_de
 
 	if ((hr_qp->ibqp.qp_type) != IB_QPT_GSI) {
 		hns_roce_table_put(hr_dev, &qp_table->irrl_table, hr_qp->qpn);
-		hns_roce_table_put(hr_dev, &qp_table->qp_table, hr_qp->qpn);
 	}
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/infiniband/hw/mlx5/qp.c linux-libre-4.9.212-gnu/drivers/infiniband/hw/mlx5/qp.c
--- linux-libre-4.9.211-gnu/drivers/infiniband/hw/mlx5/qp.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/infiniband/hw/mlx5/qp.c	2020-01-29 04:24:41.000000000 -0500
@@ -2324,6 +2324,11 @@ static enum mlx5_qp_optpar opt_mask[MLX5
 			[MLX5_QP_ST_UD] = MLX5_QP_OPTPAR_PKEY_INDEX	|
 					  MLX5_QP_OPTPAR_Q_KEY		|
 					  MLX5_QP_OPTPAR_PRI_PORT,
+			[MLX5_QP_ST_XRC] = MLX5_QP_OPTPAR_RRE		|
+					  MLX5_QP_OPTPAR_RAE		|
+					  MLX5_QP_OPTPAR_RWE		|
+					  MLX5_QP_OPTPAR_PKEY_INDEX	|
+					  MLX5_QP_OPTPAR_PRI_PORT,
 		},
 		[MLX5_QP_STATE_RTR] = {
 			[MLX5_QP_ST_RC] = MLX5_QP_OPTPAR_ALT_ADDR_PATH  |
@@ -2357,6 +2362,12 @@ static enum mlx5_qp_optpar opt_mask[MLX5
 					  MLX5_QP_OPTPAR_RWE		|
 					  MLX5_QP_OPTPAR_PM_STATE,
 			[MLX5_QP_ST_UD] = MLX5_QP_OPTPAR_Q_KEY,
+			[MLX5_QP_ST_XRC] = MLX5_QP_OPTPAR_ALT_ADDR_PATH	|
+					  MLX5_QP_OPTPAR_RRE		|
+					  MLX5_QP_OPTPAR_RAE		|
+					  MLX5_QP_OPTPAR_RWE		|
+					  MLX5_QP_OPTPAR_PM_STATE	|
+					  MLX5_QP_OPTPAR_RNR_TIMEOUT,
 		},
 	},
 	[MLX5_QP_STATE_RTS] = {
@@ -2373,6 +2384,12 @@ static enum mlx5_qp_optpar opt_mask[MLX5
 			[MLX5_QP_ST_UD] = MLX5_QP_OPTPAR_Q_KEY		|
 					  MLX5_QP_OPTPAR_SRQN		|
 					  MLX5_QP_OPTPAR_CQN_RCV,
+			[MLX5_QP_ST_XRC] = MLX5_QP_OPTPAR_RRE		|
+					  MLX5_QP_OPTPAR_RAE		|
+					  MLX5_QP_OPTPAR_RWE		|
+					  MLX5_QP_OPTPAR_RNR_TIMEOUT	|
+					  MLX5_QP_OPTPAR_PM_STATE	|
+					  MLX5_QP_OPTPAR_ALT_ADDR_PATH,
 		},
 	},
 	[MLX5_QP_STATE_SQER] = {
@@ -2384,6 +2401,10 @@ static enum mlx5_qp_optpar opt_mask[MLX5
 					   MLX5_QP_OPTPAR_RWE		|
 					   MLX5_QP_OPTPAR_RAE		|
 					   MLX5_QP_OPTPAR_RRE,
+			[MLX5_QP_ST_XRC]  = MLX5_QP_OPTPAR_RNR_TIMEOUT	|
+					   MLX5_QP_OPTPAR_RWE		|
+					   MLX5_QP_OPTPAR_RAE		|
+					   MLX5_QP_OPTPAR_RRE,
 		},
 	},
 };
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c linux-libre-4.9.212-gnu/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
--- linux-libre-4.9.211-gnu/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c	2020-01-29 04:24:41.000000000 -0500
@@ -55,7 +55,7 @@
 
 int ocrdma_query_pkey(struct ib_device *ibdev, u8 port, u16 index, u16 *pkey)
 {
-	if (index > 1)
+	if (index > 0)
 		return -EINVAL;
 
 	*pkey = 0xffff;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/infiniband/hw/qedr/verbs.c linux-libre-4.9.212-gnu/drivers/infiniband/hw/qedr/verbs.c
--- linux-libre-4.9.211-gnu/drivers/infiniband/hw/qedr/verbs.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/infiniband/hw/qedr/verbs.c	2020-01-29 04:24:41.000000000 -0500
@@ -54,7 +54,7 @@
 
 int qedr_query_pkey(struct ib_device *ibdev, u8 port, u16 index, u16 *pkey)
 {
-	if (index > QEDR_ROCE_PKEY_TABLE_LEN)
+	if (index >= QEDR_ROCE_PKEY_TABLE_LEN)
 		return -EINVAL;
 
 	*pkey = QEDR_ROCE_PKEY_DEFAULT;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/infiniband/hw/usnic/usnic_ib_verbs.c linux-libre-4.9.212-gnu/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
--- linux-libre-4.9.211-gnu/drivers/infiniband/hw/usnic/usnic_ib_verbs.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/infiniband/hw/usnic/usnic_ib_verbs.c	2020-01-29 04:24:41.000000000 -0500
@@ -425,7 +425,7 @@ int usnic_ib_query_gid(struct ib_device
 int usnic_ib_query_pkey(struct ib_device *ibdev, u8 port, u16 index,
 				u16 *pkey)
 {
-	if (index > 1)
+	if (index > 0)
 		return -EINVAL;
 
 	*pkey = 0xffff;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/infiniband/sw/rxe/rxe_cq.c linux-libre-4.9.212-gnu/drivers/infiniband/sw/rxe/rxe_cq.c
--- linux-libre-4.9.211-gnu/drivers/infiniband/sw/rxe/rxe_cq.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/infiniband/sw/rxe/rxe_cq.c	2020-01-29 04:24:41.000000000 -0500
@@ -30,7 +30,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-
+#include <linux/vmalloc.h>
 #include "rxe.h"
 #include "rxe_loc.h"
 #include "rxe_queue.h"
@@ -89,7 +89,7 @@ int rxe_cq_from_init(struct rxe_dev *rxe
 	err = do_mmap_info(rxe, udata, false, context, cq->queue->buf,
 			   cq->queue->buf_size, &cq->queue->ip);
 	if (err) {
-		kvfree(cq->queue->buf);
+		vfree(cq->queue->buf);
 		kfree(cq->queue);
 		return err;
 	}
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/infiniband/sw/rxe/rxe_qp.c linux-libre-4.9.212-gnu/drivers/infiniband/sw/rxe/rxe_qp.c
--- linux-libre-4.9.211-gnu/drivers/infiniband/sw/rxe/rxe_qp.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/infiniband/sw/rxe/rxe_qp.c	2020-01-29 04:24:41.000000000 -0500
@@ -34,6 +34,7 @@
 #include <linux/skbuff.h>
 #include <linux/delay.h>
 #include <linux/sched.h>
+#include <linux/vmalloc.h>
 
 #include "rxe.h"
 #include "rxe_loc.h"
@@ -255,7 +256,7 @@ static int rxe_qp_init_req(struct rxe_de
 			   qp->sq.queue->buf_size, &qp->sq.queue->ip);
 
 	if (err) {
-		kvfree(qp->sq.queue->buf);
+		vfree(qp->sq.queue->buf);
 		kfree(qp->sq.queue);
 		return err;
 	}
@@ -312,7 +313,7 @@ static int rxe_qp_init_resp(struct rxe_d
 				   qp->rq.queue->buf_size,
 				   &qp->rq.queue->ip);
 		if (err) {
-			kvfree(qp->rq.queue->buf);
+			vfree(qp->rq.queue->buf);
 			kfree(qp->rq.queue);
 			return err;
 		}
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/infiniband/ulp/iser/iscsi_iser.h linux-libre-4.9.212-gnu/drivers/infiniband/ulp/iser/iscsi_iser.h
--- linux-libre-4.9.211-gnu/drivers/infiniband/ulp/iser/iscsi_iser.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/infiniband/ulp/iser/iscsi_iser.h	2020-01-29 04:24:41.000000000 -0500
@@ -197,7 +197,7 @@ struct iser_data_buf {
 	struct scatterlist *sg;
 	int                size;
 	unsigned long      data_len;
-	unsigned int       dma_nents;
+	int                dma_nents;
 };
 
 /* fwd declarations */
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/infiniband/ulp/iser/iser_memory.c linux-libre-4.9.212-gnu/drivers/infiniband/ulp/iser/iser_memory.c
--- linux-libre-4.9.211-gnu/drivers/infiniband/ulp/iser/iser_memory.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/infiniband/ulp/iser/iser_memory.c	2020-01-29 04:24:41.000000000 -0500
@@ -240,8 +240,8 @@ int iser_fast_reg_fmr(struct iscsi_iser_
 	page_vec->npages = 0;
 	page_vec->fake_mr.page_size = SIZE_4K;
 	plen = ib_sg_to_pages(&page_vec->fake_mr, mem->sg,
-			      mem->size, NULL, iser_set_page);
-	if (unlikely(plen < mem->size)) {
+			      mem->dma_nents, NULL, iser_set_page);
+	if (unlikely(plen < mem->dma_nents)) {
 		iser_err("page vec too short to hold this SG\n");
 		iser_data_buf_dump(mem, device->ib_device);
 		iser_dump_page_vec(page_vec);
@@ -450,10 +450,10 @@ static int iser_fast_reg_mr(struct iscsi
 
 	ib_update_fast_reg_key(mr, ib_inc_rkey(mr->rkey));
 
-	n = ib_map_mr_sg(mr, mem->sg, mem->size, NULL, SIZE_4K);
-	if (unlikely(n != mem->size)) {
+	n = ib_map_mr_sg(mr, mem->sg, mem->dma_nents, NULL, SIZE_4K);
+	if (unlikely(n != mem->dma_nents)) {
 		iser_err("failed to map sg (%d/%d)\n",
-			 n, mem->size);
+			 n, mem->dma_nents);
 		return n < 0 ? n : -EINVAL;
 	}
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/infiniband/ulp/isert/ib_isert.c linux-libre-4.9.212-gnu/drivers/infiniband/ulp/isert/ib_isert.c
--- linux-libre-4.9.211-gnu/drivers/infiniband/ulp/isert/ib_isert.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/infiniband/ulp/isert/ib_isert.c	2020-01-29 04:24:41.000000000 -0500
@@ -2555,17 +2555,6 @@ isert_wait4logout(struct isert_conn *ise
 	}
 }
 
-static void
-isert_wait4cmds(struct iscsi_conn *conn)
-{
-	isert_info("iscsi_conn %p\n", conn);
-
-	if (conn->sess) {
-		target_sess_cmd_list_set_waiting(conn->sess->se_sess);
-		target_wait_for_sess_cmds(conn->sess->se_sess);
-	}
-}
-
 /**
  * isert_put_unsol_pending_cmds() - Drop commands waiting for
  *     unsolicitate dataout
@@ -2613,7 +2602,6 @@ static void isert_wait_conn(struct iscsi
 
 	ib_drain_qp(isert_conn->qp);
 	isert_put_unsol_pending_cmds(conn);
-	isert_wait4cmds(conn);
 	isert_wait4logout(isert_conn);
 
 	queue_work(isert_release_wq, &isert_conn->release_work);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/input/keyboard/nomadik-ske-keypad.c linux-libre-4.9.212-gnu/drivers/input/keyboard/nomadik-ske-keypad.c
--- linux-libre-4.9.211-gnu/drivers/input/keyboard/nomadik-ske-keypad.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/input/keyboard/nomadik-ske-keypad.c	2020-01-29 04:24:41.000000000 -0500
@@ -100,7 +100,7 @@ static int __init ske_keypad_chip_init(s
 	while ((readl(keypad->reg_base + SKE_RIS) != 0x00000000) && timeout--)
 		cpu_relax();
 
-	if (!timeout)
+	if (timeout == -1)
 		return -EINVAL;
 
 	/*
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/input/misc/keyspan_remote.c linux-libre-4.9.212-gnu/drivers/input/misc/keyspan_remote.c
--- linux-libre-4.9.211-gnu/drivers/input/misc/keyspan_remote.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/input/misc/keyspan_remote.c	2020-01-29 04:24:41.000000000 -0500
@@ -344,7 +344,8 @@ static int keyspan_setup(struct usb_devi
 	int retval = 0;
 
 	retval = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
-				 0x11, 0x40, 0x5601, 0x0, NULL, 0, 0);
+				 0x11, 0x40, 0x5601, 0x0, NULL, 0,
+				 USB_CTRL_SET_TIMEOUT);
 	if (retval) {
 		dev_dbg(&dev->dev, "%s - failed to set bit rate due to error: %d\n",
 			__func__, retval);
@@ -352,7 +353,8 @@ static int keyspan_setup(struct usb_devi
 	}
 
 	retval = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
-				 0x44, 0x40, 0x0, 0x0, NULL, 0, 0);
+				 0x44, 0x40, 0x0, 0x0, NULL, 0,
+				 USB_CTRL_SET_TIMEOUT);
 	if (retval) {
 		dev_dbg(&dev->dev, "%s - failed to set resume sensitivity due to error: %d\n",
 			__func__, retval);
@@ -360,7 +362,8 @@ static int keyspan_setup(struct usb_devi
 	}
 
 	retval = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
-				 0x22, 0x40, 0x0, 0x0, NULL, 0, 0);
+				 0x22, 0x40, 0x0, 0x0, NULL, 0,
+				 USB_CTRL_SET_TIMEOUT);
 	if (retval) {
 		dev_dbg(&dev->dev, "%s - failed to turn receive on due to error: %d\n",
 			__func__, retval);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/input/tablet/aiptek.c linux-libre-4.9.212-gnu/drivers/input/tablet/aiptek.c
--- linux-libre-4.9.211-gnu/drivers/input/tablet/aiptek.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/input/tablet/aiptek.c	2020-01-29 04:24:41.000000000 -0500
@@ -1822,14 +1822,14 @@ aiptek_probe(struct usb_interface *intf,
 	input_set_abs_params(inputdev, ABS_WHEEL, AIPTEK_WHEEL_MIN, AIPTEK_WHEEL_MAX - 1, 0, 0);
 
 	/* Verify that a device really has an endpoint */
-	if (intf->altsetting[0].desc.bNumEndpoints < 1) {
+	if (intf->cur_altsetting->desc.bNumEndpoints < 1) {
 		dev_err(&intf->dev,
 			"interface has %d endpoints, but must have minimum 1\n",
-			intf->altsetting[0].desc.bNumEndpoints);
+			intf->cur_altsetting->desc.bNumEndpoints);
 		err = -EINVAL;
 		goto fail3;
 	}
-	endpoint = &intf->altsetting[0].endpoint[0].desc;
+	endpoint = &intf->cur_altsetting->endpoint[0].desc;
 
 	/* Go set up our URB, which is called when the tablet receives
 	 * input.
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/input/tablet/gtco.c linux-libre-4.9.212-gnu/drivers/input/tablet/gtco.c
--- linux-libre-4.9.211-gnu/drivers/input/tablet/gtco.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/input/tablet/gtco.c	2020-01-29 04:24:41.000000000 -0500
@@ -875,18 +875,14 @@ static int gtco_probe(struct usb_interfa
 	}
 
 	/* Sanity check that a device has an endpoint */
-	if (usbinterface->altsetting[0].desc.bNumEndpoints < 1) {
+	if (usbinterface->cur_altsetting->desc.bNumEndpoints < 1) {
 		dev_err(&usbinterface->dev,
 			"Invalid number of endpoints\n");
 		error = -EINVAL;
 		goto err_free_urb;
 	}
 
-	/*
-	 * The endpoint is always altsetting 0, we know this since we know
-	 * this device only has one interrupt endpoint
-	 */
-	endpoint = &usbinterface->altsetting[0].endpoint[0].desc;
+	endpoint = &usbinterface->cur_altsetting->endpoint[0].desc;
 
 	/* Some debug */
 	dev_dbg(&usbinterface->dev, "gtco # interfaces: %d\n", usbinterface->num_altsetting);
@@ -973,7 +969,7 @@ static int gtco_probe(struct usb_interfa
 	input_dev->dev.parent = &usbinterface->dev;
 
 	/* Setup the URB, it will be posted later on open of input device */
-	endpoint = &usbinterface->altsetting[0].endpoint[0].desc;
+	endpoint = &usbinterface->cur_altsetting->endpoint[0].desc;
 
 	usb_fill_int_urb(gtco->urbinfo,
 			 udev,
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/input/tablet/pegasus_notetaker.c linux-libre-4.9.212-gnu/drivers/input/tablet/pegasus_notetaker.c
--- linux-libre-4.9.211-gnu/drivers/input/tablet/pegasus_notetaker.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/input/tablet/pegasus_notetaker.c	2020-01-29 04:24:41.000000000 -0500
@@ -260,7 +260,7 @@ static int pegasus_probe(struct usb_inte
 		return -ENODEV;
 
 	/* Sanity check that the device has an endpoint */
-	if (intf->altsetting[0].desc.bNumEndpoints < 1) {
+	if (intf->cur_altsetting->desc.bNumEndpoints < 1) {
 		dev_err(&intf->dev, "Invalid number of endpoints\n");
 		return -EINVAL;
 	}
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/input/touchscreen/sun4i-ts.c linux-libre-4.9.212-gnu/drivers/input/touchscreen/sun4i-ts.c
--- linux-libre-4.9.211-gnu/drivers/input/touchscreen/sun4i-ts.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/input/touchscreen/sun4i-ts.c	2020-01-29 04:24:41.000000000 -0500
@@ -246,6 +246,7 @@ static int sun4i_ts_probe(struct platfor
 	struct device *dev = &pdev->dev;
 	struct device_node *np = dev->of_node;
 	struct device *hwmon;
+	struct thermal_zone_device *thermal;
 	int error;
 	u32 reg;
 	bool ts_attached;
@@ -365,7 +366,10 @@ static int sun4i_ts_probe(struct platfor
 	if (IS_ERR(hwmon))
 		return PTR_ERR(hwmon);
 
-	devm_thermal_zone_of_sensor_register(ts->dev, 0, ts, &sun4i_ts_tz_ops);
+	thermal = devm_thermal_zone_of_sensor_register(ts->dev, 0, ts,
+						       &sun4i_ts_tz_ops);
+	if (IS_ERR(thermal))
+		return PTR_ERR(thermal);
 
 	writel(TEMP_IRQ_EN(1), ts->base + TP_INT_FIFOC);
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/input/touchscreen/sur40.c linux-libre-4.9.212-gnu/drivers/input/touchscreen/sur40.c
--- linux-libre-4.9.211-gnu/drivers/input/touchscreen/sur40.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/input/touchscreen/sur40.c	2020-01-29 04:24:41.000000000 -0500
@@ -523,7 +523,7 @@ static int sur40_probe(struct usb_interf
 	int error;
 
 	/* Check if we really have the right interface. */
-	iface_desc = &interface->altsetting[0];
+	iface_desc = interface->cur_altsetting;
 	if (iface_desc->desc.bInterfaceClass != 0xFF)
 		return -ENODEV;
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/iommu/amd_iommu.c linux-libre-4.9.212-gnu/drivers/iommu/amd_iommu.c
--- linux-libre-4.9.211-gnu/drivers/iommu/amd_iommu.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/iommu/amd_iommu.c	2020-01-29 04:24:41.000000000 -0500
@@ -2113,6 +2113,8 @@ skip_ats_check:
 	 */
 	domain_flush_tlb_pde(domain);
 
+	domain_flush_complete(domain);
+
 	return ret;
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/iommu/amd_iommu_init.c linux-libre-4.9.212-gnu/drivers/iommu/amd_iommu_init.c
--- linux-libre-4.9.211-gnu/drivers/iommu/amd_iommu_init.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/iommu/amd_iommu_init.c	2020-01-29 04:24:41.000000000 -0500
@@ -383,6 +383,9 @@ static void iommu_enable(struct amd_iomm
 
 static void iommu_disable(struct amd_iommu *iommu)
 {
+	if (!iommu->mmio_base)
+		return;
+
 	/* Disable command buffer */
 	iommu_feature_disable(iommu, CONTROL_CMDBUF_EN);
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/iommu/intel-iommu.c linux-libre-4.9.212-gnu/drivers/iommu/intel-iommu.c
--- linux-libre-4.9.211-gnu/drivers/iommu/intel-iommu.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/iommu/intel-iommu.c	2020-01-29 04:24:41.000000000 -0500
@@ -3345,9 +3345,12 @@ static int __init init_dmars(void)
 		iommu_identity_mapping |= IDENTMAP_ALL;
 
 #ifdef CONFIG_INTEL_IOMMU_BROKEN_GFX_WA
-	iommu_identity_mapping |= IDENTMAP_GFX;
+	dmar_map_gfx = 0;
 #endif
 
+	if (!dmar_map_gfx)
+		iommu_identity_mapping |= IDENTMAP_GFX;
+
 	check_tylersburg_isoch();
 
 	if (iommu_identity_mapping) {
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/iommu/iommu.c linux-libre-4.9.212-gnu/drivers/iommu/iommu.c
--- linux-libre-4.9.211-gnu/drivers/iommu/iommu.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/iommu/iommu.c	2020-01-29 04:24:41.000000000 -0500
@@ -1582,9 +1582,9 @@ int iommu_request_dm_for_dev(struct devi
 	int ret;
 
 	/* Device must already be in a group before calling this function */
-	group = iommu_group_get_for_dev(dev);
-	if (IS_ERR(group))
-		return PTR_ERR(group);
+	group = iommu_group_get(dev);
+	if (!group)
+		return -EINVAL;
 
 	mutex_lock(&group->mutex);
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/md/bcache/super.c linux-libre-4.9.212-gnu/drivers/md/bcache/super.c
--- linux-libre-4.9.211-gnu/drivers/md/bcache/super.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/md/bcache/super.c	2020-01-29 04:24:41.000000000 -0500
@@ -1398,9 +1398,6 @@ static void cache_set_flush(struct closu
 	struct btree *b;
 	unsigned i;
 
-	if (!c)
-		closure_return(cl);
-
 	bch_cache_accounting_destroy(&c->accounting);
 
 	kobject_put(&c->internal);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/md/bitmap.c linux-libre-4.9.212-gnu/drivers/md/bitmap.c
--- linux-libre-4.9.211-gnu/drivers/md/bitmap.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/md/bitmap.c	2020-01-29 04:24:41.000000000 -0500
@@ -1699,7 +1699,7 @@ void bitmap_flush(struct mddev *mddev)
 /*
  * free memory that was allocated
  */
-static void bitmap_free(struct bitmap *bitmap)
+static void md_bitmap_free(struct bitmap *bitmap)
 {
 	unsigned long k, pages;
 	struct bitmap_page *bp;
@@ -1749,7 +1749,7 @@ void bitmap_destroy(struct mddev *mddev)
 	if (mddev->thread)
 		mddev->thread->timeout = MAX_SCHEDULE_TIMEOUT;
 
-	bitmap_free(bitmap);
+	md_bitmap_free(bitmap);
 }
 
 /*
@@ -1834,7 +1834,7 @@ struct bitmap *bitmap_create(struct mdde
 
 	return bitmap;
  error:
-	bitmap_free(bitmap);
+	md_bitmap_free(bitmap);
 	return ERR_PTR(err);
 }
 
@@ -1936,7 +1936,7 @@ int bitmap_copy_from_slot(struct mddev *
 	*low = lo;
 	*high = hi;
 err:
-	bitmap_free(bitmap);
+	md_bitmap_free(bitmap);
 	return rv;
 }
 EXPORT_SYMBOL_GPL(bitmap_copy_from_slot);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/media/i2c/ov2659.c linux-libre-4.9.212-gnu/drivers/media/i2c/ov2659.c
--- linux-libre-4.9.211-gnu/drivers/media/i2c/ov2659.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/media/i2c/ov2659.c	2020-01-29 04:24:41.000000000 -0500
@@ -1137,7 +1137,7 @@ static int ov2659_set_fmt(struct v4l2_su
 		mf = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
 		*mf = fmt->format;
 #else
-		return -ENOTTY;
+		ret = -ENOTTY;
 #endif
 	} else {
 		s64 val;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/media/i2c/soc_camera/ov6650.c linux-libre-4.9.212-gnu/drivers/media/i2c/soc_camera/ov6650.c
--- linux-libre-4.9.211-gnu/drivers/media/i2c/soc_camera/ov6650.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/media/i2c/soc_camera/ov6650.c	2020-01-29 04:24:41.000000000 -0500
@@ -203,7 +203,6 @@ struct ov6650 {
 	unsigned long		pclk_max;	/* from resolution and format */
 	struct v4l2_fract	tpf;		/* as requested with s_parm */
 	u32 code;
-	enum v4l2_colorspace	colorspace;
 };
 
 
@@ -216,6 +215,17 @@ static u32 ov6650_codes[] = {
 	MEDIA_BUS_FMT_Y8_1X8,
 };
 
+static const struct v4l2_mbus_framefmt ov6650_def_fmt = {
+	.width		= W_CIF,
+	.height		= H_CIF,
+	.code		= MEDIA_BUS_FMT_SBGGR8_1X8,
+	.colorspace	= V4L2_COLORSPACE_SRGB,
+	.field		= V4L2_FIELD_NONE,
+	.ycbcr_enc	= V4L2_YCBCR_ENC_DEFAULT,
+	.quantization	= V4L2_QUANTIZATION_DEFAULT,
+	.xfer_func	= V4L2_XFER_FUNC_DEFAULT,
+};
+
 /* read a register */
 static int ov6650_reg_read(struct i2c_client *client, u8 reg, u8 *val)
 {
@@ -512,12 +522,20 @@ static int ov6650_get_fmt(struct v4l2_su
 	if (format->pad)
 		return -EINVAL;
 
-	mf->width	= priv->rect.width >> priv->half_scale;
-	mf->height	= priv->rect.height >> priv->half_scale;
-	mf->code	= priv->code;
-	mf->colorspace	= priv->colorspace;
-	mf->field	= V4L2_FIELD_NONE;
+	/* initialize response with default media bus frame format */
+	*mf = ov6650_def_fmt;
 
+	/* update media bus format code and frame size */
+	if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
+		mf->width = cfg->try_fmt.width;
+		mf->height = cfg->try_fmt.height;
+		mf->code = cfg->try_fmt.code;
+
+	} else {
+		mf->width = priv->rect.width >> priv->half_scale;
+		mf->height = priv->rect.height >> priv->half_scale;
+		mf->code = priv->code;
+	}
 	return 0;
 }
 
@@ -624,11 +642,6 @@ static int ov6650_s_fmt(struct v4l2_subd
 		priv->pclk_max = 8000000;
 	}
 
-	if (code == MEDIA_BUS_FMT_SBGGR8_1X8)
-		priv->colorspace = V4L2_COLORSPACE_SRGB;
-	else if (code != 0)
-		priv->colorspace = V4L2_COLORSPACE_JPEG;
-
 	if (half_scale) {
 		dev_dbg(&client->dev, "max resolution: QCIF\n");
 		coma_set |= COMA_QCIF;
@@ -684,11 +697,6 @@ static int ov6650_s_fmt(struct v4l2_subd
 	if (!ret)
 		priv->code = code;
 
-	if (!ret) {
-		mf->colorspace	= priv->colorspace;
-		mf->width = priv->rect.width >> half_scale;
-		mf->height = priv->rect.height >> half_scale;
-	}
 	return ret;
 }
 
@@ -707,8 +715,6 @@ static int ov6650_set_fmt(struct v4l2_su
 		v4l_bound_align_image(&mf->width, 2, W_CIF, 1,
 				&mf->height, 2, H_CIF, 1, 0);
 
-	mf->field = V4L2_FIELD_NONE;
-
 	switch (mf->code) {
 	case MEDIA_BUS_FMT_Y10_1X10:
 		mf->code = MEDIA_BUS_FMT_Y8_1X8;
@@ -717,19 +723,38 @@ static int ov6650_set_fmt(struct v4l2_su
 	case MEDIA_BUS_FMT_YUYV8_2X8:
 	case MEDIA_BUS_FMT_VYUY8_2X8:
 	case MEDIA_BUS_FMT_UYVY8_2X8:
-		mf->colorspace = V4L2_COLORSPACE_JPEG;
 		break;
 	default:
 		mf->code = MEDIA_BUS_FMT_SBGGR8_1X8;
 	case MEDIA_BUS_FMT_SBGGR8_1X8:
-		mf->colorspace = V4L2_COLORSPACE_SRGB;
 		break;
 	}
 
-	if (format->which == V4L2_SUBDEV_FORMAT_ACTIVE)
-		return ov6650_s_fmt(sd, mf);
-	cfg->try_fmt = *mf;
+	if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
+		/* store media bus format code and frame size in pad config */
+		cfg->try_fmt.width = mf->width;
+		cfg->try_fmt.height = mf->height;
+		cfg->try_fmt.code = mf->code;
+
+		/* return default mbus frame format updated with pad config */
+		*mf = ov6650_def_fmt;
+		mf->width = cfg->try_fmt.width;
+		mf->height = cfg->try_fmt.height;
+		mf->code = cfg->try_fmt.code;
+
+	} else {
+		/* apply new media bus format code and frame size */
+		int ret = ov6650_s_fmt(sd, mf);
+
+		if (ret)
+			return ret;
 
+		/* return default format updated with active size and code */
+		*mf = ov6650_def_fmt;
+		mf->width = priv->rect.width >> priv->half_scale;
+		mf->height = priv->rect.height >> priv->half_scale;
+		mf->code = priv->code;
+	}
 	return 0;
 }
 
@@ -1048,7 +1073,6 @@ static int ov6650_probe(struct i2c_clien
 	priv->rect.height = H_CIF;
 	priv->half_scale  = false;
 	priv->code	  = MEDIA_BUS_FMT_YUYV8_2X8;
-	priv->colorspace  = V4L2_COLORSPACE_JPEG;
 
 	ret = ov6650_video_probe(client);
 	if (ret)
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/media/pci/cx18/cx18-fileops.c linux-libre-4.9.212-gnu/drivers/media/pci/cx18/cx18-fileops.c
--- linux-libre-4.9.211-gnu/drivers/media/pci/cx18/cx18-fileops.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/media/pci/cx18/cx18-fileops.c	2020-01-29 04:24:41.000000000 -0500
@@ -490,7 +490,7 @@ static ssize_t cx18_read_pos(struct cx18
 
 	CX18_DEBUG_HI_FILE("read %zd from %s, got %zd\n", count, s->name, rc);
 	if (rc > 0)
-		pos += rc;
+		*pos += rc;
 	return rc;
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/media/pci/cx23885/cx23885-dvb.c linux-libre-4.9.212-gnu/drivers/media/pci/cx23885/cx23885-dvb.c
--- linux-libre-4.9.211-gnu/drivers/media/pci/cx23885/cx23885-dvb.c	2020-01-23 09:19:08.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/media/pci/cx23885/cx23885-dvb.c	2020-01-29 05:15:28.000000000 -0500
@@ -1471,8 +1471,9 @@ static int dvb_register(struct cx23885_t
 		if (fe0->dvb.frontend != NULL) {
 			struct i2c_adapter *tun_i2c;
 
-			fe0->dvb.frontend->sec_priv = kmalloc(sizeof(dib7000p_ops), GFP_KERNEL);
-			memcpy(fe0->dvb.frontend->sec_priv, &dib7000p_ops, sizeof(dib7000p_ops));
+			fe0->dvb.frontend->sec_priv = kmemdup(&dib7000p_ops, sizeof(dib7000p_ops), GFP_KERNEL);
+			if (!fe0->dvb.frontend->sec_priv)
+				return -ENOMEM;
 			tun_i2c = dib7000p_ops.get_i2c_master(fe0->dvb.frontend, DIBX000_I2C_INTERFACE_TUNER, 1);
 			if (!dvb_attach(dib0070_attach, fe0->dvb.frontend, tun_i2c, &dib7070p_dib0070_config))
 				return -ENODEV;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/media/pci/ivtv/ivtv-fileops.c linux-libre-4.9.212-gnu/drivers/media/pci/ivtv/ivtv-fileops.c
--- linux-libre-4.9.211-gnu/drivers/media/pci/ivtv/ivtv-fileops.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/media/pci/ivtv/ivtv-fileops.c	2020-01-29 04:24:41.000000000 -0500
@@ -420,7 +420,7 @@ static ssize_t ivtv_read_pos(struct ivtv
 
 	IVTV_DEBUG_HI_FILE("read %zd from %s, got %zd\n", count, s->name, rc);
 	if (rc > 0)
-		pos += rc;
+		*pos += rc;
 	return rc;
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/media/pci/tw5864/tw5864-video.c linux-libre-4.9.212-gnu/drivers/media/pci/tw5864/tw5864-video.c
--- linux-libre-4.9.211-gnu/drivers/media/pci/tw5864/tw5864-video.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/media/pci/tw5864/tw5864-video.c	2020-01-29 04:24:41.000000000 -0500
@@ -1386,13 +1386,13 @@ static void tw5864_handle_frame(struct t
 	input->vb = NULL;
 	spin_unlock_irqrestore(&input->slock, flags);
 
-	v4l2_buf = to_vb2_v4l2_buffer(&vb->vb.vb2_buf);
-
 	if (!vb) { /* Gone because of disabling */
 		dev_dbg(&dev->pci->dev, "vb is empty, dropping frame\n");
 		return;
 	}
 
+	v4l2_buf = to_vb2_v4l2_buffer(&vb->vb.vb2_buf);
+
 	/*
 	 * Check for space.
 	 * Mind the overhead of startcode emulation prevention.
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/media/platform/davinci/isif.c linux-libre-4.9.212-gnu/drivers/media/platform/davinci/isif.c
--- linux-libre-4.9.211-gnu/drivers/media/platform/davinci/isif.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/media/platform/davinci/isif.c	2020-01-29 04:24:41.000000000 -0500
@@ -890,9 +890,7 @@ static int isif_set_hw_if_params(struct
 static int isif_config_ycbcr(void)
 {
 	struct isif_ycbcr_config *params = &isif_cfg.ycbcr;
-	struct vpss_pg_frame_size frame_size;
 	u32 modeset = 0, ccdcfg = 0;
-	struct vpss_sync_pol sync;
 
 	dev_dbg(isif_cfg.dev, "\nStarting isif_config_ycbcr...");
 
@@ -980,13 +978,6 @@ static int isif_config_ycbcr(void)
 		/* two fields are interleaved in memory */
 		regw(0x00000249, SDOFST);
 
-	/* Setup test pattern if enabled */
-	if (isif_cfg.bayer.config_params.test_pat_gen) {
-		sync.ccdpg_hdpol = params->hd_pol;
-		sync.ccdpg_vdpol = params->vd_pol;
-		dm365_vpss_set_sync_pol(sync);
-		dm365_vpss_set_pg_frame_size(frame_size);
-	}
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/media/platform/davinci/vpbe.c linux-libre-4.9.212-gnu/drivers/media/platform/davinci/vpbe.c
--- linux-libre-4.9.211-gnu/drivers/media/platform/davinci/vpbe.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/media/platform/davinci/vpbe.c	2020-01-29 04:24:41.000000000 -0500
@@ -130,7 +130,7 @@ static int vpbe_enum_outputs(struct vpbe
 			     struct v4l2_output *output)
 {
 	struct vpbe_config *cfg = vpbe_dev->cfg;
-	int temp_index = output->index;
+	unsigned int temp_index = output->index;
 
 	if (temp_index >= cfg->num_outputs)
 		return -EINVAL;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/media/platform/omap/omap_vout.c linux-libre-4.9.212-gnu/drivers/media/platform/omap/omap_vout.c
--- linux-libre-4.9.211-gnu/drivers/media/platform/omap/omap_vout.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/media/platform/omap/omap_vout.c	2020-01-29 04:24:41.000000000 -0500
@@ -1526,23 +1526,20 @@ static int vidioc_dqbuf(struct file *fil
 	unsigned long size;
 	struct videobuf_buffer *vb;
 
-	vb = q->bufs[b->index];
-
 	if (!vout->streaming)
 		return -EINVAL;
 
-	if (file->f_flags & O_NONBLOCK)
-		/* Call videobuf_dqbuf for non blocking mode */
-		ret = videobuf_dqbuf(q, (struct v4l2_buffer *)b, 1);
-	else
-		/* Call videobuf_dqbuf for  blocking mode */
-		ret = videobuf_dqbuf(q, (struct v4l2_buffer *)b, 0);
+	ret = videobuf_dqbuf(q, b, !!(file->f_flags & O_NONBLOCK));
+	if (ret)
+		return ret;
+
+	vb = q->bufs[b->index];
 
 	addr = (unsigned long) vout->buf_phy_addr[vb->i];
 	size = (unsigned long) vb->size;
 	dma_unmap_single(vout->vid_dev->v4l2_dev.dev,  addr,
 				size, DMA_TO_DEVICE);
-	return ret;
+	return 0;
 }
 
 static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i)
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/media/platform/s5p-jpeg/jpeg-core.c linux-libre-4.9.212-gnu/drivers/media/platform/s5p-jpeg/jpeg-core.c
--- linux-libre-4.9.211-gnu/drivers/media/platform/s5p-jpeg/jpeg-core.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/media/platform/s5p-jpeg/jpeg-core.c	2020-01-29 04:24:41.000000000 -0500
@@ -1963,7 +1963,7 @@ static int s5p_jpeg_controls_create(stru
 
 		v4l2_ctrl_new_std(&ctx->ctrl_handler, &s5p_jpeg_ctrl_ops,
 				  V4L2_CID_JPEG_RESTART_INTERVAL,
-				  0, 3, 0xffff, 0);
+				  0, 0xffff, 1, 0);
 		if (ctx->jpeg->variant->version == SJPEG_S5P)
 			mask = ~0x06; /* 422, 420 */
 	}
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/media/platform/vivid/vivid-osd.c linux-libre-4.9.212-gnu/drivers/media/platform/vivid/vivid-osd.c
--- linux-libre-4.9.211-gnu/drivers/media/platform/vivid/vivid-osd.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/media/platform/vivid/vivid-osd.c	2020-01-29 04:24:41.000000000 -0500
@@ -167,7 +167,7 @@ static int _vivid_fb_check_var(struct fb
 	var->nonstd = 0;
 
 	var->vmode &= ~FB_VMODE_MASK;
-	var->vmode = FB_VMODE_NONINTERLACED;
+	var->vmode |= FB_VMODE_NONINTERLACED;
 
 	/* Dummy values */
 	var->hsync_len = 24;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/media/radio/wl128x/fmdrv_common.c linux-libre-4.9.212-gnu/drivers/media/radio/wl128x/fmdrv_common.c
--- linux-libre-4.9.211-gnu/drivers/media/radio/wl128x/fmdrv_common.c	2020-01-23 09:27:34.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/media/radio/wl128x/fmdrv_common.c	2020-01-29 05:20:23.000000000 -0500
@@ -1278,8 +1278,9 @@ static int fm_download_firmware(struct f
 
 		switch (action->type) {
 		case ACTION_SEND_COMMAND:	/* Send */
-			if (fmc_send_cmd(fmdev, 0, 0, action->data,
-						action->size, NULL, NULL))
+			ret = fmc_send_cmd(fmdev, 0, 0, action->data,
+					   action->size, NULL, NULL);
+			if (ret)
 				goto rel_fw;
 
 			cmd_cnt++;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/mfd/intel-lpss.c linux-libre-4.9.212-gnu/drivers/mfd/intel-lpss.c
--- linux-libre-4.9.211-gnu/drivers/mfd/intel-lpss.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/mfd/intel-lpss.c	2020-01-29 04:24:41.000000000 -0500
@@ -533,6 +533,7 @@ module_init(intel_lpss_init);
 
 static void __exit intel_lpss_exit(void)
 {
+	ida_destroy(&intel_lpss_devid_ida);
 	debugfs_remove(intel_lpss_debugfs);
 }
 module_exit(intel_lpss_exit);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/misc/mic/card/mic_x100.c linux-libre-4.9.212-gnu/drivers/misc/mic/card/mic_x100.c
--- linux-libre-4.9.211-gnu/drivers/misc/mic/card/mic_x100.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/misc/mic/card/mic_x100.c	2020-01-29 04:24:41.000000000 -0500
@@ -249,6 +249,9 @@ static int __init mic_probe(struct platf
 	mdrv->dev = &pdev->dev;
 	snprintf(mdrv->name, sizeof(mic_driver_name), mic_driver_name);
 
+	/* FIXME: use dma_set_mask_and_coherent() and check result */
+	dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
+
 	mdev->mmio.pa = MIC_X100_MMIO_BASE;
 	mdev->mmio.len = MIC_X100_MMIO_LEN;
 	mdev->mmio.va = devm_ioremap(&pdev->dev, MIC_X100_MMIO_BASE,
@@ -294,18 +297,6 @@ static void mic_platform_shutdown(struct
 	mic_remove(pdev);
 }
 
-static u64 mic_dma_mask = DMA_BIT_MASK(64);
-
-static struct platform_device mic_platform_dev = {
-	.name = mic_driver_name,
-	.id   = 0,
-	.num_resources = 0,
-	.dev = {
-		.dma_mask = &mic_dma_mask,
-		.coherent_dma_mask = DMA_BIT_MASK(64),
-	},
-};
-
 static struct platform_driver __refdata mic_platform_driver = {
 	.probe = mic_probe,
 	.remove = mic_remove,
@@ -315,6 +306,8 @@ static struct platform_driver __refdata
 	},
 };
 
+static struct platform_device *mic_platform_dev;
+
 static int __init mic_init(void)
 {
 	int ret;
@@ -328,9 +321,12 @@ static int __init mic_init(void)
 
 	request_module("mic_x100_dma");
 	mic_init_card_debugfs();
-	ret = platform_device_register(&mic_platform_dev);
+
+	mic_platform_dev = platform_device_register_simple(mic_driver_name,
+							   0, NULL, 0);
+	ret = PTR_ERR_OR_ZERO(mic_platform_dev);
 	if (ret) {
-		pr_err("platform_device_register ret %d\n", ret);
+		pr_err("platform_device_register_full ret %d\n", ret);
 		goto cleanup_debugfs;
 	}
 	ret = platform_driver_register(&mic_platform_driver);
@@ -341,7 +337,7 @@ static int __init mic_init(void)
 	return ret;
 
 device_unregister:
-	platform_device_unregister(&mic_platform_dev);
+	platform_device_unregister(mic_platform_dev);
 cleanup_debugfs:
 	mic_exit_card_debugfs();
 done:
@@ -351,7 +347,7 @@ done:
 static void __exit mic_exit(void)
 {
 	platform_driver_unregister(&mic_platform_driver);
-	platform_device_unregister(&mic_platform_dev);
+	platform_device_unregister(mic_platform_dev);
 	mic_exit_card_debugfs();
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/misc/sgi-xp/xpc_partition.c linux-libre-4.9.212-gnu/drivers/misc/sgi-xp/xpc_partition.c
--- linux-libre-4.9.211-gnu/drivers/misc/sgi-xp/xpc_partition.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/misc/sgi-xp/xpc_partition.c	2020-01-29 04:24:41.000000000 -0500
@@ -70,7 +70,7 @@ xpc_get_rsvd_page_pa(int nasid)
 	unsigned long rp_pa = nasid;	/* seed with nasid */
 	size_t len = 0;
 	size_t buf_len = 0;
-	void *buf = buf;
+	void *buf = NULL;
 	void *buf_base = NULL;
 	enum xp_retval (*get_partition_rsvd_page_pa)
 		(void *, u64 *, unsigned long *, size_t *) =
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/mmc/host/sdhci-brcmstb.c linux-libre-4.9.212-gnu/drivers/mmc/host/sdhci-brcmstb.c
--- linux-libre-4.9.211-gnu/drivers/mmc/host/sdhci-brcmstb.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/mmc/host/sdhci-brcmstb.c	2020-01-29 04:24:41.000000000 -0500
@@ -90,7 +90,9 @@ static int sdhci_brcmstb_probe(struct pl
 	host->mmc->caps2 |= MMC_CAP2_HC_ERASE_SZ;
 
 	sdhci_get_of_property(pdev);
-	mmc_of_parse(host->mmc);
+	res = mmc_of_parse(host->mmc);
+	if (res)
+		goto err;
 
 	/*
 	 * Supply the existing CAPS, but clear the UHS modes. This
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/mmc/host/sdhci.c linux-libre-4.9.212-gnu/drivers/mmc/host/sdhci.c
--- linux-libre-4.9.211-gnu/drivers/mmc/host/sdhci.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/mmc/host/sdhci.c	2020-01-29 04:24:41.000000000 -0500
@@ -3243,11 +3243,13 @@ int sdhci_setup_host(struct sdhci_host *
 	if (host->ops->get_min_clock)
 		mmc->f_min = host->ops->get_min_clock(host);
 	else if (host->version >= SDHCI_SPEC_300) {
-		if (host->clk_mul) {
-			mmc->f_min = (host->max_clk * host->clk_mul) / 1024;
+		if (host->clk_mul)
 			max_clk = host->max_clk * host->clk_mul;
-		} else
-			mmc->f_min = host->max_clk / SDHCI_MAX_DIV_SPEC_300;
+		/*
+		 * Divided Clock Mode minimum clock rate is always less than
+		 * Programmable Clock Mode minimum clock rate.
+		 */
+		mmc->f_min = host->max_clk / SDHCI_MAX_DIV_SPEC_300;
 	} else
 		mmc->f_min = host->max_clk / SDHCI_MAX_DIV_SPEC_200;
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/mmc/host/sdhci-tegra.c linux-libre-4.9.212-gnu/drivers/mmc/host/sdhci-tegra.c
--- linux-libre-4.9.211-gnu/drivers/mmc/host/sdhci-tegra.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/mmc/host/sdhci-tegra.c	2020-01-29 04:24:41.000000000 -0500
@@ -174,7 +174,7 @@ static void tegra_sdhci_reset(struct sdh
 			misc_ctrl |= SDHCI_MISC_CTRL_ENABLE_DDR50;
 		if (soc_data->nvquirks & NVQUIRK_ENABLE_SDR104)
 			misc_ctrl |= SDHCI_MISC_CTRL_ENABLE_SDR104;
-		if (soc_data->nvquirks & SDHCI_MISC_CTRL_ENABLE_SDR50)
+		if (soc_data->nvquirks & NVQUIRK_ENABLE_SDR50)
 			clk_ctrl |= SDHCI_CLOCK_CTRL_SDR50_TUNING_OVERRIDE;
 	}
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/can/slcan.c linux-libre-4.9.212-gnu/drivers/net/can/slcan.c
--- linux-libre-4.9.211-gnu/drivers/net/can/slcan.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/can/slcan.c	2020-01-29 04:24:41.000000000 -0500
@@ -344,9 +344,16 @@ static void slcan_transmit(struct work_s
  */
 static void slcan_write_wakeup(struct tty_struct *tty)
 {
-	struct slcan *sl = tty->disc_data;
+	struct slcan *sl;
+
+	rcu_read_lock();
+	sl = rcu_dereference(tty->disc_data);
+	if (!sl)
+		goto out;
 
 	schedule_work(&sl->tx_work);
+out:
+	rcu_read_unlock();
 }
 
 /* Send a can_frame to a TTY queue. */
@@ -640,10 +647,11 @@ static void slcan_close(struct tty_struc
 		return;
 
 	spin_lock_bh(&sl->lock);
-	tty->disc_data = NULL;
+	rcu_assign_pointer(tty->disc_data, NULL);
 	sl->tty = NULL;
 	spin_unlock_bh(&sl->lock);
 
+	synchronize_rcu();
 	flush_work(&sl->tx_work);
 
 	/* Flush network side */
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/dsa/qca8k.c linux-libre-4.9.212-gnu/drivers/net/dsa/qca8k.c
--- linux-libre-4.9.211-gnu/drivers/net/dsa/qca8k.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/dsa/qca8k.c	2020-01-29 04:24:41.000000000 -0500
@@ -460,6 +460,18 @@ qca8k_set_pad_ctrl(struct qca8k_priv *pr
 		qca8k_write(priv, QCA8K_REG_PORT5_PAD_CTRL,
 			    QCA8K_PORT_PAD_RGMII_RX_DELAY_EN);
 		break;
+	case PHY_INTERFACE_MODE_RGMII_ID:
+		/* RGMII_ID needs internal delay. This is enabled through
+		 * PORT5_PAD_CTRL for all ports, rather than individual port
+		 * registers
+		 */
+		qca8k_write(priv, reg,
+			    QCA8K_PORT_PAD_RGMII_EN |
+			    QCA8K_PORT_PAD_RGMII_TX_DELAY(QCA8K_MAX_DELAY) |
+			    QCA8K_PORT_PAD_RGMII_RX_DELAY(QCA8K_MAX_DELAY));
+		qca8k_write(priv, QCA8K_REG_PORT5_PAD_CTRL,
+			    QCA8K_PORT_PAD_RGMII_RX_DELAY_EN);
+		break;
 	case PHY_INTERFACE_MODE_SGMII:
 		qca8k_write(priv, reg, QCA8K_PORT_PAD_SGMII_EN);
 		break;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/dsa/qca8k.h linux-libre-4.9.212-gnu/drivers/net/dsa/qca8k.h
--- linux-libre-4.9.211-gnu/drivers/net/dsa/qca8k.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/dsa/qca8k.h	2020-01-29 04:24:41.000000000 -0500
@@ -40,6 +40,7 @@
 						((0x8 + (x & 0x3)) << 22)
 #define   QCA8K_PORT_PAD_RGMII_RX_DELAY(x)		\
 						((0x10 + (x & 0x3)) << 20)
+#define   QCA8K_MAX_DELAY				3
 #define   QCA8K_PORT_PAD_RGMII_RX_DELAY_EN		BIT(24)
 #define   QCA8K_PORT_PAD_SGMII_EN			BIT(7)
 #define QCA8K_REG_MODULE_EN				0x030
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/ethernet/amazon/ena/ena_com.c linux-libre-4.9.212-gnu/drivers/net/ethernet/amazon/ena/ena_com.c
--- linux-libre-4.9.211-gnu/drivers/net/ethernet/amazon/ena/ena_com.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/ethernet/amazon/ena/ena_com.c	2020-01-29 04:24:41.000000000 -0500
@@ -1967,7 +1967,7 @@ int ena_com_set_hash_function(struct ena
 	if (unlikely(ret))
 		return ret;
 
-	if (get_resp.u.flow_hash_func.supported_func & (1 << rss->hash_func)) {
+	if (!(get_resp.u.flow_hash_func.supported_func & BIT(rss->hash_func))) {
 		pr_err("Func hash %d isn't supported by device, abort\n",
 		       rss->hash_func);
 		return -EPERM;
@@ -2052,6 +2052,7 @@ int ena_com_fill_hash_function(struct en
 		return -EINVAL;
 	}
 
+	rss->hash_func = func;
 	rc = ena_com_set_hash_function(ena_dev);
 
 	/* Restore the old function */
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/ethernet/amazon/ena/ena_ethtool.c linux-libre-4.9.212-gnu/drivers/net/ethernet/amazon/ena/ena_ethtool.c
--- linux-libre-4.9.211-gnu/drivers/net/ethernet/amazon/ena/ena_ethtool.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/ethernet/amazon/ena/ena_ethtool.c	2020-01-29 04:24:41.000000000 -0500
@@ -697,8 +697,8 @@ static int ena_set_rxfh(struct net_devic
 	if (indir) {
 		for (i = 0; i < ENA_RX_RSS_TABLE_SIZE; i++) {
 			rc = ena_com_indirect_table_fill_entry(ena_dev,
-							       ENA_IO_RXQ_IDX(indir[i]),
-							       i);
+							       i,
+							       ENA_IO_RXQ_IDX(indir[i]));
 			if (unlikely(rc)) {
 				netif_err(adapter, drv, netdev,
 					  "Cannot fill indirect table (index is too large)\n");
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/ethernet/amazon/ena/ena_netdev.c linux-libre-4.9.212-gnu/drivers/net/ethernet/amazon/ena/ena_netdev.c
--- linux-libre-4.9.211-gnu/drivers/net/ethernet/amazon/ena/ena_netdev.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/ethernet/amazon/ena/ena_netdev.c	2020-01-29 04:24:41.000000000 -0500
@@ -1702,6 +1702,7 @@ err_setup_rx:
 err_setup_tx:
 	ena_free_io_irq(adapter);
 err_req_irq:
+	ena_del_napi(adapter);
 
 	return rc;
 }
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/ethernet/broadcom/bcmsysport.c linux-libre-4.9.212-gnu/drivers/net/ethernet/broadcom/bcmsysport.c
--- linux-libre-4.9.211-gnu/drivers/net/ethernet/broadcom/bcmsysport.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/ethernet/broadcom/bcmsysport.c	2020-01-29 04:24:41.000000000 -0500
@@ -1773,7 +1773,7 @@ static int bcm_sysport_probe(struct plat
 
 	priv->phy_interface = of_get_phy_mode(dn);
 	/* Default to GMII interface mode */
-	if (priv->phy_interface < 0)
+	if ((int)priv->phy_interface < 0)
 		priv->phy_interface = PHY_INTERFACE_MODE_GMII;
 
 	/* In the case of a fixed PHY, the DT node associated
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c linux-libre-4.9.212-gnu/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
--- linux-libre-4.9.211-gnu/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c	2020-01-23 09:28:50.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c	2020-01-29 05:21:15.000000000 -0500
@@ -2433,6 +2433,8 @@ static int cxgb_extension_ioctl(struct n
 
 		if (!is_offload(adapter))
 			return -EOPNOTSUPP;
+		if (!capable(CAP_NET_ADMIN))
+			return -EPERM;
 		if (!(adapter->flags & FULL_INIT_DONE))
 			return -EIO;	/* need the memory controllers */
 		if (copy_from_user(&t, useraddr, sizeof(t)))
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c linux-libre-4.9.212-gnu/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c
--- linux-libre-4.9.211-gnu/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c	2020-01-29 04:24:41.000000000 -0500
@@ -929,7 +929,7 @@ static int hix5hd2_dev_probe(struct plat
 		goto err_free_mdio;
 
 	priv->phy_mode = of_get_phy_mode(node);
-	if (priv->phy_mode < 0) {
+	if ((int)priv->phy_mode < 0) {
 		netdev_err(ndev, "not find phy-mode\n");
 		ret = -EINVAL;
 		goto err_mdiobus;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/ethernet/ibm/ehea/ehea_main.c linux-libre-4.9.212-gnu/drivers/net/ethernet/ibm/ehea/ehea_main.c
--- linux-libre-4.9.211-gnu/drivers/net/ethernet/ibm/ehea/ehea_main.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/ethernet/ibm/ehea/ehea_main.c	2020-01-29 04:24:41.000000000 -0500
@@ -1476,7 +1476,7 @@ static int ehea_init_port_res(struct ehe
 
 	memset(pr, 0, sizeof(struct ehea_port_res));
 
-	pr->tx_bytes = rx_bytes;
+	pr->tx_bytes = tx_bytes;
 	pr->tx_packets = tx_packets;
 	pr->rx_bytes = rx_bytes;
 	pr->rx_packets = rx_packets;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/ethernet/mellanox/mlxsw/reg.h linux-libre-4.9.212-gnu/drivers/net/ethernet/mellanox/mlxsw/reg.h
--- linux-libre-4.9.211-gnu/drivers/net/ethernet/mellanox/mlxsw/reg.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/ethernet/mellanox/mlxsw/reg.h	2020-01-29 04:24:41.000000000 -0500
@@ -1873,7 +1873,7 @@ static inline void mlxsw_reg_qtct_pack(c
  * Configures the ETS elements.
  */
 #define MLXSW_REG_QEEC_ID 0x400D
-#define MLXSW_REG_QEEC_LEN 0x1C
+#define MLXSW_REG_QEEC_LEN 0x20
 
 static const struct mlxsw_reg_info mlxsw_reg_qeec = {
 	.id = MLXSW_REG_QEEC_ID,
@@ -1918,6 +1918,15 @@ MLXSW_ITEM32(reg, qeec, element_index, 0
  */
 MLXSW_ITEM32(reg, qeec, next_element_index, 0x08, 0, 8);
 
+/* reg_qeec_mise
+ * Min shaper configuration enable. Enables configuration of the min
+ * shaper on this ETS element
+ * 0 - Disable
+ * 1 - Enable
+ * Access: RW
+ */
+MLXSW_ITEM32(reg, qeec, mise, 0x0C, 31, 1);
+
 enum {
 	MLXSW_REG_QEEC_BYTES_MODE,
 	MLXSW_REG_QEEC_PACKETS_MODE,
@@ -1934,6 +1943,17 @@ enum {
  */
 MLXSW_ITEM32(reg, qeec, pb, 0x0C, 28, 1);
 
+/* The smallest permitted min shaper rate. */
+#define MLXSW_REG_QEEC_MIS_MIN	200000		/* Kbps */
+
+/* reg_qeec_min_shaper_rate
+ * Min shaper information rate.
+ * For CPU port, can only be configured for port hierarchy.
+ * When in bytes mode, value is specified in units of 1000bps.
+ * Access: RW
+ */
+MLXSW_ITEM32(reg, qeec, min_shaper_rate, 0x0C, 0, 28);
+
 /* reg_qeec_mase
  * Max shaper configuration enable. Enables configuration of the max
  * shaper on this ETS element.
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/ethernet/natsemi/sonic.c linux-libre-4.9.212-gnu/drivers/net/ethernet/natsemi/sonic.c
--- linux-libre-4.9.211-gnu/drivers/net/ethernet/natsemi/sonic.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/ethernet/natsemi/sonic.c	2020-01-29 04:24:41.000000000 -0500
@@ -221,9 +221,9 @@ static int sonic_send_packet(struct sk_b
 
 	laddr = dma_map_single(lp->device, skb->data, length, DMA_TO_DEVICE);
 	if (!laddr) {
-		printk(KERN_ERR "%s: failed to map tx DMA buffer.\n", dev->name);
-		dev_kfree_skb(skb);
-		return NETDEV_TX_BUSY;
+		pr_err_ratelimited("%s: failed to map tx DMA buffer.\n", dev->name);
+		dev_kfree_skb_any(skb);
+		return NETDEV_TX_OK;
 	}
 
 	sonic_tda_put(dev, entry, SONIC_TD_STATUS, 0);       /* clear status */
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/ethernet/pasemi/pasemi_mac.c linux-libre-4.9.212-gnu/drivers/net/ethernet/pasemi/pasemi_mac.c
--- linux-libre-4.9.211-gnu/drivers/net/ethernet/pasemi/pasemi_mac.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/ethernet/pasemi/pasemi_mac.c	2020-01-29 04:24:41.000000000 -0500
@@ -1053,7 +1053,6 @@ static int pasemi_mac_phy_init(struct ne
 
 	dn = pci_device_to_OF_node(mac->pdev);
 	phy_dn = of_parse_phandle(dn, "phy-handle", 0);
-	of_node_put(phy_dn);
 
 	mac->link = 0;
 	mac->speed = 0;
@@ -1062,6 +1061,7 @@ static int pasemi_mac_phy_init(struct ne
 	phydev = of_phy_connect(dev, phy_dn, &pasemi_adjust_link, 0,
 				PHY_INTERFACE_MODE_SGMII);
 
+	of_node_put(phy_dn);
 	if (!phydev) {
 		printk(KERN_ERR "%s: Could not attach to phy\n", dev->name);
 		return -ENODEV;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/ethernet/qlogic/qed/qed_l2.c linux-libre-4.9.212-gnu/drivers/net/ethernet/qlogic/qed/qed_l2.c
--- linux-libre-4.9.211-gnu/drivers/net/ethernet/qlogic/qed/qed_l2.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/ethernet/qlogic/qed/qed_l2.c	2020-01-29 04:24:41.000000000 -0500
@@ -1328,10 +1328,9 @@ static void __qed_get_vport_pstats_addrl
 	}
 }
 
-static void __qed_get_vport_pstats(struct qed_hwfn *p_hwfn,
-				   struct qed_ptt *p_ptt,
-				   struct qed_eth_stats *p_stats,
-				   u16 statistics_bin)
+static noinline_for_stack void
+__qed_get_vport_pstats(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
+		       struct qed_eth_stats *p_stats, u16 statistics_bin)
 {
 	struct eth_pstorm_per_queue_stat pstats;
 	u32 pstats_addr = 0, pstats_len = 0;
@@ -1351,10 +1350,9 @@ static void __qed_get_vport_pstats(struc
 	p_stats->tx_err_drop_pkts += HILO_64_REGPAIR(pstats.error_drop_pkts);
 }
 
-static void __qed_get_vport_tstats(struct qed_hwfn *p_hwfn,
-				   struct qed_ptt *p_ptt,
-				   struct qed_eth_stats *p_stats,
-				   u16 statistics_bin)
+static noinline_for_stack void
+__qed_get_vport_tstats(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
+		       struct qed_eth_stats *p_stats, u16 statistics_bin)
 {
 	struct tstorm_per_port_stat tstats;
 	u32 tstats_addr, tstats_len;
@@ -1397,10 +1395,9 @@ static void __qed_get_vport_ustats_addrl
 	}
 }
 
-static void __qed_get_vport_ustats(struct qed_hwfn *p_hwfn,
-				   struct qed_ptt *p_ptt,
-				   struct qed_eth_stats *p_stats,
-				   u16 statistics_bin)
+static noinline_for_stack
+void __qed_get_vport_ustats(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
+			    struct qed_eth_stats *p_stats, u16 statistics_bin)
 {
 	struct eth_ustorm_per_queue_stat ustats;
 	u32 ustats_addr = 0, ustats_len = 0;
@@ -1436,10 +1433,9 @@ static void __qed_get_vport_mstats_addrl
 	}
 }
 
-static void __qed_get_vport_mstats(struct qed_hwfn *p_hwfn,
-				   struct qed_ptt *p_ptt,
-				   struct qed_eth_stats *p_stats,
-				   u16 statistics_bin)
+static noinline_for_stack void
+__qed_get_vport_mstats(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
+		       struct qed_eth_stats *p_stats, u16 statistics_bin)
 {
 	struct eth_mstorm_per_queue_stat mstats;
 	u32 mstats_addr = 0, mstats_len = 0;
@@ -1463,9 +1459,9 @@ static void __qed_get_vport_mstats(struc
 		HILO_64_REGPAIR(mstats.tpa_coalesced_bytes);
 }
 
-static void __qed_get_vport_port_stats(struct qed_hwfn *p_hwfn,
-				       struct qed_ptt *p_ptt,
-				       struct qed_eth_stats *p_stats)
+static noinline_for_stack void
+__qed_get_vport_port_stats(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
+			   struct qed_eth_stats *p_stats)
 {
 	struct port_stats port_stats;
 	int j;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/ethernet/qualcomm/qca_spi.c linux-libre-4.9.212-gnu/drivers/net/ethernet/qualcomm/qca_spi.c
--- linux-libre-4.9.211-gnu/drivers/net/ethernet/qualcomm/qca_spi.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/ethernet/qualcomm/qca_spi.c	2020-01-29 04:24:41.000000000 -0500
@@ -438,7 +438,6 @@ qcaspi_qca7k_sync(struct qcaspi *qca, in
 	u16 signature = 0;
 	u16 spi_config;
 	u16 wrbuf_space = 0;
-	static u16 reset_count;
 
 	if (event == QCASPI_EVENT_CPUON) {
 		/* Read signature twice, if not valid
@@ -491,13 +490,13 @@ qcaspi_qca7k_sync(struct qcaspi *qca, in
 
 		qca->sync = QCASPI_SYNC_RESET;
 		qca->stats.trig_reset++;
-		reset_count = 0;
+		qca->reset_count = 0;
 		break;
 	case QCASPI_SYNC_RESET:
-		reset_count++;
+		qca->reset_count++;
 		netdev_dbg(qca->net_dev, "sync: waiting for CPU on, count %u.\n",
-			   reset_count);
-		if (reset_count >= QCASPI_RESET_TIMEOUT) {
+			   qca->reset_count);
+		if (qca->reset_count >= QCASPI_RESET_TIMEOUT) {
 			/* reset did not seem to take place, try again */
 			qca->sync = QCASPI_SYNC_UNKNOWN;
 			qca->stats.reset_timeout++;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/ethernet/qualcomm/qca_spi.h linux-libre-4.9.212-gnu/drivers/net/ethernet/qualcomm/qca_spi.h
--- linux-libre-4.9.211-gnu/drivers/net/ethernet/qualcomm/qca_spi.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/ethernet/qualcomm/qca_spi.h	2020-01-29 04:24:41.000000000 -0500
@@ -97,6 +97,7 @@ struct qcaspi {
 
 	unsigned int intr_req;
 	unsigned int intr_svc;
+	u16 reset_count;
 
 #ifdef CONFIG_DEBUG_FS
 	struct dentry *device_root;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/ethernet/renesas/sh_eth.c linux-libre-4.9.212-gnu/drivers/net/ethernet/renesas/sh_eth.c
--- linux-libre-4.9.211-gnu/drivers/net/ethernet/renesas/sh_eth.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/ethernet/renesas/sh_eth.c	2020-01-29 04:24:41.000000000 -0500
@@ -2929,12 +2929,16 @@ static struct sh_eth_plat_data *sh_eth_p
 	struct device_node *np = dev->of_node;
 	struct sh_eth_plat_data *pdata;
 	const char *mac_addr;
+	int ret;
 
 	pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
 	if (!pdata)
 		return NULL;
 
-	pdata->phy_interface = of_get_phy_mode(np);
+	ret = of_get_phy_mode(np);
+	if (ret < 0)
+		return NULL;
+	pdata->phy_interface = ret;
 
 	mac_addr = of_get_mac_address(np);
 	if (mac_addr)
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c linux-libre-4.9.212-gnu/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
--- linux-libre-4.9.211-gnu/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c	2020-01-29 04:24:41.000000000 -0500
@@ -168,7 +168,7 @@ static void dwmac4_set_filter(struct mac
 	}
 
 	/* Handle multiple unicast addresses */
-	if (netdev_uc_count(dev) > GMAC_MAX_PERFECT_ADDRESSES) {
+	if (netdev_uc_count(dev) > hw->unicast_filter_entries) {
 		/* Switch to promiscuous mode if more than 128 addrs
 		 * are required
 		 */
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c linux-libre-4.9.212-gnu/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
--- linux-libre-4.9.211-gnu/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c	2020-01-29 04:24:41.000000000 -0500
@@ -203,7 +203,7 @@ static int ipq806x_gmac_of_parse(struct
 	struct device *dev = &gmac->pdev->dev;
 
 	gmac->phy_mode = of_get_phy_mode(dev->of_node);
-	if (gmac->phy_mode < 0) {
+	if ((int)gmac->phy_mode < 0) {
 		dev_err(dev, "missing phy mode property\n");
 		return -EINVAL;
 	}
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c linux-libre-4.9.212-gnu/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
--- linux-libre-4.9.211-gnu/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c	2020-01-29 04:24:41.000000000 -0500
@@ -280,7 +280,7 @@ static int meson8b_dwmac_probe(struct pl
 
 	dwmac->pdev = pdev;
 	dwmac->phy_mode = of_get_phy_mode(pdev->dev.of_node);
-	if (dwmac->phy_mode < 0) {
+	if ((int)dwmac->phy_mode < 0) {
 		dev_err(&pdev->dev, "missing phy-mode property\n");
 		ret = -EINVAL;
 		goto err_remove_config_dt;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c linux-libre-4.9.212-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
--- linux-libre-4.9.211-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c	2020-01-29 04:24:41.000000000 -0500
@@ -158,7 +158,7 @@ static int stmmac_enable(struct ptp_cloc
 /* structure describing a PTP hardware clock */
 static struct ptp_clock_info stmmac_ptp_clock_ops = {
 	.owner = THIS_MODULE,
-	.name = "stmmac_ptp_clock",
+	.name = "stmmac ptp",
 	.max_adj = 62500000,
 	.n_alarm = 0,
 	.n_ext_ts = 0,
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/gtp.c linux-libre-4.9.212-gnu/drivers/net/gtp.c
--- linux-libre-4.9.211-gnu/drivers/net/gtp.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/gtp.c	2020-01-29 04:24:41.000000000 -0500
@@ -836,7 +836,9 @@ static int gtp_encap_enable(struct net_d
 		return -ENOENT;
 	}
 
-	if (sock0->sk->sk_protocol != IPPROTO_UDP) {
+	if (sock0->sk->sk_protocol != IPPROTO_UDP ||
+	    sock0->sk->sk_type != SOCK_DGRAM ||
+	    (sock0->sk->sk_family != AF_INET && sock0->sk->sk_family != AF_INET6)) {
 		netdev_dbg(dev, "socket fd=%d not UDP\n", fd_gtp0);
 		err = -EINVAL;
 		goto err1;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/phy/fixed_phy.c linux-libre-4.9.212-gnu/drivers/net/phy/fixed_phy.c
--- linux-libre-4.9.211-gnu/drivers/net/phy/fixed_phy.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/phy/fixed_phy.c	2020-01-29 04:24:41.000000000 -0500
@@ -67,11 +67,11 @@ static int fixed_mdio_read(struct mii_bu
 			do {
 				s = read_seqcount_begin(&fp->seqcount);
 				/* Issue callback if user registered it. */
-				if (fp->link_update) {
+				if (fp->link_update)
 					fp->link_update(fp->phydev->attached_dev,
 							&fp->status);
-					fixed_phy_update(fp);
-				}
+				/* Check the GPIO for change in status */
+				fixed_phy_update(fp);
 				state = fp->status;
 			} while (read_seqcount_retry(&fp->seqcount, s));
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/phy/phy.c linux-libre-4.9.212-gnu/drivers/net/phy/phy.c
--- linux-libre-4.9.211-gnu/drivers/net/phy/phy.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/phy/phy.c	2020-01-29 04:24:41.000000000 -0500
@@ -463,7 +463,8 @@ int phy_ethtool_ksettings_get(struct phy
 		cmd->base.port = PORT_BNC;
 	else
 		cmd->base.port = PORT_MII;
-
+	cmd->base.transceiver = phy_is_internal(phydev) ?
+				XCVR_INTERNAL : XCVR_EXTERNAL;
 	cmd->base.phy_address = phydev->mdio.addr;
 	cmd->base.autoneg = phydev->autoneg;
 	cmd->base.eth_tp_mdix_ctrl = phydev->mdix;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/phy/phy_device.c linux-libre-4.9.212-gnu/drivers/net/phy/phy_device.c
--- linux-libre-4.9.211-gnu/drivers/net/phy/phy_device.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/phy/phy_device.c	2020-01-29 04:24:41.000000000 -0500
@@ -80,7 +80,7 @@ static LIST_HEAD(phy_fixup_list);
 static DEFINE_MUTEX(phy_fixup_lock);
 
 #ifdef CONFIG_PM
-static bool mdio_bus_phy_may_suspend(struct phy_device *phydev)
+static bool mdio_bus_phy_may_suspend(struct phy_device *phydev, bool suspend)
 {
 	struct device_driver *drv = phydev->mdio.dev.driver;
 	struct phy_driver *phydrv = to_phy_driver(drv);
@@ -92,10 +92,11 @@ static bool mdio_bus_phy_may_suspend(str
 	/* PHY not attached? May suspend if the PHY has not already been
 	 * suspended as part of a prior call to phy_disconnect() ->
 	 * phy_detach() -> phy_suspend() because the parent netdev might be the
-	 * MDIO bus driver and clock gated at this point.
+	 * MDIO bus driver and clock gated at this point. Also may resume if
+	 * PHY is not attached.
 	 */
 	if (!netdev)
-		return !phydev->suspended;
+		return suspend ? !phydev->suspended : phydev->suspended;
 
 	/* Don't suspend PHY if the attached netdev parent may wakeup.
 	 * The parent may point to a PCI device, as in tg3 driver.
@@ -125,7 +126,7 @@ static int mdio_bus_phy_suspend(struct d
 	if (phydev->attached_dev && phydev->adjust_link)
 		phy_stop_machine(phydev);
 
-	if (!mdio_bus_phy_may_suspend(phydev))
+	if (!mdio_bus_phy_may_suspend(phydev, true))
 		return 0;
 
 	return phy_suspend(phydev);
@@ -136,7 +137,7 @@ static int mdio_bus_phy_resume(struct de
 	struct phy_device *phydev = to_phy_device(dev);
 	int ret;
 
-	if (!mdio_bus_phy_may_suspend(phydev))
+	if (!mdio_bus_phy_may_suspend(phydev, false))
 		goto no_resume;
 
 	ret = phy_resume(phydev);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/slip/slip.c linux-libre-4.9.212-gnu/drivers/net/slip/slip.c
--- linux-libre-4.9.211-gnu/drivers/net/slip/slip.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/slip/slip.c	2020-01-29 04:24:41.000000000 -0500
@@ -452,9 +452,16 @@ static void slip_transmit(struct work_st
  */
 static void slip_write_wakeup(struct tty_struct *tty)
 {
-	struct slip *sl = tty->disc_data;
+	struct slip *sl;
+
+	rcu_read_lock();
+	sl = rcu_dereference(tty->disc_data);
+	if (!sl)
+		goto out;
 
 	schedule_work(&sl->tx_work);
+out:
+	rcu_read_unlock();
 }
 
 static void sl_tx_timeout(struct net_device *dev)
@@ -887,10 +894,11 @@ static void slip_close(struct tty_struct
 		return;
 
 	spin_lock_bh(&sl->lock);
-	tty->disc_data = NULL;
+	rcu_assign_pointer(tty->disc_data, NULL);
 	sl->tty = NULL;
 	spin_unlock_bh(&sl->lock);
 
+	synchronize_rcu();
 	flush_work(&sl->tx_work);
 
 	/* VSV = very important to remove timers */
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/usb/lan78xx.c linux-libre-4.9.212-gnu/drivers/net/usb/lan78xx.c
--- linux-libre-4.9.211-gnu/drivers/net/usb/lan78xx.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/usb/lan78xx.c	2020-01-29 04:24:41.000000000 -0500
@@ -30,6 +30,7 @@
 #include <linux/ipv6.h>
 #include <linux/mdio.h>
 #include <net/ip6_checksum.h>
+#include <net/vxlan.h>
 #include <linux/microchipphy.h>
 #include <linux/of_net.h>
 #include "lan78xx.h"
@@ -3291,6 +3292,19 @@ static void lan78xx_tx_timeout(struct ne
 	tasklet_schedule(&dev->bh);
 }
 
+static netdev_features_t lan78xx_features_check(struct sk_buff *skb,
+						struct net_device *netdev,
+						netdev_features_t features)
+{
+	if (skb->len + TX_OVERHEAD > MAX_SINGLE_PACKET_SIZE)
+		features &= ~NETIF_F_GSO_MASK;
+
+	features = vlan_features_check(skb, features);
+	features = vxlan_features_check(skb, features);
+
+	return features;
+}
+
 static const struct net_device_ops lan78xx_netdev_ops = {
 	.ndo_open		= lan78xx_open,
 	.ndo_stop		= lan78xx_stop,
@@ -3304,6 +3318,7 @@ static const struct net_device_ops lan78
 	.ndo_set_features	= lan78xx_set_features,
 	.ndo_vlan_rx_add_vid	= lan78xx_vlan_rx_add_vid,
 	.ndo_vlan_rx_kill_vid	= lan78xx_vlan_rx_kill_vid,
+	.ndo_features_check	= lan78xx_features_check,
 };
 
 static void lan78xx_stat_monitor(unsigned long param)
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/wireless/ath/ath9k/dynack.c linux-libre-4.9.212-gnu/drivers/net/wireless/ath/ath9k/dynack.c
--- linux-libre-4.9.211-gnu/drivers/net/wireless/ath/ath9k/dynack.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/wireless/ath/ath9k/dynack.c	2020-01-29 04:24:41.000000000 -0500
@@ -300,9 +300,9 @@ void ath_dynack_node_init(struct ath_hw
 
 	an->ackto = ackto;
 
-	spin_lock(&da->qlock);
+	spin_lock_bh(&da->qlock);
 	list_add_tail(&an->list, &da->nodes);
-	spin_unlock(&da->qlock);
+	spin_unlock_bh(&da->qlock);
 }
 EXPORT_SYMBOL(ath_dynack_node_init);
 
@@ -316,9 +316,9 @@ void ath_dynack_node_deinit(struct ath_h
 {
 	struct ath_dynack *da = &ah->dynack;
 
-	spin_lock(&da->qlock);
+	spin_lock_bh(&da->qlock);
 	list_del(&an->list);
-	spin_unlock(&da->qlock);
+	spin_unlock_bh(&da->qlock);
 }
 EXPORT_SYMBOL(ath_dynack_node_deinit);
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/wireless/intel/iwlwifi/mvm/fw.c linux-libre-4.9.212-gnu/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
--- linux-libre-4.9.211-gnu/drivers/net/wireless/intel/iwlwifi/mvm/fw.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/wireless/intel/iwlwifi/mvm/fw.c	2020-01-29 04:24:41.000000000 -0500
@@ -106,12 +106,12 @@ static int iwl_send_rss_cfg_cmd(struct i
 	int i;
 	struct iwl_rss_config_cmd cmd = {
 		.flags = cpu_to_le32(IWL_RSS_ENABLE),
-		.hash_mask = IWL_RSS_HASH_TYPE_IPV4_TCP |
-			     IWL_RSS_HASH_TYPE_IPV4_UDP |
-			     IWL_RSS_HASH_TYPE_IPV4_PAYLOAD |
-			     IWL_RSS_HASH_TYPE_IPV6_TCP |
-			     IWL_RSS_HASH_TYPE_IPV6_UDP |
-			     IWL_RSS_HASH_TYPE_IPV6_PAYLOAD,
+		.hash_mask = BIT(IWL_RSS_HASH_TYPE_IPV4_TCP) |
+			     BIT(IWL_RSS_HASH_TYPE_IPV4_UDP) |
+			     BIT(IWL_RSS_HASH_TYPE_IPV4_PAYLOAD) |
+			     BIT(IWL_RSS_HASH_TYPE_IPV6_TCP) |
+			     BIT(IWL_RSS_HASH_TYPE_IPV6_UDP) |
+			     BIT(IWL_RSS_HASH_TYPE_IPV6_PAYLOAD),
 	};
 
 	if (mvm->trans->num_rx_queues == 1)
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c linux-libre-4.9.212-gnu/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
--- linux-libre-4.9.211-gnu/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c	2020-01-29 04:24:41.000000000 -0500
@@ -810,12 +810,12 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *
 		bool toggle_bit = phy_info & IWL_RX_MPDU_PHY_AMPDU_TOGGLE;
 
 		rx_status->flag |= RX_FLAG_AMPDU_DETAILS;
-		rx_status->ampdu_reference = mvm->ampdu_ref;
 		/* toggle is switched whenever new aggregation starts */
 		if (toggle_bit != mvm->ampdu_toggle) {
 			mvm->ampdu_ref++;
 			mvm->ampdu_toggle = toggle_bit;
 		}
+		rx_status->ampdu_reference = mvm->ampdu_ref;
 	}
 
 	rcu_read_lock();
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/wireless/marvell/libertas/cfg.c linux-libre-4.9.212-gnu/drivers/net/wireless/marvell/libertas/cfg.c
--- linux-libre-4.9.211-gnu/drivers/net/wireless/marvell/libertas/cfg.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/wireless/marvell/libertas/cfg.c	2020-01-29 04:24:41.000000000 -0500
@@ -272,6 +272,10 @@ add_ie_rates(u8 *tlv, const u8 *ie, int
 	int hw, ap, ap_max = ie[1];
 	u8 hw_rate;
 
+	if (ap_max > MAX_RATES) {
+		lbs_deb_assoc("invalid rates\n");
+		return tlv;
+	}
 	/* Advance past IE header */
 	ie += 2;
 
@@ -1789,6 +1793,9 @@ static int lbs_ibss_join_existing(struct
 	struct cmd_ds_802_11_ad_hoc_join cmd;
 	u8 preamble = RADIO_PREAMBLE_SHORT;
 	int ret = 0;
+	int hw, i;
+	u8 rates_max;
+	u8 *rates;
 
 	lbs_deb_enter(LBS_DEB_CFG80211);
 
@@ -1849,9 +1856,12 @@ static int lbs_ibss_join_existing(struct
 	if (!rates_eid) {
 		lbs_add_rates(cmd.bss.rates);
 	} else {
-		int hw, i;
-		u8 rates_max = rates_eid[1];
-		u8 *rates = cmd.bss.rates;
+		rates_max = rates_eid[1];
+		if (rates_max > MAX_RATES) {
+			lbs_deb_join("invalid rates");
+			goto out;
+		}
+		rates = cmd.bss.rates;
 		for (hw = 0; hw < ARRAY_SIZE(lbs_rates); hw++) {
 			u8 hw_rate = lbs_rates[hw].bitrate / 5;
 			for (i = 0; i < rates_max; i++) {
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/wireless/marvell/libertas_tf/cmd.c linux-libre-4.9.212-gnu/drivers/net/wireless/marvell/libertas_tf/cmd.c
--- linux-libre-4.9.211-gnu/drivers/net/wireless/marvell/libertas_tf/cmd.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/wireless/marvell/libertas_tf/cmd.c	2020-01-29 04:24:41.000000000 -0500
@@ -69,7 +69,7 @@ static void lbtf_geo_init(struct lbtf_pr
 			break;
 		}
 
-	for (ch = priv->range.start; ch < priv->range.end; ch++)
+	for (ch = range->start; ch < range->end; ch++)
 		priv->channels[CHAN_TO_IDX(ch)].flags = 0;
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/net/wireless/mediatek/mt7601u/phy.c linux-libre-4.9.212-gnu/drivers/net/wireless/mediatek/mt7601u/phy.c
--- linux-libre-4.9.211-gnu/drivers/net/wireless/mediatek/mt7601u/phy.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/net/wireless/mediatek/mt7601u/phy.c	2020-01-29 04:24:41.000000000 -0500
@@ -221,7 +221,7 @@ int mt7601u_wait_bbp_ready(struct mt7601
 
 	do {
 		val = mt7601u_bbp_rr(dev, MT_BBP_REG_VERSION);
-		if (val && ~val)
+		if (val && val != 0xff)
 			break;
 	} while (--i);
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/nvme/host/pci.c linux-libre-4.9.212-gnu/drivers/nvme/host/pci.c
--- linux-libre-4.9.211-gnu/drivers/nvme/host/pci.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/nvme/host/pci.c	2020-01-29 04:24:41.000000000 -0500
@@ -1863,7 +1863,7 @@ static int nvme_pci_reg_write32(struct n
 
 static int nvme_pci_reg_read64(struct nvme_ctrl *ctrl, u32 off, u64 *val)
 {
-	*val = readq(to_nvme_dev(ctrl)->bar + off);
+	*val = lo_hi_readq(to_nvme_dev(ctrl)->bar + off);
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/of/of_mdio.c linux-libre-4.9.212-gnu/drivers/of/of_mdio.c
--- linux-libre-4.9.211-gnu/drivers/of/of_mdio.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/of/of_mdio.c	2020-01-29 04:24:41.000000000 -0500
@@ -353,7 +353,7 @@ struct phy_device *of_phy_get_and_connec
 	struct phy_device *phy;
 
 	iface = of_get_phy_mode(np);
-	if (iface < 0)
+	if ((int)iface < 0)
 		return NULL;
 
 	phy_np = of_parse_phandle(np, "phy-handle", 0);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/pinctrl/sh-pfc/pfc-emev2.c linux-libre-4.9.212-gnu/drivers/pinctrl/sh-pfc/pfc-emev2.c
--- linux-libre-4.9.211-gnu/drivers/pinctrl/sh-pfc/pfc-emev2.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/pinctrl/sh-pfc/pfc-emev2.c	2020-01-29 04:24:41.000000000 -0500
@@ -1263,6 +1263,14 @@ static const char * const dtv_groups[] =
 	"dtv_b",
 };
 
+static const char * const err_rst_reqb_groups[] = {
+	"err_rst_reqb",
+};
+
+static const char * const ext_clki_groups[] = {
+	"ext_clki",
+};
+
 static const char * const iic0_groups[] = {
 	"iic0",
 };
@@ -1285,6 +1293,10 @@ static const char * const lcd_groups[] =
 	"yuv3",
 };
 
+static const char * const lowpwr_groups[] = {
+	"lowpwr",
+};
+
 static const char * const ntsc_groups[] = {
 	"ntsc_clk",
 	"ntsc_data",
@@ -1298,6 +1310,10 @@ static const char * const pwm1_groups[]
 	"pwm1",
 };
 
+static const char * const ref_clko_groups[] = {
+	"ref_clko",
+};
+
 static const char * const sd_groups[] = {
 	"sd_cki",
 };
@@ -1391,13 +1407,17 @@ static const struct sh_pfc_function pinm
 	SH_PFC_FUNCTION(cam),
 	SH_PFC_FUNCTION(cf),
 	SH_PFC_FUNCTION(dtv),
+	SH_PFC_FUNCTION(err_rst_reqb),
+	SH_PFC_FUNCTION(ext_clki),
 	SH_PFC_FUNCTION(iic0),
 	SH_PFC_FUNCTION(iic1),
 	SH_PFC_FUNCTION(jtag),
 	SH_PFC_FUNCTION(lcd),
+	SH_PFC_FUNCTION(lowpwr),
 	SH_PFC_FUNCTION(ntsc),
 	SH_PFC_FUNCTION(pwm0),
 	SH_PFC_FUNCTION(pwm1),
+	SH_PFC_FUNCTION(ref_clko),
 	SH_PFC_FUNCTION(sd),
 	SH_PFC_FUNCTION(sdi0),
 	SH_PFC_FUNCTION(sdi1),
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/pinctrl/sh-pfc/pfc-r8a7740.c linux-libre-4.9.212-gnu/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
--- linux-libre-4.9.211-gnu/drivers/pinctrl/sh-pfc/pfc-r8a7740.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/pinctrl/sh-pfc/pfc-r8a7740.c	2020-01-29 04:24:41.000000000 -0500
@@ -1982,7 +1982,7 @@ static const unsigned int gether_gmii_pi
 	 */
 	185, 186, 187, 188, 189, 190, 191, 192, 174, 161, 204,
 	171, 170, 169, 168, 167, 166, 173, 172, 176, 184, 183, 203,
-	205, 163, 206, 207,
+	205, 163, 206, 207, 158,
 };
 static const unsigned int gether_gmii_mux[] = {
 	ET_ERXD0_MARK, ET_ERXD1_MARK, ET_ERXD2_MARK, ET_ERXD3_MARK,
@@ -2154,6 +2154,7 @@ static const unsigned int lcd0_data24_1_
 	LCD0_D0_MARK, LCD0_D1_MARK, LCD0_D2_MARK, LCD0_D3_MARK,
 	LCD0_D4_MARK, LCD0_D5_MARK, LCD0_D6_MARK, LCD0_D7_MARK,
 	LCD0_D8_MARK, LCD0_D9_MARK, LCD0_D10_MARK, LCD0_D11_MARK,
+	LCD0_D12_MARK, LCD0_D13_MARK, LCD0_D14_MARK, LCD0_D15_MARK,
 	LCD0_D16_MARK, LCD0_D17_MARK, LCD0_D18_PORT163_MARK,
 	LCD0_D19_PORT162_MARK, LCD0_D20_PORT161_MARK, LCD0_D21_PORT158_MARK,
 	LCD0_D22_PORT160_MARK, LCD0_D23_PORT159_MARK,
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/pinctrl/sh-pfc/pfc-r8a7791.c linux-libre-4.9.212-gnu/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
--- linux-libre-4.9.211-gnu/drivers/pinctrl/sh-pfc/pfc-r8a7791.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/pinctrl/sh-pfc/pfc-r8a7791.c	2020-01-29 04:24:41.000000000 -0500
@@ -3136,8 +3136,7 @@ static const unsigned int qspi_data4_b_p
 	RCAR_GP_PIN(6, 4),
 };
 static const unsigned int qspi_data4_b_mux[] = {
-	SPCLK_B_MARK, MOSI_IO0_B_MARK, MISO_IO1_B_MARK,
-	IO2_B_MARK, IO3_B_MARK, SSL_B_MARK,
+	MOSI_IO0_B_MARK, MISO_IO1_B_MARK, IO2_B_MARK, IO3_B_MARK,
 };
 /* - SCIF0 ------------------------------------------------------------------ */
 static const unsigned int scif0_data_pins[] = {
@@ -4265,17 +4264,14 @@ static const unsigned int vin1_b_data18_
 };
 static const unsigned int vin1_b_data18_mux[] = {
 	/* B */
-	VI1_DATA0_B_MARK, VI1_DATA1_B_MARK,
 	VI1_DATA2_B_MARK, VI1_DATA3_B_MARK,
 	VI1_DATA4_B_MARK, VI1_DATA5_B_MARK,
 	VI1_DATA6_B_MARK, VI1_DATA7_B_MARK,
 	/* G */
-	VI1_G0_B_MARK, VI1_G1_B_MARK,
 	VI1_G2_B_MARK, VI1_G3_B_MARK,
 	VI1_G4_B_MARK, VI1_G5_B_MARK,
 	VI1_G6_B_MARK, VI1_G7_B_MARK,
 	/* R */
-	VI1_R0_B_MARK, VI1_R1_B_MARK,
 	VI1_R2_B_MARK, VI1_R3_B_MARK,
 	VI1_R4_B_MARK, VI1_R5_B_MARK,
 	VI1_R6_B_MARK, VI1_R7_B_MARK,
@@ -5082,7 +5078,7 @@ static const char * const scifb2_groups[
 	"scifb2_data_b",
 	"scifb2_clk_b",
 	"scifb2_ctrl_b",
-	"scifb0_data_c",
+	"scifb2_data_c",
 	"scifb2_clk_c",
 	"scifb2_data_d",
 };
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/pinctrl/sh-pfc/pfc-r8a7792.c linux-libre-4.9.212-gnu/drivers/pinctrl/sh-pfc/pfc-r8a7792.c
--- linux-libre-4.9.211-gnu/drivers/pinctrl/sh-pfc/pfc-r8a7792.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/pinctrl/sh-pfc/pfc-r8a7792.c	2020-01-29 04:24:41.000000000 -0500
@@ -1863,6 +1863,7 @@ static const char * const vin1_groups[]
 	"vin1_data8",
 	"vin1_data24_b",
 	"vin1_data20_b",
+	"vin1_data18_b",
 	"vin1_data16_b",
 	"vin1_sync",
 	"vin1_field",
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/pinctrl/sh-pfc/pfc-r8a7794.c linux-libre-4.9.212-gnu/drivers/pinctrl/sh-pfc/pfc-r8a7794.c
--- linux-libre-4.9.211-gnu/drivers/pinctrl/sh-pfc/pfc-r8a7794.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/pinctrl/sh-pfc/pfc-r8a7794.c	2020-01-29 04:24:41.000000000 -0500
@@ -4826,7 +4826,7 @@ static const struct pinmux_cfg_reg pinmu
 		FN_AVB_MDC, FN_SSI_SDATA6_B, 0, 0, }
 	},
 	{ PINMUX_CFG_REG_VAR("IPSR9", 0xE6060044, 32,
-			     1, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, 3) {
+			     1, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3) {
 		/* IP9_31 [1] */
 		0, 0,
 		/* IP9_30_28 [3] */
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/pinctrl/sh-pfc/pfc-sh7269.c linux-libre-4.9.212-gnu/drivers/pinctrl/sh-pfc/pfc-sh7269.c
--- linux-libre-4.9.211-gnu/drivers/pinctrl/sh-pfc/pfc-sh7269.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/pinctrl/sh-pfc/pfc-sh7269.c	2020-01-29 04:24:41.000000000 -0500
@@ -2119,7 +2119,7 @@ static const struct pinmux_cfg_reg pinmu
 	},
 
 	{ PINMUX_CFG_REG("PCIOR0", 0xfffe3852, 16, 1) {
-		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 		PC8_IN, PC8_OUT,
 		PC7_IN, PC7_OUT,
 		PC6_IN, PC6_OUT,
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/pinctrl/sh-pfc/pfc-sh73a0.c linux-libre-4.9.212-gnu/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
--- linux-libre-4.9.211-gnu/drivers/pinctrl/sh-pfc/pfc-sh73a0.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/pinctrl/sh-pfc/pfc-sh73a0.c	2020-01-29 04:24:41.000000000 -0500
@@ -3086,6 +3086,7 @@ static const unsigned int tpu4_to2_mux[]
 };
 static const unsigned int tpu4_to3_pins[] = {
 	/* TO */
+	PIN_NUMBER(6, 26),
 };
 static const unsigned int tpu4_to3_mux[] = {
 	TPU4TO3_MARK,
@@ -3366,7 +3367,8 @@ static const char * const fsic_groups[]
 	"fsic_sclk_out",
 	"fsic_data_in",
 	"fsic_data_out",
-	"fsic_spdif",
+	"fsic_spdif_0",
+	"fsic_spdif_1",
 };
 
 static const char * const fsid_groups[] = {
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/pinctrl/sh-pfc/pfc-sh7734.c linux-libre-4.9.212-gnu/drivers/pinctrl/sh-pfc/pfc-sh7734.c
--- linux-libre-4.9.211-gnu/drivers/pinctrl/sh-pfc/pfc-sh7734.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/pinctrl/sh-pfc/pfc-sh7734.c	2020-01-29 04:24:41.000000000 -0500
@@ -2231,13 +2231,13 @@ static const struct pinmux_cfg_reg pinmu
 		FN_LCD_CL1_B, 0, 0,
 	    /* IP10_5_3 [3] */
 		FN_SSI_WS23, FN_VI1_5_B, FN_TX1_D, FN_HSCK0_C, FN_FALE_B,
-		FN_LCD_DON_B, 0, 0, 0,
+		FN_LCD_DON_B, 0, 0,
 	    /* IP10_2_0 [3] */
 		FN_SSI_SCK23, FN_VI1_4_B, FN_RX1_D, FN_FCLE_B,
 		FN_LCD_DATA15_B, 0, 0, 0 }
 	},
 	{ PINMUX_CFG_REG_VAR("IPSR11", 0xFFFC0048, 32,
-			3, 1, 2, 2, 2, 3, 3, 1, 2, 3, 3, 1, 1, 1, 1) {
+			3, 1, 2, 3, 2, 2, 3, 3, 1, 2, 3, 3, 1, 1, 1, 1) {
 	    /* IP11_31_29 [3] */
 	    0, 0, 0, 0, 0, 0, 0, 0,
 	    /* IP11_28 [1] */
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/platform/mips/cpu_hwmon.c linux-libre-4.9.212-gnu/drivers/platform/mips/cpu_hwmon.c
--- linux-libre-4.9.211-gnu/drivers/platform/mips/cpu_hwmon.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/platform/mips/cpu_hwmon.c	2020-01-29 04:24:41.000000000 -0500
@@ -155,7 +155,7 @@ static int __init loongson_hwmon_init(vo
 
 	cpu_hwmon_dev = hwmon_device_register(NULL);
 	if (IS_ERR(cpu_hwmon_dev)) {
-		ret = -ENOMEM;
+		ret = PTR_ERR(cpu_hwmon_dev);
 		pr_err("hwmon_device_register fail!\n");
 		goto fail_hwmon_device_register;
 	}
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/platform/x86/alienware-wmi.c linux-libre-4.9.212-gnu/drivers/platform/x86/alienware-wmi.c
--- linux-libre-4.9.211-gnu/drivers/platform/x86/alienware-wmi.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/platform/x86/alienware-wmi.c	2020-01-29 04:24:41.000000000 -0500
@@ -570,7 +570,7 @@ static ssize_t show_hdmi_source(struct d
 			return scnprintf(buf, PAGE_SIZE,
 					 "input [gpu] unknown\n");
 	}
-	pr_err("alienware-wmi: unknown HDMI source status: %d\n", out_data);
+	pr_err("alienware-wmi: unknown HDMI source status: %u\n", status);
 	return scnprintf(buf, PAGE_SIZE, "input gpu [unknown]\n");
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/power/supply/power_supply_core.c linux-libre-4.9.212-gnu/drivers/power/supply/power_supply_core.c
--- linux-libre-4.9.211-gnu/drivers/power/supply/power_supply_core.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/power/supply/power_supply_core.c	2020-01-29 04:24:41.000000000 -0500
@@ -764,14 +764,14 @@ __power_supply_register(struct device *p
 	}
 
 	spin_lock_init(&psy->changed_lock);
-	rc = device_init_wakeup(dev, ws);
-	if (rc)
-		goto wakeup_init_failed;
-
 	rc = device_add(dev);
 	if (rc)
 		goto device_add_failed;
 
+	rc = device_init_wakeup(dev, ws);
+	if (rc)
+		goto wakeup_init_failed;
+
 	rc = psy_register_thermal(psy);
 	if (rc)
 		goto register_thermal_failed;
@@ -808,8 +808,8 @@ register_cooler_failed:
 	psy_unregister_thermal(psy);
 register_thermal_failed:
 	device_del(dev);
-device_add_failed:
 wakeup_init_failed:
+device_add_failed:
 check_supplies_failed:
 dev_set_name_failed:
 	put_device(dev);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/pwm/pwm-lpss.c linux-libre-4.9.212-gnu/drivers/pwm/pwm-lpss.c
--- linux-libre-4.9.211-gnu/drivers/pwm/pwm-lpss.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/pwm/pwm-lpss.c	2020-01-29 04:24:41.000000000 -0500
@@ -205,6 +205,12 @@ EXPORT_SYMBOL_GPL(pwm_lpss_probe);
 
 int pwm_lpss_remove(struct pwm_lpss_chip *lpwm)
 {
+	int i;
+
+	for (i = 0; i < lpwm->info->npwm; i++) {
+		if (pwm_is_enabled(&lpwm->chip.pwms[i]))
+			pm_runtime_put(lpwm->chip.dev);
+	}
 	return pwmchip_remove(&lpwm->chip);
 }
 EXPORT_SYMBOL_GPL(pwm_lpss_remove);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/pwm/pwm-meson.c linux-libre-4.9.212-gnu/drivers/pwm/pwm-meson.c
--- linux-libre-4.9.211-gnu/drivers/pwm/pwm-meson.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/pwm/pwm-meson.c	2020-01-29 04:24:41.000000000 -0500
@@ -320,11 +320,6 @@ static int meson_pwm_apply(struct pwm_ch
 	if (state->period != channel->state.period ||
 	    state->duty_cycle != channel->state.duty_cycle ||
 	    state->polarity != channel->state.polarity) {
-		if (channel->state.enabled) {
-			meson_pwm_disable(meson, pwm->hwpwm);
-			channel->state.enabled = false;
-		}
-
 		if (state->polarity != channel->state.polarity) {
 			if (state->polarity == PWM_POLARITY_NORMAL)
 				meson->inverter_mask |= BIT(pwm->hwpwm);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/rapidio/rio_cm.c linux-libre-4.9.212-gnu/drivers/rapidio/rio_cm.c
--- linux-libre-4.9.211-gnu/drivers/rapidio/rio_cm.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/rapidio/rio_cm.c	2020-01-29 04:24:41.000000000 -0500
@@ -1215,7 +1215,9 @@ static int riocm_ch_listen(u16 ch_id)
 	riocm_debug(CHOP, "(ch_%d)", ch_id);
 
 	ch = riocm_get_channel(ch_id);
-	if (!ch || !riocm_cmp_exch(ch, RIO_CM_CHAN_BOUND, RIO_CM_LISTEN))
+	if (!ch)
+		return -EINVAL;
+	if (!riocm_cmp_exch(ch, RIO_CM_CHAN_BOUND, RIO_CM_LISTEN))
 		ret = -EINVAL;
 	riocm_put_channel(ch);
 	return ret;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/regulator/pv88060-regulator.c linux-libre-4.9.212-gnu/drivers/regulator/pv88060-regulator.c
--- linux-libre-4.9.211-gnu/drivers/regulator/pv88060-regulator.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/regulator/pv88060-regulator.c	2020-01-29 04:24:41.000000000 -0500
@@ -135,7 +135,7 @@ static int pv88060_set_current_limit(str
 	int i;
 
 	/* search for closest to maximum */
-	for (i = info->n_current_limits; i >= 0; i--) {
+	for (i = info->n_current_limits - 1; i >= 0; i--) {
 		if (min <= info->current_limits[i]
 			&& max >= info->current_limits[i]) {
 			return regmap_update_bits(rdev->regmap,
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/regulator/pv88080-regulator.c linux-libre-4.9.212-gnu/drivers/regulator/pv88080-regulator.c
--- linux-libre-4.9.211-gnu/drivers/regulator/pv88080-regulator.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/regulator/pv88080-regulator.c	2020-01-29 04:24:41.000000000 -0500
@@ -279,7 +279,7 @@ static int pv88080_set_current_limit(str
 	int i;
 
 	/* search for closest to maximum */
-	for (i = info->n_current_limits; i >= 0; i--) {
+	for (i = info->n_current_limits - 1; i >= 0; i--) {
 		if (min <= info->current_limits[i]
 			&& max >= info->current_limits[i]) {
 				return regmap_update_bits(rdev->regmap,
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/regulator/pv88090-regulator.c linux-libre-4.9.212-gnu/drivers/regulator/pv88090-regulator.c
--- linux-libre-4.9.211-gnu/drivers/regulator/pv88090-regulator.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/regulator/pv88090-regulator.c	2020-01-29 04:24:41.000000000 -0500
@@ -157,7 +157,7 @@ static int pv88090_set_current_limit(str
 	int i;
 
 	/* search for closest to maximum */
-	for (i = info->n_current_limits; i >= 0; i--) {
+	for (i = info->n_current_limits - 1; i >= 0; i--) {
 		if (min <= info->current_limits[i]
 			&& max >= info->current_limits[i]) {
 			return regmap_update_bits(rdev->regmap,
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/regulator/tps65086-regulator.c linux-libre-4.9.212-gnu/drivers/regulator/tps65086-regulator.c
--- linux-libre-4.9.211-gnu/drivers/regulator/tps65086-regulator.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/regulator/tps65086-regulator.c	2020-01-29 04:24:41.000000000 -0500
@@ -89,8 +89,8 @@ static const struct regulator_linear_ran
 static const struct regulator_linear_range tps65086_ldoa1_ranges[] = {
 	REGULATOR_LINEAR_RANGE(1350000, 0x0, 0x0, 0),
 	REGULATOR_LINEAR_RANGE(1500000, 0x1, 0x7, 100000),
-	REGULATOR_LINEAR_RANGE(2300000, 0x8, 0xA, 100000),
-	REGULATOR_LINEAR_RANGE(2700000, 0xB, 0xD, 150000),
+	REGULATOR_LINEAR_RANGE(2300000, 0x8, 0xB, 100000),
+	REGULATOR_LINEAR_RANGE(2850000, 0xC, 0xD, 150000),
 	REGULATOR_LINEAR_RANGE(3300000, 0xE, 0xE, 0),
 };
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/regulator/wm831x-dcdc.c linux-libre-4.9.212-gnu/drivers/regulator/wm831x-dcdc.c
--- linux-libre-4.9.211-gnu/drivers/regulator/wm831x-dcdc.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/regulator/wm831x-dcdc.c	2020-01-29 04:24:41.000000000 -0500
@@ -327,8 +327,8 @@ static int wm831x_buckv_get_voltage_sel(
 }
 
 /* Current limit options */
-static u16 wm831x_dcdc_ilim[] = {
-	125, 250, 375, 500, 625, 750, 875, 1000
+static const unsigned int wm831x_dcdc_ilim[] = {
+	125000, 250000, 375000, 500000, 625000, 750000, 875000, 1000000
 };
 
 static int wm831x_buckv_set_current_limit(struct regulator_dev *rdev,
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/rtc/rtc-88pm80x.c linux-libre-4.9.212-gnu/drivers/rtc/rtc-88pm80x.c
--- linux-libre-4.9.211-gnu/drivers/rtc/rtc-88pm80x.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/rtc/rtc-88pm80x.c	2020-01-29 04:24:41.000000000 -0500
@@ -116,12 +116,14 @@ static int pm80x_rtc_read_time(struct de
 	unsigned char buf[4];
 	unsigned long ticks, base, data;
 	regmap_raw_read(info->map, PM800_RTC_EXPIRE2_1, buf, 4);
-	base = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
+	base = ((unsigned long)buf[3] << 24) | (buf[2] << 16) |
+		(buf[1] << 8) | buf[0];
 	dev_dbg(info->dev, "%x-%x-%x-%x\n", buf[0], buf[1], buf[2], buf[3]);
 
 	/* load 32-bit read-only counter */
 	regmap_raw_read(info->map, PM800_RTC_COUNTER1, buf, 4);
-	data = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
+	data = ((unsigned long)buf[3] << 24) | (buf[2] << 16) |
+		(buf[1] << 8) | buf[0];
 	ticks = base + data;
 	dev_dbg(info->dev, "get base:0x%lx, RO count:0x%lx, ticks:0x%lx\n",
 		base, data, ticks);
@@ -144,7 +146,8 @@ static int pm80x_rtc_set_time(struct dev
 
 	/* load 32-bit read-only counter */
 	regmap_raw_read(info->map, PM800_RTC_COUNTER1, buf, 4);
-	data = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
+	data = ((unsigned long)buf[3] << 24) | (buf[2] << 16) |
+		(buf[1] << 8) | buf[0];
 	base = ticks - data;
 	dev_dbg(info->dev, "set base:0x%lx, RO count:0x%lx, ticks:0x%lx\n",
 		base, data, ticks);
@@ -165,11 +168,13 @@ static int pm80x_rtc_read_alarm(struct d
 	int ret;
 
 	regmap_raw_read(info->map, PM800_RTC_EXPIRE2_1, buf, 4);
-	base = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
+	base = ((unsigned long)buf[3] << 24) | (buf[2] << 16) |
+		(buf[1] << 8) | buf[0];
 	dev_dbg(info->dev, "%x-%x-%x-%x\n", buf[0], buf[1], buf[2], buf[3]);
 
 	regmap_raw_read(info->map, PM800_RTC_EXPIRE1_1, buf, 4);
-	data = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
+	data = ((unsigned long)buf[3] << 24) | (buf[2] << 16) |
+		(buf[1] << 8) | buf[0];
 	ticks = base + data;
 	dev_dbg(info->dev, "get base:0x%lx, RO count:0x%lx, ticks:0x%lx\n",
 		base, data, ticks);
@@ -192,12 +197,14 @@ static int pm80x_rtc_set_alarm(struct de
 	regmap_update_bits(info->map, PM800_RTC_CONTROL, PM800_ALARM1_EN, 0);
 
 	regmap_raw_read(info->map, PM800_RTC_EXPIRE2_1, buf, 4);
-	base = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
+	base = ((unsigned long)buf[3] << 24) | (buf[2] << 16) |
+		(buf[1] << 8) | buf[0];
 	dev_dbg(info->dev, "%x-%x-%x-%x\n", buf[0], buf[1], buf[2], buf[3]);
 
 	/* load 32-bit read-only counter */
 	regmap_raw_read(info->map, PM800_RTC_COUNTER1, buf, 4);
-	data = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
+	data = ((unsigned long)buf[3] << 24) | (buf[2] << 16) |
+		(buf[1] << 8) | buf[0];
 	ticks = base + data;
 	dev_dbg(info->dev, "get base:0x%lx, RO count:0x%lx, ticks:0x%lx\n",
 		base, data, ticks);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/rtc/rtc-88pm860x.c linux-libre-4.9.212-gnu/drivers/rtc/rtc-88pm860x.c
--- linux-libre-4.9.211-gnu/drivers/rtc/rtc-88pm860x.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/rtc/rtc-88pm860x.c	2020-01-29 04:24:41.000000000 -0500
@@ -115,11 +115,13 @@ static int pm860x_rtc_read_time(struct d
 	pm860x_page_bulk_read(info->i2c, REG0_ADDR, 8, buf);
 	dev_dbg(info->dev, "%x-%x-%x-%x-%x-%x-%x-%x\n", buf[0], buf[1],
 		buf[2], buf[3], buf[4], buf[5], buf[6], buf[7]);
-	base = (buf[1] << 24) | (buf[3] << 16) | (buf[5] << 8) | buf[7];
+	base = ((unsigned long)buf[1] << 24) | (buf[3] << 16) |
+		(buf[5] << 8) | buf[7];
 
 	/* load 32-bit read-only counter */
 	pm860x_bulk_read(info->i2c, PM8607_RTC_COUNTER1, 4, buf);
-	data = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
+	data = ((unsigned long)buf[3] << 24) | (buf[2] << 16) |
+		(buf[1] << 8) | buf[0];
 	ticks = base + data;
 	dev_dbg(info->dev, "get base:0x%lx, RO count:0x%lx, ticks:0x%lx\n",
 		base, data, ticks);
@@ -145,7 +147,8 @@ static int pm860x_rtc_set_time(struct de
 
 	/* load 32-bit read-only counter */
 	pm860x_bulk_read(info->i2c, PM8607_RTC_COUNTER1, 4, buf);
-	data = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
+	data = ((unsigned long)buf[3] << 24) | (buf[2] << 16) |
+		(buf[1] << 8) | buf[0];
 	base = ticks - data;
 	dev_dbg(info->dev, "set base:0x%lx, RO count:0x%lx, ticks:0x%lx\n",
 		base, data, ticks);
@@ -170,10 +173,12 @@ static int pm860x_rtc_read_alarm(struct
 	pm860x_page_bulk_read(info->i2c, REG0_ADDR, 8, buf);
 	dev_dbg(info->dev, "%x-%x-%x-%x-%x-%x-%x-%x\n", buf[0], buf[1],
 		buf[2], buf[3], buf[4], buf[5], buf[6], buf[7]);
-	base = (buf[1] << 24) | (buf[3] << 16) | (buf[5] << 8) | buf[7];
+	base = ((unsigned long)buf[1] << 24) | (buf[3] << 16) |
+		(buf[5] << 8) | buf[7];
 
 	pm860x_bulk_read(info->i2c, PM8607_RTC_EXPIRE1, 4, buf);
-	data = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
+	data = ((unsigned long)buf[3] << 24) | (buf[2] << 16) |
+		(buf[1] << 8) | buf[0];
 	ticks = base + data;
 	dev_dbg(info->dev, "get base:0x%lx, RO count:0x%lx, ticks:0x%lx\n",
 		base, data, ticks);
@@ -198,11 +203,13 @@ static int pm860x_rtc_set_alarm(struct d
 	pm860x_page_bulk_read(info->i2c, REG0_ADDR, 8, buf);
 	dev_dbg(info->dev, "%x-%x-%x-%x-%x-%x-%x-%x\n", buf[0], buf[1],
 		buf[2], buf[3], buf[4], buf[5], buf[6], buf[7]);
-	base = (buf[1] << 24) | (buf[3] << 16) | (buf[5] << 8) | buf[7];
+	base = ((unsigned long)buf[1] << 24) | (buf[3] << 16) |
+		(buf[5] << 8) | buf[7];
 
 	/* load 32-bit read-only counter */
 	pm860x_bulk_read(info->i2c, PM8607_RTC_COUNTER1, 4, buf);
-	data = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
+	data = ((unsigned long)buf[3] << 24) | (buf[2] << 16) |
+		(buf[1] << 8) | buf[0];
 	ticks = base + data;
 	dev_dbg(info->dev, "get base:0x%lx, RO count:0x%lx, ticks:0x%lx\n",
 		base, data, ticks);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/rtc/rtc-ds1672.c linux-libre-4.9.212-gnu/drivers/rtc/rtc-ds1672.c
--- linux-libre-4.9.211-gnu/drivers/rtc/rtc-ds1672.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/rtc/rtc-ds1672.c	2020-01-29 04:24:41.000000000 -0500
@@ -58,7 +58,8 @@ static int ds1672_get_datetime(struct i2
 		"%s: raw read data - counters=%02x,%02x,%02x,%02x\n",
 		__func__, buf[0], buf[1], buf[2], buf[3]);
 
-	time = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
+	time = ((unsigned long)buf[3] << 24) | (buf[2] << 16) |
+	       (buf[1] << 8) | buf[0];
 
 	rtc_time_to_tm(time, tm);
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/rtc/rtc-mc146818-lib.c linux-libre-4.9.212-gnu/drivers/rtc/rtc-mc146818-lib.c
--- linux-libre-4.9.211-gnu/drivers/rtc/rtc-mc146818-lib.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/rtc/rtc-mc146818-lib.c	2020-01-29 04:24:41.000000000 -0500
@@ -82,7 +82,7 @@ unsigned int mc146818_get_time(struct rt
 	time->tm_year += real_year - 72;
 #endif
 
-	if (century)
+	if (century > 20)
 		time->tm_year += (century - 19) * 100;
 
 	/*
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/rtc/rtc-pcf8563.c linux-libre-4.9.212-gnu/drivers/rtc/rtc-pcf8563.c
--- linux-libre-4.9.211-gnu/drivers/rtc/rtc-pcf8563.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/rtc/rtc-pcf8563.c	2020-01-29 04:24:41.000000000 -0500
@@ -563,7 +563,6 @@ static int pcf8563_probe(struct i2c_clie
 	struct pcf8563 *pcf8563;
 	int err;
 	unsigned char buf;
-	unsigned char alm_pending;
 
 	dev_dbg(&client->dev, "%s\n", __func__);
 
@@ -587,13 +586,13 @@ static int pcf8563_probe(struct i2c_clie
 		return err;
 	}
 
-	err = pcf8563_get_alarm_mode(client, NULL, &alm_pending);
-	if (err) {
-		dev_err(&client->dev, "%s: read error\n", __func__);
+	/* Clear flags and disable interrupts */
+	buf = 0;
+	err = pcf8563_write_block_data(client, PCF8563_REG_ST2, 1, &buf);
+	if (err < 0) {
+		dev_err(&client->dev, "%s: write error\n", __func__);
 		return err;
 	}
-	if (alm_pending)
-		pcf8563_set_alarm_mode(client, 0);
 
 	pcf8563->rtc = devm_rtc_device_register(&client->dev,
 				pcf8563_driver.driver.name,
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/rtc/rtc-pm8xxx.c linux-libre-4.9.212-gnu/drivers/rtc/rtc-pm8xxx.c
--- linux-libre-4.9.211-gnu/drivers/rtc/rtc-pm8xxx.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/rtc/rtc-pm8xxx.c	2020-01-29 04:24:41.000000000 -0500
@@ -186,7 +186,8 @@ static int pm8xxx_rtc_read_time(struct d
 		}
 	}
 
-	secs = value[0] | (value[1] << 8) | (value[2] << 16) | (value[3] << 24);
+	secs = value[0] | (value[1] << 8) | (value[2] << 16) |
+	       ((unsigned long)value[3] << 24);
 
 	rtc_time_to_tm(secs, tm);
 
@@ -267,7 +268,8 @@ static int pm8xxx_rtc_read_alarm(struct
 		return rc;
 	}
 
-	secs = value[0] | (value[1] << 8) | (value[2] << 16) | (value[3] << 24);
+	secs = value[0] | (value[1] << 8) | (value[2] << 16) |
+	       ((unsigned long)value[3] << 24);
 
 	rtc_time_to_tm(secs, &alarm->time);
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/scsi/libfc/fc_exch.c linux-libre-4.9.212-gnu/drivers/scsi/libfc/fc_exch.c
--- linux-libre-4.9.211-gnu/drivers/scsi/libfc/fc_exch.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/scsi/libfc/fc_exch.c	2020-01-29 04:24:41.000000000 -0500
@@ -2506,7 +2506,7 @@ void fc_exch_recv(struct fc_lport *lport
 
 	/* lport lock ? */
 	if (!lport || lport->state == LPORT_ST_DISABLED) {
-		FC_LPORT_DBG(lport, "Receiving frames for an lport that "
+		FC_LIBFC_DBG("Receiving frames for an lport that "
 			     "has not been initialized correctly\n");
 		fc_frame_free(fp);
 		return;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/scsi/megaraid/megaraid_sas_base.c linux-libre-4.9.212-gnu/drivers/scsi/megaraid/megaraid_sas_base.c
--- linux-libre-4.9.211-gnu/drivers/scsi/megaraid/megaraid_sas_base.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/scsi/megaraid/megaraid_sas_base.c	2020-01-29 04:24:41.000000000 -0500
@@ -3694,12 +3694,12 @@ megasas_transition_to_ready(struct megas
 		/*
 		 * The cur_state should not last for more than max_wait secs
 		 */
-		for (i = 0; i < max_wait; i++) {
+		for (i = 0; i < max_wait * 50; i++) {
 			curr_abs_state = instance->instancet->
 				read_fw_status_reg(instance->reg_set);
 
 			if (abs_state == curr_abs_state) {
-				msleep(1000);
+				msleep(20);
 			} else
 				break;
 		}
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/scsi/qla2xxx/qla_os.c linux-libre-4.9.212-gnu/drivers/scsi/qla2xxx/qla_os.c
--- linux-libre-4.9.211-gnu/drivers/scsi/qla2xxx/qla_os.c	2020-01-23 09:38:47.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/scsi/qla2xxx/qla_os.c	2020-01-29 05:30:52.000000000 -0500
@@ -6055,8 +6055,7 @@ qla2x00_module_init(void)
 	/* Initialize target kmem_cache and mem_pools */
 	ret = qlt_init();
 	if (ret < 0) {
-		kmem_cache_destroy(srb_cachep);
-		return ret;
+		goto destroy_cache;
 	} else if (ret > 0) {
 		/*
 		 * If initiator mode is explictly disabled by qlt_init(),
@@ -6075,11 +6074,10 @@ qla2x00_module_init(void)
 	qla2xxx_transport_template =
 	    fc_attach_transport(&qla2xxx_transport_functions);
 	if (!qla2xxx_transport_template) {
-		kmem_cache_destroy(srb_cachep);
 		ql_log(ql_log_fatal, NULL, 0x0002,
 		    "fc_attach_transport failed...Failing load!.\n");
-		qlt_exit();
-		return -ENODEV;
+		ret = -ENODEV;
+		goto qlt_exit;
 	}
 
 	apidev_major = register_chrdev(0, QLA2XXX_APIDEV, &apidev_fops);
@@ -6091,27 +6089,37 @@ qla2x00_module_init(void)
 	qla2xxx_transport_vport_template =
 	    fc_attach_transport(&qla2xxx_transport_vport_functions);
 	if (!qla2xxx_transport_vport_template) {
-		kmem_cache_destroy(srb_cachep);
-		qlt_exit();
-		fc_release_transport(qla2xxx_transport_template);
 		ql_log(ql_log_fatal, NULL, 0x0004,
 		    "fc_attach_transport vport failed...Failing load!.\n");
-		return -ENODEV;
+		ret = -ENODEV;
+		goto unreg_chrdev;
 	}
 	ql_log(ql_log_info, NULL, 0x0005,
 	    "QLogic Fibre Channel HBA Driver: %s.\n",
 	    qla2x00_version_str);
 	ret = pci_register_driver(&qla2xxx_pci_driver);
 	if (ret) {
-		kmem_cache_destroy(srb_cachep);
-		qlt_exit();
-		fc_release_transport(qla2xxx_transport_template);
-		fc_release_transport(qla2xxx_transport_vport_template);
 		ql_log(ql_log_fatal, NULL, 0x0006,
 		    "pci_register_driver failed...ret=%d Failing load!.\n",
 		    ret);
+		goto release_vport_transport;
 	}
 	return ret;
+
+release_vport_transport:
+	fc_release_transport(qla2xxx_transport_vport_template);
+
+unreg_chrdev:
+	if (apidev_major >= 0)
+		unregister_chrdev(apidev_major, QLA2XXX_APIDEV);
+	fc_release_transport(qla2xxx_transport_template);
+
+qlt_exit:
+	qlt_exit();
+
+destroy_cache:
+	kmem_cache_destroy(srb_cachep);
+	return ret;
 }
 
 /**
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/scsi/scsi_transport_iscsi.c linux-libre-4.9.212-gnu/drivers/scsi/scsi_transport_iscsi.c
--- linux-libre-4.9.211-gnu/drivers/scsi/scsi_transport_iscsi.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/scsi/scsi_transport_iscsi.c	2020-01-29 04:24:41.000000000 -0500
@@ -37,6 +37,8 @@
 
 #define ISCSI_TRANSPORT_VERSION "2.0-870"
 
+#define ISCSI_SEND_MAX_ALLOWED  10
+
 static int dbg_session;
 module_param_named(debug_session, dbg_session, int,
 		   S_IRUGO | S_IWUSR);
@@ -3694,6 +3696,7 @@ iscsi_if_rx(struct sk_buff *skb)
 		struct nlmsghdr	*nlh;
 		struct iscsi_uevent *ev;
 		uint32_t group;
+		int retries = ISCSI_SEND_MAX_ALLOWED;
 
 		nlh = nlmsg_hdr(skb);
 		if (nlh->nlmsg_len < sizeof(*nlh) + sizeof(*ev) ||
@@ -3724,6 +3727,10 @@ iscsi_if_rx(struct sk_buff *skb)
 				break;
 			err = iscsi_if_send_reply(group, nlh->nlmsg_seq,
 				nlh->nlmsg_type, 0, 0, ev, sizeof(*ev));
+			if (err == -EAGAIN && --retries < 0) {
+				printk(KERN_WARNING "Send reply failed, error %d\n", err);
+				break;
+			}
 		} while (err < 0 && err != -ECONNREFUSED && err != -ESRCH);
 		skb_pull(skb, rlen);
 	}
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/soc/fsl/qe/gpio.c linux-libre-4.9.212-gnu/drivers/soc/fsl/qe/gpio.c
--- linux-libre-4.9.211-gnu/drivers/soc/fsl/qe/gpio.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/soc/fsl/qe/gpio.c	2020-01-29 04:24:41.000000000 -0500
@@ -152,8 +152,10 @@ struct qe_pin *qe_pin_request(struct dev
 	if (err < 0)
 		goto err0;
 	gc = gpio_to_chip(err);
-	if (WARN_ON(!gc))
+	if (WARN_ON(!gc)) {
+		err = -ENODEV;
 		goto err0;
+	}
 
 	if (!of_device_is_compatible(gc->of_node, "fsl,mpc8323-qe-pario-bank")) {
 		pr_debug("%s: tried to get a non-qe pin\n", __func__);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/spi/spi-bcm2835aux.c linux-libre-4.9.212-gnu/drivers/spi/spi-bcm2835aux.c
--- linux-libre-4.9.211-gnu/drivers/spi/spi-bcm2835aux.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/spi/spi-bcm2835aux.c	2020-01-29 04:24:41.000000000 -0500
@@ -416,7 +416,18 @@ static int bcm2835aux_spi_probe(struct p
 	platform_set_drvdata(pdev, master);
 	master->mode_bits = (SPI_CPOL | SPI_CS_HIGH | SPI_NO_CS);
 	master->bits_per_word_mask = SPI_BPW_MASK(8);
-	master->num_chipselect = -1;
+	/* even though the driver never officially supported native CS
+	 * allow a single native CS for legacy DT support purposes when
+	 * no cs-gpio is configured.
+	 * Known limitations for native cs are:
+	 * * multiple chip-selects: cs0-cs2 are all simultaniously asserted
+	 *     whenever there is a transfer -  this even includes SPI_NO_CS
+	 * * SPI_CS_HIGH: is ignores - cs are always asserted low
+	 * * cs_change: cs is deasserted after each spi_transfer
+	 * * cs_delay_usec: cs is always deasserted one SCK cycle after
+	 *     a spi_transfer
+	 */
+	master->num_chipselect = 1;
 	master->transfer_one = bcm2835aux_spi_transfer_one;
 	master->handle_err = bcm2835aux_spi_handle_err;
 	master->prepare_message = bcm2835aux_spi_prepare_message;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/spi/spi-fsl-spi.c linux-libre-4.9.212-gnu/drivers/spi/spi-fsl-spi.c
--- linux-libre-4.9.211-gnu/drivers/spi/spi-fsl-spi.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/spi/spi-fsl-spi.c	2020-01-29 04:24:41.000000000 -0500
@@ -408,7 +408,6 @@ static int fsl_spi_do_one_msg(struct spi
 	}
 
 	m->status = status;
-	spi_finalize_current_message(master);
 
 	if (status || !cs_change) {
 		ndelay(nsecs);
@@ -416,6 +415,7 @@ static int fsl_spi_do_one_msg(struct spi
 	}
 
 	fsl_spi_setup_transfer(spi, NULL);
+	spi_finalize_current_message(master);
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/spi/spi-tegra114.c linux-libre-4.9.212-gnu/drivers/spi/spi-tegra114.c
--- linux-libre-4.9.211-gnu/drivers/spi/spi-tegra114.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/spi/spi-tegra114.c	2020-01-29 04:24:41.000000000 -0500
@@ -307,10 +307,16 @@ static unsigned tegra_spi_fill_tx_fifo_f
 				x |= (u32)(*tx_buf++) << (i * 8);
 			tegra_spi_writel(tspi, x, SPI_TX_FIFO);
 		}
+
+		tspi->cur_tx_pos += written_words * tspi->bytes_per_word;
 	} else {
+		unsigned int write_bytes;
 		max_n_32bit = min(tspi->curr_dma_words,  tx_empty_count);
 		written_words = max_n_32bit;
 		nbytes = written_words * tspi->bytes_per_word;
+		if (nbytes > t->len - tspi->cur_pos)
+			nbytes = t->len - tspi->cur_pos;
+		write_bytes = nbytes;
 		for (count = 0; count < max_n_32bit; count++) {
 			u32 x = 0;
 
@@ -319,8 +325,10 @@ static unsigned tegra_spi_fill_tx_fifo_f
 				x |= (u32)(*tx_buf++) << (i * 8);
 			tegra_spi_writel(tspi, x, SPI_TX_FIFO);
 		}
+
+		tspi->cur_tx_pos += write_bytes;
 	}
-	tspi->cur_tx_pos += written_words * tspi->bytes_per_word;
+
 	return written_words;
 }
 
@@ -344,20 +352,27 @@ static unsigned int tegra_spi_read_rx_fi
 			for (i = 0; len && (i < 4); i++, len--)
 				*rx_buf++ = (x >> i*8) & 0xFF;
 		}
-		tspi->cur_rx_pos += tspi->curr_dma_words * tspi->bytes_per_word;
 		read_words += tspi->curr_dma_words;
+		tspi->cur_rx_pos += tspi->curr_dma_words * tspi->bytes_per_word;
 	} else {
 		u32 rx_mask = ((u32)1 << t->bits_per_word) - 1;
+		u8 bytes_per_word = tspi->bytes_per_word;
+		unsigned int read_bytes;
 
+		len = rx_full_count * bytes_per_word;
+		if (len > t->len - tspi->cur_pos)
+			len = t->len - tspi->cur_pos;
+		read_bytes = len;
 		for (count = 0; count < rx_full_count; count++) {
 			u32 x = tegra_spi_readl(tspi, SPI_RX_FIFO) & rx_mask;
 
-			for (i = 0; (i < tspi->bytes_per_word); i++)
+			for (i = 0; len && (i < bytes_per_word); i++, len--)
 				*rx_buf++ = (x >> (i*8)) & 0xFF;
 		}
-		tspi->cur_rx_pos += rx_full_count * tspi->bytes_per_word;
 		read_words += rx_full_count;
+		tspi->cur_rx_pos += read_bytes;
 	}
+
 	return read_words;
 }
 
@@ -372,12 +387,17 @@ static void tegra_spi_copy_client_txbuf_
 		unsigned len = tspi->curr_dma_words * tspi->bytes_per_word;
 
 		memcpy(tspi->tx_dma_buf, t->tx_buf + tspi->cur_pos, len);
+		tspi->cur_tx_pos += tspi->curr_dma_words * tspi->bytes_per_word;
 	} else {
 		unsigned int i;
 		unsigned int count;
 		u8 *tx_buf = (u8 *)t->tx_buf + tspi->cur_tx_pos;
 		unsigned consume = tspi->curr_dma_words * tspi->bytes_per_word;
+		unsigned int write_bytes;
 
+		if (consume > t->len - tspi->cur_pos)
+			consume = t->len - tspi->cur_pos;
+		write_bytes = consume;
 		for (count = 0; count < tspi->curr_dma_words; count++) {
 			u32 x = 0;
 
@@ -386,8 +406,9 @@ static void tegra_spi_copy_client_txbuf_
 				x |= (u32)(*tx_buf++) << (i * 8);
 			tspi->tx_dma_buf[count] = x;
 		}
+
+		tspi->cur_tx_pos += write_bytes;
 	}
-	tspi->cur_tx_pos += tspi->curr_dma_words * tspi->bytes_per_word;
 
 	/* Make the dma buffer to read by dma */
 	dma_sync_single_for_device(tspi->dev, tspi->tx_dma_phys,
@@ -405,20 +426,28 @@ static void tegra_spi_copy_spi_rxbuf_to_
 		unsigned len = tspi->curr_dma_words * tspi->bytes_per_word;
 
 		memcpy(t->rx_buf + tspi->cur_rx_pos, tspi->rx_dma_buf, len);
+		tspi->cur_rx_pos += tspi->curr_dma_words * tspi->bytes_per_word;
 	} else {
 		unsigned int i;
 		unsigned int count;
 		unsigned char *rx_buf = t->rx_buf + tspi->cur_rx_pos;
 		u32 rx_mask = ((u32)1 << t->bits_per_word) - 1;
+		unsigned consume = tspi->curr_dma_words * tspi->bytes_per_word;
+		unsigned int read_bytes;
 
+		if (consume > t->len - tspi->cur_pos)
+			consume = t->len - tspi->cur_pos;
+		read_bytes = consume;
 		for (count = 0; count < tspi->curr_dma_words; count++) {
 			u32 x = tspi->rx_dma_buf[count] & rx_mask;
 
-			for (i = 0; (i < tspi->bytes_per_word); i++)
+			for (i = 0; consume && (i < tspi->bytes_per_word);
+							i++, consume--)
 				*rx_buf++ = (x >> (i*8)) & 0xFF;
 		}
+
+		tspi->cur_rx_pos += read_bytes;
 	}
-	tspi->cur_rx_pos += tspi->curr_dma_words * tspi->bytes_per_word;
 
 	/* Make the dma buffer to read by dma */
 	dma_sync_single_for_device(tspi->dev, tspi->rx_dma_phys,
@@ -730,6 +759,8 @@ static int tegra_spi_start_transfer_one(
 
 	if (tspi->is_packed)
 		command1 |= SPI_PACKED;
+	else
+		command1 &= ~SPI_PACKED;
 
 	command1 &= ~(SPI_CS_SEL_MASK | SPI_TX_EN | SPI_RX_EN);
 	tspi->cur_direction = 0;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/staging/comedi/drivers/ni_mio_common.c linux-libre-4.9.212-gnu/drivers/staging/comedi/drivers/ni_mio_common.c
--- linux-libre-4.9.211-gnu/drivers/staging/comedi/drivers/ni_mio_common.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/staging/comedi/drivers/ni_mio_common.c	2020-01-29 04:24:41.000000000 -0500
@@ -4945,7 +4945,10 @@ static int ni_valid_rtsi_output_source(s
 	case NI_RTSI_OUTPUT_G_SRC0:
 	case NI_RTSI_OUTPUT_G_GATE0:
 	case NI_RTSI_OUTPUT_RGOUT0:
-	case NI_RTSI_OUTPUT_RTSI_BRD_0:
+	case NI_RTSI_OUTPUT_RTSI_BRD(0):
+	case NI_RTSI_OUTPUT_RTSI_BRD(1):
+	case NI_RTSI_OUTPUT_RTSI_BRD(2):
+	case NI_RTSI_OUTPUT_RTSI_BRD(3):
 		return 1;
 	case NI_RTSI_OUTPUT_RTSI_OSC:
 		return (devpriv->is_m_series) ? 1 : 0;
@@ -4966,11 +4969,18 @@ static int ni_set_rtsi_routing(struct co
 		devpriv->rtsi_trig_a_output_reg |= NISTC_RTSI_TRIG(chan, src);
 		ni_stc_writew(dev, devpriv->rtsi_trig_a_output_reg,
 			      NISTC_RTSI_TRIGA_OUT_REG);
-	} else if (chan < 8) {
+	} else if (chan < NISTC_RTSI_TRIG_NUM_CHAN(devpriv->is_m_series)) {
 		devpriv->rtsi_trig_b_output_reg &= ~NISTC_RTSI_TRIG_MASK(chan);
 		devpriv->rtsi_trig_b_output_reg |= NISTC_RTSI_TRIG(chan, src);
 		ni_stc_writew(dev, devpriv->rtsi_trig_b_output_reg,
 			      NISTC_RTSI_TRIGB_OUT_REG);
+	} else if (chan != NISTC_RTSI_TRIG_OLD_CLK_CHAN) {
+		/* probably should never reach this, since the
+		 * ni_valid_rtsi_output_source above errors out if chan is too
+		 * high
+		 */
+		dev_err(dev->class_dev, "%s: unknown rtsi channel\n", __func__);
+		return -EINVAL;
 	}
 	return 2;
 }
@@ -4986,12 +4996,12 @@ static unsigned int ni_get_rtsi_routing(
 	} else if (chan < NISTC_RTSI_TRIG_NUM_CHAN(devpriv->is_m_series)) {
 		return NISTC_RTSI_TRIG_TO_SRC(chan,
 					      devpriv->rtsi_trig_b_output_reg);
-	} else {
-		if (chan == NISTC_RTSI_TRIG_OLD_CLK_CHAN)
-			return NI_RTSI_OUTPUT_RTSI_OSC;
-		dev_err(dev->class_dev, "bug! should never get here?\n");
-		return 0;
+	} else if (chan == NISTC_RTSI_TRIG_OLD_CLK_CHAN) {
+		return NI_RTSI_OUTPUT_RTSI_OSC;
 	}
+
+	dev_err(dev->class_dev, "%s: unknown rtsi channel\n", __func__);
+	return -EINVAL;
 }
 
 static int ni_rtsi_insn_config(struct comedi_device *dev,
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/staging/greybus/light.c linux-libre-4.9.212-gnu/drivers/staging/greybus/light.c
--- linux-libre-4.9.211-gnu/drivers/staging/greybus/light.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/staging/greybus/light.c	2020-01-29 04:24:41.000000000 -0500
@@ -1102,21 +1102,21 @@ static void gb_lights_channel_release(st
 static void gb_lights_light_release(struct gb_light *light)
 {
 	int i;
-	int count;
 
 	light->ready = false;
 
-	count = light->channels_count;
-
 	if (light->has_flash)
 		gb_lights_light_v4l2_unregister(light);
+	light->has_flash = false;
 
-	for (i = 0; i < count; i++) {
+	for (i = 0; i < light->channels_count; i++)
 		gb_lights_channel_release(&light->channels[i]);
-		light->channels_count--;
-	}
+	light->channels_count = 0;
+
 	kfree(light->channels);
+	light->channels = NULL;
 	kfree(light->name);
+	light->name = NULL;
 }
 
 static void gb_lights_release(struct gb_lights *glights)
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/staging/most/aim-cdev/cdev.c linux-libre-4.9.212-gnu/drivers/staging/most/aim-cdev/cdev.c
--- linux-libre-4.9.211-gnu/drivers/staging/most/aim-cdev/cdev.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/staging/most/aim-cdev/cdev.c	2020-01-29 04:24:41.000000000 -0500
@@ -451,7 +451,9 @@ static int aim_probe(struct most_interfa
 	c->devno = MKDEV(major, current_minor);
 	cdev_init(&c->cdev, &channel_fops);
 	c->cdev.owner = THIS_MODULE;
-	cdev_add(&c->cdev, c->devno, 1);
+	retval = cdev_add(&c->cdev, c->devno, 1);
+	if (retval < 0)
+		goto err_free_c;
 	c->iface = iface;
 	c->cfg = cfg;
 	c->channel_id = channel_id;
@@ -487,6 +489,7 @@ error_create_device:
 	list_del(&c->list);
 error_alloc_kfifo:
 	cdev_del(&c->cdev);
+err_free_c:
 	kfree(c);
 error_alloc_channel:
 	ida_simple_remove(&minor_id, current_minor);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/target/iscsi/iscsi_target.c linux-libre-4.9.212-gnu/drivers/target/iscsi/iscsi_target.c
--- linux-libre-4.9.211-gnu/drivers/target/iscsi/iscsi_target.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/target/iscsi/iscsi_target.c	2020-01-29 04:24:41.000000000 -0500
@@ -4162,9 +4162,6 @@ int iscsit_close_connection(
 	iscsit_stop_nopin_response_timer(conn);
 	iscsit_stop_nopin_timer(conn);
 
-	if (conn->conn_transport->iscsit_wait_conn)
-		conn->conn_transport->iscsit_wait_conn(conn);
-
 	/*
 	 * During Connection recovery drop unacknowledged out of order
 	 * commands for this connection, and prepare the other commands
@@ -4250,6 +4247,9 @@ int iscsit_close_connection(
 	target_sess_cmd_list_set_waiting(sess->se_sess);
 	target_wait_for_sess_cmds(sess->se_sess);
 
+	if (conn->conn_transport->iscsit_wait_conn)
+		conn->conn_transport->iscsit_wait_conn(conn);
+
 	ahash_request_free(conn->conn_tx_hash);
 	if (conn->conn_rx_hash) {
 		struct crypto_ahash *tfm;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/thermal/cpu_cooling.c linux-libre-4.9.212-gnu/drivers/thermal/cpu_cooling.c
--- linux-libre-4.9.211-gnu/drivers/thermal/cpu_cooling.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/thermal/cpu_cooling.c	2020-01-29 04:24:41.000000000 -0500
@@ -607,7 +607,7 @@ static int cpufreq_get_requested_power(s
 			load = 0;
 
 		total_load += load;
-		if (trace_thermal_power_cpu_limit_enabled() && load_cpu)
+		if (load_cpu)
 			load_cpu[i] = load;
 
 		i++;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/thermal/mtk_thermal.c linux-libre-4.9.212-gnu/drivers/thermal/mtk_thermal.c
--- linux-libre-4.9.211-gnu/drivers/thermal/mtk_thermal.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/thermal/mtk_thermal.c	2020-01-29 04:24:41.000000000 -0500
@@ -348,7 +348,8 @@ static int mtk_thermal_bank_temperature(
 	u32 raw;
 
 	for (i = 0; i < conf->bank_data[bank->id].num_sensors; i++) {
-		raw = readl(mt->thermal_base + conf->msr[i]);
+		raw = readl(mt->thermal_base +
+			    conf->msr[conf->bank_data[bank->id].sensors[i]]);
 
 		temp = raw_to_mcelsius(mt,
 				       conf->bank_data[bank->id].sensors[i],
@@ -485,7 +486,8 @@ static void mtk_thermal_init_bank(struct
 
 	for (i = 0; i < conf->bank_data[num].num_sensors; i++)
 		writel(conf->sensor_mux_values[conf->bank_data[num].sensors[i]],
-		       mt->thermal_base + conf->adcpnp[i]);
+		       mt->thermal_base +
+		       conf->adcpnp[conf->bank_data[num].sensors[i]]);
 
 	writel((1 << conf->bank_data[num].num_sensors) - 1,
 	       mt->thermal_base + TEMP_MONCTL0);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/tty/ipwireless/hardware.c linux-libre-4.9.212-gnu/drivers/tty/ipwireless/hardware.c
--- linux-libre-4.9.211-gnu/drivers/tty/ipwireless/hardware.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/tty/ipwireless/hardware.c	2020-01-29 04:24:41.000000000 -0500
@@ -1515,6 +1515,8 @@ static void ipw_send_setup_packet(struct
 			sizeof(struct ipw_setup_get_version_query_packet),
 			ADDR_SETUP_PROT, TL_PROTOCOLID_SETUP,
 			TL_SETUP_SIGNO_GET_VERSION_QRY);
+	if (!ver_packet)
+		return;
 	ver_packet->header.length = sizeof(struct tl_setup_get_version_qry);
 
 	/*
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/tty/serial/stm32-usart.c linux-libre-4.9.212-gnu/drivers/tty/serial/stm32-usart.c
--- linux-libre-4.9.211-gnu/drivers/tty/serial/stm32-usart.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/tty/serial/stm32-usart.c	2020-01-29 04:24:41.000000000 -0500
@@ -293,13 +293,8 @@ static void stm32_transmit_chars(struct
 		return;
 	}
 
-	if (uart_tx_stopped(port)) {
-		stm32_stop_tx(port);
-		return;
-	}
-
-	if (uart_circ_empty(xmit)) {
-		stm32_stop_tx(port);
+	if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
+		stm32_clr_bits(port, ofs->cr1, USART_CR1_TXEIE);
 		return;
 	}
 
@@ -312,7 +307,7 @@ static void stm32_transmit_chars(struct
 		uart_write_wakeup(port);
 
 	if (uart_circ_empty(xmit))
-		stm32_stop_tx(port);
+		stm32_clr_bits(port, ofs->cr1, USART_CR1_TXEIE);
 }
 
 static irqreturn_t stm32_interrupt(int irq, void *ptr)
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/usb/class/cdc-wdm.c linux-libre-4.9.212-gnu/drivers/usb/class/cdc-wdm.c
--- linux-libre-4.9.211-gnu/drivers/usb/class/cdc-wdm.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/usb/class/cdc-wdm.c	2020-01-29 04:24:41.000000000 -0500
@@ -1098,7 +1098,7 @@ static int wdm_post_reset(struct usb_int
 	rv = recover_from_urb_loss(desc);
 	mutex_unlock(&desc->wlock);
 	mutex_unlock(&desc->rlock);
-	return 0;
+	return rv;
 }
 
 static struct usb_driver wdm_driver = {
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/usb/host/xhci-hub.c linux-libre-4.9.212-gnu/drivers/usb/host/xhci-hub.c
--- linux-libre-4.9.211-gnu/drivers/usb/host/xhci-hub.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/usb/host/xhci-hub.c	2020-01-29 04:24:41.000000000 -0500
@@ -989,7 +989,7 @@ int xhci_hub_control(struct usb_hcd *hcd
 			}
 			port_li = readl(port_array[wIndex] + PORTLI);
 			status = xhci_get_ext_port_status(temp, port_li);
-			put_unaligned_le32(cpu_to_le32(status), &buf[4]);
+			put_unaligned_le32(status, &buf[4]);
 		}
 		break;
 	case SetPortFeature:
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/usb/phy/Kconfig linux-libre-4.9.212-gnu/drivers/usb/phy/Kconfig
--- linux-libre-4.9.211-gnu/drivers/usb/phy/Kconfig	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/usb/phy/Kconfig	2020-01-29 04:24:41.000000000 -0500
@@ -19,7 +19,7 @@ config AB8500_USB
 	  in host mode, low speed.
 
 config FSL_USB2_OTG
-	bool "Freescale USB OTG Transceiver Driver"
+	tristate "Freescale USB OTG Transceiver Driver"
 	depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_OTG_FSM=y && PM
 	depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't be 'y'
 	select USB_PHY
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/usb/phy/phy-twl6030-usb.c linux-libre-4.9.212-gnu/drivers/usb/phy/phy-twl6030-usb.c
--- linux-libre-4.9.211-gnu/drivers/usb/phy/phy-twl6030-usb.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/usb/phy/phy-twl6030-usb.c	2020-01-29 04:24:41.000000000 -0500
@@ -422,7 +422,7 @@ static int twl6030_usb_remove(struct pla
 {
 	struct twl6030_usb *twl = platform_get_drvdata(pdev);
 
-	cancel_delayed_work(&twl->get_status_work);
+	cancel_delayed_work_sync(&twl->get_status_work);
 	twl6030_interrupt_mask(TWL6030_USBOTG_INT_MASK,
 		REG_INT_MSK_LINE_C);
 	twl6030_interrupt_mask(TWL6030_USBOTG_INT_MASK,
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/vfio/pci/vfio_pci.c linux-libre-4.9.212-gnu/drivers/vfio/pci/vfio_pci.c
--- linux-libre-4.9.211-gnu/drivers/vfio/pci/vfio_pci.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/vfio/pci/vfio_pci.c	2020-01-29 04:24:41.000000000 -0500
@@ -729,6 +729,7 @@ static long vfio_pci_ioctl(void *device_
 		{
 			void __iomem *io;
 			size_t size;
+			u16 orig_cmd;
 
 			info.offset = VFIO_PCI_INDEX_TO_OFFSET(info.index);
 			info.flags = 0;
@@ -744,15 +745,23 @@ static long vfio_pci_ioctl(void *device_
 					break;
 			}
 
-			/* Is it really there? */
+			/*
+			 * Is it really there?  Enable memory decode for
+			 * implicit access in pci_map_rom().
+			 */
+			pci_read_config_word(pdev, PCI_COMMAND, &orig_cmd);
+			pci_write_config_word(pdev, PCI_COMMAND,
+					      orig_cmd | PCI_COMMAND_MEMORY);
+
 			io = pci_map_rom(pdev, &size);
-			if (!io || !size) {
+			if (io) {
+				info.flags = VFIO_REGION_INFO_FLAG_READ;
+				pci_unmap_rom(pdev, io);
+			} else {
 				info.size = 0;
-				break;
 			}
-			pci_unmap_rom(pdev, io);
 
-			info.flags = VFIO_REGION_INFO_FLAG_READ;
+			pci_write_config_word(pdev, PCI_COMMAND, orig_cmd);
 			break;
 		}
 		case VFIO_PCI_VGA_REGION_INDEX:
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/video/backlight/lm3630a_bl.c linux-libre-4.9.212-gnu/drivers/video/backlight/lm3630a_bl.c
--- linux-libre-4.9.211-gnu/drivers/video/backlight/lm3630a_bl.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/video/backlight/lm3630a_bl.c	2020-01-29 04:24:41.000000000 -0500
@@ -200,7 +200,7 @@ static int lm3630a_bank_a_update_status(
 				      LM3630A_LEDA_ENABLE, LM3630A_LEDA_ENABLE);
 	if (ret < 0)
 		goto out_i2c_err;
-	return bl->props.brightness;
+	return 0;
 
 out_i2c_err:
 	dev_err(pchip->dev, "i2c failed to access\n");
@@ -277,7 +277,7 @@ static int lm3630a_bank_b_update_status(
 				      LM3630A_LEDB_ENABLE, LM3630A_LEDB_ENABLE);
 	if (ret < 0)
 		goto out_i2c_err;
-	return bl->props.brightness;
+	return 0;
 
 out_i2c_err:
 	dev_err(pchip->dev, "i2c failed to access REG_CTRL\n");
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/video/fbdev/chipsfb.c linux-libre-4.9.212-gnu/drivers/video/fbdev/chipsfb.c
--- linux-libre-4.9.211-gnu/drivers/video/fbdev/chipsfb.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/video/fbdev/chipsfb.c	2020-01-29 04:24:41.000000000 -0500
@@ -350,7 +350,7 @@ static void init_chips(struct fb_info *p
 static int chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent)
 {
 	struct fb_info *p;
-	unsigned long addr, size;
+	unsigned long addr;
 	unsigned short cmd;
 	int rc = -ENODEV;
 
@@ -362,7 +362,6 @@ static int chipsfb_pci_init(struct pci_d
 	if ((dp->resource[0].flags & IORESOURCE_MEM) == 0)
 		goto err_disable;
 	addr = pci_resource_start(dp, 0);
-	size = pci_resource_len(dp, 0);
 	if (addr == 0)
 		goto err_disable;
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/drivers/xen/cpu_hotplug.c linux-libre-4.9.212-gnu/drivers/xen/cpu_hotplug.c
--- linux-libre-4.9.211-gnu/drivers/xen/cpu_hotplug.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/drivers/xen/cpu_hotplug.c	2020-01-29 04:24:41.000000000 -0500
@@ -53,7 +53,7 @@ static int vcpu_online(unsigned int cpu)
 }
 static void vcpu_hotplug(unsigned int cpu)
 {
-	if (!cpu_possible(cpu))
+	if (cpu >= nr_cpu_ids || !cpu_possible(cpu))
 		return;
 
 	switch (vcpu_online(cpu)) {
diff -druNp --no-dereference linux-libre-4.9.211-gnu/fs/afs/super.c linux-libre-4.9.212-gnu/fs/afs/super.c
--- linux-libre-4.9.211-gnu/fs/afs/super.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/fs/afs/super.c	2020-01-29 04:24:41.000000000 -0500
@@ -317,6 +317,7 @@ static int afs_fill_super(struct super_b
 	/* fill in the superblock */
 	sb->s_blocksize		= PAGE_SIZE;
 	sb->s_blocksize_bits	= PAGE_SHIFT;
+	sb->s_maxbytes		= MAX_LFS_FILESIZE;
 	sb->s_magic		= AFS_FS_MAGIC;
 	sb->s_op		= &afs_super_ops;
 	sb->s_bdi		= &as->volume->bdi;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/fs/btrfs/inode-map.c linux-libre-4.9.212-gnu/fs/btrfs/inode-map.c
--- linux-libre-4.9.211-gnu/fs/btrfs/inode-map.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/fs/btrfs/inode-map.c	2020-01-29 04:24:41.000000000 -0500
@@ -159,6 +159,7 @@ static void start_caching(struct btrfs_r
 		spin_lock(&root->ino_cache_lock);
 		root->ino_cache_state = BTRFS_CACHE_FINISHED;
 		spin_unlock(&root->ino_cache_lock);
+		wake_up(&root->ino_cache_wait);
 		return;
 	}
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/fs/cifs/connect.c linux-libre-4.9.212-gnu/fs/cifs/connect.c
--- linux-libre-4.9.211-gnu/fs/cifs/connect.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/fs/cifs/connect.c	2020-01-29 04:24:41.000000000 -0500
@@ -885,6 +885,7 @@ cifs_demultiplex_thread(void *p)
 		mempool_resize(cifs_req_poolp, length + cifs_min_rcv);
 
 	set_freezable();
+	allow_kernel_signal(SIGKILL);
 	while (server->tcpStatus != CifsExiting) {
 		if (try_to_freeze())
 			continue;
@@ -2221,7 +2222,7 @@ cifs_put_tcp_session(struct TCP_Server_I
 
 	task = xchg(&server->tsk, NULL);
 	if (task)
-		force_sig(SIGKILL, task);
+		send_sig(SIGKILL, task, 1);
 }
 
 static struct TCP_Server_Info *
diff -druNp --no-dereference linux-libre-4.9.211-gnu/fs/exportfs/expfs.c linux-libre-4.9.212-gnu/fs/exportfs/expfs.c
--- linux-libre-4.9.211-gnu/fs/exportfs/expfs.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/fs/exportfs/expfs.c	2020-01-29 04:24:41.000000000 -0500
@@ -146,6 +146,7 @@ static struct dentry *reconnect_one(stru
 	tmp = lookup_one_len_unlocked(nbuf, parent, strlen(nbuf));
 	if (IS_ERR(tmp)) {
 		dprintk("%s: lookup failed: %d\n", __func__, PTR_ERR(tmp));
+		err = PTR_ERR(tmp);
 		goto out_err;
 	}
 	if (tmp != dentry) {
diff -druNp --no-dereference linux-libre-4.9.211-gnu/fs/ext4/inline.c linux-libre-4.9.212-gnu/fs/ext4/inline.c
--- linux-libre-4.9.211-gnu/fs/ext4/inline.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/fs/ext4/inline.c	2020-01-29 04:24:41.000000000 -0500
@@ -1417,7 +1417,7 @@ int htree_inlinedir_to_tree(struct file
 		err = ext4_htree_store_dirent(dir_file, hinfo->hash,
 					      hinfo->minor_hash, de, &tmp_str);
 		if (err) {
-			count = err;
+			ret = err;
 			goto out;
 		}
 		count++;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/fs/jfs/jfs_txnmgr.c linux-libre-4.9.212-gnu/fs/jfs/jfs_txnmgr.c
--- linux-libre-4.9.211-gnu/fs/jfs/jfs_txnmgr.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/fs/jfs/jfs_txnmgr.c	2020-01-29 04:24:41.000000000 -0500
@@ -1928,8 +1928,7 @@ static void xtLog(struct jfs_log * log,
 	 * header ?
 	 */
 	if (tlck->type & tlckTRUNCATE) {
-		/* This odd declaration suppresses a bogus gcc warning */
-		pxd_t pxd = pxd;	/* truncated extent of xad */
+		pxd_t pxd;	/* truncated extent of xad */
 		int twm;
 
 		/*
diff -druNp --no-dereference linux-libre-4.9.211-gnu/fs/namei.c linux-libre-4.9.212-gnu/fs/namei.c
--- linux-libre-4.9.211-gnu/fs/namei.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/fs/namei.c	2020-01-29 04:24:41.000000000 -0500
@@ -1011,7 +1011,8 @@ static int may_linkat(struct path *link)
  * may_create_in_sticky - Check whether an O_CREAT open in a sticky directory
  *			  should be allowed, or not, on files that already
  *			  exist.
- * @dir: the sticky parent directory
+ * @dir_mode: mode bits of directory
+ * @dir_uid: owner of directory
  * @inode: the inode of the file to open
  *
  * Block an O_CREAT open of a FIFO (or a regular file) when:
@@ -1027,18 +1028,18 @@ static int may_linkat(struct path *link)
  *
  * Returns 0 if the open is allowed, -ve on error.
  */
-static int may_create_in_sticky(struct dentry * const dir,
+static int may_create_in_sticky(umode_t dir_mode, kuid_t dir_uid,
 				struct inode * const inode)
 {
 	if ((!sysctl_protected_fifos && S_ISFIFO(inode->i_mode)) ||
 	    (!sysctl_protected_regular && S_ISREG(inode->i_mode)) ||
-	    likely(!(dir->d_inode->i_mode & S_ISVTX)) ||
-	    uid_eq(inode->i_uid, dir->d_inode->i_uid) ||
+	    likely(!(dir_mode & S_ISVTX)) ||
+	    uid_eq(inode->i_uid, dir_uid) ||
 	    uid_eq(current_fsuid(), inode->i_uid))
 		return 0;
 
-	if (likely(dir->d_inode->i_mode & 0002) ||
-	    (dir->d_inode->i_mode & 0020 &&
+	if (likely(dir_mode & 0002) ||
+	    (dir_mode & 0020 &&
 	     ((sysctl_protected_fifos >= 2 && S_ISFIFO(inode->i_mode)) ||
 	      (sysctl_protected_regular >= 2 && S_ISREG(inode->i_mode))))) {
 		return -EACCES;
@@ -3259,6 +3260,8 @@ static int do_last(struct nameidata *nd,
 		   int *opened)
 {
 	struct dentry *dir = nd->path.dentry;
+	kuid_t dir_uid = dir->d_inode->i_uid;
+	umode_t dir_mode = dir->d_inode->i_mode;
 	int open_flag = op->open_flag;
 	bool will_truncate = (open_flag & O_TRUNC) != 0;
 	bool got_write = false;
@@ -3401,7 +3404,7 @@ finish_open:
 		error = -EISDIR;
 		if (d_is_dir(nd->path.dentry))
 			goto out;
-		error = may_create_in_sticky(dir,
+		error = may_create_in_sticky(dir_mode, dir_uid,
 					     d_backing_inode(nd->path.dentry));
 		if (unlikely(error))
 			goto out;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/fs/nfs/delegation.c linux-libre-4.9.212-gnu/fs/nfs/delegation.c
--- linux-libre-4.9.211-gnu/fs/nfs/delegation.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/fs/nfs/delegation.c	2020-01-29 04:24:41.000000000 -0500
@@ -234,6 +234,8 @@ static struct inode *nfs_delegation_grab
 	spin_lock(&delegation->lock);
 	if (delegation->inode != NULL)
 		inode = igrab(delegation->inode);
+	if (!inode)
+		set_bit(NFS_DELEGATION_INODE_FREEING, &delegation->flags);
 	spin_unlock(&delegation->lock);
 	return inode;
 }
@@ -867,10 +869,11 @@ restart:
 	list_for_each_entry_rcu(server, &clp->cl_superblocks, client_link) {
 		list_for_each_entry_rcu(delegation, &server->delegations,
 								super_list) {
-			if (test_bit(NFS_DELEGATION_RETURNING,
-						&delegation->flags))
-				continue;
-			if (test_bit(NFS_DELEGATION_NEED_RECLAIM,
+			if (test_bit(NFS_DELEGATION_INODE_FREEING,
+						&delegation->flags) ||
+			    test_bit(NFS_DELEGATION_RETURNING,
+						&delegation->flags) ||
+			    test_bit(NFS_DELEGATION_NEED_RECLAIM,
 						&delegation->flags) == 0)
 				continue;
 			if (!nfs_sb_active(server->super))
@@ -975,10 +978,11 @@ restart:
 	list_for_each_entry_rcu(server, &clp->cl_superblocks, client_link) {
 		list_for_each_entry_rcu(delegation, &server->delegations,
 								super_list) {
-			if (test_bit(NFS_DELEGATION_RETURNING,
-						&delegation->flags))
-				continue;
-			if (test_bit(NFS_DELEGATION_TEST_EXPIRED,
+			if (test_bit(NFS_DELEGATION_INODE_FREEING,
+						&delegation->flags) ||
+			    test_bit(NFS_DELEGATION_RETURNING,
+						&delegation->flags) ||
+			    test_bit(NFS_DELEGATION_TEST_EXPIRED,
 						&delegation->flags) == 0)
 				continue;
 			if (!nfs_sb_active(server->super))
diff -druNp --no-dereference linux-libre-4.9.211-gnu/fs/nfs/delegation.h linux-libre-4.9.212-gnu/fs/nfs/delegation.h
--- linux-libre-4.9.211-gnu/fs/nfs/delegation.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/fs/nfs/delegation.h	2020-01-29 04:24:41.000000000 -0500
@@ -33,6 +33,7 @@ enum {
 	NFS_DELEGATION_RETURNING,
 	NFS_DELEGATION_REVOKED,
 	NFS_DELEGATION_TEST_EXPIRED,
+	NFS_DELEGATION_INODE_FREEING,
 };
 
 int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct nfs_openres *res);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/fs/nfs/super.c linux-libre-4.9.212-gnu/fs/nfs/super.c
--- linux-libre-4.9.211-gnu/fs/nfs/super.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/fs/nfs/super.c	2020-01-29 04:24:41.000000000 -0500
@@ -1928,7 +1928,7 @@ static int nfs_parse_devname(const char
 		/* kill possible hostname list: not supported */
 		comma = strchr(dev_name, ',');
 		if (comma != NULL && comma < end)
-			*comma = 0;
+			len = comma - dev_name;
 	}
 
 	if (len > maxnamlen)
diff -druNp --no-dereference linux-libre-4.9.211-gnu/fs/xfs/xfs_quotaops.c linux-libre-4.9.212-gnu/fs/xfs/xfs_quotaops.c
--- linux-libre-4.9.211-gnu/fs/xfs/xfs_quotaops.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/fs/xfs/xfs_quotaops.c	2020-01-29 04:24:41.000000000 -0500
@@ -214,6 +214,9 @@ xfs_fs_rm_xquota(
 	if (XFS_IS_QUOTA_ON(mp))
 		return -EINVAL;
 
+	if (uflags & ~(FS_USER_QUOTA | FS_GROUP_QUOTA | FS_PROJ_QUOTA))
+		return -EINVAL;
+
 	if (uflags & FS_USER_QUOTA)
 		flags |= XFS_DQ_USER;
 	if (uflags & FS_GROUP_QUOTA)
diff -druNp --no-dereference linux-libre-4.9.211-gnu/include/linux/bitmap.h linux-libre-4.9.212-gnu/include/linux/bitmap.h
--- linux-libre-4.9.211-gnu/include/linux/bitmap.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/include/linux/bitmap.h	2020-01-29 04:24:41.000000000 -0500
@@ -86,6 +86,14 @@
  */
 
 /*
+ * Allocation and deallocation of bitmap.
+ * Provided in lib/bitmap.c to avoid circular dependency.
+ */
+extern unsigned long *bitmap_alloc(unsigned int nbits, gfp_t flags);
+extern unsigned long *bitmap_zalloc(unsigned int nbits, gfp_t flags);
+extern void bitmap_free(const unsigned long *bitmap);
+
+/*
  * lib/bitmap.c provides these functions:
  */
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/include/linux/device.h linux-libre-4.9.212-gnu/include/linux/device.h
--- linux-libre-4.9.211-gnu/include/linux/device.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/include/linux/device.h	2020-01-29 04:24:41.000000000 -0500
@@ -682,7 +682,8 @@ extern unsigned long devm_get_free_pages
 					 gfp_t gfp_mask, unsigned int order);
 extern void devm_free_pages(struct device *dev, unsigned long addr);
 
-void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res);
+void __iomem *devm_ioremap_resource(struct device *dev,
+				    const struct resource *res);
 
 /* allows to add/remove a custom action to devres stack */
 int devm_add_action(struct device *dev, void (*action)(void *), void *data);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/include/linux/mlx5/mlx5_ifc.h linux-libre-4.9.212-gnu/include/linux/mlx5/mlx5_ifc.h
--- linux-libre-4.9.211-gnu/include/linux/mlx5/mlx5_ifc.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/include/linux/mlx5/mlx5_ifc.h	2020-01-29 04:24:41.000000000 -0500
@@ -7909,8 +7909,6 @@ struct mlx5_ifc_query_lag_out_bits {
 
 	u8         syndrome[0x20];
 
-	u8         reserved_at_40[0x40];
-
 	struct mlx5_ifc_lagc_bits ctx;
 };
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/include/linux/netfilter/ipset/ip_set.h linux-libre-4.9.212-gnu/include/linux/netfilter/ipset/ip_set.h
--- linux-libre-4.9.211-gnu/include/linux/netfilter/ipset/ip_set.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/include/linux/netfilter/ipset/ip_set.h	2020-01-29 04:24:41.000000000 -0500
@@ -537,13 +537,6 @@ ip6addrptr(const struct sk_buff *skb, bo
 	       sizeof(*addr));
 }
 
-/* Calculate the bytes required to store the inclusive range of a-b */
-static inline int
-bitmap_bytes(u32 a, u32 b)
-{
-	return 4 * ((((b - a + 8) / 8) + 3) / 4);
-}
-
 #include <linux/netfilter/ipset/ip_set_timeout.h>
 #include <linux/netfilter/ipset/ip_set_comment.h>
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/include/linux/platform_data/dma-imx-sdma.h linux-libre-4.9.212-gnu/include/linux/platform_data/dma-imx-sdma.h
--- linux-libre-4.9.211-gnu/include/linux/platform_data/dma-imx-sdma.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/include/linux/platform_data/dma-imx-sdma.h	2020-01-29 04:24:41.000000000 -0500
@@ -50,7 +50,10 @@ struct sdma_script_start_addrs {
 	/* End of v2 array */
 	s32 zcanfd_2_mcu_addr;
 	s32 zqspi_2_mcu_addr;
+	s32 mcu_2_ecspi_addr;
 	/* End of v3 array */
+	s32 mcu_2_zqspi_addr;
+	/* End of v4 array */
 };
 
 /**
diff -druNp --no-dereference linux-libre-4.9.211-gnu/include/linux/signal.h linux-libre-4.9.212-gnu/include/linux/signal.h
--- linux-libre-4.9.211-gnu/include/linux/signal.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/include/linux/signal.h	2020-01-29 04:24:41.000000000 -0500
@@ -313,6 +313,9 @@ extern void signal_setup_done(int failed
 extern void exit_signals(struct task_struct *tsk);
 extern void kernel_sigaction(int, __sighandler_t);
 
+#define SIG_KTHREAD ((__force __sighandler_t)2)
+#define SIG_KTHREAD_KERNEL ((__force __sighandler_t)3)
+
 static inline void allow_signal(int sig)
 {
 	/*
@@ -320,7 +323,17 @@ static inline void allow_signal(int sig)
 	 * know it'll be handled, so that they don't get converted to
 	 * SIGKILL or just silently dropped.
 	 */
-	kernel_sigaction(sig, (__force __sighandler_t)2);
+	kernel_sigaction(sig, SIG_KTHREAD);
+}
+
+static inline void allow_kernel_signal(int sig)
+{
+	/*
+	 * Kernel threads handle their own signals. Let the signal code
+	 * know signals sent by the kernel will be handled, so that they
+	 * don't get silently dropped.
+	 */
+	kernel_sigaction(sig, SIG_KTHREAD_KERNEL);
 }
 
 static inline void disallow_signal(int sig)
diff -druNp --no-dereference linux-libre-4.9.211-gnu/include/media/davinci/vpbe.h linux-libre-4.9.212-gnu/include/media/davinci/vpbe.h
--- linux-libre-4.9.211-gnu/include/media/davinci/vpbe.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/include/media/davinci/vpbe.h	2020-01-29 04:24:41.000000000 -0500
@@ -96,7 +96,7 @@ struct vpbe_config {
 	struct encoder_config_info *ext_encoders;
 	/* amplifier information goes here */
 	struct amp_config_info *amp;
-	int num_outputs;
+	unsigned int num_outputs;
 	/* Order is venc outputs followed by LCD and then external encoders */
 	struct vpbe_output *outputs;
 };
diff -druNp --no-dereference linux-libre-4.9.211-gnu/include/trace/events/xen.h linux-libre-4.9.212-gnu/include/trace/events/xen.h
--- linux-libre-4.9.211-gnu/include/trace/events/xen.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/include/trace/events/xen.h	2020-01-29 04:24:41.000000000 -0500
@@ -63,7 +63,11 @@ TRACE_EVENT(xen_mc_callback,
 	    TP_PROTO(xen_mc_callback_fn_t fn, void *data),
 	    TP_ARGS(fn, data),
 	    TP_STRUCT__entry(
-		    __field(xen_mc_callback_fn_t, fn)
+		    /*
+		     * Use field_struct to avoid is_signed_type()
+		     * comparison of a function pointer.
+		     */
+		    __field_struct(xen_mc_callback_fn_t, fn)
 		    __field(void *, data)
 		    ),
 	    TP_fast_assign(
diff -druNp --no-dereference linux-libre-4.9.211-gnu/include/uapi/linux/ethtool.h linux-libre-4.9.212-gnu/include/uapi/linux/ethtool.h
--- linux-libre-4.9.211-gnu/include/uapi/linux/ethtool.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/include/uapi/linux/ethtool.h	2020-01-29 04:24:41.000000000 -0500
@@ -1687,6 +1687,8 @@ enum ethtool_reset_flags {
  *	%ethtool_link_mode_bit_indices for the link modes, and other
  *	link features that the link partner advertised through
  *	autonegotiation; 0 if unknown or not applicable.  Read-only.
+ * @transceiver: Used to distinguish different possible PHY types,
+ *	reported consistently by PHYLIB.  Read-only.
  *
  * If autonegotiation is disabled, the speed and @duplex represent the
  * fixed link mode and are writable if the driver supports multiple
@@ -1738,7 +1740,9 @@ struct ethtool_link_settings {
 	__u8	eth_tp_mdix;
 	__u8	eth_tp_mdix_ctrl;
 	__s8	link_mode_masks_nwords;
-	__u32	reserved[8];
+	__u8	transceiver;
+	__u8	reserved1[3];
+	__u32	reserved[7];
 	__u32	link_mode_masks[0];
 	/* layout of link_mode_masks fields:
 	 * __u32 map_supported[link_mode_masks_nwords];
diff -druNp --no-dereference linux-libre-4.9.211-gnu/kernel/debug/kdb/kdb_main.c linux-libre-4.9.212-gnu/kernel/debug/kdb/kdb_main.c
--- linux-libre-4.9.211-gnu/kernel/debug/kdb/kdb_main.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/kernel/debug/kdb/kdb_main.c	2020-01-29 04:24:41.000000000 -0500
@@ -2632,7 +2632,7 @@ static int kdb_per_cpu(int argc, const c
 		diag = kdbgetularg(argv[3], &whichcpu);
 		if (diag)
 			return diag;
-		if (!cpu_online(whichcpu)) {
+		if (whichcpu >= nr_cpu_ids || !cpu_online(whichcpu)) {
 			kdb_printf("cpu %ld is not online\n", whichcpu);
 			return KDB_BADCPUNUM;
 		}
diff -druNp --no-dereference linux-libre-4.9.211-gnu/kernel/events/core.c linux-libre-4.9.212-gnu/kernel/events/core.c
--- linux-libre-4.9.211-gnu/kernel/events/core.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/kernel/events/core.c	2020-01-29 04:24:41.000000000 -0500
@@ -4624,6 +4624,9 @@ static int perf_event_period(struct perf
 	if (perf_event_check_period(event, value))
 		return -EINVAL;
 
+	if (!event->attr.freq && (value & (1ULL << 63)))
+		return -EINVAL;
+
 	event_function_call(event, __perf_event_period, &value);
 
 	return 0;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/kernel/signal.c linux-libre-4.9.212-gnu/kernel/signal.c
--- linux-libre-4.9.211-gnu/kernel/signal.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/kernel/signal.c	2020-01-29 04:24:41.000000000 -0500
@@ -79,6 +79,11 @@ static int sig_task_ignored(struct task_
 	    handler == SIG_DFL && !(force && sig_kernel_only(sig)))
 		return 1;
 
+	/* Only allow kernel generated signals to this kthread */
+	if (unlikely((t->flags & PF_KTHREAD) &&
+		     (handler == SIG_KTHREAD_KERNEL) && !force))
+		return true;
+
 	return sig_handler_ignored(handler, sig);
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/lib/bitmap.c linux-libre-4.9.212-gnu/lib/bitmap.c
--- linux-libre-4.9.211-gnu/lib/bitmap.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/lib/bitmap.c	2020-01-29 04:24:41.000000000 -0500
@@ -13,6 +13,7 @@
 #include <linux/bitops.h>
 #include <linux/bug.h>
 #include <linux/kernel.h>
+#include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/uaccess.h>
 
@@ -1212,3 +1213,22 @@ void bitmap_copy_le(unsigned long *dst,
 }
 EXPORT_SYMBOL(bitmap_copy_le);
 #endif
+
+unsigned long *bitmap_alloc(unsigned int nbits, gfp_t flags)
+{
+	return kmalloc_array(BITS_TO_LONGS(nbits), sizeof(unsigned long),
+			     flags);
+}
+EXPORT_SYMBOL(bitmap_alloc);
+
+unsigned long *bitmap_zalloc(unsigned int nbits, gfp_t flags)
+{
+	return bitmap_alloc(nbits, flags | __GFP_ZERO);
+}
+EXPORT_SYMBOL(bitmap_zalloc);
+
+void bitmap_free(const unsigned long *bitmap)
+{
+	kfree(bitmap);
+}
+EXPORT_SYMBOL(bitmap_free);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/lib/devres.c linux-libre-4.9.212-gnu/lib/devres.c
--- linux-libre-4.9.211-gnu/lib/devres.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/lib/devres.c	2020-01-29 04:24:41.000000000 -0500
@@ -131,7 +131,8 @@ EXPORT_SYMBOL(devm_iounmap);
  *	if (IS_ERR(base))
  *		return PTR_ERR(base);
  */
-void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res)
+void __iomem *devm_ioremap_resource(struct device *dev,
+				    const struct resource *res)
 {
 	resource_size_t size;
 	const char *name;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/lib/kfifo.c linux-libre-4.9.212-gnu/lib/kfifo.c
--- linux-libre-4.9.211-gnu/lib/kfifo.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/lib/kfifo.c	2020-01-29 04:24:41.000000000 -0500
@@ -82,7 +82,8 @@ int __kfifo_init(struct __kfifo *fifo, v
 {
 	size /= esize;
 
-	size = roundup_pow_of_two(size);
+	if (!is_power_of_2(size))
+		size = rounddown_pow_of_two(size);
 
 	fifo->in = 0;
 	fifo->out = 0;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/Makefile linux-libre-4.9.212-gnu/Makefile
--- linux-libre-4.9.211-gnu/Makefile	2020-01-23 09:11:36.000000000 -0500
+++ linux-libre-4.9.212-gnu/Makefile	2020-01-29 05:10:56.000000000 -0500
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 9
-SUBLEVEL = 211
+SUBLEVEL = 212
 EXTRAVERSION = -gnu
 NAME = Roaring Lionus
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/6lowpan/nhc.c linux-libre-4.9.212-gnu/net/6lowpan/nhc.c
--- linux-libre-4.9.211-gnu/net/6lowpan/nhc.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/6lowpan/nhc.c	2020-01-29 04:24:41.000000000 -0500
@@ -18,7 +18,7 @@
 #include "nhc.h"
 
 static struct rb_root rb_root = RB_ROOT;
-static struct lowpan_nhc *lowpan_nexthdr_nhcs[NEXTHDR_MAX];
+static struct lowpan_nhc *lowpan_nexthdr_nhcs[NEXTHDR_MAX + 1];
 static DEFINE_SPINLOCK(lowpan_nhc_lock);
 
 static int lowpan_nhc_insert(struct lowpan_nhc *nhc)
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/bridge/netfilter/ebtables.c linux-libre-4.9.212-gnu/net/bridge/netfilter/ebtables.c
--- linux-libre-4.9.211-gnu/net/bridge/netfilter/ebtables.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/bridge/netfilter/ebtables.c	2020-01-29 04:24:41.000000000 -0500
@@ -2182,7 +2182,9 @@ static int compat_copy_entries(unsigned
 	if (ret < 0)
 		return ret;
 
-	WARN_ON(size_remaining);
+	if (size_remaining)
+		return -EINVAL;
+
 	return state->buf_kern_offset;
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/core/ethtool.c linux-libre-4.9.212-gnu/net/core/ethtool.c
--- linux-libre-4.9.211-gnu/net/core/ethtool.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/core/ethtool.c	2020-01-29 04:24:41.000000000 -0500
@@ -514,6 +514,8 @@ convert_link_ksettings_to_legacy_setting
 		= link_ksettings->base.eth_tp_mdix;
 	legacy_settings->eth_tp_mdix_ctrl
 		= link_ksettings->base.eth_tp_mdix_ctrl;
+	legacy_settings->transceiver
+		= link_ksettings->base.transceiver;
 	return retval;
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/core/neighbour.c linux-libre-4.9.212-gnu/net/core/neighbour.c
--- linux-libre-4.9.211-gnu/net/core/neighbour.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/core/neighbour.c	2020-01-29 04:24:41.000000000 -0500
@@ -1834,8 +1834,8 @@ static int neightbl_fill_info(struct sk_
 		goto nla_put_failure;
 	{
 		unsigned long now = jiffies;
-		unsigned int flush_delta = now - tbl->last_flush;
-		unsigned int rand_delta = now - tbl->last_rand;
+		long flush_delta = now - tbl->last_flush;
+		long rand_delta = now - tbl->last_rand;
 		struct neigh_hash_table *nht;
 		struct ndt_config ndc = {
 			.ndtc_key_len		= tbl->key_len,
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/ieee802154/6lowpan/reassembly.c linux-libre-4.9.212-gnu/net/ieee802154/6lowpan/reassembly.c
--- linux-libre-4.9.211-gnu/net/ieee802154/6lowpan/reassembly.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/ieee802154/6lowpan/reassembly.c	2020-01-29 04:24:41.000000000 -0500
@@ -633,7 +633,7 @@ err_sysctl:
 
 void lowpan_net_frag_exit(void)
 {
-	inet_frags_fini(&lowpan_frags);
 	lowpan_frags_sysctl_unregister();
 	unregister_pernet_subsys(&lowpan_frags_ops);
+	inet_frags_fini(&lowpan_frags);
 }
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/ipv4/ip_tunnel.c linux-libre-4.9.212-gnu/net/ipv4/ip_tunnel.c
--- linux-libre-4.9.211-gnu/net/ipv4/ip_tunnel.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/ipv4/ip_tunnel.c	2020-01-29 04:24:41.000000000 -0500
@@ -1184,10 +1184,8 @@ int ip_tunnel_init(struct net_device *de
 	iph->version		= 4;
 	iph->ihl		= 5;
 
-	if (tunnel->collect_md) {
-		dev->features |= NETIF_F_NETNS_LOCAL;
+	if (tunnel->collect_md)
 		netif_keep_dst(dev);
-	}
 	return 0;
 }
 EXPORT_SYMBOL_GPL(ip_tunnel_init);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/ipv4/tcp_bbr.c linux-libre-4.9.212-gnu/net/ipv4/tcp_bbr.c
--- linux-libre-4.9.211-gnu/net/ipv4/tcp_bbr.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/ipv4/tcp_bbr.c	2020-01-29 04:24:41.000000000 -0500
@@ -649,8 +649,7 @@ static void bbr_update_bw(struct sock *s
 	 * bandwidth sample. Delivered is in packets and interval_us in uS and
 	 * ratio will be <<1 for most connections. So delivered is first scaled.
 	 */
-	bw = (u64)rs->delivered * BW_UNIT;
-	do_div(bw, rs->interval_us);
+	bw = div64_long((u64)rs->delivered * BW_UNIT, rs->interval_us);
 
 	/* If this sample is application-limited, it is likely to have a very
 	 * low delivered count that represents application behavior rather than
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/ipv6/ip6_tunnel.c linux-libre-4.9.212-gnu/net/ipv6/ip6_tunnel.c
--- linux-libre-4.9.211-gnu/net/ipv6/ip6_tunnel.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/ipv6/ip6_tunnel.c	2020-01-29 04:24:41.000000000 -0500
@@ -1861,10 +1861,8 @@ static int ip6_tnl_dev_init(struct net_d
 	if (err)
 		return err;
 	ip6_tnl_link_config(t);
-	if (t->parms.collect_md) {
-		dev->features |= NETIF_F_NETNS_LOCAL;
+	if (t->parms.collect_md)
 		netif_keep_dst(dev);
-	}
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/ipv6/reassembly.c linux-libre-4.9.212-gnu/net/ipv6/reassembly.c
--- linux-libre-4.9.211-gnu/net/ipv6/reassembly.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/ipv6/reassembly.c	2020-01-29 04:24:41.000000000 -0500
@@ -592,8 +592,8 @@ err_protocol:
 
 void ipv6_frag_exit(void)
 {
-	inet_frags_fini(&ip6_frags);
 	ip6_frags_sysctl_unregister();
 	unregister_pernet_subsys(&ip6_frags_ops);
 	inet6_del_protocol(&frag_protocol, IPPROTO_FRAGMENT);
+	inet_frags_fini(&ip6_frags);
 }
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/iucv/af_iucv.c linux-libre-4.9.212-gnu/net/iucv/af_iucv.c
--- linux-libre-4.9.211-gnu/net/iucv/af_iucv.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/iucv/af_iucv.c	2020-01-29 04:24:41.000000000 -0500
@@ -2431,6 +2431,13 @@ out:
 	return err;
 }
 
+static void afiucv_iucv_exit(void)
+{
+	device_unregister(af_iucv_dev);
+	driver_unregister(&af_iucv_driver);
+	pr_iucv->iucv_unregister(&af_iucv_handler, 0);
+}
+
 static int __init afiucv_init(void)
 {
 	int err;
@@ -2464,11 +2471,18 @@ static int __init afiucv_init(void)
 		err = afiucv_iucv_init();
 		if (err)
 			goto out_sock;
-	} else
-		register_netdevice_notifier(&afiucv_netdev_notifier);
+	}
+
+	err = register_netdevice_notifier(&afiucv_netdev_notifier);
+	if (err)
+		goto out_notifier;
+
 	dev_add_pack(&iucv_packet_type);
 	return 0;
 
+out_notifier:
+	if (pr_iucv)
+		afiucv_iucv_exit();
 out_sock:
 	sock_unregister(PF_IUCV);
 out_proto:
@@ -2482,12 +2496,11 @@ out:
 static void __exit afiucv_exit(void)
 {
 	if (pr_iucv) {
-		device_unregister(af_iucv_dev);
-		driver_unregister(&af_iucv_driver);
-		pr_iucv->iucv_unregister(&af_iucv_handler, 0);
+		afiucv_iucv_exit();
 		symbol_put(iucv_if);
-	} else
-		unregister_netdevice_notifier(&afiucv_netdev_notifier);
+	}
+
+	unregister_netdevice_notifier(&afiucv_netdev_notifier);
 	dev_remove_pack(&iucv_packet_type);
 	sock_unregister(PF_IUCV);
 	proto_unregister(&iucv_proto);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/l2tp/l2tp_core.c linux-libre-4.9.212-gnu/net/l2tp/l2tp_core.c
--- linux-libre-4.9.211-gnu/net/l2tp/l2tp_core.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/l2tp/l2tp_core.c	2020-01-29 04:24:41.000000000 -0500
@@ -1947,7 +1947,8 @@ static __net_exit void l2tp_exit_net(str
 	}
 	rcu_read_unlock_bh();
 
-	flush_workqueue(l2tp_wq);
+	if (l2tp_wq)
+		flush_workqueue(l2tp_wq);
 	rcu_barrier();
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/llc/af_llc.c linux-libre-4.9.212-gnu/net/llc/af_llc.c
--- linux-libre-4.9.211-gnu/net/llc/af_llc.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/llc/af_llc.c	2020-01-29 04:24:41.000000000 -0500
@@ -111,22 +111,26 @@ static inline u8 llc_ui_header_len(struc
  *
  *	Send data via reliable llc2 connection.
  *	Returns 0 upon success, non-zero if action did not succeed.
+ *
+ *	This function always consumes a reference to the skb.
  */
 static int llc_ui_send_data(struct sock* sk, struct sk_buff *skb, int noblock)
 {
 	struct llc_sock* llc = llc_sk(sk);
-	int rc = 0;
 
 	if (unlikely(llc_data_accept_state(llc->state) ||
 		     llc->remote_busy_flag ||
 		     llc->p_flag)) {
 		long timeout = sock_sndtimeo(sk, noblock);
+		int rc;
 
 		rc = llc_ui_wait_for_busy_core(sk, timeout);
+		if (rc) {
+			kfree_skb(skb);
+			return rc;
+		}
 	}
-	if (unlikely(!rc))
-		rc = llc_build_and_send_pkt(sk, skb);
-	return rc;
+	return llc_build_and_send_pkt(sk, skb);
 }
 
 static void llc_ui_sk_init(struct socket *sock, struct sock *sk)
@@ -896,7 +900,7 @@ static int llc_ui_sendmsg(struct socket
 	DECLARE_SOCKADDR(struct sockaddr_llc *, addr, msg->msg_name);
 	int flags = msg->msg_flags;
 	int noblock = flags & MSG_DONTWAIT;
-	struct sk_buff *skb;
+	struct sk_buff *skb = NULL;
 	size_t size = 0;
 	int rc = -EINVAL, copied = 0, hdrlen;
 
@@ -905,10 +909,10 @@ static int llc_ui_sendmsg(struct socket
 	lock_sock(sk);
 	if (addr) {
 		if (msg->msg_namelen < sizeof(*addr))
-			goto release;
+			goto out;
 	} else {
 		if (llc_ui_addr_null(&llc->addr))
-			goto release;
+			goto out;
 		addr = &llc->addr;
 	}
 	/* must bind connection to sap if user hasn't done it. */
@@ -916,7 +920,7 @@ static int llc_ui_sendmsg(struct socket
 		/* bind to sap with null dev, exclusive. */
 		rc = llc_ui_autobind(sock, addr);
 		if (rc)
-			goto release;
+			goto out;
 	}
 	hdrlen = llc->dev->hard_header_len + llc_ui_header_len(sk, addr);
 	size = hdrlen + len;
@@ -925,12 +929,12 @@ static int llc_ui_sendmsg(struct socket
 	copied = size - hdrlen;
 	rc = -EINVAL;
 	if (copied < 0)
-		goto release;
+		goto out;
 	release_sock(sk);
 	skb = sock_alloc_send_skb(sk, size, noblock, &rc);
 	lock_sock(sk);
 	if (!skb)
-		goto release;
+		goto out;
 	skb->dev      = llc->dev;
 	skb->protocol = llc_proto_type(addr->sllc_arphrd);
 	skb_reserve(skb, hdrlen);
@@ -940,29 +944,31 @@ static int llc_ui_sendmsg(struct socket
 	if (sk->sk_type == SOCK_DGRAM || addr->sllc_ua) {
 		llc_build_and_send_ui_pkt(llc->sap, skb, addr->sllc_mac,
 					  addr->sllc_sap);
+		skb = NULL;
 		goto out;
 	}
 	if (addr->sllc_test) {
 		llc_build_and_send_test_pkt(llc->sap, skb, addr->sllc_mac,
 					    addr->sllc_sap);
+		skb = NULL;
 		goto out;
 	}
 	if (addr->sllc_xid) {
 		llc_build_and_send_xid_pkt(llc->sap, skb, addr->sllc_mac,
 					   addr->sllc_sap);
+		skb = NULL;
 		goto out;
 	}
 	rc = -ENOPROTOOPT;
 	if (!(sk->sk_type == SOCK_STREAM && !addr->sllc_ua))
 		goto out;
 	rc = llc_ui_send_data(sk, skb, noblock);
+	skb = NULL;
 out:
-	if (rc) {
-		kfree_skb(skb);
-release:
+	kfree_skb(skb);
+	if (rc)
 		dprintk("%s: failed sending from %02X to %02X: %d\n",
 			__func__, llc->laddr.lsap, llc->daddr.lsap, rc);
-	}
 	release_sock(sk);
 	return rc ? : copied;
 }
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/llc/llc_conn.c linux-libre-4.9.212-gnu/net/llc/llc_conn.c
--- linux-libre-4.9.211-gnu/net/llc/llc_conn.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/llc/llc_conn.c	2020-01-29 04:24:41.000000000 -0500
@@ -55,6 +55,8 @@ int sysctl_llc2_busy_timeout = LLC2_BUSY
  *	(executing it's actions and changing state), upper layer will be
  *	indicated or confirmed, if needed. Returns 0 for success, 1 for
  *	failure. The socket lock has to be held before calling this function.
+ *
+ *	This function always consumes a reference to the skb.
  */
 int llc_conn_state_process(struct sock *sk, struct sk_buff *skb)
 {
@@ -62,12 +64,6 @@ int llc_conn_state_process(struct sock *
 	struct llc_sock *llc = llc_sk(skb->sk);
 	struct llc_conn_state_ev *ev = llc_conn_ev(skb);
 
-	/*
-	 * We have to hold the skb, because llc_conn_service will kfree it in
-	 * the sending path and we need to look at the skb->cb, where we encode
-	 * llc_conn_state_ev.
-	 */
-	skb_get(skb);
 	ev->ind_prim = ev->cfm_prim = 0;
 	/*
 	 * Send event to state machine
@@ -75,21 +71,12 @@ int llc_conn_state_process(struct sock *
 	rc = llc_conn_service(skb->sk, skb);
 	if (unlikely(rc != 0)) {
 		printk(KERN_ERR "%s: llc_conn_service failed\n", __func__);
-		goto out_kfree_skb;
-	}
-
-	if (unlikely(!ev->ind_prim && !ev->cfm_prim)) {
-		/* indicate or confirm not required */
-		if (!skb->next)
-			goto out_kfree_skb;
 		goto out_skb_put;
 	}
 
-	if (unlikely(ev->ind_prim && ev->cfm_prim)) /* Paranoia */
-		skb_get(skb);
-
 	switch (ev->ind_prim) {
 	case LLC_DATA_PRIM:
+		skb_get(skb);
 		llc_save_primitive(sk, skb, LLC_DATA_PRIM);
 		if (unlikely(sock_queue_rcv_skb(sk, skb))) {
 			/*
@@ -106,6 +93,7 @@ int llc_conn_state_process(struct sock *
 		 * skb->sk pointing to the newly created struct sock in
 		 * llc_conn_handler. -acme
 		 */
+		skb_get(skb);
 		skb_queue_tail(&sk->sk_receive_queue, skb);
 		sk->sk_state_change(sk);
 		break;
@@ -121,7 +109,6 @@ int llc_conn_state_process(struct sock *
 				sk->sk_state_change(sk);
 			}
 		}
-		kfree_skb(skb);
 		sock_put(sk);
 		break;
 	case LLC_RESET_PRIM:
@@ -130,14 +117,11 @@ int llc_conn_state_process(struct sock *
 		 * RESET is not being notified to upper layers for now
 		 */
 		printk(KERN_INFO "%s: received a reset ind!\n", __func__);
-		kfree_skb(skb);
 		break;
 	default:
-		if (ev->ind_prim) {
+		if (ev->ind_prim)
 			printk(KERN_INFO "%s: received unknown %d prim!\n",
 				__func__, ev->ind_prim);
-			kfree_skb(skb);
-		}
 		/* No indication */
 		break;
 	}
@@ -179,15 +163,12 @@ int llc_conn_state_process(struct sock *
 		printk(KERN_INFO "%s: received a reset conf!\n", __func__);
 		break;
 	default:
-		if (ev->cfm_prim) {
+		if (ev->cfm_prim)
 			printk(KERN_INFO "%s: received unknown %d prim!\n",
 					__func__, ev->cfm_prim);
-			break;
-		}
-		goto out_skb_put; /* No confirmation */
+		/* No confirmation */
+		break;
 	}
-out_kfree_skb:
-	kfree_skb(skb);
 out_skb_put:
 	kfree_skb(skb);
 	return rc;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/llc/llc_if.c linux-libre-4.9.212-gnu/net/llc/llc_if.c
--- linux-libre-4.9.211-gnu/net/llc/llc_if.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/llc/llc_if.c	2020-01-29 04:24:41.000000000 -0500
@@ -38,6 +38,8 @@
  *	closed and -EBUSY when sending data is not permitted in this state or
  *	LLC has send an I pdu with p bit set to 1 and is waiting for it's
  *	response.
+ *
+ *	This function always consumes a reference to the skb.
  */
 int llc_build_and_send_pkt(struct sock *sk, struct sk_buff *skb)
 {
@@ -46,20 +48,22 @@ int llc_build_and_send_pkt(struct sock *
 	struct llc_sock *llc = llc_sk(sk);
 
 	if (unlikely(llc->state == LLC_CONN_STATE_ADM))
-		goto out;
+		goto out_free;
 	rc = -EBUSY;
 	if (unlikely(llc_data_accept_state(llc->state) || /* data_conn_refuse */
 		     llc->p_flag)) {
 		llc->failed_data_req = 1;
-		goto out;
+		goto out_free;
 	}
 	ev = llc_conn_ev(skb);
 	ev->type      = LLC_CONN_EV_TYPE_PRIM;
 	ev->prim      = LLC_DATA_PRIM;
 	ev->prim_type = LLC_PRIM_TYPE_REQ;
 	skb->dev      = llc->dev;
-	rc = llc_conn_state_process(sk, skb);
-out:
+	return llc_conn_state_process(sk, skb);
+
+out_free:
+	kfree_skb(skb);
 	return rc;
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/mac80211/rc80211_minstrel_ht.c linux-libre-4.9.212-gnu/net/mac80211/rc80211_minstrel_ht.c
--- linux-libre-4.9.211-gnu/net/mac80211/rc80211_minstrel_ht.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/mac80211/rc80211_minstrel_ht.c	2020-01-29 04:24:41.000000000 -0500
@@ -547,7 +547,7 @@ minstrel_ht_update_stats(struct minstrel
 
 		/* (re)Initialize group rate indexes */
 		for(j = 0; j < MAX_THR_RATES; j++)
-			tmp_group_tp_rate[j] = group;
+			tmp_group_tp_rate[j] = MCS_GROUP_RATES * group;
 
 		for (i = 0; i < MCS_GROUP_RATES; i++) {
 			if (!(mg->supported & BIT(i)))
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/mac80211/rx.c linux-libre-4.9.212-gnu/net/mac80211/rx.c
--- linux-libre-4.9.211-gnu/net/mac80211/rx.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/mac80211/rx.c	2020-01-29 04:24:41.000000000 -0500
@@ -3205,9 +3205,18 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_
 	case cpu_to_le16(IEEE80211_STYPE_PROBE_RESP):
 		/* process for all: mesh, mlme, ibss */
 		break;
+	case cpu_to_le16(IEEE80211_STYPE_DEAUTH):
+		if (is_multicast_ether_addr(mgmt->da) &&
+		    !is_broadcast_ether_addr(mgmt->da))
+			return RX_DROP_MONITOR;
+
+		/* process only for station/IBSS */
+		if (sdata->vif.type != NL80211_IFTYPE_STATION &&
+		    sdata->vif.type != NL80211_IFTYPE_ADHOC)
+			return RX_DROP_MONITOR;
+		break;
 	case cpu_to_le16(IEEE80211_STYPE_ASSOC_RESP):
 	case cpu_to_le16(IEEE80211_STYPE_REASSOC_RESP):
-	case cpu_to_le16(IEEE80211_STYPE_DEAUTH):
 	case cpu_to_le16(IEEE80211_STYPE_DISASSOC):
 		if (is_multicast_ether_addr(mgmt->da) &&
 		    !is_broadcast_ether_addr(mgmt->da))
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/netfilter/ipset/ip_set_bitmap_gen.h linux-libre-4.9.212-gnu/net/netfilter/ipset/ip_set_bitmap_gen.h
--- linux-libre-4.9.211-gnu/net/netfilter/ipset/ip_set_bitmap_gen.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/netfilter/ipset/ip_set_bitmap_gen.h	2020-01-29 04:24:41.000000000 -0500
@@ -81,7 +81,7 @@ mtype_flush(struct ip_set *set)
 
 	if (set->extensions & IPSET_EXT_DESTROY)
 		mtype_ext_cleanup(set);
-	memset(map->members, 0, map->memsize);
+	bitmap_zero(map->members, map->elements);
 }
 
 static int
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/netfilter/ipset/ip_set_bitmap_ip.c linux-libre-4.9.212-gnu/net/netfilter/ipset/ip_set_bitmap_ip.c
--- linux-libre-4.9.211-gnu/net/netfilter/ipset/ip_set_bitmap_ip.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/netfilter/ipset/ip_set_bitmap_ip.c	2020-01-29 04:24:41.000000000 -0500
@@ -40,7 +40,7 @@ MODULE_ALIAS("ip_set_bitmap:ip");
 
 /* Type structure */
 struct bitmap_ip {
-	void *members;		/* the set members */
+	unsigned long *members;	/* the set members */
 	u32 first_ip;		/* host byte order, included in range */
 	u32 last_ip;		/* host byte order, included in range */
 	u32 elements;		/* number of max elements in the set */
@@ -222,7 +222,7 @@ init_map_ip(struct ip_set *set, struct b
 	    u32 first_ip, u32 last_ip,
 	    u32 elements, u32 hosts, u8 netmask)
 {
-	map->members = ip_set_alloc(map->memsize);
+	map->members = bitmap_zalloc(elements, GFP_KERNEL | __GFP_NOWARN);
 	if (!map->members)
 		return false;
 	map->first_ip = first_ip;
@@ -315,7 +315,7 @@ bitmap_ip_create(struct net *net, struct
 	if (!map)
 		return -ENOMEM;
 
-	map->memsize = bitmap_bytes(0, elements - 1);
+	map->memsize = BITS_TO_LONGS(elements) * sizeof(unsigned long);
 	set->variant = &bitmap_ip;
 	if (!init_map_ip(set, map, first_ip, last_ip,
 			 elements, hosts, netmask)) {
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/netfilter/ipset/ip_set_bitmap_ipmac.c linux-libre-4.9.212-gnu/net/netfilter/ipset/ip_set_bitmap_ipmac.c
--- linux-libre-4.9.211-gnu/net/netfilter/ipset/ip_set_bitmap_ipmac.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/netfilter/ipset/ip_set_bitmap_ipmac.c	2020-01-29 04:24:41.000000000 -0500
@@ -46,7 +46,7 @@ enum {
 
 /* Type structure */
 struct bitmap_ipmac {
-	void *members;		/* the set members */
+	unsigned long *members;	/* the set members */
 	u32 first_ip;		/* host byte order, included in range */
 	u32 last_ip;		/* host byte order, included in range */
 	u32 elements;		/* number of max elements in the set */
@@ -299,7 +299,7 @@ static bool
 init_map_ipmac(struct ip_set *set, struct bitmap_ipmac *map,
 	       u32 first_ip, u32 last_ip, u32 elements)
 {
-	map->members = ip_set_alloc(map->memsize);
+	map->members = bitmap_zalloc(elements, GFP_KERNEL | __GFP_NOWARN);
 	if (!map->members)
 		return false;
 	map->first_ip = first_ip;
@@ -363,7 +363,7 @@ bitmap_ipmac_create(struct net *net, str
 	if (!map)
 		return -ENOMEM;
 
-	map->memsize = bitmap_bytes(0, elements - 1);
+	map->memsize = BITS_TO_LONGS(elements) * sizeof(unsigned long);
 	set->variant = &bitmap_ipmac;
 	if (!init_map_ipmac(set, map, first_ip, last_ip, elements)) {
 		kfree(map);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/netfilter/ipset/ip_set_bitmap_port.c linux-libre-4.9.212-gnu/net/netfilter/ipset/ip_set_bitmap_port.c
--- linux-libre-4.9.211-gnu/net/netfilter/ipset/ip_set_bitmap_port.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/netfilter/ipset/ip_set_bitmap_port.c	2020-01-29 04:24:41.000000000 -0500
@@ -34,7 +34,7 @@ MODULE_ALIAS("ip_set_bitmap:port");
 
 /* Type structure */
 struct bitmap_port {
-	void *members;		/* the set members */
+	unsigned long *members;	/* the set members */
 	u16 first_port;		/* host byte order, included in range */
 	u16 last_port;		/* host byte order, included in range */
 	u32 elements;		/* number of max elements in the set */
@@ -207,7 +207,7 @@ static bool
 init_map_port(struct ip_set *set, struct bitmap_port *map,
 	      u16 first_port, u16 last_port)
 {
-	map->members = ip_set_alloc(map->memsize);
+	map->members = bitmap_zalloc(map->elements, GFP_KERNEL | __GFP_NOWARN);
 	if (!map->members)
 		return false;
 	map->first_port = first_port;
@@ -250,7 +250,7 @@ bitmap_port_create(struct net *net, stru
 		return -ENOMEM;
 
 	map->elements = elements;
-	map->memsize = bitmap_bytes(0, map->elements);
+	map->memsize = BITS_TO_LONGS(elements) * sizeof(unsigned long);
 	set->variant = &bitmap_port;
 	if (!init_map_port(set, map, first_port, last_port)) {
 		kfree(map);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/packet/af_packet.c linux-libre-4.9.212-gnu/net/packet/af_packet.c
--- linux-libre-4.9.211-gnu/net/packet/af_packet.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/packet/af_packet.c	2020-01-29 04:24:41.000000000 -0500
@@ -1332,15 +1332,21 @@ static void packet_sock_destruct(struct
 
 static bool fanout_flow_is_huge(struct packet_sock *po, struct sk_buff *skb)
 {
-	u32 rxhash;
+	u32 *history = po->rollover->history;
+	u32 victim, rxhash;
 	int i, count = 0;
 
 	rxhash = skb_get_hash(skb);
 	for (i = 0; i < ROLLOVER_HLEN; i++)
-		if (po->rollover->history[i] == rxhash)
+		if (READ_ONCE(history[i]) == rxhash)
 			count++;
 
-	po->rollover->history[prandom_u32() % ROLLOVER_HLEN] = rxhash;
+	victim = prandom_u32() % ROLLOVER_HLEN;
+
+	/* Avoid dirtying the cache line if possible */
+	if (READ_ONCE(history[victim]) != rxhash)
+		WRITE_ONCE(history[victim], rxhash);
+
 	return count > (ROLLOVER_HLEN >> 1);
 }
 
@@ -3404,20 +3410,29 @@ static int packet_recvmsg(struct socket
 	sock_recv_ts_and_drops(msg, sk, skb);
 
 	if (msg->msg_name) {
+		int copy_len;
+
 		/* If the address length field is there to be filled
 		 * in, we fill it in now.
 		 */
 		if (sock->type == SOCK_PACKET) {
 			__sockaddr_check_size(sizeof(struct sockaddr_pkt));
 			msg->msg_namelen = sizeof(struct sockaddr_pkt);
+			copy_len = msg->msg_namelen;
 		} else {
 			struct sockaddr_ll *sll = &PACKET_SKB_CB(skb)->sa.ll;
 
 			msg->msg_namelen = sll->sll_halen +
 				offsetof(struct sockaddr_ll, sll_addr);
+			copy_len = msg->msg_namelen;
+			if (msg->msg_namelen < sizeof(struct sockaddr_ll)) {
+				memset(msg->msg_name +
+				       offsetof(struct sockaddr_ll, sll_addr),
+				       0, sizeof(sll->sll_addr));
+				msg->msg_namelen = sizeof(struct sockaddr_ll);
+			}
 		}
-		memcpy(msg->msg_name, &PACKET_SKB_CB(skb)->sa,
-		       msg->msg_namelen);
+		memcpy(msg->msg_name, &PACKET_SKB_CB(skb)->sa, copy_len);
 	}
 
 	if (pkt_sk(sk)->auxdata) {
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/rds/ib_stats.c linux-libre-4.9.212-gnu/net/rds/ib_stats.c
--- linux-libre-4.9.211-gnu/net/rds/ib_stats.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/rds/ib_stats.c	2020-01-29 04:24:41.000000000 -0500
@@ -42,7 +42,7 @@ DEFINE_PER_CPU_SHARED_ALIGNED(struct rds
 static const char *const rds_ib_stat_names[] = {
 	"ib_connect_raced",
 	"ib_listen_closed_stale",
-	"s_ib_evt_handler_call",
+	"ib_evt_handler_call",
 	"ib_tasklet_call",
 	"ib_tx_cq_event",
 	"ib_tx_ring_full",
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/rxrpc/output.c linux-libre-4.9.212-gnu/net/rxrpc/output.c
--- linux-libre-4.9.211-gnu/net/rxrpc/output.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/rxrpc/output.c	2020-01-29 04:24:41.000000000 -0500
@@ -400,6 +400,9 @@ send_fragmentable:
 		}
 		break;
 #endif
+
+	default:
+		BUG();
 	}
 
 	up_write(&conn->params.local->defrag_sem);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/sched/act_mirred.c linux-libre-4.9.212-gnu/net/sched/act_mirred.c
--- linux-libre-4.9.211-gnu/net/sched/act_mirred.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/sched/act_mirred.c	2020-01-29 04:24:41.000000000 -0500
@@ -332,7 +332,11 @@ static int __init mirred_init_module(voi
 		return err;
 
 	pr_info("Mirror/redirect action on\n");
-	return tcf_register_action(&act_mirred_ops, &mirred_net_ops);
+	err = tcf_register_action(&act_mirred_ops, &mirred_net_ops);
+	if (err)
+		unregister_netdevice_notifier(&mirred_device_notifier);
+
+	return err;
 }
 
 static void __exit mirred_cleanup_module(void)
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/sched/ematch.c linux-libre-4.9.212-gnu/net/sched/ematch.c
--- linux-libre-4.9.211-gnu/net/sched/ematch.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/sched/ematch.c	2020-01-29 04:24:41.000000000 -0500
@@ -267,12 +267,12 @@ static int tcf_em_validate(struct tcf_pr
 				}
 				em->data = (unsigned long) v;
 			}
+			em->datalen = data_len;
 		}
 	}
 
 	em->matchid = em_hdr->matchid;
 	em->flags = em_hdr->flags;
-	em->datalen = data_len;
 	em->net = net;
 
 	err = 0;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/sched/sch_netem.c linux-libre-4.9.212-gnu/net/sched/sch_netem.c
--- linux-libre-4.9.211-gnu/net/sched/sch_netem.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/sched/sch_netem.c	2020-01-29 04:24:41.000000000 -0500
@@ -437,8 +437,7 @@ static int netem_enqueue(struct sk_buff
 	struct netem_skb_cb *cb;
 	struct sk_buff *skb2;
 	struct sk_buff *segs = NULL;
-	unsigned int len = 0, last_len, prev_len = qdisc_pkt_len(skb);
-	int nb = 0;
+	unsigned int prev_len = qdisc_pkt_len(skb);
 	int count = 1;
 	int rc = NET_XMIT_SUCCESS;
 	int rc_drop = NET_XMIT_DROP;
@@ -495,6 +494,7 @@ static int netem_enqueue(struct sk_buff
 			segs = netem_segment(skb, sch, to_free);
 			if (!segs)
 				return rc_drop;
+			qdisc_skb_cb(segs)->pkt_len = segs->len;
 		} else {
 			segs = skb;
 		}
@@ -510,6 +510,7 @@ static int netem_enqueue(struct sk_buff
 		if (skb->ip_summed == CHECKSUM_PARTIAL &&
 		    skb_checksum_help(skb)) {
 			qdisc_drop(skb, sch, to_free);
+			skb = NULL;
 			goto finish_segs;
 		}
 
@@ -585,6 +586,12 @@ static int netem_enqueue(struct sk_buff
 
 finish_segs:
 	if (segs) {
+		unsigned int len, last_len;
+		int nb;
+
+		len = skb ? skb->len : 0;
+		nb = skb ? 1 : 0;
+
 		while (segs) {
 			skb2 = segs->next;
 			segs->next = NULL;
@@ -600,9 +607,10 @@ finish_segs:
 			}
 			segs = skb2;
 		}
-		sch->q.qlen += nb;
-		if (nb > 1)
-			qdisc_tree_reduce_backlog(sch, 1 - nb, prev_len - len);
+		/* Parent qdiscs accounted for 1 skb of size @prev_len */
+		qdisc_tree_reduce_backlog(sch, -(nb - 1), -(len - prev_len));
+	} else if (!skb) {
+		return NET_XMIT_DROP;
 	}
 	return NET_XMIT_SUCCESS;
 }
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/tipc/node.c linux-libre-4.9.212-gnu/net/tipc/node.c
--- linux-libre-4.9.211-gnu/net/tipc/node.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/tipc/node.c	2020-01-29 04:24:41.000000000 -0500
@@ -688,10 +688,10 @@ static void __tipc_node_link_down(struct
 static void tipc_node_link_down(struct tipc_node *n, int bearer_id, bool delete)
 {
 	struct tipc_link_entry *le = &n->links[bearer_id];
+	struct tipc_media_addr *maddr = NULL;
 	struct tipc_link *l = le->link;
-	struct tipc_media_addr *maddr;
-	struct sk_buff_head xmitq;
 	int old_bearer_id = bearer_id;
+	struct sk_buff_head xmitq;
 
 	if (!l)
 		return;
@@ -713,7 +713,8 @@ static void tipc_node_link_down(struct t
 	tipc_node_write_unlock(n);
 	if (delete)
 		tipc_mon_remove_peer(n->net, n->addr, old_bearer_id);
-	tipc_bearer_xmit(n->net, bearer_id, &xmitq, maddr);
+	if (!skb_queue_empty(&xmitq))
+		tipc_bearer_xmit(n->net, bearer_id, &xmitq, maddr);
 	tipc_sk_rcv(n->net, &le->inputq);
 }
 
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/tipc/sysctl.c linux-libre-4.9.212-gnu/net/tipc/sysctl.c
--- linux-libre-4.9.211-gnu/net/tipc/sysctl.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/tipc/sysctl.c	2020-01-29 04:24:41.000000000 -0500
@@ -37,6 +37,8 @@
 
 #include <linux/sysctl.h>
 
+static int zero;
+static int one = 1;
 static struct ctl_table_header *tipc_ctl_hdr;
 
 static struct ctl_table tipc_table[] = {
@@ -45,14 +47,16 @@ static struct ctl_table tipc_table[] = {
 		.data		= &sysctl_tipc_rmem,
 		.maxlen		= sizeof(sysctl_tipc_rmem),
 		.mode		= 0644,
-		.proc_handler	= proc_dointvec,
+		.proc_handler	= proc_dointvec_minmax,
+		.extra1         = &one,
 	},
 	{
 		.procname	= "named_timeout",
 		.data		= &sysctl_tipc_named_timeout,
 		.maxlen		= sizeof(sysctl_tipc_named_timeout),
 		.mode		= 0644,
-		.proc_handler	= proc_dointvec,
+		.proc_handler	= proc_dointvec_minmax,
+		.extra1         = &zero,
 	},
 	{}
 };
diff -druNp --no-dereference linux-libre-4.9.211-gnu/net/x25/af_x25.c linux-libre-4.9.212-gnu/net/x25/af_x25.c
--- linux-libre-4.9.211-gnu/net/x25/af_x25.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/net/x25/af_x25.c	2020-01-29 04:24:41.000000000 -0500
@@ -764,6 +764,10 @@ static int x25_connect(struct socket *so
 	if (sk->sk_state == TCP_ESTABLISHED)
 		goto out;
 
+	rc = -EALREADY;	/* Do nothing if call is already in progress */
+	if (sk->sk_state == TCP_SYN_SENT)
+		goto out;
+
 	sk->sk_state   = TCP_CLOSE;
 	sock->state = SS_UNCONNECTED;
 
@@ -810,7 +814,7 @@ static int x25_connect(struct socket *so
 	/* Now the loop */
 	rc = -EINPROGRESS;
 	if (sk->sk_state != TCP_ESTABLISHED && (flags & O_NONBLOCK))
-		goto out_put_neigh;
+		goto out;
 
 	rc = x25_wait_for_connection_establishment(sk);
 	if (rc)
diff -druNp --no-dereference linux-libre-4.9.211-gnu/scripts/recordmcount.c linux-libre-4.9.212-gnu/scripts/recordmcount.c
--- linux-libre-4.9.211-gnu/scripts/recordmcount.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/scripts/recordmcount.c	2020-01-29 04:24:41.000000000 -0500
@@ -53,6 +53,10 @@
 #define R_AARCH64_ABS64	257
 #endif
 
+#define R_ARM_PC24		1
+#define R_ARM_THM_CALL		10
+#define R_ARM_CALL		28
+
 static int fd_map;	/* File descriptor for file being modified. */
 static int mmap_failed; /* Boolean flag. */
 static char gpfx;	/* prefix for global symbol name (sometimes '_') */
@@ -374,6 +378,18 @@ is_mcounted_section_name(char const *con
 #define RECORD_MCOUNT_64
 #include "recordmcount.h"
 
+static int arm_is_fake_mcount(Elf32_Rel const *rp)
+{
+	switch (ELF32_R_TYPE(w(rp->r_info))) {
+	case R_ARM_THM_CALL:
+	case R_ARM_CALL:
+	case R_ARM_PC24:
+		return 0;
+	}
+
+	return 1;
+}
+
 /* 64-bit EM_MIPS has weird ELF64_Rela.r_info.
  * http://techpubs.sgi.com/library/manuals/4000/007-4658-001/pdf/007-4658-001.pdf
  * We interpret Table 29 Relocation Operation (Elf64_Rel, Elf64_Rela) [p.40]
@@ -463,6 +479,7 @@ do_file(char const *const fname)
 		break;
 	case EM_ARM:	 reltype = R_ARM_ABS32;
 			 altmcount = "__gnu_mcount_nc";
+			 is_fake_mcount32 = arm_is_fake_mcount;
 			 break;
 	case EM_AARCH64:
 			reltype = R_AARCH64_ABS64;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/security/keys/key.c linux-libre-4.9.212-gnu/security/keys/key.c
--- linux-libre-4.9.211-gnu/security/keys/key.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/security/keys/key.c	2020-01-29 04:24:41.000000000 -0500
@@ -296,6 +296,7 @@ struct key *key_alloc(struct key_type *t
 	key->gid = gid;
 	key->perm = perm;
 	key->restrict_link = restrict_link;
+	key->last_used_at = ktime_get_real_seconds();
 
 	if (!(flags & KEY_ALLOC_NOT_IN_QUOTA))
 		key->flags |= 1 << KEY_FLAG_IN_QUOTA;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/sound/aoa/codecs/onyx.c linux-libre-4.9.212-gnu/sound/aoa/codecs/onyx.c
--- linux-libre-4.9.211-gnu/sound/aoa/codecs/onyx.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/sound/aoa/codecs/onyx.c	2020-01-29 04:24:41.000000000 -0500
@@ -74,8 +74,10 @@ static int onyx_read_register(struct ony
 		return 0;
 	}
 	v = i2c_smbus_read_byte_data(onyx->i2c, reg);
-	if (v < 0)
+	if (v < 0) {
+		*value = 0;
 		return -1;
+	}
 	*value = (u8)v;
 	onyx->cache[ONYX_REG_CONTROL-FIRSTREGISTER] = *value;
 	return 0;
diff -druNp --no-dereference linux-libre-4.9.211-gnu/sound/pci/hda/hda_controller.h linux-libre-4.9.212-gnu/sound/pci/hda/hda_controller.h
--- linux-libre-4.9.211-gnu/sound/pci/hda/hda_controller.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/sound/pci/hda/hda_controller.h	2020-01-29 04:24:41.000000000 -0500
@@ -171,11 +171,10 @@ struct azx {
 #define azx_bus(chip)	(&(chip)->bus.core)
 #define bus_to_azx(_bus)	container_of(_bus, struct azx, bus.core)
 
-#ifdef CONFIG_X86
-#define azx_snoop(chip)		((chip)->snoop)
-#else
-#define azx_snoop(chip)		true
-#endif
+static inline bool azx_snoop(struct azx *chip)
+{
+	return !IS_ENABLED(CONFIG_X86) || chip->snoop;
+}
 
 /*
  * macros for easy use
diff -druNp --no-dereference linux-libre-4.9.211-gnu/sound/soc/codecs/cs4349.c linux-libre-4.9.212-gnu/sound/soc/codecs/cs4349.c
--- linux-libre-4.9.211-gnu/sound/soc/codecs/cs4349.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/sound/soc/codecs/cs4349.c	2020-01-29 04:24:41.000000000 -0500
@@ -380,6 +380,7 @@ static struct i2c_driver cs4349_i2c_driv
 	.driver = {
 		.name		= "cs4349",
 		.of_match_table	= cs4349_of_match,
+		.pm = &cs4349_runtime_pm,
 	},
 	.id_table	= cs4349_i2c_id,
 	.probe		= cs4349_i2c_probe,
diff -druNp --no-dereference linux-libre-4.9.211-gnu/sound/soc/codecs/es8328.c linux-libre-4.9.212-gnu/sound/soc/codecs/es8328.c
--- linux-libre-4.9.211-gnu/sound/soc/codecs/es8328.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/sound/soc/codecs/es8328.c	2020-01-29 04:24:41.000000000 -0500
@@ -234,7 +234,7 @@ static const struct soc_enum es8328_rlin
 			      ARRAY_SIZE(es8328_line_texts),
 			      es8328_line_texts);
 static const struct snd_kcontrol_new es8328_right_line_controls =
-	SOC_DAPM_ENUM("Route", es8328_lline_enum);
+	SOC_DAPM_ENUM("Route", es8328_rline_enum);
 
 /* Left Mixer */
 static const struct snd_kcontrol_new es8328_left_mixer_controls[] = {
diff -druNp --no-dereference linux-libre-4.9.211-gnu/sound/soc/codecs/wm8737.c linux-libre-4.9.212-gnu/sound/soc/codecs/wm8737.c
--- linux-libre-4.9.211-gnu/sound/soc/codecs/wm8737.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/sound/soc/codecs/wm8737.c	2020-01-29 04:24:41.000000000 -0500
@@ -170,7 +170,7 @@ SOC_DOUBLE("Polarity Invert Switch", WM8
 SOC_SINGLE("3D Switch", WM8737_3D_ENHANCE, 0, 1, 0),
 SOC_SINGLE("3D Depth", WM8737_3D_ENHANCE, 1, 15, 0),
 SOC_ENUM("3D Low Cut-off", low_3d),
-SOC_ENUM("3D High Cut-off", low_3d),
+SOC_ENUM("3D High Cut-off", high_3d),
 SOC_SINGLE_TLV("3D ADC Volume", WM8737_3D_ENHANCE, 7, 1, 1, adc_tlv),
 
 SOC_SINGLE("Noise Gate Switch", WM8737_NOISE_GATE, 0, 1, 0),
diff -druNp --no-dereference linux-libre-4.9.211-gnu/sound/soc/davinci/davinci-mcasp.c linux-libre-4.9.212-gnu/sound/soc/davinci/davinci-mcasp.c
--- linux-libre-4.9.211-gnu/sound/soc/davinci/davinci-mcasp.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/sound/soc/davinci/davinci-mcasp.c	2020-01-29 04:24:41.000000000 -0500
@@ -882,14 +882,13 @@ static int mcasp_i2s_hw_param(struct dav
 		active_slots = hweight32(mcasp->tdm_mask[stream]);
 		active_serializers = (channels + active_slots - 1) /
 			active_slots;
-		if (active_serializers == 1) {
+		if (active_serializers == 1)
 			active_slots = channels;
-			for (i = 0; i < total_slots; i++) {
-				if ((1 << i) & mcasp->tdm_mask[stream]) {
-					mask |= (1 << i);
-					if (--active_slots <= 0)
-						break;
-				}
+		for (i = 0; i < total_slots; i++) {
+			if ((1 << i) & mcasp->tdm_mask[stream]) {
+				mask |= (1 << i);
+				if (--active_slots <= 0)
+					break;
 			}
 		}
 	} else {
diff -druNp --no-dereference linux-libre-4.9.211-gnu/sound/soc/fsl/imx-sgtl5000.c linux-libre-4.9.212-gnu/sound/soc/fsl/imx-sgtl5000.c
--- linux-libre-4.9.211-gnu/sound/soc/fsl/imx-sgtl5000.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/sound/soc/fsl/imx-sgtl5000.c	2020-01-29 04:24:41.000000000 -0500
@@ -119,7 +119,8 @@ static int imx_sgtl5000_probe(struct pla
 	codec_dev = of_find_i2c_device_by_node(codec_np);
 	if (!codec_dev) {
 		dev_err(&pdev->dev, "failed to find codec platform device\n");
-		return -EPROBE_DEFER;
+		ret = -EPROBE_DEFER;
+		goto fail;
 	}
 
 	data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
diff -druNp --no-dereference linux-libre-4.9.211-gnu/sound/soc/qcom/apq8016_sbc.c linux-libre-4.9.212-gnu/sound/soc/qcom/apq8016_sbc.c
--- linux-libre-4.9.211-gnu/sound/soc/qcom/apq8016_sbc.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/sound/soc/qcom/apq8016_sbc.c	2020-01-29 04:24:41.000000000 -0500
@@ -114,13 +114,15 @@ static struct apq8016_sbc_data *apq8016_
 
 		if (!cpu || !codec) {
 			dev_err(dev, "Can't find cpu/codec DT node\n");
-			return ERR_PTR(-EINVAL);
+			ret = -EINVAL;
+			goto error;
 		}
 
 		link->cpu_of_node = of_parse_phandle(cpu, "sound-dai", 0);
 		if (!link->cpu_of_node) {
 			dev_err(card->dev, "error getting cpu phandle\n");
-			return ERR_PTR(-EINVAL);
+			ret = -EINVAL;
+			goto error;
 		}
 
 		link->codec_of_node = of_parse_phandle(codec, "sound-dai", 0);
@@ -132,28 +134,37 @@ static struct apq8016_sbc_data *apq8016_
 		ret = snd_soc_of_get_dai_name(cpu, &link->cpu_dai_name);
 		if (ret) {
 			dev_err(card->dev, "error getting cpu dai name\n");
-			return ERR_PTR(ret);
+			goto error;
 		}
 
 		ret = snd_soc_of_get_dai_name(codec, &link->codec_dai_name);
 		if (ret) {
 			dev_err(card->dev, "error getting codec dai name\n");
-			return ERR_PTR(ret);
+			goto error;
 		}
 
 		link->platform_of_node = link->cpu_of_node;
 		ret = of_property_read_string(np, "link-name", &link->name);
 		if (ret) {
 			dev_err(card->dev, "error getting codec dai_link name\n");
-			return ERR_PTR(ret);
+			goto error;
 		}
 
 		link->stream_name = link->name;
 		link->init = apq8016_sbc_dai_init;
 		link++;
+
+		of_node_put(cpu);
+		of_node_put(codec);
 	}
 
 	return data;
+
+ error:
+	of_node_put(np);
+	of_node_put(cpu);
+	of_node_put(codec);
+	return ERR_PTR(ret);
 }
 
 static const struct snd_soc_dapm_widget apq8016_sbc_dapm_widgets[] = {
diff -druNp --no-dereference linux-libre-4.9.211-gnu/sound/soc/soc-pcm.c linux-libre-4.9.212-gnu/sound/soc/soc-pcm.c
--- linux-libre-4.9.211-gnu/sound/soc/soc-pcm.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/sound/soc/soc-pcm.c	2020-01-29 04:24:41.000000000 -0500
@@ -48,8 +48,8 @@ static bool snd_soc_dai_stream_valid(str
 	else
 		codec_stream = &dai->driver->capture;
 
-	/* If the codec specifies any rate at all, it supports the stream. */
-	return codec_stream->rates;
+	/* If the codec specifies any channels at all, it supports the stream */
+	return codec_stream->channels_min;
 }
 
 /**
diff -druNp --no-dereference linux-libre-4.9.211-gnu/sound/soc/sunxi/sun4i-i2s.c linux-libre-4.9.212-gnu/sound/soc/sunxi/sun4i-i2s.c
--- linux-libre-4.9.211-gnu/sound/soc/sunxi/sun4i-i2s.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/sound/soc/sunxi/sun4i-i2s.c	2020-01-29 04:24:41.000000000 -0500
@@ -78,8 +78,8 @@
 #define SUN4I_I2S_CLK_DIV_MCLK_MASK		GENMASK(3, 0)
 #define SUN4I_I2S_CLK_DIV_MCLK(mclk)			((mclk) << 0)
 
-#define SUN4I_I2S_RX_CNT_REG		0x28
-#define SUN4I_I2S_TX_CNT_REG		0x2c
+#define SUN4I_I2S_TX_CNT_REG		0x28
+#define SUN4I_I2S_RX_CNT_REG		0x2c
 
 #define SUN4I_I2S_TX_CHAN_SEL_REG	0x30
 #define SUN4I_I2S_TX_CHAN_SEL(num_chan)		(((num_chan) - 1) << 0)
diff -druNp --no-dereference linux-libre-4.9.211-gnu/sound/usb/mixer.c linux-libre-4.9.212-gnu/sound/usb/mixer.c
--- linux-libre-4.9.211-gnu/sound/usb/mixer.c	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/sound/usb/mixer.c	2020-01-29 04:24:41.000000000 -0500
@@ -2626,7 +2626,9 @@ int snd_usb_create_mixer(struct snd_usb_
 	    (err = snd_usb_mixer_status_create(mixer)) < 0)
 		goto _error;
 
-	snd_usb_mixer_apply_create_quirk(mixer);
+	err = snd_usb_mixer_apply_create_quirk(mixer);
+	if (err < 0)
+		goto _error;
 
 	err = snd_device_new(chip->card, SNDRV_DEV_CODEC, mixer, &dev_ops);
 	if (err < 0)
diff -druNp --no-dereference linux-libre-4.9.211-gnu/sound/usb/quirks-table.h linux-libre-4.9.212-gnu/sound/usb/quirks-table.h
--- linux-libre-4.9.211-gnu/sound/usb/quirks-table.h	2020-01-23 02:19:43.000000000 -0500
+++ linux-libre-4.9.212-gnu/sound/usb/quirks-table.h	2020-01-29 04:24:41.000000000 -0500
@@ -3293,19 +3293,14 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge
 				.ifnum = 0,
 				.type = QUIRK_AUDIO_STANDARD_MIXER,
 			},
-			/* Capture */
-			{
-				.ifnum = 1,
-				.type = QUIRK_IGNORE_INTERFACE,
-			},
 			/* Playback */
 			{
-				.ifnum = 2,
+				.ifnum = 1,
 				.type = QUIRK_AUDIO_FIXED_ENDPOINT,
 				.data = &(const struct audioformat) {
 					.formats = SNDRV_PCM_FMTBIT_S16_LE,
 					.channels = 2,
-					.iface = 2,
+					.iface = 1,
 					.altsetting = 1,
 					.altset_idx = 1,
 					.attributes = UAC_EP_CS_ATTR_FILL_MAX |
