diff -druNp --no-dereference linux-libre-4.14.29-gnu/arch/alpha/kernel/console.c linux-libre-4.14.30-gnu/arch/alpha/kernel/console.c
--- linux-libre-4.14.29-gnu/arch/alpha/kernel/console.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/arch/alpha/kernel/console.c	2018-03-24 06:01:30.000000000 -0400
@@ -21,6 +21,7 @@
 struct pci_controller *pci_vga_hose;
 static struct resource alpha_vga = {
 	.name	= "alpha-vga+",
+	.flags	= IORESOURCE_IO,
 	.start	= 0x3C0,
 	.end	= 0x3DF
 };
diff -druNp --no-dereference linux-libre-4.14.29-gnu/arch/arm/boot/dts/aspeed-ast2500-evb.dts linux-libre-4.14.30-gnu/arch/arm/boot/dts/aspeed-ast2500-evb.dts
--- linux-libre-4.14.29-gnu/arch/arm/boot/dts/aspeed-ast2500-evb.dts	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/arch/arm/boot/dts/aspeed-ast2500-evb.dts	2018-03-24 06:01:30.000000000 -0400
@@ -16,7 +16,7 @@
 		bootargs = "console=ttyS4,115200 earlyprintk";
 	};
 
-	memory {
+	memory@80000000 {
 		reg = <0x80000000 0x20000000>;
 	};
 };
diff -druNp --no-dereference linux-libre-4.14.29-gnu/Documentation/devicetree/bindings/display/panel/toppoly,td028ttec1.txt linux-libre-4.14.30-gnu/Documentation/devicetree/bindings/display/panel/toppoly,td028ttec1.txt
--- linux-libre-4.14.29-gnu/Documentation/devicetree/bindings/display/panel/toppoly,td028ttec1.txt	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/Documentation/devicetree/bindings/display/panel/toppoly,td028ttec1.txt	1969-12-31 19:00:00.000000000 -0500
@@ -1,30 +0,0 @@
-Toppoly TD028TTEC1 Panel
-========================
-
-Required properties:
-- compatible: "toppoly,td028ttec1"
-
-Optional properties:
-- label: a symbolic name for the panel
-
-Required nodes:
-- Video port for DPI input
-
-Example
--------
-
-lcd-panel: td028ttec1@0 {
-	compatible = "toppoly,td028ttec1";
-	reg = <0>;
-	spi-max-frequency = <100000>;
-	spi-cpol;
-	spi-cpha;
-
-	label = "lcd";
-	port {
-		lcd_in: endpoint {
-			remote-endpoint = <&dpi_out>;
-		};
-	};
-};
-
diff -druNp --no-dereference linux-libre-4.14.29-gnu/Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt linux-libre-4.14.30-gnu/Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt
--- linux-libre-4.14.29-gnu/Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt	1969-12-31 19:00:00.000000000 -0500
+++ linux-libre-4.14.30-gnu/Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt	2018-03-24 06:01:30.000000000 -0400
@@ -0,0 +1,30 @@
+Toppoly TD028TTEC1 Panel
+========================
+
+Required properties:
+- compatible: "tpo,td028ttec1"
+
+Optional properties:
+- label: a symbolic name for the panel
+
+Required nodes:
+- Video port for DPI input
+
+Example
+-------
+
+lcd-panel: td028ttec1@0 {
+	compatible = "tpo,td028ttec1";
+	reg = <0>;
+	spi-max-frequency = <100000>;
+	spi-cpol;
+	spi-cpha;
+
+	label = "lcd";
+	port {
+		lcd_in: endpoint {
+			remote-endpoint = <&dpi_out>;
+		};
+	};
+};
+
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/bluetooth/btqcomsmd.c linux-libre-4.14.30-gnu/drivers/bluetooth/btqcomsmd.c
--- linux-libre-4.14.29-gnu/drivers/bluetooth/btqcomsmd.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/bluetooth/btqcomsmd.c	2018-03-24 06:01:30.000000000 -0400
@@ -86,7 +86,8 @@ static int btqcomsmd_send(struct hci_dev
 		break;
 	}
 
-	kfree_skb(skb);
+	if (!ret)
+		kfree_skb(skb);
 
 	return ret;
 }
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/bluetooth/hci_qca.c linux-libre-4.14.30-gnu/drivers/bluetooth/hci_qca.c
--- linux-libre-4.14.29-gnu/drivers/bluetooth/hci_qca.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/bluetooth/hci_qca.c	2018-03-24 06:01:30.000000000 -0400
@@ -933,6 +933,9 @@ static int qca_setup(struct hci_uart *hu
 	if (!ret) {
 		set_bit(STATE_IN_BAND_SLEEP_ENABLED, &qca->flags);
 		qca_debugfs_init(hdev);
+	} else if (ret == -ENOENT) {
+		/* No patch/nvm-config found, run with original fw/config */
+		ret = 0;
 	}
 
 	/* Setup bdaddr */
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/char/mem.c linux-libre-4.14.30-gnu/drivers/char/mem.c
--- linux-libre-4.14.29-gnu/drivers/char/mem.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/char/mem.c	2018-03-24 06:01:30.000000000 -0400
@@ -107,6 +107,8 @@ static ssize_t read_mem(struct file *fil
 	phys_addr_t p = *ppos;
 	ssize_t read, sz;
 	void *ptr;
+	char *bounce;
+	int err;
 
 	if (p != *ppos)
 		return 0;
@@ -129,15 +131,22 @@ static ssize_t read_mem(struct file *fil
 	}
 #endif
 
+	bounce = kmalloc(PAGE_SIZE, GFP_KERNEL);
+	if (!bounce)
+		return -ENOMEM;
+
 	while (count > 0) {
 		unsigned long remaining;
 		int allowed;
 
 		sz = size_inside_page(p, count);
 
+		err = -EPERM;
 		allowed = page_is_allowed(p >> PAGE_SHIFT);
 		if (!allowed)
-			return -EPERM;
+			goto failed;
+
+		err = -EFAULT;
 		if (allowed == 2) {
 			/* Show zeros for restricted memory. */
 			remaining = clear_user(buf, sz);
@@ -149,24 +158,32 @@ static ssize_t read_mem(struct file *fil
 			 */
 			ptr = xlate_dev_mem_ptr(p);
 			if (!ptr)
-				return -EFAULT;
-
-			remaining = copy_to_user(buf, ptr, sz);
+				goto failed;
 
+			err = probe_kernel_read(bounce, ptr, sz);
 			unxlate_dev_mem_ptr(p, ptr);
+			if (err)
+				goto failed;
+
+			remaining = copy_to_user(buf, bounce, sz);
 		}
 
 		if (remaining)
-			return -EFAULT;
+			goto failed;
 
 		buf += sz;
 		p += sz;
 		count -= sz;
 		read += sz;
 	}
+	kfree(bounce);
 
 	*ppos += read;
 	return read;
+
+failed:
+	kfree(bounce);
+	return err;
 }
 
 static ssize_t write_mem(struct file *file, const char __user *buf,
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/clk/at91/pmc.c linux-libre-4.14.30-gnu/drivers/clk/at91/pmc.c
--- linux-libre-4.14.29-gnu/drivers/clk/at91/pmc.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/clk/at91/pmc.c	2018-03-24 06:01:30.000000000 -0400
@@ -107,10 +107,20 @@ static int pmc_suspend(void)
 	return 0;
 }
 
+static bool pmc_ready(unsigned int mask)
+{
+	unsigned int status;
+
+	regmap_read(pmcreg, AT91_PMC_SR, &status);
+
+	return ((status & mask) == mask) ? 1 : 0;
+}
+
 static void pmc_resume(void)
 {
-	int i, ret = 0;
+	int i;
 	u32 tmp;
+	u32 mask = AT91_PMC_MCKRDY | AT91_PMC_LOCKA;
 
 	regmap_read(pmcreg, AT91_PMC_MCKR, &tmp);
 	if (pmc_cache.mckr != tmp)
@@ -134,13 +144,11 @@ static void pmc_resume(void)
 			     AT91_PMC_PCR_CMD);
 	}
 
-	if (pmc_cache.uckr & AT91_PMC_UPLLEN) {
-		ret = regmap_read_poll_timeout(pmcreg, AT91_PMC_SR, tmp,
-					       !(tmp & AT91_PMC_LOCKU),
-					       10, 5000);
-		if (ret)
-			pr_crit("USB PLL didn't lock when resuming\n");
-	}
+	if (pmc_cache.uckr & AT91_PMC_UPLLEN)
+		mask |= AT91_PMC_LOCKU;
+
+	while (!pmc_ready(mask))
+		cpu_relax();
 }
 
 static struct syscore_ops pmc_syscore_ops = {
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/clk/clk-axi-clkgen.c linux-libre-4.14.30-gnu/drivers/clk/clk-axi-clkgen.c
--- linux-libre-4.14.29-gnu/drivers/clk/clk-axi-clkgen.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/clk/clk-axi-clkgen.c	2018-03-24 06:01:30.000000000 -0400
@@ -40,6 +40,10 @@
 #define MMCM_REG_FILTER1	0x4e
 #define MMCM_REG_FILTER2	0x4f
 
+#define MMCM_CLKOUT_NOCOUNT	BIT(6)
+
+#define MMCM_CLK_DIV_NOCOUNT	BIT(12)
+
 struct axi_clkgen {
 	void __iomem *base;
 	struct clk_hw clk_hw;
@@ -315,12 +319,27 @@ static unsigned long axi_clkgen_recalc_r
 	unsigned int reg;
 	unsigned long long tmp;
 
-	axi_clkgen_mmcm_read(axi_clkgen, MMCM_REG_CLKOUT0_1, &reg);
-	dout = (reg & 0x3f) + ((reg >> 6) & 0x3f);
+	axi_clkgen_mmcm_read(axi_clkgen, MMCM_REG_CLKOUT0_2, &reg);
+	if (reg & MMCM_CLKOUT_NOCOUNT) {
+		dout = 1;
+	} else {
+		axi_clkgen_mmcm_read(axi_clkgen, MMCM_REG_CLKOUT0_1, &reg);
+		dout = (reg & 0x3f) + ((reg >> 6) & 0x3f);
+	}
+
 	axi_clkgen_mmcm_read(axi_clkgen, MMCM_REG_CLK_DIV, &reg);
-	d = (reg & 0x3f) + ((reg >> 6) & 0x3f);
-	axi_clkgen_mmcm_read(axi_clkgen, MMCM_REG_CLK_FB1, &reg);
-	m = (reg & 0x3f) + ((reg >> 6) & 0x3f);
+	if (reg & MMCM_CLK_DIV_NOCOUNT)
+		d = 1;
+	else
+		d = (reg & 0x3f) + ((reg >> 6) & 0x3f);
+
+	axi_clkgen_mmcm_read(axi_clkgen, MMCM_REG_CLK_FB2, &reg);
+	if (reg & MMCM_CLKOUT_NOCOUNT) {
+		m = 1;
+	} else {
+		axi_clkgen_mmcm_read(axi_clkgen, MMCM_REG_CLK_FB1, &reg);
+		m = (reg & 0x3f) + ((reg >> 6) & 0x3f);
+	}
 
 	if (d == 0 || dout == 0)
 		return 0;
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/clk/clk.c linux-libre-4.14.30-gnu/drivers/clk/clk.c
--- linux-libre-4.14.29-gnu/drivers/clk/clk.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/clk/clk.c	2018-03-24 06:01:30.000000000 -0400
@@ -2471,6 +2471,21 @@ static int __clk_core_init(struct clk_co
 	core->rate = core->req_rate = rate;
 
 	/*
+	 * Enable CLK_IS_CRITICAL clocks so newly added critical clocks
+	 * don't get accidentally disabled when walking the orphan tree and
+	 * reparenting clocks
+	 */
+	if (core->flags & CLK_IS_CRITICAL) {
+		unsigned long flags;
+
+		clk_core_prepare(core);
+
+		flags = clk_enable_lock();
+		clk_core_enable(core);
+		clk_enable_unlock(flags);
+	}
+
+	/*
 	 * walk the list of orphan clocks and reparent any that newly finds a
 	 * parent.
 	 */
@@ -2478,10 +2493,13 @@ static int __clk_core_init(struct clk_co
 		struct clk_core *parent = __clk_init_parent(orphan);
 
 		/*
-		 * we could call __clk_set_parent, but that would result in a
-		 * redundant call to the .set_rate op, if it exists
+		 * We need to use __clk_set_parent_before() and _after() to
+		 * to properly migrate any prepare/enable count of the orphan
+		 * clock. This is important for CLK_IS_CRITICAL clocks, which
+		 * are enabled during init but might not have a parent yet.
 		 */
 		if (parent) {
+			/* update the clk tree topology */
 			__clk_set_parent_before(orphan, parent);
 			__clk_set_parent_after(orphan, parent, NULL);
 			__clk_recalc_accuracies(orphan);
@@ -2500,16 +2518,6 @@ static int __clk_core_init(struct clk_co
 	if (core->ops->init)
 		core->ops->init(core->hw);
 
-	if (core->flags & CLK_IS_CRITICAL) {
-		unsigned long flags;
-
-		clk_core_prepare(core);
-
-		flags = clk_enable_lock();
-		clk_core_enable(core);
-		clk_enable_unlock(flags);
-	}
-
 	kref_init(&core->ref);
 out:
 	clk_prepare_unlock();
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/clk/clk-si5351.c linux-libre-4.14.30-gnu/drivers/clk/clk-si5351.c
--- linux-libre-4.14.29-gnu/drivers/clk/clk-si5351.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/clk/clk-si5351.c	2018-03-24 06:01:30.000000000 -0400
@@ -72,7 +72,7 @@ static const char * const si5351_input_n
 	"xtal", "clkin"
 };
 static const char * const si5351_pll_names[] = {
-	"plla", "pllb", "vxco"
+	"si5351_plla", "si5351_pllb", "si5351_vxco"
 };
 static const char * const si5351_msynth_names[] = {
 	"ms0", "ms1", "ms2", "ms3", "ms4", "ms5", "ms6", "ms7"
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/cpufreq/longhaul.c linux-libre-4.14.30-gnu/drivers/cpufreq/longhaul.c
--- linux-libre-4.14.29-gnu/drivers/cpufreq/longhaul.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/cpufreq/longhaul.c	2018-03-24 06:01:30.000000000 -0400
@@ -894,7 +894,7 @@ static int longhaul_cpu_init(struct cpuf
 	if ((longhaul_version != TYPE_LONGHAUL_V1) && (scale_voltage != 0))
 		longhaul_setup_voltagescaling();
 
-	policy->cpuinfo.transition_latency = 200000;	/* nsec */
+	policy->transition_delay_us = 200000;	/* usec */
 
 	return cpufreq_table_validate_and_show(policy, longhaul_table);
 }
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/crypto/axis/artpec6_crypto.c linux-libre-4.14.30-gnu/drivers/crypto/axis/artpec6_crypto.c
--- linux-libre-4.14.29-gnu/drivers/crypto/axis/artpec6_crypto.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/crypto/axis/artpec6_crypto.c	2018-03-24 06:01:30.000000000 -0400
@@ -22,6 +22,7 @@
 #include <linux/slab.h>
 
 #include <crypto/aes.h>
+#include <crypto/gcm.h>
 #include <crypto/internal/aead.h>
 #include <crypto/internal/hash.h>
 #include <crypto/internal/skcipher.h>
@@ -1934,7 +1935,7 @@ static int artpec6_crypto_prepare_aead(s
 
 	memcpy(req_ctx->hw_ctx.J0, areq->iv, crypto_aead_ivsize(cipher));
 	// The HW omits the initial increment of the counter field.
-	crypto_inc(req_ctx->hw_ctx.J0+12, 4);
+	memcpy(req_ctx->hw_ctx.J0 + GCM_AES_IV_SIZE, "\x00\x00\x00\x01", 4);
 
 	ret = artpec6_crypto_setup_out_descr(common, &req_ctx->hw_ctx,
 		sizeof(struct artpec6_crypto_aead_hw_ctx), false, false);
@@ -2956,7 +2957,7 @@ static struct aead_alg aead_algos[] = {
 		.setkey = artpec6_crypto_aead_set_key,
 		.encrypt = artpec6_crypto_aead_encrypt,
 		.decrypt = artpec6_crypto_aead_decrypt,
-		.ivsize = AES_BLOCK_SIZE,
+		.ivsize = GCM_AES_IV_SIZE,
 		.maxauthsize = AES_BLOCK_SIZE,
 
 		.base = {
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/dma/ti-dma-crossbar.c linux-libre-4.14.30-gnu/drivers/dma/ti-dma-crossbar.c
--- linux-libre-4.14.29-gnu/drivers/dma/ti-dma-crossbar.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/dma/ti-dma-crossbar.c	2018-03-24 06:01:30.000000000 -0400
@@ -54,7 +54,15 @@ struct ti_am335x_xbar_map {
 
 static inline void ti_am335x_xbar_write(void __iomem *iomem, int event, u8 val)
 {
-	writeb_relaxed(val, iomem + event);
+	/*
+	 * TPCC_EVT_MUX_60_63 register layout is different than the
+	 * rest, in the sense, that event 63 is mapped to lowest byte
+	 * and event 60 is mapped to highest, handle it separately.
+	 */
+	if (event >= 60 && event <= 63)
+		writeb_relaxed(val, iomem + (63 - event % 4));
+	else
+		writeb_relaxed(val, iomem + event);
 }
 
 static void ti_am335x_xbar_free(struct device *dev, void *route_data)
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/dma/xilinx/zynqmp_dma.c linux-libre-4.14.30-gnu/drivers/dma/xilinx/zynqmp_dma.c
--- linux-libre-4.14.29-gnu/drivers/dma/xilinx/zynqmp_dma.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/dma/xilinx/zynqmp_dma.c	2018-03-24 06:01:30.000000000 -0400
@@ -838,7 +838,8 @@ static void zynqmp_dma_chan_remove(struc
 	if (!chan)
 		return;
 
-	devm_free_irq(chan->zdev->dev, chan->irq, chan);
+	if (chan->irq)
+		devm_free_irq(chan->zdev->dev, chan->irq, chan);
 	tasklet_kill(&chan->tasklet);
 	list_del(&chan->common.device_node);
 	clk_disable_unprepare(chan->clk_apb);
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/gpu/drm/msm/msm_gem.c linux-libre-4.14.30-gnu/drivers/gpu/drm/msm/msm_gem.c
--- linux-libre-4.14.29-gnu/drivers/gpu/drm/msm/msm_gem.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/gpu/drm/msm/msm_gem.c	2018-03-24 06:01:30.000000000 -0400
@@ -93,14 +93,17 @@ static struct page **get_pages(struct dr
 			return p;
 		}
 
+		msm_obj->pages = p;
+
 		msm_obj->sgt = drm_prime_pages_to_sg(p, npages);
 		if (IS_ERR(msm_obj->sgt)) {
+			void *ptr = ERR_CAST(msm_obj->sgt);
+
 			dev_err(dev->dev, "failed to allocate sgt\n");
-			return ERR_CAST(msm_obj->sgt);
+			msm_obj->sgt = NULL;
+			return ptr;
 		}
 
-		msm_obj->pages = p;
-
 		/* For non-cached buffers, ensure the new pages are clean
 		 * because display controller, GPU, etc. are not coherent:
 		 */
@@ -135,7 +138,10 @@ static void put_pages(struct drm_gem_obj
 		if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED))
 			dma_unmap_sg(obj->dev->dev, msm_obj->sgt->sgl,
 					msm_obj->sgt->nents, DMA_BIDIRECTIONAL);
-		sg_free_table(msm_obj->sgt);
+
+		if (msm_obj->sgt)
+			sg_free_table(msm_obj->sgt);
+
 		kfree(msm_obj->sgt);
 
 		if (use_pages(obj))
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c linux-libre-4.14.30-gnu/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
--- linux-libre-4.14.29-gnu/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c	2018-03-24 06:01:30.000000000 -0400
@@ -452,6 +452,8 @@ static int td028ttec1_panel_remove(struc
 }
 
 static const struct of_device_id td028ttec1_of_match[] = {
+	{ .compatible = "omapdss,tpo,td028ttec1", },
+	/* keep to not break older DTB */
 	{ .compatible = "omapdss,toppoly,td028ttec1", },
 	{},
 };
@@ -471,6 +473,7 @@ static struct spi_driver td028ttec1_spi_
 
 module_spi_driver(td028ttec1_spi_driver);
 
+MODULE_ALIAS("spi:tpo,td028ttec1");
 MODULE_ALIAS("spi:toppoly,td028ttec1");
 MODULE_AUTHOR("H. Nikolaus Schaller <hns@goldelico.com>");
 MODULE_DESCRIPTION("Toppoly TD028TTEC1 panel driver");
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c linux-libre-4.14.30-gnu/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
--- linux-libre-4.14.29-gnu/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c	2018-03-24 06:01:30.000000000 -0400
@@ -298,7 +298,12 @@ static int dmm_txn_commit(struct dmm_txn
 				msecs_to_jiffies(100))) {
 			dev_err(dmm->dev, "timed out waiting for done\n");
 			ret = -ETIMEDOUT;
+			goto cleanup;
 		}
+
+		/* Check the engine status before continue */
+		ret = wait_status(engine, DMM_PATSTATUS_READY |
+				  DMM_PATSTATUS_VALID | DMM_PATSTATUS_DONE);
 	}
 
 cleanup:
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/gpu/drm/tilcdc/tilcdc_regs.h linux-libre-4.14.30-gnu/drivers/gpu/drm/tilcdc/tilcdc_regs.h
--- linux-libre-4.14.29-gnu/drivers/gpu/drm/tilcdc/tilcdc_regs.h	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/gpu/drm/tilcdc/tilcdc_regs.h	2018-03-24 06:01:30.000000000 -0400
@@ -133,7 +133,7 @@ static inline void tilcdc_write64(struct
 	struct tilcdc_drm_private *priv = dev->dev_private;
 	volatile void __iomem *addr = priv->mmio + reg;
 
-#ifdef iowrite64
+#if defined(iowrite64) && !defined(iowrite64_is_nonatomic)
 	iowrite64(data, addr);
 #else
 	__iowmb();
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/hwtracing/coresight/coresight-tpiu.c linux-libre-4.14.30-gnu/drivers/hwtracing/coresight/coresight-tpiu.c
--- linux-libre-4.14.29-gnu/drivers/hwtracing/coresight/coresight-tpiu.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/hwtracing/coresight/coresight-tpiu.c	2018-03-24 06:01:30.000000000 -0400
@@ -46,8 +46,11 @@
 #define TPIU_ITATBCTR0		0xef8
 
 /** register definition **/
+/* FFSR - 0x300 */
+#define FFSR_FT_STOPPED		BIT(1)
 /* FFCR - 0x304 */
 #define FFCR_FON_MAN		BIT(6)
+#define FFCR_STOP_FI		BIT(12)
 
 /**
  * @base:	memory mapped base address for this component.
@@ -85,10 +88,14 @@ static void tpiu_disable_hw(struct tpiu_
 {
 	CS_UNLOCK(drvdata->base);
 
-	/* Clear formatter controle reg. */
-	writel_relaxed(0x0, drvdata->base + TPIU_FFCR);
+	/* Clear formatter and stop on flush */
+	writel_relaxed(FFCR_STOP_FI, drvdata->base + TPIU_FFCR);
 	/* Generate manual flush */
-	writel_relaxed(FFCR_FON_MAN, drvdata->base + TPIU_FFCR);
+	writel_relaxed(FFCR_STOP_FI | FFCR_FON_MAN, drvdata->base + TPIU_FFCR);
+	/* Wait for flush to complete */
+	coresight_timeout(drvdata->base, TPIU_FFCR, FFCR_FON_MAN, 0);
+	/* Wait for formatter to stop */
+	coresight_timeout(drvdata->base, TPIU_FFSR, FFSR_FT_STOPPED, 1);
 
 	CS_LOCK(drvdata->base);
 }
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/infiniband/core/cma.c linux-libre-4.14.30-gnu/drivers/infiniband/core/cma.c
--- linux-libre-4.14.29-gnu/drivers/infiniband/core/cma.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/infiniband/core/cma.c	2018-03-24 06:01:30.000000000 -0400
@@ -3017,7 +3017,8 @@ static int cma_port_is_unique(struct rdm
 			continue;
 
 		/* different dest port -> unique */
-		if (!cma_any_port(cur_daddr) &&
+		if (!cma_any_port(daddr) &&
+		    !cma_any_port(cur_daddr) &&
 		    (dport != cur_dport))
 			continue;
 
@@ -3028,7 +3029,8 @@ static int cma_port_is_unique(struct rdm
 			continue;
 
 		/* different dst address -> unique */
-		if (!cma_any_addr(cur_daddr) &&
+		if (!cma_any_addr(daddr) &&
+		    !cma_any_addr(cur_daddr) &&
 		    cma_addr_cmp(daddr, cur_daddr))
 			continue;
 
@@ -3326,13 +3328,13 @@ int rdma_bind_addr(struct rdma_cm_id *id
 		}
 #endif
 	}
+	daddr = cma_dst_addr(id_priv);
+	daddr->sa_family = addr->sa_family;
+
 	ret = cma_get_port(id_priv);
 	if (ret)
 		goto err2;
 
-	daddr = cma_dst_addr(id_priv);
-	daddr->sa_family = addr->sa_family;
-
 	return 0;
 err2:
 	if (id_priv->cma_dev)
@@ -4118,6 +4120,9 @@ int rdma_join_multicast(struct rdma_cm_i
 	struct cma_multicast *mc;
 	int ret;
 
+	if (!id->device)
+		return -EINVAL;
+
 	id_priv = container_of(id, struct rdma_id_private, id);
 	if (!cma_comp(id_priv, RDMA_CM_ADDR_BOUND) &&
 	    !cma_comp(id_priv, RDMA_CM_ADDR_RESOLVED))
@@ -4436,7 +4441,7 @@ static int cma_get_id_stats(struct sk_bu
 					  RDMA_NL_RDMA_CM_ATTR_SRC_ADDR))
 				goto out;
 			if (ibnl_put_attr(skb, nlh,
-					  rdma_addr_size(cma_src_addr(id_priv)),
+					  rdma_addr_size(cma_dst_addr(id_priv)),
 					  cma_dst_addr(id_priv),
 					  RDMA_NL_RDMA_CM_ATTR_DST_ADDR))
 				goto out;
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/infiniband/core/iwpm_util.c linux-libre-4.14.30-gnu/drivers/infiniband/core/iwpm_util.c
--- linux-libre-4.14.29-gnu/drivers/infiniband/core/iwpm_util.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/infiniband/core/iwpm_util.c	2018-03-24 06:01:30.000000000 -0400
@@ -654,6 +654,7 @@ int iwpm_send_mapinfo(u8 nl_client, int
 	}
 	skb_num++;
 	spin_lock_irqsave(&iwpm_mapinfo_lock, flags);
+	ret = -EINVAL;
 	for (i = 0; i < IWPM_MAPINFO_HASH_SIZE; i++) {
 		hlist_for_each_entry(map_info, &iwpm_hash_bucket[i],
 				     hlist_node) {
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/infiniband/core/ucma.c linux-libre-4.14.30-gnu/drivers/infiniband/core/ucma.c
--- linux-libre-4.14.29-gnu/drivers/infiniband/core/ucma.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/infiniband/core/ucma.c	2018-03-24 06:01:30.000000000 -0400
@@ -1348,7 +1348,7 @@ static ssize_t ucma_process_join(struct
 		return -ENOSPC;
 
 	addr = (struct sockaddr *) &cmd->addr;
-	if (!cmd->addr_size || (cmd->addr_size != rdma_addr_size(addr)))
+	if (cmd->addr_size != rdma_addr_size(addr))
 		return -EINVAL;
 
 	if (cmd->join_flags == RDMA_MC_JOIN_FLAG_FULLMEMBER)
@@ -1416,6 +1416,9 @@ static ssize_t ucma_join_ip_multicast(st
 	join_cmd.uid = cmd.uid;
 	join_cmd.id = cmd.id;
 	join_cmd.addr_size = rdma_addr_size((struct sockaddr *) &cmd.addr);
+	if (!join_cmd.addr_size)
+		return -EINVAL;
+
 	join_cmd.join_flags = RDMA_MC_JOIN_FLAG_FULLMEMBER;
 	memcpy(&join_cmd.addr, &cmd.addr, join_cmd.addr_size);
 
@@ -1431,6 +1434,9 @@ static ssize_t ucma_join_multicast(struc
 	if (copy_from_user(&cmd, inbuf, sizeof(cmd)))
 		return -EFAULT;
 
+	if (!rdma_addr_size((struct sockaddr *)&cmd.addr))
+		return -EINVAL;
+
 	return ucma_process_join(file, &cmd, out_len);
 }
 
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/infiniband/core/umem.c linux-libre-4.14.30-gnu/drivers/infiniband/core/umem.c
--- linux-libre-4.14.29-gnu/drivers/infiniband/core/umem.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/infiniband/core/umem.c	2018-03-24 06:01:30.000000000 -0400
@@ -352,7 +352,7 @@ int ib_umem_copy_from(void *dst, struct
 		return -EINVAL;
 	}
 
-	ret = sg_pcopy_to_buffer(umem->sg_head.sgl, umem->nmap, dst, length,
+	ret = sg_pcopy_to_buffer(umem->sg_head.sgl, umem->npages, dst, length,
 				 offset + ib_umem_offset(umem));
 
 	if (ret < 0)
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/infiniband/hw/mlx5/qp.c linux-libre-4.14.30-gnu/drivers/infiniband/hw/mlx5/qp.c
--- linux-libre-4.14.29-gnu/drivers/infiniband/hw/mlx5/qp.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/infiniband/hw/mlx5/qp.c	2018-03-24 06:01:30.000000000 -0400
@@ -1130,7 +1130,7 @@ static void destroy_raw_packet_qp_sq(str
 	ib_umem_release(sq->ubuffer.umem);
 }
 
-static int get_rq_pas_size(void *qpc)
+static size_t get_rq_pas_size(void *qpc)
 {
 	u32 log_page_size = MLX5_GET(qpc, qpc, log_page_size) + 12;
 	u32 log_rq_stride = MLX5_GET(qpc, qpc, log_rq_stride);
@@ -1146,7 +1146,8 @@ static int get_rq_pas_size(void *qpc)
 }
 
 static int create_raw_packet_qp_rq(struct mlx5_ib_dev *dev,
-				   struct mlx5_ib_rq *rq, void *qpin)
+				   struct mlx5_ib_rq *rq, void *qpin,
+				   size_t qpinlen)
 {
 	struct mlx5_ib_qp *mqp = rq->base.container_mibqp;
 	__be64 *pas;
@@ -1155,9 +1156,12 @@ static int create_raw_packet_qp_rq(struc
 	void *rqc;
 	void *wq;
 	void *qpc = MLX5_ADDR_OF(create_qp_in, qpin, qpc);
-	int inlen;
+	size_t rq_pas_size = get_rq_pas_size(qpc);
+	size_t inlen;
 	int err;
-	u32 rq_pas_size = get_rq_pas_size(qpc);
+
+	if (qpinlen < rq_pas_size + MLX5_BYTE_OFF(create_qp_in, pas))
+		return -EINVAL;
 
 	inlen = MLX5_ST_SZ_BYTES(create_rq_in) + rq_pas_size;
 	in = kvzalloc(inlen, GFP_KERNEL);
@@ -1236,7 +1240,7 @@ static void destroy_raw_packet_qp_tir(st
 }
 
 static int create_raw_packet_qp(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp,
-				u32 *in,
+				u32 *in, size_t inlen,
 				struct ib_pd *pd)
 {
 	struct mlx5_ib_raw_packet_qp *raw_packet_qp = &qp->raw_packet_qp;
@@ -1266,7 +1270,7 @@ static int create_raw_packet_qp(struct m
 
 		if (qp->flags & MLX5_IB_QP_CVLAN_STRIPPING)
 			rq->flags |= MLX5_IB_RQ_CVLAN_STRIPPING;
-		err = create_raw_packet_qp_rq(dev, rq, in);
+		err = create_raw_packet_qp_rq(dev, rq, in, inlen);
 		if (err)
 			goto err_destroy_sq;
 
@@ -1781,11 +1785,16 @@ static int create_qp_common(struct mlx5_
 		qp->flags |= MLX5_IB_QP_LSO;
 	}
 
+	if (inlen < 0) {
+		err = -EINVAL;
+		goto err;
+	}
+
 	if (init_attr->qp_type == IB_QPT_RAW_PACKET ||
 	    qp->flags & MLX5_IB_QP_UNDERLAY) {
 		qp->raw_packet_qp.sq.ubuffer.buf_addr = ucmd.sq_buf_addr;
 		raw_packet_qp_copy_info(qp, &qp->raw_packet_qp);
-		err = create_raw_packet_qp(dev, qp, in, pd);
+		err = create_raw_packet_qp(dev, qp, in, inlen, pd);
 	} else {
 		err = mlx5_core_create_qp(dev->mdev, &base->mqp, in, inlen);
 	}
@@ -1825,6 +1834,7 @@ err_create:
 	else if (qp->create_type == MLX5_QP_KERNEL)
 		destroy_qp_kernel(dev, qp);
 
+err:
 	kvfree(in);
 	return err;
 }
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/infiniband/hw/mlx5/srq.c linux-libre-4.14.30-gnu/drivers/infiniband/hw/mlx5/srq.c
--- linux-libre-4.14.29-gnu/drivers/infiniband/hw/mlx5/srq.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/infiniband/hw/mlx5/srq.c	2018-03-24 06:01:30.000000000 -0400
@@ -241,8 +241,8 @@ struct ib_srq *mlx5_ib_create_srq(struct
 {
 	struct mlx5_ib_dev *dev = to_mdev(pd->device);
 	struct mlx5_ib_srq *srq;
-	int desc_size;
-	int buf_size;
+	size_t desc_size;
+	size_t buf_size;
 	int err;
 	struct mlx5_srq_attr in = {0};
 	__u32 max_srq_wqes = 1 << MLX5_CAP_GEN(dev->mdev, log_max_srq_sz);
@@ -266,15 +266,18 @@ struct ib_srq *mlx5_ib_create_srq(struct
 
 	desc_size = sizeof(struct mlx5_wqe_srq_next_seg) +
 		    srq->msrq.max_gs * sizeof(struct mlx5_wqe_data_seg);
+	if (desc_size == 0 || srq->msrq.max_gs > desc_size)
+		return ERR_PTR(-EINVAL);
 	desc_size = roundup_pow_of_two(desc_size);
-	desc_size = max_t(int, 32, desc_size);
+	desc_size = max_t(size_t, 32, desc_size);
+	if (desc_size < sizeof(struct mlx5_wqe_srq_next_seg))
+		return ERR_PTR(-EINVAL);
 	srq->msrq.max_avail_gather = (desc_size - sizeof(struct mlx5_wqe_srq_next_seg)) /
 		sizeof(struct mlx5_wqe_data_seg);
 	srq->msrq.wqe_shift = ilog2(desc_size);
 	buf_size = srq->msrq.max * desc_size;
-	mlx5_ib_dbg(dev, "desc_size 0x%x, req wr 0x%x, srq size 0x%x, max_gs 0x%x, max_avail_gather 0x%x\n",
-		    desc_size, init_attr->attr.max_wr, srq->msrq.max, srq->msrq.max_gs,
-		    srq->msrq.max_avail_gather);
+	if (buf_size < desc_size)
+		return ERR_PTR(-EINVAL);
 	in.type = init_attr->srq_type;
 
 	if (pd->uobject)
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/infiniband/hw/ocrdma/ocrdma_stats.c linux-libre-4.14.30-gnu/drivers/infiniband/hw/ocrdma/ocrdma_stats.c
--- linux-libre-4.14.29-gnu/drivers/infiniband/hw/ocrdma/ocrdma_stats.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/infiniband/hw/ocrdma/ocrdma_stats.c	2018-03-24 06:01:30.000000000 -0400
@@ -834,7 +834,7 @@ void ocrdma_add_port_stats(struct ocrdma
 
 	dev->reset_stats.type = OCRDMA_RESET_STATS;
 	dev->reset_stats.dev = dev;
-	if (!debugfs_create_file("reset_stats", S_IRUSR, dev->dir,
+	if (!debugfs_create_file("reset_stats", 0200, dev->dir,
 				&dev->reset_stats, &ocrdma_dbg_ops))
 		goto err;
 
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c linux-libre-4.14.30-gnu/drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c
--- linux-libre-4.14.29-gnu/drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c	2018-03-24 06:01:30.000000000 -0400
@@ -114,6 +114,7 @@ struct ib_cq *pvrdma_create_cq(struct ib
 	union pvrdma_cmd_resp rsp;
 	struct pvrdma_cmd_create_cq *cmd = &req.create_cq;
 	struct pvrdma_cmd_create_cq_resp *resp = &rsp.create_cq_resp;
+	struct pvrdma_create_cq_resp cq_resp = {0};
 	struct pvrdma_create_cq ucmd;
 
 	BUILD_BUG_ON(sizeof(struct pvrdma_cqe) != 64);
@@ -198,6 +199,7 @@ struct ib_cq *pvrdma_create_cq(struct ib
 
 	cq->ibcq.cqe = resp->cqe;
 	cq->cq_handle = resp->cq_handle;
+	cq_resp.cqn = resp->cq_handle;
 	spin_lock_irqsave(&dev->cq_tbl_lock, flags);
 	dev->cq_tbl[cq->cq_handle % dev->dsr->caps.max_cq] = cq;
 	spin_unlock_irqrestore(&dev->cq_tbl_lock, flags);
@@ -206,7 +208,7 @@ struct ib_cq *pvrdma_create_cq(struct ib
 		cq->uar = &(to_vucontext(context)->uar);
 
 		/* Copy udata back. */
-		if (ib_copy_to_udata(udata, &cq->cq_handle, sizeof(__u32))) {
+		if (ib_copy_to_udata(udata, &cq_resp, sizeof(cq_resp))) {
 			dev_warn(&dev->pdev->dev,
 				 "failed to copy back udata\n");
 			pvrdma_destroy_cq(&cq->ibcq);
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c linux-libre-4.14.30-gnu/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c
--- linux-libre-4.14.29-gnu/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c	2018-03-24 06:01:30.000000000 -0400
@@ -444,6 +444,7 @@ struct ib_pd *pvrdma_alloc_pd(struct ib_
 	union pvrdma_cmd_resp rsp;
 	struct pvrdma_cmd_create_pd *cmd = &req.create_pd;
 	struct pvrdma_cmd_create_pd_resp *resp = &rsp.create_pd_resp;
+	struct pvrdma_alloc_pd_resp pd_resp = {0};
 	int ret;
 	void *ptr;
 
@@ -472,9 +473,10 @@ struct ib_pd *pvrdma_alloc_pd(struct ib_
 	pd->privileged = !context;
 	pd->pd_handle = resp->pd_handle;
 	pd->pdn = resp->pd_handle;
+	pd_resp.pdn = resp->pd_handle;
 
 	if (context) {
-		if (ib_copy_to_udata(udata, &pd->pdn, sizeof(__u32))) {
+		if (ib_copy_to_udata(udata, &pd_resp, sizeof(pd_resp))) {
 			dev_warn(&dev->pdev->dev,
 				 "failed to copy back protection domain\n");
 			pvrdma_dealloc_pd(&pd->ibpd);
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/infiniband/ulp/ipoib/ipoib_main.c linux-libre-4.14.30-gnu/drivers/infiniband/ulp/ipoib/ipoib_main.c
--- linux-libre-4.14.29-gnu/drivers/infiniband/ulp/ipoib/ipoib_main.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/infiniband/ulp/ipoib/ipoib_main.c	2018-03-24 06:01:30.000000000 -0400
@@ -776,6 +776,22 @@ static void path_rec_completion(int stat
 	spin_lock_irqsave(&priv->lock, flags);
 
 	if (!IS_ERR_OR_NULL(ah)) {
+		/*
+		 * pathrec.dgid is used as the database key from the LLADDR,
+		 * it must remain unchanged even if the SA returns a different
+		 * GID to use in the AH.
+		 */
+		if (memcmp(pathrec->dgid.raw, path->pathrec.dgid.raw,
+			   sizeof(union ib_gid))) {
+			ipoib_dbg(
+				priv,
+				"%s got PathRec for gid %pI6 while asked for %pI6\n",
+				dev->name, pathrec->dgid.raw,
+				path->pathrec.dgid.raw);
+			memcpy(pathrec->dgid.raw, path->pathrec.dgid.raw,
+			       sizeof(union ib_gid));
+		}
+
 		path->pathrec = *pathrec;
 
 		old_ah   = path->ah;
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/infiniband/ulp/isert/ib_isert.c linux-libre-4.14.30-gnu/drivers/infiniband/ulp/isert/ib_isert.c
--- linux-libre-4.14.29-gnu/drivers/infiniband/ulp/isert/ib_isert.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/infiniband/ulp/isert/ib_isert.c	2018-03-24 06:01:30.000000000 -0400
@@ -2124,6 +2124,9 @@ isert_rdma_rw_ctx_post(struct isert_cmd
 	u32 rkey, offset;
 	int ret;
 
+	if (cmd->ctx_init_done)
+		goto rdma_ctx_post;
+
 	if (dir == DMA_FROM_DEVICE) {
 		addr = cmd->write_va;
 		rkey = cmd->write_stag;
@@ -2151,11 +2154,15 @@ isert_rdma_rw_ctx_post(struct isert_cmd
 				se_cmd->t_data_sg, se_cmd->t_data_nents,
 				offset, addr, rkey, dir);
 	}
+
 	if (ret < 0) {
 		isert_err("Cmd: %p failed to prepare RDMA res\n", cmd);
 		return ret;
 	}
 
+	cmd->ctx_init_done = true;
+
+rdma_ctx_post:
 	ret = rdma_rw_ctx_post(&cmd->rw, conn->qp, port_num, cqe, chain_wr);
 	if (ret < 0)
 		isert_err("Cmd: %p failed to post RDMA res\n", cmd);
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/infiniband/ulp/isert/ib_isert.h linux-libre-4.14.30-gnu/drivers/infiniband/ulp/isert/ib_isert.h
--- linux-libre-4.14.29-gnu/drivers/infiniband/ulp/isert/ib_isert.h	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/infiniband/ulp/isert/ib_isert.h	2018-03-24 06:01:30.000000000 -0400
@@ -126,6 +126,7 @@ struct isert_cmd {
 	struct rdma_rw_ctx	rw;
 	struct work_struct	comp_work;
 	struct scatterlist	sg;
+	bool			ctx_init_done;
 };
 
 static inline struct isert_cmd *tx_desc_to_cmd(struct iser_tx_desc *desc)
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/iommu/intel-svm.c linux-libre-4.14.30-gnu/drivers/iommu/intel-svm.c
--- linux-libre-4.14.29-gnu/drivers/iommu/intel-svm.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/iommu/intel-svm.c	2018-03-24 06:01:30.000000000 -0400
@@ -129,6 +129,7 @@ int intel_svm_enable_prq(struct intel_io
 		pr_err("IOMMU: %s: Failed to request IRQ for page request queue\n",
 		       iommu->name);
 		dmar_free_hwirq(irq);
+		iommu->pr_irq = 0;
 		goto err;
 	}
 	dmar_writeq(iommu->reg + DMAR_PQH_REG, 0ULL);
@@ -144,9 +145,11 @@ int intel_svm_finish_prq(struct intel_io
 	dmar_writeq(iommu->reg + DMAR_PQT_REG, 0ULL);
 	dmar_writeq(iommu->reg + DMAR_PQA_REG, 0ULL);
 
-	free_irq(iommu->pr_irq, iommu);
-	dmar_free_hwirq(iommu->pr_irq);
-	iommu->pr_irq = 0;
+	if (iommu->pr_irq) {
+		free_irq(iommu->pr_irq, iommu);
+		dmar_free_hwirq(iommu->pr_irq);
+		iommu->pr_irq = 0;
+	}
 
 	free_pages((unsigned long)iommu->prq, PRQ_ORDER);
 	iommu->prq = NULL;
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/media/dvb-frontends/si2168.c linux-libre-4.14.30-gnu/drivers/media/dvb-frontends/si2168.c
--- linux-libre-4.14.29-gnu/drivers/media/dvb-frontends/si2168.c	2018-03-21 13:05:30.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/media/dvb-frontends/si2168.c	2018-03-25 17:51:55.000000000 -0400
@@ -14,6 +14,8 @@
  *    GNU General Public License for more details.
  */
 
+#include <linux/delay.h>
+
 #include "si2168_priv.h"
 
 static const struct dvb_frontend_ops si2168_ops;
@@ -435,6 +437,7 @@ static int si2168_init(struct dvb_fronte
 		if (ret)
 			goto err;
 
+		udelay(100);
 		memcpy(cmd.args, "\x85", 1);
 		cmd.wlen = 1;
 		cmd.rlen = 1;
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/media/pci/bt8xx/bt878.c linux-libre-4.14.30-gnu/drivers/media/pci/bt8xx/bt878.c
--- linux-libre-4.14.29-gnu/drivers/media/pci/bt8xx/bt878.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/media/pci/bt8xx/bt878.c	2018-03-24 06:01:30.000000000 -0400
@@ -422,8 +422,7 @@ static int bt878_probe(struct pci_dev *d
 	       bt878_num);
 	if (bt878_num >= BT878_MAX) {
 		printk(KERN_ERR "bt878: Too many devices inserted\n");
-		result = -ENOMEM;
-		goto fail0;
+		return -ENOMEM;
 	}
 	if (pci_enable_device(dev))
 		return -EIO;
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/media/platform/davinci/vpif_capture.c linux-libre-4.14.30-gnu/drivers/media/platform/davinci/vpif_capture.c
--- linux-libre-4.14.29-gnu/drivers/media/platform/davinci/vpif_capture.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/media/platform/davinci/vpif_capture.c	2018-03-24 06:01:30.000000000 -0400
@@ -1397,9 +1397,9 @@ static int vpif_async_bound(struct v4l2_
 			vpif_obj.config->chan_config->inputs[i].subdev_name =
 				(char *)to_of_node(subdev->fwnode)->full_name;
 			vpif_dbg(2, debug,
-				 "%s: setting input %d subdev_name = %pOF\n",
+				 "%s: setting input %d subdev_name = %s\n",
 				 __func__, i,
-				 to_of_node(subdev->fwnode));
+				vpif_obj.config->chan_config->inputs[i].subdev_name);
 			return 0;
 		}
 	}
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/media/platform/s5p-mfc/s5p_mfc.c linux-libre-4.14.30-gnu/drivers/media/platform/s5p-mfc/s5p_mfc.c
--- linux-libre-4.14.29-gnu/drivers/media/platform/s5p-mfc/s5p_mfc.c	2018-03-21 13:08:09.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/media/platform/s5p-mfc/s5p_mfc.c	2018-03-25 17:56:08.000000000 -0400
@@ -1315,6 +1315,12 @@ static int s5p_mfc_probe(struct platform
 		goto err_dma;
 	}
 
+	/*
+	 * Load fails if fs isn't mounted. Try loading anyway.
+	 * _open() will load it, it it fails now. Ignore failure.
+	 */
+	s5p_mfc_load_firmware(dev);
+
 	mutex_init(&dev->mfc_mutex);
 	init_waitqueue_head(&dev->queue);
 	dev->hw_lock = 0;
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_common.h linux-libre-4.14.30-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
--- linux-libre-4.14.29-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_common.h	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_common.h	2018-03-24 06:01:30.000000000 -0400
@@ -290,6 +290,8 @@ struct s5p_mfc_priv_buf {
  * @mfc_cmds:		cmd structure holding HW commands function pointers
  * @mfc_regs:		structure holding MFC registers
  * @fw_ver:		loaded firmware sub-version
+ * @fw_get_done		flag set when request_firmware() is complete and
+ *			copied into fw_buf
  * risc_on:		flag indicates RISC is on or off
  *
  */
@@ -336,6 +338,7 @@ struct s5p_mfc_dev {
 	struct s5p_mfc_hw_cmds *mfc_cmds;
 	const struct s5p_mfc_regs *mfc_regs;
 	enum s5p_mfc_fw_ver fw_ver;
+	bool fw_get_done;
 	bool risc_on; /* indicates if RISC is on or off */
 };
 
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c linux-libre-4.14.30-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
--- linux-libre-4.14.29-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c	2018-03-21 13:08:06.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c	2018-03-25 17:56:03.000000000 -0400
@@ -55,6 +55,9 @@ int s5p_mfc_load_firmware(struct s5p_mfc
 	 * into kernel. */
 	mfc_debug_enter();
 
+	if (dev->fw_get_done)
+		return 0;
+
 	for (i = MFC_FW_MAX_VERSIONS - 1; i >= 0; i--) {
 		if (!dev->variant->fw_name[i])
 			continue;
@@ -82,6 +85,7 @@ int s5p_mfc_load_firmware(struct s5p_mfc
 	}
 	memcpy(dev->fw_buf.virt, fw_blob->data, fw_blob->size);
 	wmb();
+	dev->fw_get_done = true;
 	release_firmware(fw_blob);
 	mfc_debug_leave();
 	return 0;
@@ -93,6 +97,7 @@ int s5p_mfc_release_firmware(struct s5p_
 	/* Before calling this function one has to make sure
 	 * that MFC is no longer processing */
 	s5p_mfc_release_priv_buf(dev, &dev->fw_buf);
+	dev->fw_get_done = false;
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c linux-libre-4.14.30-gnu/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
--- linux-libre-4.14.29-gnu/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c	2018-03-21 13:05:55.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c	2018-03-25 17:52:38.000000000 -0400
@@ -83,7 +83,7 @@ static void c8sectpfe_timer_interrupt(un
 static void channel_swdemux_tsklet(unsigned long data)
 {
 	struct channel_info *channel = (struct channel_info *)data;
-	struct c8sectpfei *fei = channel->fei;
+	struct c8sectpfei *fei;
 	unsigned long wp, rp;
 	int pos, num_packets, n, size;
 	u8 *buf;
@@ -91,6 +91,8 @@ static void channel_swdemux_tsklet(unsig
 	if (unlikely(!channel || !channel->irec))
 		return;
 
+	fei = channel->fei;
+
 	wp = readl(channel->irec + DMA_PRDS_BUSWP_TP(0));
 	rp = readl(channel->irec + DMA_PRDS_BUSRP_TP(0));
 
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/mmc/core/block.c linux-libre-4.14.30-gnu/drivers/mmc/core/block.c
--- linux-libre-4.14.29-gnu/drivers/mmc/core/block.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/mmc/core/block.c	2018-03-24 06:01:30.000000000 -0400
@@ -2387,6 +2387,7 @@ static int mmc_ext_csd_open(struct inode
 
 	if (n != EXT_CSD_STR_LEN) {
 		err = -EINVAL;
+		kfree(ext_csd);
 		goto out_free;
 	}
 
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/mmc/core/core.c linux-libre-4.14.30-gnu/drivers/mmc/core/core.c
--- linux-libre-4.14.29-gnu/drivers/mmc/core/core.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/mmc/core/core.c	2018-03-24 06:01:30.000000000 -0400
@@ -2751,6 +2751,14 @@ static int mmc_pm_notify(struct notifier
 		if (!err)
 			break;
 
+		if (!mmc_card_is_removable(host)) {
+			dev_warn(mmc_dev(host),
+				 "pre_suspend failed for non-removable host: "
+				 "%d\n", err);
+			/* Avoid removing non-removable hosts */
+			break;
+		}
+
 		/* Calling bus_ops->remove() with a claimed host can deadlock */
 		host->bus_ops->remove(host);
 		mmc_claim_host(host);
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/mmc/host/sdhci-xenon.c linux-libre-4.14.30-gnu/drivers/mmc/host/sdhci-xenon.c
--- linux-libre-4.14.29-gnu/drivers/mmc/host/sdhci-xenon.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/mmc/host/sdhci-xenon.c	2018-03-24 06:01:30.000000000 -0400
@@ -230,7 +230,14 @@ static void xenon_set_power(struct sdhci
 		mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
 }
 
+static void xenon_voltage_switch(struct sdhci_host *host)
+{
+	/* Wait for 5ms after set 1.8V signal enable bit */
+	usleep_range(5000, 5500);
+}
+
 static const struct sdhci_ops sdhci_xenon_ops = {
+	.voltage_switch		= xenon_voltage_switch,
 	.set_clock		= sdhci_set_clock,
 	.set_power		= xenon_set_power,
 	.set_bus_width		= sdhci_set_bus_width,
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/net/hyperv/hyperv_net.h linux-libre-4.14.30-gnu/drivers/net/hyperv/hyperv_net.h
--- linux-libre-4.14.29-gnu/drivers/net/hyperv/hyperv_net.h	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/net/hyperv/hyperv_net.h	2018-03-24 06:01:30.000000000 -0400
@@ -635,14 +635,27 @@ struct nvsp_message {
 #define NETVSC_MTU 65535
 #define NETVSC_MTU_MIN ETH_MIN_MTU
 
-#define NETVSC_RECEIVE_BUFFER_SIZE		(1024*1024*16)	/* 16MB */
-#define NETVSC_RECEIVE_BUFFER_SIZE_LEGACY	(1024*1024*15)  /* 15MB */
-#define NETVSC_SEND_BUFFER_SIZE			(1024 * 1024 * 15)   /* 15MB */
+/* Max buffer sizes allowed by a host */
+#define NETVSC_RECEIVE_BUFFER_SIZE		(1024 * 1024 * 31) /* 31MB */
+#define NETVSC_RECEIVE_BUFFER_SIZE_LEGACY	(1024 * 1024 * 15) /* 15MB */
+#define NETVSC_RECEIVE_BUFFER_DEFAULT		(1024 * 1024 * 16)
+
+#define NETVSC_SEND_BUFFER_SIZE			(1024 * 1024 * 15)  /* 15MB */
+#define NETVSC_SEND_BUFFER_DEFAULT		(1024 * 1024)
+
 #define NETVSC_INVALID_INDEX			-1
 
 #define NETVSC_SEND_SECTION_SIZE		6144
 #define NETVSC_RECV_SECTION_SIZE		1728
 
+/* Default size of TX buf: 1MB, RX buf: 16MB */
+#define NETVSC_MIN_TX_SECTIONS	10
+#define NETVSC_DEFAULT_TX	(NETVSC_SEND_BUFFER_DEFAULT \
+				 / NETVSC_SEND_SECTION_SIZE)
+#define NETVSC_MIN_RX_SECTIONS	10
+#define NETVSC_DEFAULT_RX	(NETVSC_RECEIVE_BUFFER_DEFAULT \
+				 / NETVSC_RECV_SECTION_SIZE)
+
 #define NETVSC_RECEIVE_BUFFER_ID		0xcafe
 #define NETVSC_SEND_BUFFER_ID			0
 
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/net/hyperv/netvsc.c linux-libre-4.14.30-gnu/drivers/net/hyperv/netvsc.c
--- linux-libre-4.14.29-gnu/drivers/net/hyperv/netvsc.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/net/hyperv/netvsc.c	2018-03-24 06:01:30.000000000 -0400
@@ -262,6 +262,11 @@ static int netvsc_init_buf(struct hv_dev
 	buf_size = device_info->recv_sections * device_info->recv_section_size;
 	buf_size = roundup(buf_size, PAGE_SIZE);
 
+	/* Legacy hosts only allow smaller receive buffer */
+	if (net_device->nvsp_version <= NVSP_PROTOCOL_VERSION_2)
+		buf_size = min_t(unsigned int, buf_size,
+				 NETVSC_RECEIVE_BUFFER_SIZE_LEGACY);
+
 	net_device->recv_buf = vzalloc(buf_size);
 	if (!net_device->recv_buf) {
 		netdev_err(ndev,
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/net/hyperv/netvsc_drv.c linux-libre-4.14.30-gnu/drivers/net/hyperv/netvsc_drv.c
--- linux-libre-4.14.29-gnu/drivers/net/hyperv/netvsc_drv.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/net/hyperv/netvsc_drv.c	2018-03-24 06:01:30.000000000 -0400
@@ -46,10 +46,6 @@
 #include "hyperv_net.h"
 
 #define RING_SIZE_MIN		64
-#define NETVSC_MIN_TX_SECTIONS	10
-#define NETVSC_DEFAULT_TX	192	/* ~1M */
-#define NETVSC_MIN_RX_SECTIONS	10	/* ~64K */
-#define NETVSC_DEFAULT_RX	10485   /* Max ~16M */
 
 #define LINKCHANGE_INT (2 * HZ)
 #define VF_TAKEOVER_INT (HZ / 10)
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/net/phy/meson-gxl.c linux-libre-4.14.30-gnu/drivers/net/phy/meson-gxl.c
--- linux-libre-4.14.29-gnu/drivers/net/phy/meson-gxl.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/net/phy/meson-gxl.c	2018-03-24 06:01:30.000000000 -0400
@@ -25,27 +25,53 @@
 
 static int meson_gxl_config_init(struct phy_device *phydev)
 {
+	int ret;
+
 	/* Enable Analog and DSP register Bank access by */
-	phy_write(phydev, 0x14, 0x0000);
-	phy_write(phydev, 0x14, 0x0400);
-	phy_write(phydev, 0x14, 0x0000);
-	phy_write(phydev, 0x14, 0x0400);
+	ret = phy_write(phydev, 0x14, 0x0000);
+	if (ret)
+		return ret;
+	ret = phy_write(phydev, 0x14, 0x0400);
+	if (ret)
+		return ret;
+	ret = phy_write(phydev, 0x14, 0x0000);
+	if (ret)
+		return ret;
+	ret = phy_write(phydev, 0x14, 0x0400);
+	if (ret)
+		return ret;
 
 	/* Write Analog register 23 */
-	phy_write(phydev, 0x17, 0x8E0D);
-	phy_write(phydev, 0x14, 0x4417);
+	ret = phy_write(phydev, 0x17, 0x8E0D);
+	if (ret)
+		return ret;
+	ret = phy_write(phydev, 0x14, 0x4417);
+	if (ret)
+		return ret;
 
 	/* Enable fractional PLL */
-	phy_write(phydev, 0x17, 0x0005);
-	phy_write(phydev, 0x14, 0x5C1B);
+	ret = phy_write(phydev, 0x17, 0x0005);
+	if (ret)
+		return ret;
+	ret = phy_write(phydev, 0x14, 0x5C1B);
+	if (ret)
+		return ret;
 
 	/* Program fraction FR_PLL_DIV1 */
-	phy_write(phydev, 0x17, 0x029A);
-	phy_write(phydev, 0x14, 0x5C1D);
+	ret = phy_write(phydev, 0x17, 0x029A);
+	if (ret)
+		return ret;
+	ret = phy_write(phydev, 0x14, 0x5C1D);
+	if (ret)
+		return ret;
 
 	/* Program fraction FR_PLL_DIV1 */
-	phy_write(phydev, 0x17, 0xAAAA);
-	phy_write(phydev, 0x14, 0x5C1C);
+	ret = phy_write(phydev, 0x17, 0xAAAA);
+	if (ret)
+		return ret;
+	ret = phy_write(phydev, 0x14, 0x5C1C);
+	if (ret)
+		return ret;
 
 	return 0;
 }
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/net/phy/sfp.c linux-libre-4.14.30-gnu/drivers/net/phy/sfp.c
--- linux-libre-4.14.29-gnu/drivers/net/phy/sfp.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/net/phy/sfp.c	2018-03-24 06:01:30.000000000 -0400
@@ -318,12 +318,12 @@ static void sfp_sm_probe_phy(struct sfp
 	msleep(T_PHY_RESET_MS);
 
 	phy = mdiobus_scan(sfp->i2c_mii, SFP_PHY_ADDR);
-	if (IS_ERR(phy)) {
-		dev_err(sfp->dev, "mdiobus scan returned %ld\n", PTR_ERR(phy));
+	if (phy == ERR_PTR(-ENODEV)) {
+		dev_info(sfp->dev, "no PHY detected\n");
 		return;
 	}
-	if (!phy) {
-		dev_info(sfp->dev, "no PHY detected\n");
+	if (IS_ERR(phy)) {
+		dev_err(sfp->dev, "mdiobus scan returned %ld\n", PTR_ERR(phy));
 		return;
 	}
 
@@ -667,20 +667,19 @@ static int sfp_module_eeprom(struct sfp
 		len = min_t(unsigned int, last, ETH_MODULE_SFF_8079_LEN);
 		len -= first;
 
-		ret = sfp->read(sfp, false, first, data, len);
+		ret = sfp_read(sfp, false, first, data, len);
 		if (ret < 0)
 			return ret;
 
 		first += len;
 		data += len;
 	}
-	if (first >= ETH_MODULE_SFF_8079_LEN &&
-	    first < ETH_MODULE_SFF_8472_LEN) {
+	if (first < ETH_MODULE_SFF_8472_LEN && last > ETH_MODULE_SFF_8079_LEN) {
 		len = min_t(unsigned int, last, ETH_MODULE_SFF_8472_LEN);
 		len -= first;
 		first -= ETH_MODULE_SFF_8079_LEN;
 
-		ret = sfp->read(sfp, true, first, data, len);
+		ret = sfp_read(sfp, true, first, data, len);
 		if (ret < 0)
 			return ret;
 	}
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/net/usb/qmi_wwan.c linux-libre-4.14.30-gnu/drivers/net/usb/qmi_wwan.c
--- linux-libre-4.14.29-gnu/drivers/net/usb/qmi_wwan.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/net/usb/qmi_wwan.c	2018-03-24 06:01:30.000000000 -0400
@@ -826,7 +826,7 @@ err:
 
 static const struct driver_info	qmi_wwan_info = {
 	.description	= "WWAN/QMI device",
-	.flags		= FLAG_WWAN,
+	.flags		= FLAG_WWAN | FLAG_SEND_ZLP,
 	.bind		= qmi_wwan_bind,
 	.unbind		= qmi_wwan_unbind,
 	.manage_power	= qmi_wwan_manage_power,
@@ -835,7 +835,7 @@ static const struct driver_info	qmi_wwan
 
 static const struct driver_info	qmi_wwan_info_quirk_dtr = {
 	.description	= "WWAN/QMI device",
-	.flags		= FLAG_WWAN,
+	.flags		= FLAG_WWAN | FLAG_SEND_ZLP,
 	.bind		= qmi_wwan_bind,
 	.unbind		= qmi_wwan_unbind,
 	.manage_power	= qmi_wwan_manage_power,
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/net/wireless/ath/ath10k/mac.c linux-libre-4.14.30-gnu/drivers/net/wireless/ath/ath10k/mac.c
--- linux-libre-4.14.29-gnu/drivers/net/wireless/ath/ath10k/mac.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/net/wireless/ath/ath10k/mac.c	2018-03-24 06:01:30.000000000 -0400
@@ -2553,7 +2553,7 @@ static void ath10k_peer_assoc_h_qos(stru
 		}
 		break;
 	case WMI_VDEV_TYPE_STA:
-		if (vif->bss_conf.qos)
+		if (sta->wme)
 			arg->peer_flags |= arvif->ar->wmi.peer_flags->qos;
 		break;
 	case WMI_VDEV_TYPE_IBSS:
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/net/wireless/realtek/rtlwifi/base.c linux-libre-4.14.30-gnu/drivers/net/wireless/realtek/rtlwifi/base.c
--- linux-libre-4.14.29-gnu/drivers/net/wireless/realtek/rtlwifi/base.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/net/wireless/realtek/rtlwifi/base.c	2018-03-24 06:01:30.000000000 -0400
@@ -1664,7 +1664,7 @@ int rtl_tx_agg_oper(struct ieee80211_hw
 void rtl_rx_ampdu_apply(struct rtl_priv *rtlpriv)
 {
 	struct rtl_btc_ops *btc_ops = rtlpriv->btcoexist.btc_ops;
-	u8 reject_agg, ctrl_agg_size = 0, agg_size;
+	u8 reject_agg = 0, ctrl_agg_size = 0, agg_size = 0;
 
 	if (rtlpriv->cfg->ops->get_btc_status())
 		btc_ops->btc_get_ampdu_cfg(rtlpriv, &reject_agg,
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/net/wireless/realtek/rtlwifi/pci.c linux-libre-4.14.30-gnu/drivers/net/wireless/realtek/rtlwifi/pci.c
--- linux-libre-4.14.29-gnu/drivers/net/wireless/realtek/rtlwifi/pci.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/net/wireless/realtek/rtlwifi/pci.c	2018-03-24 06:01:30.000000000 -0400
@@ -1568,7 +1568,14 @@ int rtl_pci_reset_trx_ring(struct ieee80
 				dev_kfree_skb_irq(skb);
 				ring->idx = (ring->idx + 1) % ring->entries;
 			}
+
+			if (rtlpriv->use_new_trx_flow) {
+				rtlpci->tx_ring[i].cur_tx_rp = 0;
+				rtlpci->tx_ring[i].cur_tx_wp = 0;
+			}
+
 			ring->idx = 0;
+			ring->entries = rtlpci->txringcount[i];
 		}
 	}
 	spin_unlock_irqrestore(&rtlpriv->locks.irq_th_lock, flags);
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/pci/dwc/pcie-designware-ep.c linux-libre-4.14.30-gnu/drivers/pci/dwc/pcie-designware-ep.c
--- linux-libre-4.14.29-gnu/drivers/pci/dwc/pcie-designware-ep.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/pci/dwc/pcie-designware-ep.c	2018-03-24 06:01:30.000000000 -0400
@@ -197,20 +197,14 @@ static int dw_pcie_ep_map_addr(struct pc
 static int dw_pcie_ep_get_msi(struct pci_epc *epc)
 {
 	int val;
-	u32 lower_addr;
-	u32 upper_addr;
 	struct dw_pcie_ep *ep = epc_get_drvdata(epc);
 	struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
 
-	val = dw_pcie_readb_dbi(pci, MSI_MESSAGE_CONTROL);
-	val = (val & MSI_CAP_MME_MASK) >> MSI_CAP_MME_SHIFT;
-
-	lower_addr = dw_pcie_readl_dbi(pci, MSI_MESSAGE_ADDR_L32);
-	upper_addr = dw_pcie_readl_dbi(pci, MSI_MESSAGE_ADDR_U32);
-
-	if (!(lower_addr || upper_addr))
+	val = dw_pcie_readw_dbi(pci, MSI_MESSAGE_CONTROL);
+	if (!(val & MSI_CAP_MSI_EN_MASK))
 		return -EINVAL;
 
+	val = (val & MSI_CAP_MME_MASK) >> MSI_CAP_MME_SHIFT;
 	return val;
 }
 
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/pci/dwc/pcie-designware.h linux-libre-4.14.30-gnu/drivers/pci/dwc/pcie-designware.h
--- linux-libre-4.14.29-gnu/drivers/pci/dwc/pcie-designware.h	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/pci/dwc/pcie-designware.h	2018-03-24 06:01:30.000000000 -0400
@@ -101,6 +101,7 @@
 #define MSI_MESSAGE_CONTROL		0x52
 #define MSI_CAP_MMC_SHIFT		1
 #define MSI_CAP_MME_SHIFT		4
+#define MSI_CAP_MSI_EN_MASK		0x1
 #define MSI_CAP_MME_MASK		(7 << MSI_CAP_MME_SHIFT)
 #define MSI_MESSAGE_ADDR_L32		0x54
 #define MSI_MESSAGE_ADDR_U32		0x58
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/pci/endpoint/pci-ep-cfs.c linux-libre-4.14.30-gnu/drivers/pci/endpoint/pci-ep-cfs.c
--- linux-libre-4.14.29-gnu/drivers/pci/endpoint/pci-ep-cfs.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/pci/endpoint/pci-ep-cfs.c	2018-03-24 06:01:30.000000000 -0400
@@ -109,7 +109,10 @@ static int pci_epc_epf_link(struct confi
 		goto err_add_epf;
 
 	func_no = find_first_zero_bit(&epc_group->function_num_map,
-				      sizeof(epc_group->function_num_map));
+				      BITS_PER_LONG);
+	if (func_no >= BITS_PER_LONG)
+		return -EINVAL;
+
 	set_bit(func_no, &epc_group->function_num_map);
 	epf->func_no = func_no;
 
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/pci/host/pcie-rcar.c linux-libre-4.14.30-gnu/drivers/pci/host/pcie-rcar.c
--- linux-libre-4.14.29-gnu/drivers/pci/host/pcie-rcar.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/pci/host/pcie-rcar.c	2018-03-24 06:01:30.000000000 -0400
@@ -1141,7 +1141,9 @@ static int rcar_pcie_probe(struct platfo
 
 	INIT_LIST_HEAD(&pcie->resources);
 
-	rcar_pcie_parse_request_of_pci_ranges(pcie);
+	err = rcar_pcie_parse_request_of_pci_ranges(pcie);
+	if (err)
+		goto err_free_bridge;
 
 	err = rcar_pcie_get_resources(pcie);
 	if (err < 0) {
@@ -1196,6 +1198,7 @@ err_pm_disable:
 
 err_free_resource_list:
 	pci_free_resource_list(&pcie->resources);
+err_free_bridge:
 	pci_free_host_bridge(bridge);
 
 	return err;
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/pinctrl/core.c linux-libre-4.14.30-gnu/drivers/pinctrl/core.c
--- linux-libre-4.14.29-gnu/drivers/pinctrl/core.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/pinctrl/core.c	2018-03-24 06:01:30.000000000 -0400
@@ -1189,19 +1189,16 @@ struct pinctrl_state *pinctrl_lookup_sta
 EXPORT_SYMBOL_GPL(pinctrl_lookup_state);
 
 /**
- * pinctrl_select_state() - select/activate/program a pinctrl state to HW
+ * pinctrl_commit_state() - select/activate/program a pinctrl state to HW
  * @p: the pinctrl handle for the device that requests configuration
  * @state: the state handle to select/activate/program
  */
-int pinctrl_select_state(struct pinctrl *p, struct pinctrl_state *state)
+static int pinctrl_commit_state(struct pinctrl *p, struct pinctrl_state *state)
 {
 	struct pinctrl_setting *setting, *setting2;
 	struct pinctrl_state *old_state = p->state;
 	int ret;
 
-	if (p->state == state)
-		return 0;
-
 	if (p->state) {
 		/*
 		 * For each pinmux setting in the old state, forget SW's record
@@ -1265,6 +1262,19 @@ unapply_new_state:
 
 	return ret;
 }
+
+/**
+ * pinctrl_select_state() - select/activate/program a pinctrl state to HW
+ * @p: the pinctrl handle for the device that requests configuration
+ * @state: the state handle to select/activate/program
+ */
+int pinctrl_select_state(struct pinctrl *p, struct pinctrl_state *state)
+{
+	if (p->state == state)
+		return 0;
+
+	return pinctrl_commit_state(p, state);
+}
 EXPORT_SYMBOL_GPL(pinctrl_select_state);
 
 static void devm_pinctrl_release(struct device *dev, void *res)
@@ -1430,7 +1440,7 @@ void pinctrl_unregister_map(const struct
 int pinctrl_force_sleep(struct pinctrl_dev *pctldev)
 {
 	if (!IS_ERR(pctldev->p) && !IS_ERR(pctldev->hog_sleep))
-		return pinctrl_select_state(pctldev->p, pctldev->hog_sleep);
+		return pinctrl_commit_state(pctldev->p, pctldev->hog_sleep);
 	return 0;
 }
 EXPORT_SYMBOL_GPL(pinctrl_force_sleep);
@@ -1442,7 +1452,7 @@ EXPORT_SYMBOL_GPL(pinctrl_force_sleep);
 int pinctrl_force_default(struct pinctrl_dev *pctldev)
 {
 	if (!IS_ERR(pctldev->p) && !IS_ERR(pctldev->hog_default))
-		return pinctrl_select_state(pctldev->p, pctldev->hog_default);
+		return pinctrl_commit_state(pctldev->p, pctldev->hog_default);
 	return 0;
 }
 EXPORT_SYMBOL_GPL(pinctrl_force_default);
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/pinctrl/pinctrl-rockchip.c linux-libre-4.14.30-gnu/drivers/pinctrl/pinctrl-rockchip.c
--- linux-libre-4.14.29-gnu/drivers/pinctrl/pinctrl-rockchip.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/pinctrl/pinctrl-rockchip.c	2018-03-24 06:01:30.000000000 -0400
@@ -1989,8 +1989,16 @@ static int rockchip_gpio_get_direction(s
 {
 	struct rockchip_pin_bank *bank = gpiochip_get_data(chip);
 	u32 data;
+	int ret;
 
+	ret = clk_enable(bank->clk);
+	if (ret < 0) {
+		dev_err(bank->drvdata->dev,
+			"failed to enable clock for bank %s\n", bank->name);
+		return ret;
+	}
 	data = readl_relaxed(bank->reg_base + GPIO_SWPORT_DDR);
+	clk_disable(bank->clk);
 
 	return !(data & BIT(offset));
 }
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/platform/chrome/cros_ec_proto.c linux-libre-4.14.30-gnu/drivers/platform/chrome/cros_ec_proto.c
--- linux-libre-4.14.29-gnu/drivers/platform/chrome/cros_ec_proto.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/platform/chrome/cros_ec_proto.c	2018-03-24 06:01:30.000000000 -0400
@@ -60,12 +60,14 @@ static int send_command(struct cros_ec_d
 			struct cros_ec_command *msg)
 {
 	int ret;
+	int (*xfer_fxn)(struct cros_ec_device *ec, struct cros_ec_command *msg);
 
 	if (ec_dev->proto_version > 2)
-		ret = ec_dev->pkt_xfer(ec_dev, msg);
+		xfer_fxn = ec_dev->pkt_xfer;
 	else
-		ret = ec_dev->cmd_xfer(ec_dev, msg);
+		xfer_fxn = ec_dev->cmd_xfer;
 
+	ret = (*xfer_fxn)(ec_dev, msg);
 	if (msg->result == EC_RES_IN_PROGRESS) {
 		int i;
 		struct cros_ec_command *status_msg;
@@ -88,7 +90,7 @@ static int send_command(struct cros_ec_d
 		for (i = 0; i < EC_COMMAND_RETRIES; i++) {
 			usleep_range(10000, 11000);
 
-			ret = ec_dev->cmd_xfer(ec_dev, status_msg);
+			ret = (*xfer_fxn)(ec_dev, status_msg);
 			if (ret < 0)
 				break;
 
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/platform/chrome/cros_ec_sysfs.c linux-libre-4.14.30-gnu/drivers/platform/chrome/cros_ec_sysfs.c
--- linux-libre-4.14.29-gnu/drivers/platform/chrome/cros_ec_sysfs.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/platform/chrome/cros_ec_sysfs.c	2018-03-24 06:01:30.000000000 -0400
@@ -187,7 +187,7 @@ static ssize_t show_ec_version(struct de
 		count += scnprintf(buf + count, PAGE_SIZE - count,
 				   "Build info:    EC error %d\n", msg->result);
 	else {
-		msg->data[sizeof(msg->data) - 1] = '\0';
+		msg->data[EC_HOST_PARAM_SIZE - 1] = '\0';
 		count += scnprintf(buf + count, PAGE_SIZE - count,
 				   "Build info:    %s\n", msg->data);
 	}
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/rtc/rtc-ac100.c linux-libre-4.14.30-gnu/drivers/rtc/rtc-ac100.c
--- linux-libre-4.14.29-gnu/drivers/rtc/rtc-ac100.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/rtc/rtc-ac100.c	2018-03-24 06:01:30.000000000 -0400
@@ -567,6 +567,12 @@ static int ac100_rtc_probe(struct platfo
 		return chip->irq;
 	}
 
+	chip->rtc = devm_rtc_allocate_device(&pdev->dev);
+	if (IS_ERR(chip->rtc))
+		return PTR_ERR(chip->rtc);
+
+	chip->rtc->ops = &ac100_rtc_ops;
+
 	ret = devm_request_threaded_irq(&pdev->dev, chip->irq, NULL,
 					ac100_rtc_irq,
 					IRQF_SHARED | IRQF_ONESHOT,
@@ -586,17 +592,16 @@ static int ac100_rtc_probe(struct platfo
 	/* clear counter alarm pending interrupts */
 	regmap_write(chip->regmap, AC100_ALM_INT_STA, AC100_ALM_INT_ENABLE);
 
-	chip->rtc = devm_rtc_device_register(&pdev->dev, "rtc-ac100",
-					     &ac100_rtc_ops, THIS_MODULE);
-	if (IS_ERR(chip->rtc)) {
-		dev_err(&pdev->dev, "unable to register device\n");
-		return PTR_ERR(chip->rtc);
-	}
-
 	ret = ac100_rtc_register_clks(chip);
 	if (ret)
 		return ret;
 
+	ret = rtc_register_device(chip->rtc);
+	if (ret) {
+		dev_err(&pdev->dev, "unable to register device\n");
+		return ret;
+	}
+
 	dev_info(&pdev->dev, "RTC enabled\n");
 
 	return 0;
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/scsi/lpfc/lpfc_ct.c linux-libre-4.14.30-gnu/drivers/scsi/lpfc/lpfc_ct.c
--- linux-libre-4.14.29-gnu/drivers/scsi/lpfc/lpfc_ct.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/scsi/lpfc/lpfc_ct.c	2018-03-24 06:01:30.000000000 -0400
@@ -471,6 +471,7 @@ lpfc_prep_node_fc4type(struct lpfc_vport
 				"Parse GID_FTrsp: did:x%x flg:x%x x%x",
 				Did, ndlp->nlp_flag, vport->fc_flag);
 
+			ndlp->nlp_fc4_type &= ~(NLP_FC4_FCP | NLP_FC4_NVME);
 			/* By default, the driver expects to support FCP FC4 */
 			if (fc4_type == FC_TYPE_FCP)
 				ndlp->nlp_fc4_type |= NLP_FC4_FCP;
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/scsi/lpfc/lpfc_els.c linux-libre-4.14.30-gnu/drivers/scsi/lpfc/lpfc_els.c
--- linux-libre-4.14.29-gnu/drivers/scsi/lpfc/lpfc_els.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/scsi/lpfc/lpfc_els.c	2018-03-24 06:01:30.000000000 -0400
@@ -2088,6 +2088,10 @@ lpfc_cmpl_els_prli(struct lpfc_hba *phba
 	ndlp = (struct lpfc_nodelist *) cmdiocb->context1;
 	spin_lock_irq(shost->host_lock);
 	ndlp->nlp_flag &= ~NLP_PRLI_SND;
+
+	/* Driver supports multiple FC4 types.  Counters matter. */
+	vport->fc_prli_sent--;
+	ndlp->fc4_prli_sent--;
 	spin_unlock_irq(shost->host_lock);
 
 	lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_CMD,
@@ -2095,9 +2099,6 @@ lpfc_cmpl_els_prli(struct lpfc_hba *phba
 		irsp->ulpStatus, irsp->un.ulpWord[4],
 		ndlp->nlp_DID);
 
-	/* Ddriver supports multiple FC4 types.  Counters matter. */
-	vport->fc_prli_sent--;
-
 	/* PRLI completes to NPort <nlp_DID> */
 	lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
 			 "0103 PRLI completes to NPort x%06x "
@@ -2111,7 +2112,6 @@ lpfc_cmpl_els_prli(struct lpfc_hba *phba
 
 	if (irsp->ulpStatus) {
 		/* Check for retry */
-		ndlp->fc4_prli_sent--;
 		if (lpfc_els_retry(phba, cmdiocb, rspiocb)) {
 			/* ELS command is being retried */
 			goto out;
@@ -2190,6 +2190,15 @@ lpfc_issue_els_prli(struct lpfc_vport *v
 		ndlp->nlp_fc4_type |= NLP_FC4_NVME;
 	local_nlp_type = ndlp->nlp_fc4_type;
 
+	/* This routine will issue 1 or 2 PRLIs, so zero all the ndlp
+	 * fields here before any of them can complete.
+	 */
+	ndlp->nlp_type &= ~(NLP_FCP_TARGET | NLP_FCP_INITIATOR);
+	ndlp->nlp_type &= ~(NLP_NVME_TARGET | NLP_NVME_INITIATOR);
+	ndlp->nlp_fcp_info &= ~NLP_FCP_2_DEVICE;
+	ndlp->nlp_flag &= ~NLP_FIRSTBURST;
+	ndlp->nvme_fb_size = 0;
+
  send_next_prli:
 	if (local_nlp_type & NLP_FC4_FCP) {
 		/* Payload is 4 + 16 = 20 x14 bytes. */
@@ -2298,6 +2307,13 @@ lpfc_issue_els_prli(struct lpfc_vport *v
 	elsiocb->iocb_cmpl = lpfc_cmpl_els_prli;
 	spin_lock_irq(shost->host_lock);
 	ndlp->nlp_flag |= NLP_PRLI_SND;
+
+	/* The vport counters are used for lpfc_scan_finished, but
+	 * the ndlp is used to track outstanding PRLIs for different
+	 * FC4 types.
+	 */
+	vport->fc_prli_sent++;
+	ndlp->fc4_prli_sent++;
 	spin_unlock_irq(shost->host_lock);
 	if (lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0) ==
 	    IOCB_ERROR) {
@@ -2308,12 +2324,6 @@ lpfc_issue_els_prli(struct lpfc_vport *v
 		return 1;
 	}
 
-	/* The vport counters are used for lpfc_scan_finished, but
-	 * the ndlp is used to track outstanding PRLIs for different
-	 * FC4 types.
-	 */
-	vport->fc_prli_sent++;
-	ndlp->fc4_prli_sent++;
 
 	/* The driver supports 2 FC4 types.  Make sure
 	 * a PRLI is issued for all types before exiting.
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/scsi/lpfc/lpfc_nportdisc.c linux-libre-4.14.30-gnu/drivers/scsi/lpfc/lpfc_nportdisc.c
--- linux-libre-4.14.29-gnu/drivers/scsi/lpfc/lpfc_nportdisc.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/scsi/lpfc/lpfc_nportdisc.c	2018-03-24 06:01:30.000000000 -0400
@@ -390,6 +390,11 @@ lpfc_rcv_plogi(struct lpfc_vport *vport,
 		break;
 	}
 
+	ndlp->nlp_type &= ~(NLP_FCP_TARGET | NLP_FCP_INITIATOR);
+	ndlp->nlp_type &= ~(NLP_NVME_TARGET | NLP_NVME_INITIATOR);
+	ndlp->nlp_fcp_info &= ~NLP_FCP_2_DEVICE;
+	ndlp->nlp_flag &= ~NLP_FIRSTBURST;
+
 	/* Check for Nport to NPort pt2pt protocol */
 	if ((vport->fc_flag & FC_PT2PT) &&
 	    !(vport->fc_flag & FC_PT2PT_PLOGI)) {
@@ -742,9 +747,6 @@ lpfc_rcv_prli(struct lpfc_vport *vport,
 	lp = (uint32_t *) pcmd->virt;
 	npr = (PRLI *) ((uint8_t *) lp + sizeof (uint32_t));
 
-	ndlp->nlp_type &= ~(NLP_FCP_TARGET | NLP_FCP_INITIATOR);
-	ndlp->nlp_fcp_info &= ~NLP_FCP_2_DEVICE;
-	ndlp->nlp_flag &= ~NLP_FIRSTBURST;
 	if ((npr->prliType == PRLI_FCP_TYPE) ||
 	    (npr->prliType == PRLI_NVME_TYPE)) {
 		if (npr->initiatorFunc) {
@@ -769,8 +771,12 @@ lpfc_rcv_prli(struct lpfc_vport *vport,
 		 * type.  Target mode does not issue gft_id so doesn't get
 		 * the fc4 type set until now.
 		 */
-		if ((phba->nvmet_support) && (npr->prliType == PRLI_NVME_TYPE))
+		if (phba->nvmet_support && (npr->prliType == PRLI_NVME_TYPE)) {
 			ndlp->nlp_fc4_type |= NLP_FC4_NVME;
+			lpfc_nlp_set_state(vport, ndlp, NLP_STE_UNMAPPED_NODE);
+		}
+		if (npr->prliType == PRLI_FCP_TYPE)
+			ndlp->nlp_fc4_type |= NLP_FC4_FCP;
 	}
 	if (rport) {
 		/* We need to update the rport role values */
@@ -1552,7 +1558,6 @@ lpfc_rcv_prli_reglogin_issue(struct lpfc
 		if (ndlp->nlp_flag & NLP_RPI_REGISTERED) {
 			lpfc_rcv_prli(vport, ndlp, cmdiocb);
 			lpfc_els_rsp_prli_acc(vport, cmdiocb, ndlp);
-			lpfc_nlp_set_state(vport, ndlp, NLP_STE_UNMAPPED_NODE);
 		} else {
 			/* RPI registration has not completed. Reject the PRLI
 			 * to prevent an illegal state transition when the
@@ -1564,10 +1569,11 @@ lpfc_rcv_prli_reglogin_issue(struct lpfc
 					 ndlp->nlp_rpi, ndlp->nlp_state,
 					 ndlp->nlp_flag);
 			memset(&stat, 0, sizeof(struct ls_rjt));
-			stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC;
-			stat.un.b.lsRjtRsnCodeExp = LSEXP_CMD_IN_PROGRESS;
+			stat.un.b.lsRjtRsnCode = LSRJT_LOGICAL_BSY;
+			stat.un.b.lsRjtRsnCodeExp = LSEXP_NOTHING_MORE;
 			lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb,
 					    ndlp, NULL);
+			return ndlp->nlp_state;
 		}
 	} else {
 		/* Initiator mode. */
@@ -1922,13 +1928,6 @@ lpfc_cmpl_prli_prli_issue(struct lpfc_vp
 		return ndlp->nlp_state;
 	}
 
-	/* Check out PRLI rsp */
-	ndlp->nlp_type &= ~(NLP_FCP_TARGET | NLP_FCP_INITIATOR);
-	ndlp->nlp_fcp_info &= ~NLP_FCP_2_DEVICE;
-
-	/* NVME or FCP first burst must be negotiated for each PRLI. */
-	ndlp->nlp_flag &= ~NLP_FIRSTBURST;
-	ndlp->nvme_fb_size = 0;
 	if (npr && (npr->acceptRspCode == PRLI_REQ_EXECUTED) &&
 	    (npr->prliType == PRLI_FCP_TYPE)) {
 		lpfc_printf_vlog(vport, KERN_INFO, LOG_NVME_DISC,
@@ -1945,8 +1944,6 @@ lpfc_cmpl_prli_prli_issue(struct lpfc_vp
 		if (npr->Retry)
 			ndlp->nlp_fcp_info |= NLP_FCP_2_DEVICE;
 
-		/* PRLI completed.  Decrement count. */
-		ndlp->fc4_prli_sent--;
 	} else if (nvpr &&
 		   (bf_get_be32(prli_acc_rsp_code, nvpr) ==
 		    PRLI_REQ_EXECUTED) &&
@@ -1991,8 +1988,6 @@ lpfc_cmpl_prli_prli_issue(struct lpfc_vp
 				 be32_to_cpu(nvpr->word5),
 				 ndlp->nlp_flag, ndlp->nlp_fcp_info,
 				 ndlp->nlp_type);
-		/* PRLI completed.  Decrement count. */
-		ndlp->fc4_prli_sent--;
 	}
 	if (!(ndlp->nlp_type & NLP_FCP_TARGET) &&
 	    (vport->port_type == LPFC_NPIV_PORT) &&
@@ -2016,7 +2011,8 @@ out_err:
 		ndlp->nlp_prev_state = NLP_STE_PRLI_ISSUE;
 		if (ndlp->nlp_type & (NLP_FCP_TARGET | NLP_NVME_TARGET))
 			lpfc_nlp_set_state(vport, ndlp, NLP_STE_MAPPED_NODE);
-		else
+		else if (ndlp->nlp_type &
+			 (NLP_FCP_INITIATOR | NLP_NVME_INITIATOR))
 			lpfc_nlp_set_state(vport, ndlp, NLP_STE_UNMAPPED_NODE);
 	} else
 		lpfc_printf_vlog(vport,
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/scsi/megaraid/megaraid_sas_fusion.c linux-libre-4.14.30-gnu/drivers/scsi/megaraid/megaraid_sas_fusion.c
--- linux-libre-4.14.29-gnu/drivers/scsi/megaraid/megaraid_sas_fusion.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/scsi/megaraid/megaraid_sas_fusion.c	2018-03-24 06:01:30.000000000 -0400
@@ -190,36 +190,30 @@ inline void megasas_return_cmd_fusion(st
 /**
  * megasas_fire_cmd_fusion -	Sends command to the FW
  * @instance:			Adapter soft state
- * @req_desc:			32bit or 64bit Request descriptor
+ * @req_desc:			64bit Request descriptor
  *
- * Perform PCI Write. Ventura supports 32 bit Descriptor.
- * Prior to Ventura (12G) MR controller supports 64 bit Descriptor.
+ * Perform PCI Write.
  */
 
 static void
 megasas_fire_cmd_fusion(struct megasas_instance *instance,
 		union MEGASAS_REQUEST_DESCRIPTOR_UNION *req_desc)
 {
-	if (instance->is_ventura)
-		writel(le32_to_cpu(req_desc->u.low),
-			&instance->reg_set->inbound_single_queue_port);
-	else {
 #if defined(writeq) && defined(CONFIG_64BIT)
-		u64 req_data = (((u64)le32_to_cpu(req_desc->u.high) << 32) |
-				le32_to_cpu(req_desc->u.low));
+	u64 req_data = (((u64)le32_to_cpu(req_desc->u.high) << 32) |
+		le32_to_cpu(req_desc->u.low));
 
-		writeq(req_data, &instance->reg_set->inbound_low_queue_port);
+	writeq(req_data, &instance->reg_set->inbound_low_queue_port);
 #else
-		unsigned long flags;
-		spin_lock_irqsave(&instance->hba_lock, flags);
-		writel(le32_to_cpu(req_desc->u.low),
-			&instance->reg_set->inbound_low_queue_port);
-		writel(le32_to_cpu(req_desc->u.high),
-			&instance->reg_set->inbound_high_queue_port);
-		mmiowb();
-		spin_unlock_irqrestore(&instance->hba_lock, flags);
+	unsigned long flags;
+	spin_lock_irqsave(&instance->hba_lock, flags);
+	writel(le32_to_cpu(req_desc->u.low),
+		&instance->reg_set->inbound_low_queue_port);
+	writel(le32_to_cpu(req_desc->u.high),
+		&instance->reg_set->inbound_high_queue_port);
+	mmiowb();
+	spin_unlock_irqrestore(&instance->hba_lock, flags);
 #endif
-	}
 }
 
 /**
@@ -772,7 +766,6 @@ megasas_ioc_init_fusion(struct megasas_i
 	const char *sys_info;
 	MFI_CAPABILITIES *drv_ops;
 	u32 scratch_pad_2;
-	unsigned long flags;
 
 	fusion = instance->ctrl_context;
 
@@ -900,14 +893,7 @@ megasas_ioc_init_fusion(struct megasas_i
 			break;
 	}
 
-	/* For Ventura also IOC INIT required 64 bit Descriptor write. */
-	spin_lock_irqsave(&instance->hba_lock, flags);
-	writel(le32_to_cpu(req_desc.u.low),
-	       &instance->reg_set->inbound_low_queue_port);
-	writel(le32_to_cpu(req_desc.u.high),
-	       &instance->reg_set->inbound_high_queue_port);
-	mmiowb();
-	spin_unlock_irqrestore(&instance->hba_lock, flags);
+	megasas_fire_cmd_fusion(instance, &req_desc);
 
 	wait_and_poll(instance, cmd, MFI_POLL_TIMEOUT_SECS);
 
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/scsi/mpt3sas/mpt3sas_base.c linux-libre-4.14.30-gnu/drivers/scsi/mpt3sas/mpt3sas_base.c
--- linux-libre-4.14.29-gnu/drivers/scsi/mpt3sas/mpt3sas_base.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/scsi/mpt3sas/mpt3sas_base.c	2018-03-24 06:01:30.000000000 -0400
@@ -5659,14 +5659,14 @@ _base_reset_handler(struct MPT3SAS_ADAPT
 }
 
 /**
- * _wait_for_commands_to_complete - reset controller
+ * mpt3sas_wait_for_commands_to_complete - reset controller
  * @ioc: Pointer to MPT_ADAPTER structure
  *
  * This function waiting(3s) for all pending commands to complete
  * prior to putting controller in reset.
  */
-static void
-_wait_for_commands_to_complete(struct MPT3SAS_ADAPTER *ioc)
+void
+mpt3sas_wait_for_commands_to_complete(struct MPT3SAS_ADAPTER *ioc)
 {
 	u32 ioc_state;
 	unsigned long flags;
@@ -5745,7 +5745,7 @@ mpt3sas_base_hard_reset_handler(struct M
 			is_fault = 1;
 	}
 	_base_reset_handler(ioc, MPT3_IOC_PRE_RESET);
-	_wait_for_commands_to_complete(ioc);
+	mpt3sas_wait_for_commands_to_complete(ioc);
 	_base_mask_interrupts(ioc);
 	r = _base_make_ioc_ready(ioc, type);
 	if (r)
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/scsi/mpt3sas/mpt3sas_base.h linux-libre-4.14.30-gnu/drivers/scsi/mpt3sas/mpt3sas_base.h
--- linux-libre-4.14.29-gnu/drivers/scsi/mpt3sas/mpt3sas_base.h	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/scsi/mpt3sas/mpt3sas_base.h	2018-03-24 06:01:30.000000000 -0400
@@ -1292,6 +1292,9 @@ void mpt3sas_base_update_missing_delay(s
 
 int mpt3sas_port_enable(struct MPT3SAS_ADAPTER *ioc);
 
+void
+mpt3sas_wait_for_commands_to_complete(struct MPT3SAS_ADAPTER *ioc);
+
 
 /* scsih shared API */
 u8 mpt3sas_scsih_event_callback(struct MPT3SAS_ADAPTER *ioc, u8 msix_index,
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/scsi/mpt3sas/mpt3sas_scsih.c linux-libre-4.14.30-gnu/drivers/scsi/mpt3sas/mpt3sas_scsih.c
--- linux-libre-4.14.29-gnu/drivers/scsi/mpt3sas/mpt3sas_scsih.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/scsi/mpt3sas/mpt3sas_scsih.c	2018-03-24 06:01:30.000000000 -0400
@@ -2471,7 +2471,8 @@ scsih_abort(struct scsi_cmnd *scmd)
 	_scsih_tm_display_info(ioc, scmd);
 
 	sas_device_priv_data = scmd->device->hostdata;
-	if (!sas_device_priv_data || !sas_device_priv_data->sas_target) {
+	if (!sas_device_priv_data || !sas_device_priv_data->sas_target ||
+	    ioc->remove_host) {
 		sdev_printk(KERN_INFO, scmd->device,
 			"device been deleted! scmd(%p)\n", scmd);
 		scmd->result = DID_NO_CONNECT << 16;
@@ -2533,7 +2534,8 @@ scsih_dev_reset(struct scsi_cmnd *scmd)
 	_scsih_tm_display_info(ioc, scmd);
 
 	sas_device_priv_data = scmd->device->hostdata;
-	if (!sas_device_priv_data || !sas_device_priv_data->sas_target) {
+	if (!sas_device_priv_data || !sas_device_priv_data->sas_target ||
+	    ioc->remove_host) {
 		sdev_printk(KERN_INFO, scmd->device,
 			"device been deleted! scmd(%p)\n", scmd);
 		scmd->result = DID_NO_CONNECT << 16;
@@ -2595,7 +2597,8 @@ scsih_target_reset(struct scsi_cmnd *scm
 	_scsih_tm_display_info(ioc, scmd);
 
 	sas_device_priv_data = scmd->device->hostdata;
-	if (!sas_device_priv_data || !sas_device_priv_data->sas_target) {
+	if (!sas_device_priv_data || !sas_device_priv_data->sas_target ||
+	    ioc->remove_host) {
 		starget_printk(KERN_INFO, starget, "target been deleted! scmd(%p)\n",
 			scmd);
 		scmd->result = DID_NO_CONNECT << 16;
@@ -2652,7 +2655,7 @@ scsih_host_reset(struct scsi_cmnd *scmd)
 	    ioc->name, scmd);
 	scsi_print_command(scmd);
 
-	if (ioc->is_driver_loading) {
+	if (ioc->is_driver_loading || ioc->remove_host) {
 		pr_info(MPT3SAS_FMT "Blocking the host reset\n",
 		    ioc->name);
 		r = FAILED;
@@ -3957,7 +3960,7 @@ _scsih_flush_running_cmds(struct MPT3SAS
 		_scsih_set_satl_pending(scmd, false);
 		mpt3sas_base_free_smid(ioc, smid);
 		scsi_dma_unmap(scmd);
-		if (ioc->pci_error_recovery)
+		if (ioc->pci_error_recovery || ioc->remove_host)
 			scmd->result = DID_NO_CONNECT << 16;
 		else
 			scmd->result = DID_RESET << 16;
@@ -8240,6 +8243,10 @@ static void scsih_remove(struct pci_dev
 	unsigned long flags;
 
 	ioc->remove_host = 1;
+
+	mpt3sas_wait_for_commands_to_complete(ioc);
+	_scsih_flush_running_cmds(ioc);
+
 	_scsih_fw_event_cleanup_queue(ioc);
 
 	spin_lock_irqsave(&ioc->fw_event_lock, flags);
@@ -8310,6 +8317,10 @@ scsih_shutdown(struct pci_dev *pdev)
 	unsigned long flags;
 
 	ioc->remove_host = 1;
+
+	mpt3sas_wait_for_commands_to_complete(ioc);
+	_scsih_flush_running_cmds(ioc);
+
 	_scsih_fw_event_cleanup_queue(ioc);
 
 	spin_lock_irqsave(&ioc->fw_event_lock, flags);
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/soc/qcom/smsm.c linux-libre-4.14.30-gnu/drivers/soc/qcom/smsm.c
--- linux-libre-4.14.29-gnu/drivers/soc/qcom/smsm.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/soc/qcom/smsm.c	2018-03-24 06:01:30.000000000 -0400
@@ -496,8 +496,10 @@ static int qcom_smsm_probe(struct platfo
 	if (!smsm->hosts)
 		return -ENOMEM;
 
-	local_node = of_find_node_with_property(of_node_get(pdev->dev.of_node),
-						"#qcom,smem-state-cells");
+	for_each_child_of_node(pdev->dev.of_node, local_node) {
+		if (of_find_property(local_node, "#qcom,smem-state-cells", NULL))
+			break;
+	}
 	if (!local_node) {
 		dev_err(&pdev->dev, "no state entry\n");
 		return -EINVAL;
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/spi/spi-sh-msiof.c linux-libre-4.14.30-gnu/drivers/spi/spi-sh-msiof.c
--- linux-libre-4.14.29-gnu/drivers/spi/spi-sh-msiof.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/spi/spi-sh-msiof.c	2018-03-24 06:01:30.000000000 -0400
@@ -55,6 +55,8 @@ struct sh_msiof_spi_priv {
 	void *rx_dma_page;
 	dma_addr_t tx_dma_addr;
 	dma_addr_t rx_dma_addr;
+	bool native_cs_inited;
+	bool native_cs_high;
 	bool slave_aborted;
 };
 
@@ -528,8 +530,7 @@ static int sh_msiof_spi_setup(struct spi
 {
 	struct device_node	*np = spi->master->dev.of_node;
 	struct sh_msiof_spi_priv *p = spi_master_get_devdata(spi->master);
-
-	pm_runtime_get_sync(&p->pdev->dev);
+	u32 clr, set, tmp;
 
 	if (!np) {
 		/*
@@ -539,19 +540,31 @@ static int sh_msiof_spi_setup(struct spi
 		spi->cs_gpio = (uintptr_t)spi->controller_data;
 	}
 
-	/* Configure pins before deasserting CS */
-	sh_msiof_spi_set_pin_regs(p, !!(spi->mode & SPI_CPOL),
-				  !!(spi->mode & SPI_CPHA),
-				  !!(spi->mode & SPI_3WIRE),
-				  !!(spi->mode & SPI_LSB_FIRST),
-				  !!(spi->mode & SPI_CS_HIGH));
-
-	if (spi->cs_gpio >= 0)
+	if (spi->cs_gpio >= 0) {
 		gpio_set_value(spi->cs_gpio, !(spi->mode & SPI_CS_HIGH));
+		return 0;
+	}
 
+	if (spi_controller_is_slave(p->master))
+		return 0;
 
-	pm_runtime_put(&p->pdev->dev);
+	if (p->native_cs_inited &&
+	    (p->native_cs_high == !!(spi->mode & SPI_CS_HIGH)))
+		return 0;
 
+	/* Configure native chip select mode/polarity early */
+	clr = MDR1_SYNCMD_MASK;
+	set = MDR1_TRMD | TMDR1_PCON | MDR1_SYNCMD_SPI;
+	if (spi->mode & SPI_CS_HIGH)
+		clr |= BIT(MDR1_SYNCAC_SHIFT);
+	else
+		set |= BIT(MDR1_SYNCAC_SHIFT);
+	pm_runtime_get_sync(&p->pdev->dev);
+	tmp = sh_msiof_read(p, TMDR1) & ~clr;
+	sh_msiof_write(p, TMDR1, tmp | set);
+	pm_runtime_put(&p->pdev->dev);
+	p->native_cs_high = spi->mode & SPI_CS_HIGH;
+	p->native_cs_inited = true;
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/staging/android/ashmem.c linux-libre-4.14.30-gnu/drivers/staging/android/ashmem.c
--- linux-libre-4.14.29-gnu/drivers/staging/android/ashmem.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/staging/android/ashmem.c	2018-03-24 06:01:30.000000000 -0400
@@ -709,16 +709,14 @@ static int ashmem_pin_unpin(struct ashme
 	size_t pgstart, pgend;
 	int ret = -EINVAL;
 
+	if (unlikely(copy_from_user(&pin, p, sizeof(pin))))
+		return -EFAULT;
+
 	mutex_lock(&ashmem_mutex);
 
 	if (unlikely(!asma->file))
 		goto out_unlock;
 
-	if (unlikely(copy_from_user(&pin, p, sizeof(pin)))) {
-		ret = -EFAULT;
-		goto out_unlock;
-	}
-
 	/* per custom, you can pass zero for len to mean "everything onward" */
 	if (!pin.len)
 		pin.len = PAGE_ALIGN(asma->size) - pin.offset;
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/tty/goldfish.c linux-libre-4.14.30-gnu/drivers/tty/goldfish.c
--- linux-libre-4.14.29-gnu/drivers/tty/goldfish.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/tty/goldfish.c	2018-03-24 06:01:30.000000000 -0400
@@ -442,6 +442,7 @@ static int goldfish_tty_remove(struct pl
 	return 0;
 }
 
+#ifdef CONFIG_GOLDFISH_TTY_EARLY_CONSOLE
 static void gf_early_console_putchar(struct uart_port *port, int ch)
 {
 	__raw_writel(ch, port->membase);
@@ -465,6 +466,7 @@ static int __init gf_earlycon_setup(stru
 }
 
 OF_EARLYCON_DECLARE(early_gf_tty, "google,goldfish-tty", gf_earlycon_setup);
+#endif
 
 static const struct of_device_id goldfish_tty_of_match[] = {
 	{ .compatible = "google,goldfish-tty", },
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/tty/Kconfig linux-libre-4.14.30-gnu/drivers/tty/Kconfig
--- linux-libre-4.14.29-gnu/drivers/tty/Kconfig	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/tty/Kconfig	2018-03-24 06:01:30.000000000 -0400
@@ -394,10 +394,14 @@ config GOLDFISH_TTY
 	depends on GOLDFISH
 	select SERIAL_CORE
 	select SERIAL_CORE_CONSOLE
-	select SERIAL_EARLYCON
 	help
 	  Console and system TTY driver for the Goldfish virtual platform.
 
+config GOLDFISH_TTY_EARLY_CONSOLE
+	bool
+	default y if GOLDFISH_TTY=y
+	select SERIAL_EARLYCON
+
 config DA_TTY
 	bool "DA TTY"
 	depends on METAG_DA
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/tty/serial/8250/8250_dw.c linux-libre-4.14.30-gnu/drivers/tty/serial/8250/8250_dw.c
--- linux-libre-4.14.29-gnu/drivers/tty/serial/8250/8250_dw.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/tty/serial/8250/8250_dw.c	2018-03-24 06:01:30.000000000 -0400
@@ -513,7 +513,8 @@ static int dw8250_probe(struct platform_
 	/* If no clock rate is defined, fail. */
 	if (!p->uartclk) {
 		dev_err(dev, "clock rate not defined\n");
-		return -EINVAL;
+		err = -EINVAL;
+		goto err_clk;
 	}
 
 	data->pclk = devm_clk_get(dev, "apb_pclk");
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/tty/serial/8250/8250_pci.c linux-libre-4.14.30-gnu/drivers/tty/serial/8250/8250_pci.c
--- linux-libre-4.14.29-gnu/drivers/tty/serial/8250/8250_pci.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/tty/serial/8250/8250_pci.c	2018-03-24 06:01:30.000000000 -0400
@@ -3389,11 +3389,9 @@ static int serial_pci_is_class_communica
 	/*
 	 * If it is not a communications device or the programming
 	 * interface is greater than 6, give up.
-	 *
-	 * (Should we try to make guesses for multiport serial devices
-	 * later?)
 	 */
 	if ((((dev->class >> 8) != PCI_CLASS_COMMUNICATION_SERIAL) &&
+	     ((dev->class >> 8) != PCI_CLASS_COMMUNICATION_MULTISERIAL) &&
 	     ((dev->class >> 8) != PCI_CLASS_COMMUNICATION_MODEM)) ||
 	    (dev->class & 0xff) > 6)
 		return -ENODEV;
@@ -3430,6 +3428,12 @@ serial_pci_guess_board(struct pci_dev *d
 {
 	int num_iomem, num_port, first_port = -1, i;
 
+	/*
+	 * Should we try to make guesses for multiport serial devices later?
+	 */
+	if ((dev->class >> 8) == PCI_CLASS_COMMUNICATION_MULTISERIAL)
+		return -ENODEV;
+
 	num_iomem = num_port = 0;
 	for (i = 0; i < PCI_NUM_BAR_RESOURCES; i++) {
 		if (pci_resource_flags(dev, i) & IORESOURCE_IO) {
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/tty/tty_io.c linux-libre-4.14.30-gnu/drivers/tty/tty_io.c
--- linux-libre-4.14.29-gnu/drivers/tty/tty_io.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/tty/tty_io.c	2018-03-24 06:01:30.000000000 -0400
@@ -1481,6 +1481,8 @@ static void release_tty(struct tty_struc
 	if (tty->link)
 		tty->link->port->itty = NULL;
 	tty_buffer_cancel_work(tty->port);
+	if (tty->link)
+		tty_buffer_cancel_work(tty->link->port);
 
 	tty_kref_put(tty->link);
 	tty_kref_put(tty);
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/video/console/vgacon.c linux-libre-4.14.30-gnu/drivers/video/console/vgacon.c
--- linux-libre-4.14.29-gnu/drivers/video/console/vgacon.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/video/console/vgacon.c	2018-03-24 06:01:30.000000000 -0400
@@ -422,7 +422,10 @@ static const char *vgacon_startup(void)
 		vga_video_port_val = VGA_CRT_DM;
 		if ((screen_info.orig_video_ega_bx & 0xff) != 0x10) {
 			static struct resource ega_console_resource =
-			    { .name = "ega", .start = 0x3B0, .end = 0x3BF };
+			    { .name	= "ega",
+			      .flags	= IORESOURCE_IO,
+			      .start	= 0x3B0,
+			      .end	= 0x3BF };
 			vga_video_type = VIDEO_TYPE_EGAM;
 			vga_vram_size = 0x8000;
 			display_desc = "EGA+";
@@ -430,9 +433,15 @@ static const char *vgacon_startup(void)
 					 &ega_console_resource);
 		} else {
 			static struct resource mda1_console_resource =
-			    { .name = "mda", .start = 0x3B0, .end = 0x3BB };
+			    { .name	= "mda",
+			      .flags	= IORESOURCE_IO,
+			      .start	= 0x3B0,
+			      .end	= 0x3BB };
 			static struct resource mda2_console_resource =
-			    { .name = "mda", .start = 0x3BF, .end = 0x3BF };
+			    { .name	= "mda",
+			      .flags	= IORESOURCE_IO,
+			      .start	= 0x3BF,
+			      .end	= 0x3BF };
 			vga_video_type = VIDEO_TYPE_MDA;
 			vga_vram_size = 0x2000;
 			display_desc = "*MDA";
@@ -454,15 +463,21 @@ static const char *vgacon_startup(void)
 			vga_vram_size = 0x8000;
 
 			if (!screen_info.orig_video_isVGA) {
-				static struct resource ega_console_resource
-				    = { .name = "ega", .start = 0x3C0, .end = 0x3DF };
+				static struct resource ega_console_resource =
+				    { .name	= "ega",
+				      .flags	= IORESOURCE_IO,
+				      .start	= 0x3C0,
+				      .end	= 0x3DF };
 				vga_video_type = VIDEO_TYPE_EGAC;
 				display_desc = "EGA";
 				request_resource(&ioport_resource,
 						 &ega_console_resource);
 			} else {
-				static struct resource vga_console_resource
-				    = { .name = "vga+", .start = 0x3C0, .end = 0x3DF };
+				static struct resource vga_console_resource =
+				    { .name	= "vga+",
+				      .flags	= IORESOURCE_IO,
+				      .start	= 0x3C0,
+				      .end	= 0x3DF };
 				vga_video_type = VIDEO_TYPE_VGAC;
 				display_desc = "VGA+";
 				request_resource(&ioport_resource,
@@ -494,7 +509,10 @@ static const char *vgacon_startup(void)
 			}
 		} else {
 			static struct resource cga_console_resource =
-			    { .name = "cga", .start = 0x3D4, .end = 0x3D5 };
+			    { .name	= "cga",
+			      .flags	= IORESOURCE_IO,
+			      .start	= 0x3D4,
+			      .end	= 0x3D5 };
 			vga_video_type = VIDEO_TYPE_CGA;
 			vga_vram_size = 0x2000;
 			display_desc = "*CGA";
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c linux-libre-4.14.30-gnu/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c
--- linux-libre-4.14.29-gnu/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td028ttec1.c	2018-03-24 06:01:30.000000000 -0400
@@ -455,6 +455,8 @@ static int td028ttec1_panel_remove(struc
 }
 
 static const struct of_device_id td028ttec1_of_match[] = {
+	{ .compatible = "omapdss,tpo,td028ttec1", },
+	/* keep to not break older DTB */
 	{ .compatible = "omapdss,toppoly,td028ttec1", },
 	{},
 };
@@ -474,6 +476,7 @@ static struct spi_driver td028ttec1_spi_
 
 module_spi_driver(td028ttec1_spi_driver);
 
+MODULE_ALIAS("spi:tpo,td028ttec1");
 MODULE_ALIAS("spi:toppoly,td028ttec1");
 MODULE_AUTHOR("H. Nikolaus Schaller <hns@goldelico.com>");
 MODULE_DESCRIPTION("Toppoly TD028TTEC1 panel driver");
diff -druNp --no-dereference linux-libre-4.14.29-gnu/drivers/watchdog/watchdog_dev.c linux-libre-4.14.30-gnu/drivers/watchdog/watchdog_dev.c
--- linux-libre-4.14.29-gnu/drivers/watchdog/watchdog_dev.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/drivers/watchdog/watchdog_dev.c	2018-03-24 06:01:30.000000000 -0400
@@ -768,6 +768,7 @@ static int watchdog_open(struct inode *i
 {
 	struct watchdog_core_data *wd_data;
 	struct watchdog_device *wdd;
+	bool hw_running;
 	int err;
 
 	/* Get the corresponding watchdog device */
@@ -787,7 +788,8 @@ static int watchdog_open(struct inode *i
 	 * If the /dev/watchdog device is open, we don't want the module
 	 * to be unloaded.
 	 */
-	if (!watchdog_hw_running(wdd) && !try_module_get(wdd->ops->owner)) {
+	hw_running = watchdog_hw_running(wdd);
+	if (!hw_running && !try_module_get(wdd->ops->owner)) {
 		err = -EBUSY;
 		goto out_clear;
 	}
@@ -798,7 +800,7 @@ static int watchdog_open(struct inode *i
 
 	file->private_data = wd_data;
 
-	if (!watchdog_hw_running(wdd))
+	if (!hw_running)
 		kref_get(&wd_data->kref);
 
 	/* dev/watchdog is a virtual (and thus non-seekable) filesystem */
@@ -964,14 +966,13 @@ static int watchdog_cdev_register(struct
 	 * and schedule an immediate ping.
 	 */
 	if (watchdog_hw_running(wdd)) {
-		if (handle_boot_enabled) {
-			__module_get(wdd->ops->owner);
-			kref_get(&wd_data->kref);
+		__module_get(wdd->ops->owner);
+		kref_get(&wd_data->kref);
+		if (handle_boot_enabled)
 			queue_delayed_work(watchdog_wq, &wd_data->work, 0);
-		} else {
+		else
 			pr_info("watchdog%d running and kernel based pre-userspace handler disabled\n",
-					wdd->id);
-		}
+				wdd->id);
 	}
 
 	return 0;
diff -druNp --no-dereference linux-libre-4.14.29-gnu/fs/nfsd/nfs4proc.c linux-libre-4.14.30-gnu/fs/nfsd/nfs4proc.c
--- linux-libre-4.14.29-gnu/fs/nfsd/nfs4proc.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/fs/nfsd/nfs4proc.c	2018-03-24 06:01:30.000000000 -0400
@@ -1372,14 +1372,14 @@ nfsd4_layoutget(struct svc_rqst *rqstp,
 	const struct nfsd4_layout_ops *ops;
 	struct nfs4_layout_stateid *ls;
 	__be32 nfserr;
-	int accmode;
+	int accmode = NFSD_MAY_READ_IF_EXEC;
 
 	switch (lgp->lg_seg.iomode) {
 	case IOMODE_READ:
-		accmode = NFSD_MAY_READ;
+		accmode |= NFSD_MAY_READ;
 		break;
 	case IOMODE_RW:
-		accmode = NFSD_MAY_READ | NFSD_MAY_WRITE;
+		accmode |= NFSD_MAY_READ | NFSD_MAY_WRITE;
 		break;
 	default:
 		dprintk("%s: invalid iomode %d\n",
diff -druNp --no-dereference linux-libre-4.14.29-gnu/include/linux/mlx5/driver.h linux-libre-4.14.30-gnu/include/linux/mlx5/driver.h
--- linux-libre-4.14.29-gnu/include/linux/mlx5/driver.h	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/include/linux/mlx5/driver.h	2018-03-24 06:01:30.000000000 -0400
@@ -432,8 +432,8 @@ struct mlx5_core_srq {
 	struct mlx5_core_rsc_common	common; /* must be first */
 	u32		srqn;
 	int		max;
-	int		max_gs;
-	int		max_avail_gather;
+	size_t		max_gs;
+	size_t		max_avail_gather;
 	int		wqe_shift;
 	void (*event)	(struct mlx5_core_srq *, enum mlx5_event);
 
diff -druNp --no-dereference linux-libre-4.14.29-gnu/Makefile linux-libre-4.14.30-gnu/Makefile
--- linux-libre-4.14.29-gnu/Makefile	2018-03-21 12:57:38.000000000 -0400
+++ linux-libre-4.14.30-gnu/Makefile	2018-03-25 17:38:45.000000000 -0400
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 4
 PATCHLEVEL = 14
-SUBLEVEL = 29
+SUBLEVEL = 30
 EXTRAVERSION = -gnu
 NAME = Petit Gorille
 
diff -druNp --no-dereference linux-libre-4.14.29-gnu/net/ipv4/ip_gre.c linux-libre-4.14.30-gnu/net/ipv4/ip_gre.c
--- linux-libre-4.14.29-gnu/net/ipv4/ip_gre.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/net/ipv4/ip_gre.c	2018-03-24 06:01:30.000000000 -0400
@@ -303,8 +303,10 @@ static int erspan_rcv(struct sk_buff *sk
 				return PACKET_REJECT;
 
 			md = ip_tunnel_info_opts(&tun_dst->u.tun_info);
-			if (!md)
+			if (!md) {
+				dst_release((struct dst_entry *)tun_dst);
 				return PACKET_REJECT;
+			}
 
 			md->index = index;
 			info = &tun_dst->u.tun_info;
@@ -408,11 +410,13 @@ static int gre_rcv(struct sk_buff *skb)
 	if (unlikely(tpi.proto == htons(ETH_P_ERSPAN))) {
 		if (erspan_rcv(skb, &tpi, hdr_len) == PACKET_RCVD)
 			return 0;
+		goto out;
 	}
 
 	if (ipgre_rcv(skb, &tpi, hdr_len) == PACKET_RCVD)
 		return 0;
 
+out:
 	icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
 drop:
 	kfree_skb(skb);
diff -druNp --no-dereference linux-libre-4.14.29-gnu/net/ipv6/ip6_vti.c linux-libre-4.14.30-gnu/net/ipv6/ip6_vti.c
--- linux-libre-4.14.29-gnu/net/ipv6/ip6_vti.c	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/net/ipv6/ip6_vti.c	2018-03-24 06:01:30.000000000 -0400
@@ -626,6 +626,7 @@ static void vti6_link_config(struct ip6_
 {
 	struct net_device *dev = t->dev;
 	struct __ip6_tnl_parm *p = &t->parms;
+	struct net_device *tdev = NULL;
 
 	memcpy(dev->dev_addr, &p->laddr, sizeof(struct in6_addr));
 	memcpy(dev->broadcast, &p->raddr, sizeof(struct in6_addr));
@@ -638,6 +639,25 @@ static void vti6_link_config(struct ip6_
 		dev->flags |= IFF_POINTOPOINT;
 	else
 		dev->flags &= ~IFF_POINTOPOINT;
+
+	if (p->flags & IP6_TNL_F_CAP_XMIT) {
+		int strict = (ipv6_addr_type(&p->raddr) &
+			      (IPV6_ADDR_MULTICAST | IPV6_ADDR_LINKLOCAL));
+		struct rt6_info *rt = rt6_lookup(t->net,
+						 &p->raddr, &p->laddr,
+						 p->link, strict);
+
+		if (rt)
+			tdev = rt->dst.dev;
+		ip6_rt_put(rt);
+	}
+
+	if (!tdev && p->link)
+		tdev = __dev_get_by_index(t->net, p->link);
+
+	if (tdev)
+		dev->mtu = max_t(int, tdev->mtu - dev->hard_header_len,
+				 IPV6_MIN_MTU);
 }
 
 /**
diff -druNp --no-dereference linux-libre-4.14.29-gnu/scripts/Kbuild.include linux-libre-4.14.30-gnu/scripts/Kbuild.include
--- linux-libre-4.14.29-gnu/scripts/Kbuild.include	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/scripts/Kbuild.include	2018-03-24 06:01:30.000000000 -0400
@@ -160,12 +160,13 @@ cc-if-fullversion = $(shell [ $(cc-fullv
 # cc-ldoption
 # Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both)
 cc-ldoption = $(call try-run,\
-	$(CC) $(1) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2))
+	$(CC) $(1) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2))
 
 # ld-option
 # Usage: LDFLAGS += $(call ld-option, -X)
 ld-option = $(call try-run,\
-	$(CC) -x c /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2))
+	$(CC) $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -x c /dev/null -c -o "$$TMPO"; \
+	$(LD) $(LDFLAGS) $(1) "$$TMPO" -o "$$TMP",$(1),$(2))
 
 # ar-option
 # Usage: KBUILD_ARFLAGS := $(call ar-option,D)
diff -druNp --no-dereference linux-libre-4.14.29-gnu/security/Kconfig linux-libre-4.14.30-gnu/security/Kconfig
--- linux-libre-4.14.29-gnu/security/Kconfig	2018-03-21 07:06:45.000000000 -0400
+++ linux-libre-4.14.30-gnu/security/Kconfig	2018-03-24 06:01:30.000000000 -0400
@@ -154,6 +154,7 @@ config HARDENED_USERCOPY
 	bool "Harden memory copies between kernel and userspace"
 	depends on HAVE_HARDENED_USERCOPY_ALLOCATOR
 	select BUG
+	imply STRICT_DEVMEM
 	help
 	  This option checks for obviously wrong memory regions when
 	  copying memory to/from the kernel (via copy_to_user() and
