diff -druNp --no-dereference linux-libre-4.19.75-gnu/arch/powerpc/include/asm/opal.h linux-libre-4.19.76-gnu/arch/powerpc/include/asm/opal.h
--- linux-libre-4.19.75-gnu/arch/powerpc/include/asm/opal.h	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/arch/powerpc/include/asm/opal.h	2019-10-01 02:26:13.000000000 -0400
@@ -275,7 +275,7 @@ int64_t opal_xive_get_vp_info(uint64_t v
 int64_t opal_xive_set_vp_info(uint64_t vp,
 			      uint64_t flags,
 			      uint64_t report_cl_pair);
-int64_t opal_xive_allocate_irq(uint32_t chip_id);
+int64_t opal_xive_allocate_irq_raw(uint32_t chip_id);
 int64_t opal_xive_free_irq(uint32_t girq);
 int64_t opal_xive_sync(uint32_t type, uint32_t id);
 int64_t opal_xive_dump(uint32_t type, uint32_t id);
diff -druNp --no-dereference linux-libre-4.19.75-gnu/arch/powerpc/platforms/powernv/opal-wrappers.S linux-libre-4.19.76-gnu/arch/powerpc/platforms/powernv/opal-wrappers.S
--- linux-libre-4.19.75-gnu/arch/powerpc/platforms/powernv/opal-wrappers.S	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/arch/powerpc/platforms/powernv/opal-wrappers.S	2019-10-01 02:26:13.000000000 -0400
@@ -303,7 +303,7 @@ OPAL_CALL(opal_xive_set_queue_info,		OPA
 OPAL_CALL(opal_xive_donate_page,		OPAL_XIVE_DONATE_PAGE);
 OPAL_CALL(opal_xive_alloc_vp_block,		OPAL_XIVE_ALLOCATE_VP_BLOCK);
 OPAL_CALL(opal_xive_free_vp_block,		OPAL_XIVE_FREE_VP_BLOCK);
-OPAL_CALL(opal_xive_allocate_irq,		OPAL_XIVE_ALLOCATE_IRQ);
+OPAL_CALL(opal_xive_allocate_irq_raw,		OPAL_XIVE_ALLOCATE_IRQ);
 OPAL_CALL(opal_xive_free_irq,			OPAL_XIVE_FREE_IRQ);
 OPAL_CALL(opal_xive_get_vp_info,		OPAL_XIVE_GET_VP_INFO);
 OPAL_CALL(opal_xive_set_vp_info,		OPAL_XIVE_SET_VP_INFO);
diff -druNp --no-dereference linux-libre-4.19.75-gnu/arch/powerpc/sysdev/xive/native.c linux-libre-4.19.76-gnu/arch/powerpc/sysdev/xive/native.c
--- linux-libre-4.19.75-gnu/arch/powerpc/sysdev/xive/native.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/arch/powerpc/sysdev/xive/native.c	2019-10-01 02:26:13.000000000 -0400
@@ -235,6 +235,17 @@ static bool xive_native_match(struct dev
 	return of_device_is_compatible(node, "ibm,opal-xive-vc");
 }
 
+static s64 opal_xive_allocate_irq(u32 chip_id)
+{
+	s64 irq = opal_xive_allocate_irq_raw(chip_id);
+
+	/*
+	 * Old versions of skiboot can incorrectly return 0xffffffff to
+	 * indicate no space, fix it up here.
+	 */
+	return irq == 0xffffffff ? OPAL_RESOURCE : irq;
+}
+
 #ifdef CONFIG_SMP
 static int xive_native_get_ipi(unsigned int cpu, struct xive_cpu *xc)
 {
diff -druNp --no-dereference linux-libre-4.19.75-gnu/block/blk-core.c linux-libre-4.19.76-gnu/block/blk-core.c
--- linux-libre-4.19.75-gnu/block/blk-core.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/block/blk-core.c	2019-10-01 02:26:13.000000000 -0400
@@ -1165,7 +1165,7 @@ int blk_init_allocated_queue(struct requ
 {
 	WARN_ON_ONCE(q->mq_ops);
 
-	q->fq = blk_alloc_flush_queue(q, NUMA_NO_NODE, q->cmd_size);
+	q->fq = blk_alloc_flush_queue(q, NUMA_NO_NODE, q->cmd_size, GFP_KERNEL);
 	if (!q->fq)
 		return -ENOMEM;
 
diff -druNp --no-dereference linux-libre-4.19.75-gnu/block/blk-flush.c linux-libre-4.19.76-gnu/block/blk-flush.c
--- linux-libre-4.19.75-gnu/block/blk-flush.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/block/blk-flush.c	2019-10-01 02:26:13.000000000 -0400
@@ -566,12 +566,12 @@ int blkdev_issue_flush(struct block_devi
 EXPORT_SYMBOL(blkdev_issue_flush);
 
 struct blk_flush_queue *blk_alloc_flush_queue(struct request_queue *q,
-		int node, int cmd_size)
+		int node, int cmd_size, gfp_t flags)
 {
 	struct blk_flush_queue *fq;
 	int rq_sz = sizeof(struct request);
 
-	fq = kzalloc_node(sizeof(*fq), GFP_KERNEL, node);
+	fq = kzalloc_node(sizeof(*fq), flags, node);
 	if (!fq)
 		goto fail;
 
@@ -579,7 +579,7 @@ struct blk_flush_queue *blk_alloc_flush_
 		spin_lock_init(&fq->mq_flush_lock);
 
 	rq_sz = round_up(rq_sz + cmd_size, cache_line_size());
-	fq->flush_rq = kzalloc_node(rq_sz, GFP_KERNEL, node);
+	fq->flush_rq = kzalloc_node(rq_sz, flags, node);
 	if (!fq->flush_rq)
 		goto fail_rq;
 
diff -druNp --no-dereference linux-libre-4.19.75-gnu/block/blk.h linux-libre-4.19.76-gnu/block/blk.h
--- linux-libre-4.19.75-gnu/block/blk.h	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/block/blk.h	2019-10-01 02:26:13.000000000 -0400
@@ -124,7 +124,7 @@ static inline void __blk_get_queue(struc
 }
 
 struct blk_flush_queue *blk_alloc_flush_queue(struct request_queue *q,
-		int node, int cmd_size);
+		int node, int cmd_size, gfp_t flags);
 void blk_free_flush_queue(struct blk_flush_queue *q);
 
 int blk_init_rl(struct request_list *rl, struct request_queue *q,
diff -druNp --no-dereference linux-libre-4.19.75-gnu/block/blk-mq.c linux-libre-4.19.76-gnu/block/blk-mq.c
--- linux-libre-4.19.75-gnu/block/blk-mq.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/block/blk-mq.c	2019-10-01 02:26:13.000000000 -0400
@@ -2198,12 +2198,12 @@ static int blk_mq_init_hctx(struct reque
 	 * runtime
 	 */
 	hctx->ctxs = kmalloc_array_node(nr_cpu_ids, sizeof(void *),
-					GFP_KERNEL, node);
+			GFP_NOIO | __GFP_NOWARN | __GFP_NORETRY, node);
 	if (!hctx->ctxs)
 		goto unregister_cpu_notifier;
 
-	if (sbitmap_init_node(&hctx->ctx_map, nr_cpu_ids, ilog2(8), GFP_KERNEL,
-			      node))
+	if (sbitmap_init_node(&hctx->ctx_map, nr_cpu_ids, ilog2(8),
+				GFP_NOIO | __GFP_NOWARN | __GFP_NORETRY, node))
 		goto free_ctxs;
 
 	hctx->nr_ctx = 0;
@@ -2216,7 +2216,8 @@ static int blk_mq_init_hctx(struct reque
 	    set->ops->init_hctx(hctx, set->driver_data, hctx_idx))
 		goto free_bitmap;
 
-	hctx->fq = blk_alloc_flush_queue(q, hctx->numa_node, set->cmd_size);
+	hctx->fq = blk_alloc_flush_queue(q, hctx->numa_node, set->cmd_size,
+			GFP_NOIO | __GFP_NOWARN | __GFP_NORETRY);
 	if (!hctx->fq)
 		goto exit_hctx;
 
@@ -2460,8 +2461,6 @@ void blk_mq_release(struct request_queue
 	struct blk_mq_hw_ctx *hctx;
 	unsigned int i;
 
-	cancel_delayed_work_sync(&q->requeue_work);
-
 	/* hctx kobj stays in hctx */
 	queue_for_each_hw_ctx(q, hctx, i) {
 		if (!hctx)
@@ -2530,12 +2529,14 @@ static void blk_mq_realloc_hw_ctxs(struc
 
 		node = blk_mq_hw_queue_to_node(q->mq_map, i);
 		hctxs[i] = kzalloc_node(blk_mq_hw_ctx_size(set),
-					GFP_KERNEL, node);
+				GFP_NOIO | __GFP_NOWARN | __GFP_NORETRY,
+				node);
 		if (!hctxs[i])
 			break;
 
-		if (!zalloc_cpumask_var_node(&hctxs[i]->cpumask, GFP_KERNEL,
-						node)) {
+		if (!zalloc_cpumask_var_node(&hctxs[i]->cpumask,
+					GFP_NOIO | __GFP_NOWARN | __GFP_NORETRY,
+					node)) {
 			kfree(hctxs[i]);
 			hctxs[i] = NULL;
 			break;
diff -druNp --no-dereference linux-libre-4.19.75-gnu/block/blk-sysfs.c linux-libre-4.19.76-gnu/block/blk-sysfs.c
--- linux-libre-4.19.75-gnu/block/blk-sysfs.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/block/blk-sysfs.c	2019-10-01 02:26:13.000000000 -0400
@@ -836,6 +836,9 @@ static void __blk_release_queue(struct w
 
 	blk_free_queue_stats(q->stats);
 
+	if (q->mq_ops)
+		cancel_delayed_work_sync(&q->requeue_work);
+
 	blk_exit_rl(q, &q->root_rl);
 
 	if (q->queue_tags)
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/acpi/acpi_video.c linux-libre-4.19.76-gnu/drivers/acpi/acpi_video.c
--- linux-libre-4.19.75-gnu/drivers/acpi/acpi_video.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/acpi/acpi_video.c	2019-10-01 02:26:13.000000000 -0400
@@ -73,6 +73,12 @@ module_param(report_key_events, int, 064
 MODULE_PARM_DESC(report_key_events,
 	"0: none, 1: output changes, 2: brightness changes, 3: all");
 
+static int hw_changes_brightness = -1;
+module_param(hw_changes_brightness, int, 0644);
+MODULE_PARM_DESC(hw_changes_brightness,
+	"Set this to 1 on buggy hw which changes the brightness itself when "
+	"a hotkey is pressed: -1: auto, 0: normal 1: hw-changes-brightness");
+
 /*
  * Whether the struct acpi_video_device_attrib::device_id_scheme bit should be
  * assumed even if not actually set.
@@ -418,6 +424,14 @@ static int video_set_report_key_events(c
 	return 0;
 }
 
+static int video_hw_changes_brightness(
+	const struct dmi_system_id *d)
+{
+	if (hw_changes_brightness == -1)
+		hw_changes_brightness = 1;
+	return 0;
+}
+
 static const struct dmi_system_id video_dmi_table[] = {
 	/*
 	 * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121
@@ -542,6 +556,21 @@ static const struct dmi_system_id video_
 		DMI_MATCH(DMI_PRODUCT_NAME, "Vostro V131"),
 		},
 	},
+	/*
+	 * Some machines change the brightness themselves when a brightness
+	 * hotkey gets pressed, despite us telling them not to. In this case
+	 * acpi_video_device_notify() should only call backlight_force_update(
+	 * BACKLIGHT_UPDATE_HOTKEY) and not do anything else.
+	 */
+	{
+	 /* https://bugzilla.kernel.org/show_bug.cgi?id=204077 */
+	 .callback = video_hw_changes_brightness,
+	 .ident = "Packard Bell EasyNote MZ35",
+	 .matches = {
+		DMI_MATCH(DMI_SYS_VENDOR, "Packard Bell"),
+		DMI_MATCH(DMI_PRODUCT_NAME, "EasyNote MZ35"),
+		},
+	},
 	{}
 };
 
@@ -1625,6 +1654,14 @@ static void acpi_video_device_notify(acp
 	bus = video_device->video;
 	input = bus->input;
 
+	if (hw_changes_brightness > 0) {
+		if (video_device->backlight)
+			backlight_force_update(video_device->backlight,
+					       BACKLIGHT_UPDATE_HOTKEY);
+		acpi_notifier_call_chain(device, event, 0);
+		return;
+	}
+
 	switch (event) {
 	case ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS:	/* Cycle brightness */
 		brightness_switch_event(video_device, event);
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/bluetooth/btrtl.c linux-libre-4.19.76-gnu/drivers/bluetooth/btrtl.c
--- linux-libre-4.19.75-gnu/drivers/bluetooth/btrtl.c	2019-09-21 05:21:19.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/bluetooth/btrtl.c	2019-10-01 06:53:24.000000000 -0400
@@ -639,6 +639,26 @@ int btrtl_setup_realtek(struct hci_dev *
 }
 EXPORT_SYMBOL_GPL(btrtl_setup_realtek);
 
+int btrtl_shutdown_realtek(struct hci_dev *hdev)
+{
+	struct sk_buff *skb;
+	int ret;
+
+	/* According to the vendor driver, BT must be reset on close to avoid
+	 * firmware crash.
+	 */
+	skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL, HCI_INIT_TIMEOUT);
+	if (IS_ERR(skb)) {
+		ret = PTR_ERR(skb);
+		bt_dev_err(hdev, "HCI reset during shutdown failed");
+		return ret;
+	}
+	kfree_skb(skb);
+
+	return 0;
+}
+EXPORT_SYMBOL_GPL(btrtl_shutdown_realtek);
+
 static unsigned int btrtl_convert_baudrate(u32 device_baudrate)
 {
 	switch (device_baudrate) {
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/bluetooth/btrtl.h linux-libre-4.19.76-gnu/drivers/bluetooth/btrtl.h
--- linux-libre-4.19.75-gnu/drivers/bluetooth/btrtl.h	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/bluetooth/btrtl.h	2019-10-01 02:26:13.000000000 -0400
@@ -65,6 +65,7 @@ void btrtl_free(struct btrtl_device_info
 int btrtl_download_firmware(struct hci_dev *hdev,
 			    struct btrtl_device_info *btrtl_dev);
 int btrtl_setup_realtek(struct hci_dev *hdev);
+int btrtl_shutdown_realtek(struct hci_dev *hdev);
 int btrtl_get_uart_settings(struct hci_dev *hdev,
 			    struct btrtl_device_info *btrtl_dev,
 			    unsigned int *controller_baudrate,
@@ -92,6 +93,11 @@ static inline int btrtl_setup_realtek(st
 {
 	return -EOPNOTSUPP;
 }
+
+static inline int btrtl_shutdown_realtek(struct hci_dev *hdev)
+{
+	return -EOPNOTSUPP;
+}
 
 static inline int btrtl_get_uart_settings(struct hci_dev *hdev,
 					  struct btrtl_device_info *btrtl_dev,
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/bluetooth/btusb.c linux-libre-4.19.76-gnu/drivers/bluetooth/btusb.c
--- linux-libre-4.19.75-gnu/drivers/bluetooth/btusb.c	2019-09-21 05:20:57.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/bluetooth/btusb.c	2019-10-01 06:52:56.000000000 -0400
@@ -391,6 +391,9 @@ static const struct usb_device_id blackl
 	{ USB_DEVICE(0x13d3, 0x3526), .driver_info = BTUSB_REALTEK },
 	{ USB_DEVICE(0x0b05, 0x185c), .driver_info = BTUSB_REALTEK },
 
+	/* Additional Realtek 8822CE Bluetooth devices */
+	{ USB_DEVICE(0x04ca, 0x4005), .driver_info = BTUSB_REALTEK },
+
 	/* Silicon Wave based devices */
 	{ USB_DEVICE(0x0c10, 0x0000), .driver_info = BTUSB_SWAVE },
 
@@ -3128,6 +3131,7 @@ static int btusb_probe(struct usb_interf
 #ifdef CONFIG_BT_HCIBTUSB_RTL
 	if (id->driver_info & BTUSB_REALTEK) {
 		hdev->setup = btrtl_setup_realtek;
+		hdev->shutdown = btrtl_shutdown_realtek;
 
 		/* Realtek devices lose their updated firmware over suspend,
 		 * but the USB hub doesn't notice any status change.
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/crypto/talitos.c linux-libre-4.19.76-gnu/drivers/crypto/talitos.c
--- linux-libre-4.19.75-gnu/drivers/crypto/talitos.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/crypto/talitos.c	2019-10-01 02:26:13.000000000 -0400
@@ -3124,6 +3124,7 @@ static int talitos_remove(struct platfor
 			break;
 		case CRYPTO_ALG_TYPE_AEAD:
 			crypto_unregister_aead(&t_alg->algt.alg.aead);
+			break;
 		case CRYPTO_ALG_TYPE_AHASH:
 			crypto_unregister_ahash(&t_alg->algt.alg.hash);
 			break;
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/gpu/drm/amd/display/dc/calcs/Makefile linux-libre-4.19.76-gnu/drivers/gpu/drm/amd/display/dc/calcs/Makefile
--- linux-libre-4.19.75-gnu/drivers/gpu/drm/amd/display/dc/calcs/Makefile	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/gpu/drm/amd/display/dc/calcs/Makefile	2019-10-01 02:26:13.000000000 -0400
@@ -32,6 +32,10 @@ endif
 
 calcs_ccflags := -mhard-float -msse $(cc_stack_align)
 
+ifdef CONFIG_CC_IS_CLANG
+calcs_ccflags += -msse2
+endif
+
 CFLAGS_dcn_calcs.o := $(calcs_ccflags)
 CFLAGS_dcn_calc_auto.o := $(calcs_ccflags)
 CFLAGS_dcn_calc_math.o := $(calcs_ccflags) -Wno-tautological-compare
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/gpu/drm/amd/display/dc/dml/Makefile linux-libre-4.19.76-gnu/drivers/gpu/drm/amd/display/dc/dml/Makefile
--- linux-libre-4.19.75-gnu/drivers/gpu/drm/amd/display/dc/dml/Makefile	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/gpu/drm/amd/display/dc/dml/Makefile	2019-10-01 02:26:13.000000000 -0400
@@ -32,6 +32,10 @@ endif
 
 dml_ccflags := -mhard-float -msse $(cc_stack_align)
 
+ifdef CONFIG_CC_IS_CLANG
+dml_ccflags += -msse2
+endif
+
 CFLAGS_display_mode_lib.o := $(dml_ccflags)
 CFLAGS_display_pipe_clocks.o := $(dml_ccflags)
 CFLAGS_dml1_display_rq_dlg_calc.o := $(dml_ccflags)
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c linux-libre-4.19.76-gnu/drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c
--- linux-libre-4.19.75-gnu/drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c	2019-10-01 02:26:13.000000000 -0400
@@ -1222,17 +1222,14 @@ static int smu8_dpm_force_dpm_level(stru
 
 static int smu8_dpm_powerdown_uvd(struct pp_hwmgr *hwmgr)
 {
-	if (PP_CAP(PHM_PlatformCaps_UVDPowerGating)) {
-		smu8_nbdpm_pstate_enable_disable(hwmgr, true, true);
+	if (PP_CAP(PHM_PlatformCaps_UVDPowerGating))
 		return smum_send_msg_to_smc(hwmgr, PPSMC_MSG_UVDPowerOFF);
-	}
 	return 0;
 }
 
 static int smu8_dpm_powerup_uvd(struct pp_hwmgr *hwmgr)
 {
 	if (PP_CAP(PHM_PlatformCaps_UVDPowerGating)) {
-		smu8_nbdpm_pstate_enable_disable(hwmgr, false, true);
 		return smum_send_msg_to_smc_with_parameter(
 			hwmgr,
 			PPSMC_MSG_UVDPowerON,
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/gpu/drm/drm_probe_helper.c linux-libre-4.19.76-gnu/drivers/gpu/drm/drm_probe_helper.c
--- linux-libre-4.19.75-gnu/drivers/gpu/drm/drm_probe_helper.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/gpu/drm/drm_probe_helper.c	2019-10-01 02:26:13.000000000 -0400
@@ -581,6 +581,9 @@ static void output_poll_execute(struct w
 	enum drm_connector_status old_status;
 	bool repoll = false, changed;
 
+	if (!dev->mode_config.poll_enabled)
+		return;
+
 	/* Pick up any changes detected by the probe functions. */
 	changed = dev->mode_config.delayed_event;
 	dev->mode_config.delayed_event = false;
@@ -735,7 +738,11 @@ EXPORT_SYMBOL(drm_kms_helper_poll_init);
  */
 void drm_kms_helper_poll_fini(struct drm_device *dev)
 {
-	drm_kms_helper_poll_disable(dev);
+	if (!dev->mode_config.poll_enabled)
+		return;
+
+	dev->mode_config.poll_enabled = false;
+	cancel_delayed_work_sync(&dev->mode_config.output_poll_work);
 }
 EXPORT_SYMBOL(drm_kms_helper_poll_fini);
 
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/gpu/drm/nouveau/dispnv50/head.c linux-libre-4.19.76-gnu/drivers/gpu/drm/nouveau/dispnv50/head.c
--- linux-libre-4.19.75-gnu/drivers/gpu/drm/nouveau/dispnv50/head.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/gpu/drm/nouveau/dispnv50/head.c	2019-10-01 02:26:13.000000000 -0400
@@ -169,14 +169,34 @@ nv50_head_atomic_check_view(struct nv50_
 	 */
 	switch (mode) {
 	case DRM_MODE_SCALE_CENTER:
-		asyh->view.oW = min((u16)umode->hdisplay, asyh->view.oW);
-		asyh->view.oH = min((u16)umode_vdisplay, asyh->view.oH);
-		/* fall-through */
+		/* NOTE: This will cause scaling when the input is
+		 * larger than the output.
+		 */
+		asyh->view.oW = min(asyh->view.iW, asyh->view.oW);
+		asyh->view.oH = min(asyh->view.iH, asyh->view.oH);
+		break;
 	case DRM_MODE_SCALE_ASPECT:
-		if (asyh->view.oH < asyh->view.oW) {
+		/* Determine whether the scaling should be on width or on
+		 * height. This is done by comparing the aspect ratios of the
+		 * sizes. If the output AR is larger than input AR, that means
+		 * we want to change the width (letterboxed on the
+		 * left/right), otherwise on the height (letterboxed on the
+		 * top/bottom).
+		 *
+		 * E.g. 4:3 (1.333) AR image displayed on a 16:10 (1.6) AR
+		 * screen will have letterboxes on the left/right. However a
+		 * 16:9 (1.777) AR image on that same screen will have
+		 * letterboxes on the top/bottom.
+		 *
+		 * inputAR = iW / iH; outputAR = oW / oH
+		 * outputAR > inputAR is equivalent to oW * iH > iW * oH
+		 */
+		if (asyh->view.oW * asyh->view.iH > asyh->view.iW * asyh->view.oH) {
+			/* Recompute output width, i.e. left/right letterbox */
 			u32 r = (asyh->view.iW << 19) / asyh->view.iH;
 			asyh->view.oW = ((asyh->view.oH * r) + (r / 2)) >> 19;
 		} else {
+			/* Recompute output height, i.e. top/bottom letterbox */
 			u32 r = (asyh->view.iH << 19) / asyh->view.iW;
 			asyh->view.oH = ((asyh->view.oW * r) + (r / 2)) >> 19;
 		}
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/hid/hid-ids.h linux-libre-4.19.76-gnu/drivers/hid/hid-ids.h
--- linux-libre-4.19.75-gnu/drivers/hid/hid-ids.h	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/hid/hid-ids.h	2019-10-01 02:26:13.000000000 -0400
@@ -559,6 +559,7 @@
 #define USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0B4A	0x0b4a
 #define USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE		0x134a
 #define USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_094A	0x094a
+#define USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_0941	0x0941
 #define USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_0641	0x0641
 
 #define USB_VENDOR_ID_HUION		0x256c
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/hid/hid-lg4ff.c linux-libre-4.19.76-gnu/drivers/hid/hid-lg4ff.c
--- linux-libre-4.19.75-gnu/drivers/hid/hid-lg4ff.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/hid/hid-lg4ff.c	2019-10-01 02:26:13.000000000 -0400
@@ -1483,7 +1483,6 @@ int lg4ff_deinit(struct hid_device *hid)
 		}
 	}
 #endif
-	hid_hw_stop(hid);
 	drv_data->device_props = NULL;
 
 	kfree(entry);
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/hid/hid-lg.c linux-libre-4.19.76-gnu/drivers/hid/hid-lg.c
--- linux-libre-4.19.75-gnu/drivers/hid/hid-lg.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/hid/hid-lg.c	2019-10-01 02:26:13.000000000 -0400
@@ -763,7 +763,7 @@ static int lg_probe(struct hid_device *h
 
 		if (!buf) {
 			ret = -ENOMEM;
-			goto err_free;
+			goto err_stop;
 		}
 
 		ret = hid_hw_raw_request(hdev, buf[0], buf, sizeof(cbuf),
@@ -795,9 +795,12 @@ static int lg_probe(struct hid_device *h
 		ret = lg4ff_init(hdev);
 
 	if (ret)
-		goto err_free;
+		goto err_stop;
 
 	return 0;
+
+err_stop:
+	hid_hw_stop(hdev);
 err_free:
 	kfree(drv_data);
 	return ret;
@@ -808,8 +811,7 @@ static void lg_remove(struct hid_device
 	struct lg_drv_data *drv_data = hid_get_drvdata(hdev);
 	if (drv_data->quirks & LG_FF4)
 		lg4ff_deinit(hdev);
-	else
-		hid_hw_stop(hdev);
+	hid_hw_stop(hdev);
 	kfree(drv_data);
 }
 
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/hid/hid-prodikeys.c linux-libre-4.19.76-gnu/drivers/hid/hid-prodikeys.c
--- linux-libre-4.19.75-gnu/drivers/hid/hid-prodikeys.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/hid/hid-prodikeys.c	2019-10-01 02:26:13.000000000 -0400
@@ -555,10 +555,14 @@ static void pcmidi_setup_extra_keys(
 
 static int pcmidi_set_operational(struct pcmidi_snd *pm)
 {
+	int rc;
+
 	if (pm->ifnum != 1)
 		return 0; /* only set up ONCE for interace 1 */
 
-	pcmidi_get_output_report(pm);
+	rc = pcmidi_get_output_report(pm);
+	if (rc < 0)
+		return rc;
 	pcmidi_submit_output_report(pm, 0xc1);
 	return 0;
 }
@@ -687,7 +691,11 @@ static int pcmidi_snd_initialise(struct
 	spin_lock_init(&pm->rawmidi_in_lock);
 
 	init_sustain_timers(pm);
-	pcmidi_set_operational(pm);
+	err = pcmidi_set_operational(pm);
+	if (err < 0) {
+		pk_error("failed to find output report\n");
+		goto fail_register;
+	}
 
 	/* register it */
 	err = snd_card_register(card);
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/hid/hid-quirks.c linux-libre-4.19.76-gnu/drivers/hid/hid-quirks.c
--- linux-libre-4.19.75-gnu/drivers/hid/hid-quirks.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/hid/hid-quirks.c	2019-10-01 02:26:13.000000000 -0400
@@ -94,6 +94,7 @@ static const struct hid_device_id hid_qu
 	{ HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0B4A), HID_QUIRK_ALWAYS_POLL },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_094A), HID_QUIRK_ALWAYS_POLL },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_0941), HID_QUIRK_ALWAYS_POLL },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_0641), HID_QUIRK_ALWAYS_POLL },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_IDEACOM, USB_DEVICE_ID_IDEACOM_IDC6680), HID_QUIRK_MULTI_INPUT },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_INNOMEDIA, USB_DEVICE_ID_INNEX_GENESIS_ATARI), HID_QUIRK_MULTI_INPUT },
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/hid/hidraw.c linux-libre-4.19.76-gnu/drivers/hid/hidraw.c
--- linux-libre-4.19.75-gnu/drivers/hid/hidraw.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/hid/hidraw.c	2019-10-01 02:26:13.000000000 -0400
@@ -378,7 +378,7 @@ static long hidraw_ioctl(struct file *fi
 
 	mutex_lock(&minors_lock);
 	dev = hidraw_table[minor];
-	if (!dev) {
+	if (!dev || !dev->exist) {
 		ret = -ENODEV;
 		goto out;
 	}
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/hid/hid-sony.c linux-libre-4.19.76-gnu/drivers/hid/hid-sony.c
--- linux-libre-4.19.75-gnu/drivers/hid/hid-sony.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/hid/hid-sony.c	2019-10-01 02:26:13.000000000 -0400
@@ -2806,7 +2806,6 @@ err_stop:
 	sony_cancel_work_sync(sc);
 	sony_remove_dev_list(sc);
 	sony_release_device_id(sc);
-	hid_hw_stop(hdev);
 	return ret;
 }
 
@@ -2868,6 +2867,7 @@ static int sony_probe(struct hid_device
 	 */
 	if (!(hdev->claimed & HID_CLAIMED_INPUT)) {
 		hid_err(hdev, "failed to claim input\n");
+		hid_hw_stop(hdev);
 		return -ENODEV;
 	}
 
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/infiniband/core/cq.c linux-libre-4.19.76-gnu/drivers/infiniband/core/cq.c
--- linux-libre-4.19.75-gnu/drivers/infiniband/core/cq.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/infiniband/core/cq.c	2019-10-01 02:26:13.000000000 -0400
@@ -112,12 +112,12 @@ static void ib_cq_poll_work(struct work_
 				    IB_POLL_BATCH);
 	if (completed >= IB_POLL_BUDGET_WORKQUEUE ||
 	    ib_req_notify_cq(cq, IB_POLL_FLAGS) > 0)
-		queue_work(ib_comp_wq, &cq->work);
+		queue_work(cq->comp_wq, &cq->work);
 }
 
 static void ib_cq_completion_workqueue(struct ib_cq *cq, void *private)
 {
-	queue_work(ib_comp_wq, &cq->work);
+	queue_work(cq->comp_wq, &cq->work);
 }
 
 /**
@@ -175,9 +175,12 @@ struct ib_cq *__ib_alloc_cq(struct ib_de
 		ib_req_notify_cq(cq, IB_CQ_NEXT_COMP);
 		break;
 	case IB_POLL_WORKQUEUE:
+	case IB_POLL_UNBOUND_WORKQUEUE:
 		cq->comp_handler = ib_cq_completion_workqueue;
 		INIT_WORK(&cq->work, ib_cq_poll_work);
 		ib_req_notify_cq(cq, IB_CQ_NEXT_COMP);
+		cq->comp_wq = (cq->poll_ctx == IB_POLL_WORKQUEUE) ?
+				ib_comp_wq : ib_comp_unbound_wq;
 		break;
 	default:
 		ret = -EINVAL;
@@ -213,6 +216,7 @@ void ib_free_cq(struct ib_cq *cq)
 		irq_poll_disable(&cq->iop);
 		break;
 	case IB_POLL_WORKQUEUE:
+	case IB_POLL_UNBOUND_WORKQUEUE:
 		cancel_work_sync(&cq->work);
 		break;
 	default:
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/infiniband/core/device.c linux-libre-4.19.76-gnu/drivers/infiniband/core/device.c
--- linux-libre-4.19.75-gnu/drivers/infiniband/core/device.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/infiniband/core/device.c	2019-10-01 02:26:13.000000000 -0400
@@ -61,6 +61,7 @@ struct ib_client_data {
 };
 
 struct workqueue_struct *ib_comp_wq;
+struct workqueue_struct *ib_comp_unbound_wq;
 struct workqueue_struct *ib_wq;
 EXPORT_SYMBOL_GPL(ib_wq);
 
@@ -1166,10 +1167,19 @@ static int __init ib_core_init(void)
 		goto err;
 	}
 
+	ib_comp_unbound_wq =
+		alloc_workqueue("ib-comp-unb-wq",
+				WQ_UNBOUND | WQ_HIGHPRI | WQ_MEM_RECLAIM |
+				WQ_SYSFS, WQ_UNBOUND_MAX_ACTIVE);
+	if (!ib_comp_unbound_wq) {
+		ret = -ENOMEM;
+		goto err_comp;
+	}
+
 	ret = class_register(&ib_class);
 	if (ret) {
 		pr_warn("Couldn't create InfiniBand device class\n");
-		goto err_comp;
+		goto err_comp_unbound;
 	}
 
 	ret = rdma_nl_init();
@@ -1218,6 +1228,8 @@ err_ibnl:
 	rdma_nl_exit();
 err_sysfs:
 	class_unregister(&ib_class);
+err_comp_unbound:
+	destroy_workqueue(ib_comp_unbound_wq);
 err_comp:
 	destroy_workqueue(ib_comp_wq);
 err:
@@ -1236,6 +1248,7 @@ static void __exit ib_core_cleanup(void)
 	addr_cleanup();
 	rdma_nl_exit();
 	class_unregister(&ib_class);
+	destroy_workqueue(ib_comp_unbound_wq);
 	destroy_workqueue(ib_comp_wq);
 	/* Make sure that any pending umem accounting work is done. */
 	destroy_workqueue(ib_wq);
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/infiniband/core/mad.c linux-libre-4.19.76-gnu/drivers/infiniband/core/mad.c
--- linux-libre-4.19.75-gnu/drivers/infiniband/core/mad.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/infiniband/core/mad.c	2019-10-01 02:26:13.000000000 -0400
@@ -3190,7 +3190,7 @@ static int ib_mad_port_open(struct ib_de
 	}
 
 	port_priv->cq = ib_alloc_cq(port_priv->device, port_priv, cq_size, 0,
-			IB_POLL_WORKQUEUE);
+			IB_POLL_UNBOUND_WORKQUEUE);
 	if (IS_ERR(port_priv->cq)) {
 		dev_err(&device->dev, "Couldn't create ib_mad CQ\n");
 		ret = PTR_ERR(port_priv->cq);
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/infiniband/core/restrack.c linux-libre-4.19.76-gnu/drivers/infiniband/core/restrack.c
--- linux-libre-4.19.75-gnu/drivers/infiniband/core/restrack.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/infiniband/core/restrack.c	2019-10-01 02:26:13.000000000 -0400
@@ -225,7 +225,9 @@ void rdma_restrack_del(struct rdma_restr
 	up_write(&dev->res.rwsem);
 
 out:
-	if (res->task)
+	if (res->task) {
 		put_task_struct(res->task);
+		res->task = NULL;
+	}
 }
 EXPORT_SYMBOL(rdma_restrack_del);
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/irqchip/irq-gic-v3-its.c linux-libre-4.19.76-gnu/drivers/irqchip/irq-gic-v3-its.c
--- linux-libre-4.19.75-gnu/drivers/irqchip/irq-gic-v3-its.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/irqchip/irq-gic-v3-its.c	2019-10-01 02:26:13.000000000 -0400
@@ -2514,14 +2514,13 @@ static void its_irq_domain_free(struct i
 	struct its_node *its = its_dev->its;
 	int i;
 
+	bitmap_release_region(its_dev->event_map.lpi_map,
+			      its_get_event_id(irq_domain_get_irq_data(domain, virq)),
+			      get_count_order(nr_irqs));
+
 	for (i = 0; i < nr_irqs; i++) {
 		struct irq_data *data = irq_domain_get_irq_data(domain,
 								virq + i);
-		u32 event = its_get_event_id(data);
-
-		/* Mark interrupt index as unused */
-		clear_bit(event, its_dev->event_map.lpi_map);
-
 		/* Nuke the entry in the domain */
 		irq_domain_reset_irq_data(data);
 	}
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/md/bcache/super.c linux-libre-4.19.76-gnu/drivers/md/bcache/super.c
--- linux-libre-4.19.75-gnu/drivers/md/bcache/super.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/md/bcache/super.c	2019-10-01 02:26:13.000000000 -0400
@@ -1768,7 +1768,6 @@ static int run_cache_set(struct cache_se
 	set_gc_sectors(c);
 
 	if (CACHE_SYNC(&c->sb)) {
-		LIST_HEAD(journal);
 		struct bkey *k;
 		struct jset *j;
 
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/md/dm-zoned-target.c linux-libre-4.19.76-gnu/drivers/md/dm-zoned-target.c
--- linux-libre-4.19.75-gnu/drivers/md/dm-zoned-target.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/md/dm-zoned-target.c	2019-10-01 02:26:13.000000000 -0400
@@ -133,8 +133,6 @@ static int dmz_submit_bio(struct dmz_tar
 
 	atomic_inc(&bioctx->ref);
 	generic_make_request(clone);
-	if (clone->bi_status == BLK_STS_IOERR)
-		return -EIO;
 
 	if (bio_op(bio) == REQ_OP_WRITE && dmz_is_seq(zone))
 		zone->wp_block += nr_blocks;
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/media/i2c/tvp5150.c linux-libre-4.19.76-gnu/drivers/media/i2c/tvp5150.c
--- linux-libre-4.19.75-gnu/drivers/media/i2c/tvp5150.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/media/i2c/tvp5150.c	2019-10-01 02:26:13.000000000 -0400
@@ -828,7 +828,7 @@ static int tvp5150_s_ctrl(struct v4l2_ct
 		return 0;
 	case V4L2_CID_HUE:
 		tvp5150_write(sd, TVP5150_HUE_CTL, ctrl->val);
-		break;
+		return 0;
 	case V4L2_CID_TEST_PATTERN:
 		decoder->enable = ctrl->val ? false : true;
 		tvp5150_selmux(sd);
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/mtd/chips/cfi_cmdset_0002.c linux-libre-4.19.76-gnu/drivers/mtd/chips/cfi_cmdset_0002.c
--- linux-libre-4.19.75-gnu/drivers/mtd/chips/cfi_cmdset_0002.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/mtd/chips/cfi_cmdset_0002.c	2019-10-01 02:26:13.000000000 -0400
@@ -1627,29 +1627,35 @@ static int __xipram do_write_oneword(str
 			continue;
 		}
 
-		if (time_after(jiffies, timeo) && !chip_ready(map, adr)){
+		/*
+		 * We check "time_after" and "!chip_good" before checking
+		 * "chip_good" to avoid the failure due to scheduling.
+		 */
+		if (time_after(jiffies, timeo) && !chip_good(map, adr, datum)) {
 			xip_enable(map, chip, adr);
 			printk(KERN_WARNING "MTD %s(): software timeout\n", __func__);
 			xip_disable(map, chip, adr);
+			ret = -EIO;
 			break;
 		}
 
-		if (chip_ready(map, adr))
+		if (chip_good(map, adr, datum))
 			break;
 
 		/* Latency issues. Drop the lock, wait a while and retry */
 		UDELAY(map, chip, adr, 1);
 	}
+
 	/* Did we succeed? */
-	if (!chip_good(map, adr, datum)) {
+	if (ret) {
 		/* reset on all failures. */
 		map_write(map, CMD(0xF0), chip->start);
 		/* FIXME - should have reset delay before continuing */
 
-		if (++retry_cnt <= MAX_RETRIES)
+		if (++retry_cnt <= MAX_RETRIES) {
+			ret = 0;
 			goto retry;
-
-		ret = -EIO;
+		}
 	}
 	xip_enable(map, chip, adr);
  op_done:
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/net/ethernet/ibm/ibmvnic.c linux-libre-4.19.76-gnu/drivers/net/ethernet/ibm/ibmvnic.c
--- linux-libre-4.19.75-gnu/drivers/net/ethernet/ibm/ibmvnic.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/net/ethernet/ibm/ibmvnic.c	2019-10-01 02:26:13.000000000 -0400
@@ -1999,8 +1999,11 @@ static void __ibmvnic_reset(struct work_
 	rwi = get_next_rwi(adapter);
 	while (rwi) {
 		if (adapter->state == VNIC_REMOVING ||
-		    adapter->state == VNIC_REMOVED)
-			goto out;
+		    adapter->state == VNIC_REMOVED) {
+			kfree(rwi);
+			rc = EBUSY;
+			break;
+		}
 
 		if (adapter->force_reset_recovery) {
 			adapter->force_reset_recovery = false;
@@ -2026,7 +2029,7 @@ static void __ibmvnic_reset(struct work_
 		netdev_dbg(adapter->netdev, "Reset failed\n");
 		free_all_rwi(adapter);
 	}
-out:
+
 	adapter->resetting = false;
 	if (we_lock_rtnl)
 		rtnl_unlock();
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c linux-libre-4.19.76-gnu/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
--- linux-libre-4.19.75-gnu/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c	2019-10-01 02:26:13.000000000 -0400
@@ -1510,6 +1510,28 @@ static int set_pflag_rx_striding_rq(stru
 	return 0;
 }
 
+static int set_pflag_rx_no_csum_complete(struct net_device *netdev, bool enable)
+{
+	struct mlx5e_priv *priv = netdev_priv(netdev);
+	struct mlx5e_channels *channels = &priv->channels;
+	struct mlx5e_channel *c;
+	int i;
+
+	if (!test_bit(MLX5E_STATE_OPENED, &priv->state) ||
+	    priv->channels.params.xdp_prog)
+		return 0;
+
+	for (i = 0; i < channels->num; i++) {
+		c = channels->c[i];
+		if (enable)
+			__set_bit(MLX5E_RQ_STATE_NO_CSUM_COMPLETE, &c->rq.state);
+		else
+			__clear_bit(MLX5E_RQ_STATE_NO_CSUM_COMPLETE, &c->rq.state);
+	}
+
+	return 0;
+}
+
 static int mlx5e_handle_pflag(struct net_device *netdev,
 			      u32 wanted_flags,
 			      enum mlx5e_priv_flag flag,
@@ -1561,6 +1583,12 @@ static int mlx5e_set_priv_flags(struct n
 	err = mlx5e_handle_pflag(netdev, pflags,
 				 MLX5E_PFLAG_RX_STRIDING_RQ,
 				 set_pflag_rx_striding_rq);
+	if (err)
+		goto out;
+
+	err = mlx5e_handle_pflag(netdev, pflags,
+				 MLX5E_PFLAG_RX_NO_CSUM_COMPLETE,
+				 set_pflag_rx_no_csum_complete);
 
 out:
 	mutex_unlock(&priv->state_lock);
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/net/ethernet/mellanox/mlx5/core/en.h linux-libre-4.19.76-gnu/drivers/net/ethernet/mellanox/mlx5/core/en.h
--- linux-libre-4.19.75-gnu/drivers/net/ethernet/mellanox/mlx5/core/en.h	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/net/ethernet/mellanox/mlx5/core/en.h	2019-10-01 02:26:13.000000000 -0400
@@ -210,6 +210,7 @@ static const char mlx5e_priv_flags[][ETH
 	"tx_cqe_moder",
 	"rx_cqe_compress",
 	"rx_striding_rq",
+	"rx_no_csum_complete",
 };
 
 enum mlx5e_priv_flag {
@@ -217,6 +218,7 @@ enum mlx5e_priv_flag {
 	MLX5E_PFLAG_TX_CQE_BASED_MODER = (1 << 1),
 	MLX5E_PFLAG_RX_CQE_COMPRESS = (1 << 2),
 	MLX5E_PFLAG_RX_STRIDING_RQ = (1 << 3),
+	MLX5E_PFLAG_RX_NO_CSUM_COMPLETE = (1 << 4),
 };
 
 #define MLX5E_SET_PFLAG(params, pflag, enable)			\
@@ -298,6 +300,7 @@ struct mlx5e_dcbx_dp {
 enum {
 	MLX5E_RQ_STATE_ENABLED,
 	MLX5E_RQ_STATE_AM,
+	MLX5E_RQ_STATE_NO_CSUM_COMPLETE,
 };
 
 struct mlx5e_cq {
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/net/ethernet/mellanox/mlx5/core/en_main.c linux-libre-4.19.76-gnu/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
--- linux-libre-4.19.75-gnu/drivers/net/ethernet/mellanox/mlx5/core/en_main.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/net/ethernet/mellanox/mlx5/core/en_main.c	2019-10-01 02:26:13.000000000 -0400
@@ -934,6 +934,13 @@ static int mlx5e_open_rq(struct mlx5e_ch
 	if (params->rx_dim_enabled)
 		__set_bit(MLX5E_RQ_STATE_AM, &c->rq.state);
 
+	/* We disable csum_complete when XDP is enabled since
+	 * XDP programs might manipulate packets which will render
+	 * skb->checksum incorrect.
+	 */
+	if (MLX5E_GET_PFLAG(params, MLX5E_PFLAG_RX_NO_CSUM_COMPLETE) || c->xdp)
+		__set_bit(MLX5E_RQ_STATE_NO_CSUM_COMPLETE, &c->rq.state);
+
 	return 0;
 
 err_destroy_rq:
@@ -4533,6 +4540,7 @@ void mlx5e_build_nic_params(struct mlx5_
 		params->rx_cqe_compress_def = slow_pci_heuristic(mdev);
 
 	MLX5E_SET_PFLAG(params, MLX5E_PFLAG_RX_CQE_COMPRESS, params->rx_cqe_compress_def);
+	MLX5E_SET_PFLAG(params, MLX5E_PFLAG_RX_NO_CSUM_COMPLETE, false);
 
 	/* RQ */
 	/* Prefer Striding RQ, unless any of the following holds:
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c linux-libre-4.19.76-gnu/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
--- linux-libre-4.19.75-gnu/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c	2019-10-01 02:26:13.000000000 -0400
@@ -37,6 +37,7 @@
 #include <net/busy_poll.h>
 #include <net/ip6_checksum.h>
 #include <net/page_pool.h>
+#include <net/inet_ecn.h>
 #include "en.h"
 #include "en_tc.h"
 #include "eswitch.h"
@@ -688,27 +689,110 @@ static inline void mlx5e_skb_set_hash(st
 	skb_set_hash(skb, be32_to_cpu(cqe->rss_hash_result), ht);
 }
 
-static inline bool is_last_ethertype_ip(struct sk_buff *skb, int *network_depth)
+static inline bool is_last_ethertype_ip(struct sk_buff *skb, int *network_depth,
+					__be16 *proto)
 {
-	__be16 ethertype = ((struct ethhdr *)skb->data)->h_proto;
+	*proto = ((struct ethhdr *)skb->data)->h_proto;
+	*proto = __vlan_get_protocol(skb, *proto, network_depth);
 
-	ethertype = __vlan_get_protocol(skb, ethertype, network_depth);
-	return (ethertype == htons(ETH_P_IP) || ethertype == htons(ETH_P_IPV6));
+	if (*proto == htons(ETH_P_IP))
+		return pskb_may_pull(skb, *network_depth + sizeof(struct iphdr));
+
+	if (*proto == htons(ETH_P_IPV6))
+		return pskb_may_pull(skb, *network_depth + sizeof(struct ipv6hdr));
+
+	return false;
 }
 
-static u32 mlx5e_get_fcs(const struct sk_buff *skb)
+static inline void mlx5e_enable_ecn(struct mlx5e_rq *rq, struct sk_buff *skb)
 {
-	const void *fcs_bytes;
-	u32 _fcs_bytes;
+	int network_depth = 0;
+	__be16 proto;
+	void *ip;
+	int rc;
 
-	fcs_bytes = skb_header_pointer(skb, skb->len - ETH_FCS_LEN,
-				       ETH_FCS_LEN, &_fcs_bytes);
+	if (unlikely(!is_last_ethertype_ip(skb, &network_depth, &proto)))
+		return;
 
-	return __get_unaligned_cpu32(fcs_bytes);
+	ip = skb->data + network_depth;
+	rc = ((proto == htons(ETH_P_IP)) ? IP_ECN_set_ce((struct iphdr *)ip) :
+					 IP6_ECN_set_ce(skb, (struct ipv6hdr *)ip));
+
+	rq->stats->ecn_mark += !!rc;
+}
+
+static u8 get_ip_proto(struct sk_buff *skb, int network_depth, __be16 proto)
+{
+	void *ip_p = skb->data + network_depth;
+
+	return (proto == htons(ETH_P_IP)) ? ((struct iphdr *)ip_p)->protocol :
+					    ((struct ipv6hdr *)ip_p)->nexthdr;
 }
 
 #define short_frame(size) ((size) <= ETH_ZLEN + ETH_FCS_LEN)
 
+#define MAX_PADDING 8
+
+static void
+tail_padding_csum_slow(struct sk_buff *skb, int offset, int len,
+		       struct mlx5e_rq_stats *stats)
+{
+	stats->csum_complete_tail_slow++;
+	skb->csum = csum_block_add(skb->csum,
+				   skb_checksum(skb, offset, len, 0),
+				   offset);
+}
+
+static void
+tail_padding_csum(struct sk_buff *skb, int offset,
+		  struct mlx5e_rq_stats *stats)
+{
+	u8 tail_padding[MAX_PADDING];
+	int len = skb->len - offset;
+	void *tail;
+
+	if (unlikely(len > MAX_PADDING)) {
+		tail_padding_csum_slow(skb, offset, len, stats);
+		return;
+	}
+
+	tail = skb_header_pointer(skb, offset, len, tail_padding);
+	if (unlikely(!tail)) {
+		tail_padding_csum_slow(skb, offset, len, stats);
+		return;
+	}
+
+	stats->csum_complete_tail++;
+	skb->csum = csum_block_add(skb->csum, csum_partial(tail, len, 0), offset);
+}
+
+static void
+mlx5e_skb_padding_csum(struct sk_buff *skb, int network_depth, __be16 proto,
+		       struct mlx5e_rq_stats *stats)
+{
+	struct ipv6hdr *ip6;
+	struct iphdr   *ip4;
+	int pkt_len;
+
+	switch (proto) {
+	case htons(ETH_P_IP):
+		ip4 = (struct iphdr *)(skb->data + network_depth);
+		pkt_len = network_depth + ntohs(ip4->tot_len);
+		break;
+	case htons(ETH_P_IPV6):
+		ip6 = (struct ipv6hdr *)(skb->data + network_depth);
+		pkt_len = network_depth + sizeof(*ip6) + ntohs(ip6->payload_len);
+		break;
+	default:
+		return;
+	}
+
+	if (likely(pkt_len >= skb->len))
+		return;
+
+	tail_padding_csum(skb, pkt_len, stats);
+}
+
 static inline void mlx5e_handle_csum(struct net_device *netdev,
 				     struct mlx5_cqe64 *cqe,
 				     struct mlx5e_rq *rq,
@@ -717,6 +801,7 @@ static inline void mlx5e_handle_csum(str
 {
 	struct mlx5e_rq_stats *stats = rq->stats;
 	int network_depth = 0;
+	__be16 proto;
 
 	if (unlikely(!(netdev->features & NETIF_F_RXCSUM)))
 		goto csum_none;
@@ -727,6 +812,10 @@ static inline void mlx5e_handle_csum(str
 		return;
 	}
 
+	/* True when explicitly set via priv flag, or XDP prog is loaded */
+	if (test_bit(MLX5E_RQ_STATE_NO_CSUM_COMPLETE, &rq->state))
+		goto csum_unnecessary;
+
 	/* CQE csum doesn't cover padding octets in short ethernet
 	 * frames. And the pad field is appended prior to calculating
 	 * and appending the FCS field.
@@ -738,7 +827,10 @@ static inline void mlx5e_handle_csum(str
 	if (short_frame(skb->len))
 		goto csum_unnecessary;
 
-	if (likely(is_last_ethertype_ip(skb, &network_depth))) {
+	if (likely(is_last_ethertype_ip(skb, &network_depth, &proto))) {
+		if (unlikely(get_ip_proto(skb, network_depth, proto) == IPPROTO_SCTP))
+			goto csum_unnecessary;
+
 		skb->ip_summed = CHECKSUM_COMPLETE;
 		skb->csum = csum_unfold((__force __sum16)cqe->check_sum);
 		if (network_depth > ETH_HLEN)
@@ -749,10 +841,8 @@ static inline void mlx5e_handle_csum(str
 			skb->csum = csum_partial(skb->data + ETH_HLEN,
 						 network_depth - ETH_HLEN,
 						 skb->csum);
-		if (unlikely(netdev->features & NETIF_F_RXFCS))
-			skb->csum = csum_block_add(skb->csum,
-						   (__force __wsum)mlx5e_get_fcs(skb),
-						   skb->len - ETH_FCS_LEN);
+
+		mlx5e_skb_padding_csum(skb, network_depth, proto, stats);
 		stats->csum_complete++;
 		return;
 	}
@@ -775,6 +865,8 @@ csum_none:
 	stats->csum_none++;
 }
 
+#define MLX5E_CE_BIT_MASK 0x80
+
 static inline void mlx5e_build_rx_skb(struct mlx5_cqe64 *cqe,
 				      u32 cqe_bcnt,
 				      struct mlx5e_rq *rq,
@@ -819,6 +911,10 @@ static inline void mlx5e_build_rx_skb(st
 	skb->mark = be32_to_cpu(cqe->sop_drop_qpn) & MLX5E_TC_FLOW_ID_MASK;
 
 	mlx5e_handle_csum(netdev, cqe, rq, skb, !!lro_num_seg);
+	/* checking CE bit in cqe - MSB in ml_path field */
+	if (unlikely(cqe->ml_path & MLX5E_CE_BIT_MASK))
+		mlx5e_enable_ecn(rq, skb);
+
 	skb->protocol = eth_type_trans(skb, netdev);
 }
 
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c linux-libre-4.19.76-gnu/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
--- linux-libre-4.19.75-gnu/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c	2019-10-01 02:26:13.000000000 -0400
@@ -53,10 +53,13 @@ static const struct counter_desc sw_stat
 
 	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_lro_packets) },
 	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_lro_bytes) },
+	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_ecn_mark) },
 	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_removed_vlan_packets) },
 	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_csum_unnecessary) },
 	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_csum_none) },
 	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_csum_complete) },
+	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_csum_complete_tail) },
+	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_csum_complete_tail_slow) },
 	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_csum_unnecessary_inner) },
 	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_xdp_drop) },
 	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_xdp_redirect) },
@@ -144,9 +147,12 @@ void mlx5e_grp_sw_update_stats(struct ml
 		s->rx_bytes	+= rq_stats->bytes;
 		s->rx_lro_packets += rq_stats->lro_packets;
 		s->rx_lro_bytes	+= rq_stats->lro_bytes;
+		s->rx_ecn_mark	+= rq_stats->ecn_mark;
 		s->rx_removed_vlan_packets += rq_stats->removed_vlan_packets;
 		s->rx_csum_none	+= rq_stats->csum_none;
 		s->rx_csum_complete += rq_stats->csum_complete;
+		s->rx_csum_complete_tail += rq_stats->csum_complete_tail;
+		s->rx_csum_complete_tail_slow += rq_stats->csum_complete_tail_slow;
 		s->rx_csum_unnecessary += rq_stats->csum_unnecessary;
 		s->rx_csum_unnecessary_inner += rq_stats->csum_unnecessary_inner;
 		s->rx_xdp_drop     += rq_stats->xdp_drop;
@@ -1137,6 +1143,8 @@ static const struct counter_desc rq_stat
 	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, packets) },
 	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, bytes) },
 	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, csum_complete) },
+	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, csum_complete_tail) },
+	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, csum_complete_tail_slow) },
 	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, csum_unnecessary) },
 	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, csum_unnecessary_inner) },
 	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, csum_none) },
@@ -1144,6 +1152,7 @@ static const struct counter_desc rq_stat
 	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, xdp_redirect) },
 	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, lro_packets) },
 	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, lro_bytes) },
+	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, ecn_mark) },
 	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, removed_vlan_packets) },
 	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, wqe_err) },
 	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, mpwqe_filler_cqes) },
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h linux-libre-4.19.76-gnu/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h
--- linux-libre-4.19.75-gnu/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h	2019-10-01 02:26:13.000000000 -0400
@@ -66,10 +66,13 @@ struct mlx5e_sw_stats {
 	u64 tx_nop;
 	u64 rx_lro_packets;
 	u64 rx_lro_bytes;
+	u64 rx_ecn_mark;
 	u64 rx_removed_vlan_packets;
 	u64 rx_csum_unnecessary;
 	u64 rx_csum_none;
 	u64 rx_csum_complete;
+	u64 rx_csum_complete_tail;
+	u64 rx_csum_complete_tail_slow;
 	u64 rx_csum_unnecessary_inner;
 	u64 rx_xdp_drop;
 	u64 rx_xdp_redirect;
@@ -179,11 +182,14 @@ struct mlx5e_rq_stats {
 	u64 packets;
 	u64 bytes;
 	u64 csum_complete;
+	u64 csum_complete_tail;
+	u64 csum_complete_tail_slow;
 	u64 csum_unnecessary;
 	u64 csum_unnecessary_inner;
 	u64 csum_none;
 	u64 lro_packets;
 	u64 lro_bytes;
+	u64 ecn_mark;
 	u64 removed_vlan_packets;
 	u64 xdp_drop;
 	u64 xdp_redirect;
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/net/wireless/intel/iwlwifi/mvm/rs.c linux-libre-4.19.76-gnu/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
--- linux-libre-4.19.75-gnu/drivers/net/wireless/intel/iwlwifi/mvm/rs.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/net/wireless/intel/iwlwifi/mvm/rs.c	2019-10-01 02:26:13.000000000 -0400
@@ -4113,7 +4113,7 @@ void iwl_mvm_rs_rate_init(struct iwl_mvm
 			  enum nl80211_band band, bool update)
 {
 	if (iwl_mvm_has_tlc_offload(mvm))
-		rs_fw_rate_init(mvm, sta, band);
+		rs_fw_rate_init(mvm, sta, band, update);
 	else
 		rs_drv_rate_init(mvm, sta, band, update);
 }
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c linux-libre-4.19.76-gnu/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c
--- linux-libre-4.19.75-gnu/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c	2019-10-01 02:26:13.000000000 -0400
@@ -315,7 +315,7 @@ out:
 }
 
 void rs_fw_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
-		     enum nl80211_band band)
+		     enum nl80211_band band, bool update)
 {
 	struct ieee80211_hw *hw = mvm->hw;
 	struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
@@ -324,7 +324,8 @@ void rs_fw_rate_init(struct iwl_mvm *mvm
 	struct ieee80211_supported_band *sband;
 	struct iwl_tlc_config_cmd cfg_cmd = {
 		.sta_id = mvmsta->sta_id,
-		.max_ch_width = rs_fw_bw_from_sta_bw(sta),
+		.max_ch_width = update ?
+			rs_fw_bw_from_sta_bw(sta) : RATE_MCS_CHAN_WIDTH_20,
 		.flags = cpu_to_le16(rs_fw_set_config_flags(mvm, sta)),
 		.chains = rs_fw_set_active_chains(iwl_mvm_get_valid_tx_ant(mvm)),
 		.max_mpdu_len = cpu_to_le16(sta->max_amsdu_len),
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/net/wireless/intel/iwlwifi/mvm/rs.h linux-libre-4.19.76-gnu/drivers/net/wireless/intel/iwlwifi/mvm/rs.h
--- linux-libre-4.19.75-gnu/drivers/net/wireless/intel/iwlwifi/mvm/rs.h	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/net/wireless/intel/iwlwifi/mvm/rs.h	2019-10-01 02:26:13.000000000 -0400
@@ -461,7 +461,7 @@ void rs_remove_sta_debugfs(void *mvm, vo
 
 void iwl_mvm_rs_add_sta(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvmsta);
 void rs_fw_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
-		     enum nl80211_band band);
+		     enum nl80211_band band, bool update);
 int rs_fw_tx_protection(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvmsta,
 			bool enable);
 void iwl_mvm_tlc_update_notif(struct iwl_mvm *mvm,
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/net/wireless/intel/iwlwifi/mvm/tx.c linux-libre-4.19.76-gnu/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
--- linux-libre-4.19.75-gnu/drivers/net/wireless/intel/iwlwifi/mvm/tx.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/net/wireless/intel/iwlwifi/mvm/tx.c	2019-10-01 02:26:13.000000000 -0400
@@ -671,7 +671,7 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mv
 		if (info.control.vif->type == NL80211_IFTYPE_P2P_DEVICE ||
 		    info.control.vif->type == NL80211_IFTYPE_AP ||
 		    info.control.vif->type == NL80211_IFTYPE_ADHOC) {
-			if (info.control.vif->type == NL80211_IFTYPE_P2P_DEVICE)
+			if (!ieee80211_is_data(hdr->frame_control))
 				sta_id = mvmvif->bcast_sta.sta_id;
 			else
 				sta_id = mvmvif->mcast_sta.sta_id;
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/pci/controller/pci-hyperv.c linux-libre-4.19.76-gnu/drivers/pci/controller/pci-hyperv.c
--- linux-libre-4.19.75-gnu/drivers/pci/controller/pci-hyperv.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/pci/controller/pci-hyperv.c	2019-10-01 02:26:13.000000000 -0400
@@ -2706,8 +2706,8 @@ static int hv_pci_remove(struct hv_devic
 		/* Remove the bus from PCI's point of view. */
 		pci_lock_rescan_remove();
 		pci_stop_root_bus(hbus->pci_bus);
-		pci_remove_root_bus(hbus->pci_bus);
 		hv_pci_remove_slots(hbus);
+		pci_remove_root_bus(hbus->pci_bus);
 		pci_unlock_rescan_remove();
 		hbus->state = hv_pcibus_removed;
 	}
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/pinctrl/sprd/pinctrl-sprd.c linux-libre-4.19.76-gnu/drivers/pinctrl/sprd/pinctrl-sprd.c
--- linux-libre-4.19.75-gnu/drivers/pinctrl/sprd/pinctrl-sprd.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/pinctrl/sprd/pinctrl-sprd.c	2019-10-01 02:26:13.000000000 -0400
@@ -159,10 +159,8 @@ struct sprd_pinctrl {
 	struct sprd_pinctrl_soc_info *info;
 };
 
-enum sprd_pinconf_params {
-	SPRD_PIN_CONFIG_CONTROL = PIN_CONFIG_END + 1,
-	SPRD_PIN_CONFIG_SLEEP_MODE = PIN_CONFIG_END + 2,
-};
+#define SPRD_PIN_CONFIG_CONTROL		(PIN_CONFIG_END + 1)
+#define SPRD_PIN_CONFIG_SLEEP_MODE	(PIN_CONFIG_END + 2)
 
 static int sprd_pinctrl_get_id_by_name(struct sprd_pinctrl *sprd_pctl,
 				       const char *name)
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/power/supply/power_supply_sysfs.c linux-libre-4.19.76-gnu/drivers/power/supply/power_supply_sysfs.c
--- linux-libre-4.19.75-gnu/drivers/power/supply/power_supply_sysfs.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/power/supply/power_supply_sysfs.c	2019-10-01 02:26:13.000000000 -0400
@@ -131,7 +131,8 @@ static ssize_t power_supply_show_propert
 				dev_dbg(dev, "driver has no data for `%s' property\n",
 					attr->attr.name);
 			else if (ret != -ENODEV && ret != -EAGAIN)
-				dev_err(dev, "driver failed to report `%s' property: %zd\n",
+				dev_err_ratelimited(dev,
+					"driver failed to report `%s' property: %zd\n",
 					attr->attr.name, ret);
 			return ret;
 		}
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/scsi/qla2xxx/qla_gs.c linux-libre-4.19.76-gnu/drivers/scsi/qla2xxx/qla_gs.c
--- linux-libre-4.19.75-gnu/drivers/scsi/qla2xxx/qla_gs.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/scsi/qla2xxx/qla_gs.c	2019-10-01 02:26:13.000000000 -0400
@@ -4045,6 +4045,41 @@ out:
 	}
 }
 
+static int qla2x00_post_gnnft_gpnft_done_work(struct scsi_qla_host *vha,
+    srb_t *sp, int cmd)
+{
+	struct qla_work_evt *e;
+
+	if (cmd != QLA_EVT_GPNFT_DONE && cmd != QLA_EVT_GNNFT_DONE)
+		return QLA_PARAMETER_ERROR;
+
+	e = qla2x00_alloc_work(vha, cmd);
+	if (!e)
+		return QLA_FUNCTION_FAILED;
+
+	e->u.iosb.sp = sp;
+
+	return qla2x00_post_work(vha, e);
+}
+
+static int qla2x00_post_nvme_gpnft_done_work(struct scsi_qla_host *vha,
+    srb_t *sp, int cmd)
+{
+	struct qla_work_evt *e;
+
+	if (cmd != QLA_EVT_GPNFT)
+		return QLA_PARAMETER_ERROR;
+
+	e = qla2x00_alloc_work(vha, cmd);
+	if (!e)
+		return QLA_FUNCTION_FAILED;
+
+	e->u.gpnft.fc4_type = FC4_TYPE_NVME;
+	e->u.gpnft.sp = sp;
+
+	return qla2x00_post_work(vha, e);
+}
+
 static void qla2x00_find_free_fcp_nvme_slot(struct scsi_qla_host *vha,
 	struct srb *sp)
 {
@@ -4145,22 +4180,36 @@ static void qla2x00_async_gpnft_gnnft_sp
 {
 	struct srb *sp = s;
 	struct scsi_qla_host *vha = sp->vha;
-	struct qla_work_evt *e;
 	struct ct_sns_req *ct_req =
 		(struct ct_sns_req *)sp->u.iocb_cmd.u.ctarg.req;
 	u16 cmd = be16_to_cpu(ct_req->command);
 	u8 fc4_type = sp->gen2;
 	unsigned long flags;
+	int rc;
 
 	/* gen2 field is holding the fc4type */
 	ql_dbg(ql_dbg_disc, vha, 0xffff,
 	    "Async done-%s res %x FC4Type %x\n",
 	    sp->name, res, sp->gen2);
 
+	sp->rc = res;
 	if (res) {
 		unsigned long flags;
+		const char *name = sp->name;
+
+		/*
+		 * We are in an Interrupt context, queue up this
+		 * sp for GNNFT_DONE work. This will allow all
+		 * the resource to get freed up.
+		 */
+		rc = qla2x00_post_gnnft_gpnft_done_work(vha, sp,
+		    QLA_EVT_GNNFT_DONE);
+		if (rc) {
+			/* Cleanup here to prevent memory leak */
+			qla24xx_sp_unmap(vha, sp);
+			sp->free(sp);
+		}
 
-		sp->free(sp);
 		spin_lock_irqsave(&vha->work_lock, flags);
 		vha->scan.scan_flags &= ~SF_SCANNING;
 		vha->scan.scan_retry++;
@@ -4171,9 +4220,9 @@ static void qla2x00_async_gpnft_gnnft_sp
 			set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);
 			qla2xxx_wake_dpc(vha);
 		} else {
-			ql_dbg(ql_dbg_disc, sp->vha, 0xffff,
-			    "Async done-%s rescan failed on all retries\n",
-			    sp->name);
+			ql_dbg(ql_dbg_disc, vha, 0xffff,
+			    "Async done-%s rescan failed on all retries.\n",
+			    name);
 		}
 		return;
 	}
@@ -4188,77 +4237,31 @@ static void qla2x00_async_gpnft_gnnft_sp
 		vha->scan.scan_flags &= ~SF_SCANNING;
 		spin_unlock_irqrestore(&vha->work_lock, flags);
 
-		e = qla2x00_alloc_work(vha, QLA_EVT_GPNFT);
-		if (!e) {
-			/*
-			 * please ignore kernel warning. Otherwise,
-			 * we have mem leak.
-			 */
-			if (sp->u.iocb_cmd.u.ctarg.req) {
-				dma_free_coherent(&vha->hw->pdev->dev,
-				    sp->u.iocb_cmd.u.ctarg.req_allocated_size,
-				    sp->u.iocb_cmd.u.ctarg.req,
-				    sp->u.iocb_cmd.u.ctarg.req_dma);
-				sp->u.iocb_cmd.u.ctarg.req = NULL;
-			}
-			if (sp->u.iocb_cmd.u.ctarg.rsp) {
-				dma_free_coherent(&vha->hw->pdev->dev,
-				    sp->u.iocb_cmd.u.ctarg.rsp_allocated_size,
-				    sp->u.iocb_cmd.u.ctarg.rsp,
-				    sp->u.iocb_cmd.u.ctarg.rsp_dma);
-				sp->u.iocb_cmd.u.ctarg.rsp = NULL;
-			}
-
-			ql_dbg(ql_dbg_disc, vha, 0xffff,
-			    "Async done-%s unable to alloc work element\n",
-			    sp->name);
-			sp->free(sp);
+		sp->rc = res;
+		rc = qla2x00_post_nvme_gpnft_done_work(vha, sp, QLA_EVT_GPNFT);
+		if (!rc) {
+			qla24xx_sp_unmap(vha, sp);
 			set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags);
 			set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);
 			return;
 		}
-		e->u.gpnft.fc4_type = FC4_TYPE_NVME;
-		sp->rc = res;
-		e->u.gpnft.sp = sp;
-
-		qla2x00_post_work(vha, e);
-		return;
 	}
 
-	if (cmd == GPN_FT_CMD)
-		e = qla2x00_alloc_work(vha, QLA_EVT_GPNFT_DONE);
-	else
-		e = qla2x00_alloc_work(vha, QLA_EVT_GNNFT_DONE);
-	if (!e) {
-		/* please ignore kernel warning. Otherwise, we have mem leak. */
-		if (sp->u.iocb_cmd.u.ctarg.req) {
-			dma_free_coherent(&vha->hw->pdev->dev,
-			    sp->u.iocb_cmd.u.ctarg.req_allocated_size,
-			    sp->u.iocb_cmd.u.ctarg.req,
-			    sp->u.iocb_cmd.u.ctarg.req_dma);
-			sp->u.iocb_cmd.u.ctarg.req = NULL;
-		}
-		if (sp->u.iocb_cmd.u.ctarg.rsp) {
-			dma_free_coherent(&vha->hw->pdev->dev,
-			    sp->u.iocb_cmd.u.ctarg.rsp_allocated_size,
-			    sp->u.iocb_cmd.u.ctarg.rsp,
-			    sp->u.iocb_cmd.u.ctarg.rsp_dma);
-			sp->u.iocb_cmd.u.ctarg.rsp = NULL;
-		}
+	if (cmd == GPN_FT_CMD) {
+		del_timer(&sp->u.iocb_cmd.timer);
+		rc = qla2x00_post_gnnft_gpnft_done_work(vha, sp,
+		    QLA_EVT_GPNFT_DONE);
+	} else {
+		rc = qla2x00_post_gnnft_gpnft_done_work(vha, sp,
+		    QLA_EVT_GNNFT_DONE);
+	}
 
-		ql_dbg(ql_dbg_disc, vha, 0xffff,
-		    "Async done-%s unable to alloc work element\n",
-		    sp->name);
-		sp->free(sp);
+	if (rc) {
+		qla24xx_sp_unmap(vha, sp);
 		set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags);
 		set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);
 		return;
 	}
-
-	sp->rc = res;
-	e->u.iosb.sp = sp;
-
-	qla2x00_post_work(vha, e);
 }
 
 /*
@@ -4357,7 +4360,6 @@ void qla24xx_async_gpnft_done(scsi_qla_h
 {
 	ql_dbg(ql_dbg_disc, vha, 0xffff,
 	    "%s enter\n", __func__);
-	del_timer(&sp->u.iocb_cmd.timer);
 	qla24xx_async_gnnft(vha, sp, sp->gen2);
 }
 
diff -druNp --no-dereference linux-libre-4.19.75-gnu/drivers/scsi/qla2xxx/qla_init.c linux-libre-4.19.76-gnu/drivers/scsi/qla2xxx/qla_init.c
--- linux-libre-4.19.75-gnu/drivers/scsi/qla2xxx/qla_init.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/drivers/scsi/qla2xxx/qla_init.c	2019-10-01 02:26:13.000000000 -0400
@@ -54,7 +54,7 @@ qla2x00_sp_timeout(struct timer_list *t)
 	unsigned long flags;
 	struct qla_hw_data *ha = sp->vha->hw;
 
-	WARN_ON(irqs_disabled());
+	WARN_ON_ONCE(irqs_disabled());
 	spin_lock_irqsave(&ha->hardware_lock, flags);
 	req = sp->qpair->req;
 	req->outstanding_cmds[sp->handle] = NULL;
@@ -796,6 +796,9 @@ qla24xx_async_gnl_sp_done(void *s, int r
 	    sp->name, res, sp->u.iocb_cmd.u.mbx.in_mb[1],
 	    sp->u.iocb_cmd.u.mbx.in_mb[2]);
 
+	if (res == QLA_FUNCTION_TIMEOUT)
+		return;
+
 	memset(&ea, 0, sizeof(ea));
 	ea.sp = sp;
 	ea.rc = res;
@@ -979,17 +982,13 @@ void qla24xx_async_gpdb_sp_done(void *s,
 	    "Async done-%s res %x, WWPN %8phC mb[1]=%x mb[2]=%x \n",
 	    sp->name, res, fcport->port_name, mb[1], mb[2]);
 
-	fcport->flags &= ~(FCF_ASYNC_SENT | FCF_ASYNC_ACTIVE);
-
-	if (res == QLA_FUNCTION_TIMEOUT)
-		return;
-
 	if (res == QLA_FUNCTION_TIMEOUT) {
 		dma_pool_free(sp->vha->hw->s_dma_pool, sp->u.iocb_cmd.u.mbx.in,
 			sp->u.iocb_cmd.u.mbx.in_dma);
 		return;
 	}
 
+	fcport->flags &= ~(FCF_ASYNC_SENT | FCF_ASYNC_ACTIVE);
 	memset(&ea, 0, sizeof(ea));
 	ea.event = FCME_GPDB_DONE;
 	ea.fcport = fcport;
diff -druNp --no-dereference linux-libre-4.19.75-gnu/fs/cifs/smb2ops.c linux-libre-4.19.76-gnu/fs/cifs/smb2ops.c
--- linux-libre-4.19.75-gnu/fs/cifs/smb2ops.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/fs/cifs/smb2ops.c	2019-10-01 02:26:13.000000000 -0400
@@ -553,7 +553,50 @@ int open_shroot(unsigned int xid, struct
 	oparams.fid = pfid;
 	oparams.reconnect = false;
 
+	/*
+	 * We do not hold the lock for the open because in case
+	 * SMB2_open needs to reconnect, it will end up calling
+	 * cifs_mark_open_files_invalid() which takes the lock again
+	 * thus causing a deadlock
+	 */
+	mutex_unlock(&tcon->crfid.fid_mutex);
 	rc = SMB2_open(xid, &oparams, &srch_path, &oplock, NULL, NULL, NULL);
+	mutex_lock(&tcon->crfid.fid_mutex);
+
+	/*
+	 * Now we need to check again as the cached root might have
+	 * been successfully re-opened from a concurrent process
+	 */
+
+	if (tcon->crfid.is_valid) {
+		/* work was already done */
+
+		/* stash fids for close() later */
+		struct cifs_fid fid = {
+			.persistent_fid = pfid->persistent_fid,
+			.volatile_fid = pfid->volatile_fid,
+		};
+
+		/*
+		 * Caller expects this func to set pfid to a valid
+		 * cached root, so we copy the existing one and get a
+		 * reference
+		 */
+		memcpy(pfid, tcon->crfid.fid, sizeof(*pfid));
+		kref_get(&tcon->crfid.refcount);
+
+		mutex_unlock(&tcon->crfid.fid_mutex);
+
+		if (rc == 0) {
+			/* close extra handle outside of critical section */
+			SMB2_close(xid, tcon, fid.persistent_fid,
+				   fid.volatile_fid);
+		}
+		return 0;
+	}
+
+	/* Cached root is still invalid, continue normaly */
+
 	if (rc == 0) {
 		memcpy(tcon->crfid.fid, pfid, sizeof(struct cifs_fid));
 		tcon->crfid.tcon = tcon;
@@ -561,6 +604,7 @@ int open_shroot(unsigned int xid, struct
 		kref_init(&tcon->crfid.refcount);
 		kref_get(&tcon->crfid.refcount);
 	}
+
 	mutex_unlock(&tcon->crfid.fid_mutex);
 	return rc;
 }
diff -druNp --no-dereference linux-libre-4.19.75-gnu/fs/f2fs/checkpoint.c linux-libre-4.19.76-gnu/fs/f2fs/checkpoint.c
--- linux-libre-4.19.75-gnu/fs/f2fs/checkpoint.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/fs/f2fs/checkpoint.c	2019-10-01 02:26:13.000000000 -0400
@@ -849,6 +849,7 @@ int f2fs_get_valid_checkpoint(struct f2f
 	unsigned int cp_blks = 1 + __cp_payload(sbi);
 	block_t cp_blk_no;
 	int i;
+	int err;
 
 	sbi->ckpt = f2fs_kzalloc(sbi, array_size(blk_size, cp_blks),
 				 GFP_KERNEL);
@@ -876,6 +877,7 @@ int f2fs_get_valid_checkpoint(struct f2f
 	} else if (cp2) {
 		cur_page = cp2;
 	} else {
+		err = -EFSCORRUPTED;
 		goto fail_no_cp;
 	}
 
@@ -888,8 +890,10 @@ int f2fs_get_valid_checkpoint(struct f2f
 		sbi->cur_cp_pack = 2;
 
 	/* Sanity checking of checkpoint */
-	if (f2fs_sanity_check_ckpt(sbi))
+	if (f2fs_sanity_check_ckpt(sbi)) {
+		err = -EFSCORRUPTED;
 		goto free_fail_no_cp;
+	}
 
 	if (cp_blks <= 1)
 		goto done;
@@ -903,8 +907,10 @@ int f2fs_get_valid_checkpoint(struct f2f
 		unsigned char *ckpt = (unsigned char *)sbi->ckpt;
 
 		cur_page = f2fs_get_meta_page(sbi, cp_blk_no + i);
-		if (IS_ERR(cur_page))
+		if (IS_ERR(cur_page)) {
+			err = PTR_ERR(cur_page);
 			goto free_fail_no_cp;
+		}
 		sit_bitmap_ptr = page_address(cur_page);
 		memcpy(ckpt + i * blk_size, sit_bitmap_ptr, blk_size);
 		f2fs_put_page(cur_page, 1);
@@ -919,7 +925,7 @@ free_fail_no_cp:
 	f2fs_put_page(cp2, 1);
 fail_no_cp:
 	kfree(sbi->ckpt);
-	return -EINVAL;
+	return err;
 }
 
 static void __add_dirty_inode(struct inode *inode, enum inode_type type)
diff -druNp --no-dereference linux-libre-4.19.75-gnu/fs/f2fs/data.c linux-libre-4.19.76-gnu/fs/f2fs/data.c
--- linux-libre-4.19.75-gnu/fs/f2fs/data.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/fs/f2fs/data.c	2019-10-01 02:26:13.000000000 -0400
@@ -449,7 +449,7 @@ int f2fs_submit_page_bio(struct f2fs_io_
 
 	if (!f2fs_is_valid_blkaddr(fio->sbi, fio->new_blkaddr,
 			__is_meta_io(fio) ? META_GENERIC : DATA_GENERIC))
-		return -EFAULT;
+		return -EFSCORRUPTED;
 
 	trace_f2fs_submit_page_bio(page, fio);
 	f2fs_trace_ios(fio, 0);
@@ -1071,7 +1071,7 @@ next_block:
 
 	if (__is_valid_data_blkaddr(blkaddr) &&
 		!f2fs_is_valid_blkaddr(sbi, blkaddr, DATA_GENERIC)) {
-		err = -EFAULT;
+		err = -EFSCORRUPTED;
 		goto sync_out;
 	}
 
@@ -1755,7 +1755,7 @@ int f2fs_do_write_data_page(struct f2fs_
 
 		if (!f2fs_is_valid_blkaddr(fio->sbi, fio->old_blkaddr,
 							DATA_GENERIC))
-			return -EFAULT;
+			return -EFSCORRUPTED;
 
 		ipu_force = true;
 		fio->need_lock = LOCK_DONE;
@@ -1781,7 +1781,7 @@ got_it:
 	if (__is_valid_data_blkaddr(fio->old_blkaddr) &&
 		!f2fs_is_valid_blkaddr(fio->sbi, fio->old_blkaddr,
 							DATA_GENERIC)) {
-		err = -EFAULT;
+		err = -EFSCORRUPTED;
 		goto out_writepage;
 	}
 	/*
diff -druNp --no-dereference linux-libre-4.19.75-gnu/fs/f2fs/f2fs.h linux-libre-4.19.76-gnu/fs/f2fs/f2fs.h
--- linux-libre-4.19.75-gnu/fs/f2fs/f2fs.h	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/fs/f2fs/f2fs.h	2019-10-01 02:26:13.000000000 -0400
@@ -3487,3 +3487,7 @@ extern void f2fs_build_fault_attr(struct
 #endif
 
 #endif
+
+#define EFSBADCRC	EBADMSG		/* Bad CRC detected */
+#define EFSCORRUPTED	EUCLEAN		/* Filesystem is corrupted */
+
diff -druNp --no-dereference linux-libre-4.19.75-gnu/fs/f2fs/gc.c linux-libre-4.19.76-gnu/fs/f2fs/gc.c
--- linux-libre-4.19.75-gnu/fs/f2fs/gc.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/fs/f2fs/gc.c	2019-10-01 02:26:13.000000000 -0400
@@ -636,7 +636,7 @@ static int ra_data_block(struct inode *i
 
 	if (unlikely(!f2fs_is_valid_blkaddr(sbi, dn.data_blkaddr,
 						DATA_GENERIC))) {
-		err = -EFAULT;
+		err = -EFSCORRUPTED;
 		goto put_page;
 	}
 got_it:
diff -druNp --no-dereference linux-libre-4.19.75-gnu/fs/f2fs/inline.c linux-libre-4.19.76-gnu/fs/f2fs/inline.c
--- linux-libre-4.19.75-gnu/fs/f2fs/inline.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/fs/f2fs/inline.c	2019-10-01 02:26:13.000000000 -0400
@@ -146,7 +146,7 @@ int f2fs_convert_inline_page(struct dnod
 			"%s: corrupted inline inode ino=%lx, i_addr[0]:0x%x, "
 			"run fsck to fix.",
 			__func__, dn->inode->i_ino, dn->data_blkaddr);
-		return -EINVAL;
+		return -EFSCORRUPTED;
 	}
 
 	f2fs_bug_on(F2FS_P_SB(page), PageWriteback(page));
@@ -389,7 +389,7 @@ static int f2fs_move_inline_dirents(stru
 			"%s: corrupted inline inode ino=%lx, i_addr[0]:0x%x, "
 			"run fsck to fix.",
 			__func__, dir->i_ino, dn.data_blkaddr);
-		err = -EINVAL;
+		err = -EFSCORRUPTED;
 		goto out;
 	}
 
diff -druNp --no-dereference linux-libre-4.19.75-gnu/fs/f2fs/inode.c linux-libre-4.19.76-gnu/fs/f2fs/inode.c
--- linux-libre-4.19.75-gnu/fs/f2fs/inode.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/fs/f2fs/inode.c	2019-10-01 02:26:13.000000000 -0400
@@ -76,7 +76,7 @@ static int __written_first_block(struct
 	if (!__is_valid_data_blkaddr(addr))
 		return 1;
 	if (!f2fs_is_valid_blkaddr(sbi, addr, DATA_GENERIC))
-		return -EFAULT;
+		return -EFSCORRUPTED;
 	return 0;
 }
 
@@ -361,7 +361,7 @@ static int do_read_inode(struct inode *i
 
 	if (!sanity_check_inode(inode, node_page)) {
 		f2fs_put_page(node_page, 1);
-		return -EINVAL;
+		return -EFSCORRUPTED;
 	}
 
 	/* check data exist */
diff -druNp --no-dereference linux-libre-4.19.75-gnu/fs/f2fs/node.c linux-libre-4.19.76-gnu/fs/f2fs/node.c
--- linux-libre-4.19.75-gnu/fs/f2fs/node.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/fs/f2fs/node.c	2019-10-01 02:26:13.000000000 -0400
@@ -40,7 +40,7 @@ int f2fs_check_nid_range(struct f2fs_sb_
 		f2fs_msg(sbi->sb, KERN_WARNING,
 				"%s: out-of-range nid=%x, run fsck to fix.",
 				__func__, nid);
-		return -EINVAL;
+		return -EFSCORRUPTED;
 	}
 	return 0;
 }
@@ -1284,7 +1284,7 @@ static int read_node_page(struct page *p
 	if (PageUptodate(page)) {
 		if (!f2fs_inode_chksum_verify(sbi, page)) {
 			ClearPageUptodate(page);
-			return -EBADMSG;
+			return -EFSBADCRC;
 		}
 		return LOCKED_PAGE;
 	}
@@ -1370,7 +1370,7 @@ repeat:
 	}
 
 	if (!f2fs_inode_chksum_verify(sbi, page)) {
-		err = -EBADMSG;
+		err = -EFSBADCRC;
 		goto out_err;
 	}
 page_hit:
diff -druNp --no-dereference linux-libre-4.19.75-gnu/fs/f2fs/recovery.c linux-libre-4.19.76-gnu/fs/f2fs/recovery.c
--- linux-libre-4.19.75-gnu/fs/f2fs/recovery.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/fs/f2fs/recovery.c	2019-10-01 02:26:13.000000000 -0400
@@ -491,7 +491,7 @@ retry_dn:
 			"Inconsistent ofs_of_node, ino:%lu, ofs:%u, %u",
 			inode->i_ino, ofs_of_node(dn.node_page),
 			ofs_of_node(page));
-		err = -EFAULT;
+		err = -EFSCORRUPTED;
 		goto err;
 	}
 
diff -druNp --no-dereference linux-libre-4.19.75-gnu/fs/f2fs/segment.c linux-libre-4.19.76-gnu/fs/f2fs/segment.c
--- linux-libre-4.19.75-gnu/fs/f2fs/segment.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/fs/f2fs/segment.c	2019-10-01 02:26:13.000000000 -0400
@@ -2657,7 +2657,7 @@ int f2fs_trim_fs(struct f2fs_sb_info *sb
 	if (is_sbi_flag_set(sbi, SBI_NEED_FSCK)) {
 		f2fs_msg(sbi->sb, KERN_WARNING,
 			"Found FS corruption, run fsck to fix.");
-		return -EIO;
+		return -EFSCORRUPTED;
 	}
 
 	/* start/end segment number in main_area */
@@ -3079,7 +3079,7 @@ int f2fs_inplace_write_data(struct f2fs_
 
 	if (!IS_DATASEG(get_seg_entry(sbi, segno)->type)) {
 		set_sbi_flag(sbi, SBI_NEED_FSCK);
-		return -EFAULT;
+		return -EFSCORRUPTED;
 	}
 
 	stat_inc_inplace_blocks(fio->sbi);
@@ -3261,11 +3261,6 @@ static int read_compacted_summaries(stru
 		seg_i = CURSEG_I(sbi, i);
 		segno = le32_to_cpu(ckpt->cur_data_segno[i]);
 		blk_off = le16_to_cpu(ckpt->cur_data_blkoff[i]);
-		if (blk_off > ENTRIES_IN_SUM) {
-			f2fs_bug_on(sbi, 1);
-			f2fs_put_page(page, 1);
-			return -EFAULT;
-		}
 		seg_i->next_segno = segno;
 		reset_curseg(sbi, i, 0);
 		seg_i->alloc_type = ckpt->alloc_type[i];
@@ -3971,7 +3966,7 @@ static int build_sit_entries(struct f2fs
 					"Wrong journal entry on segno %u",
 					start);
 			set_sbi_flag(sbi, SBI_NEED_FSCK);
-			err = -EINVAL;
+			err = -EFSCORRUPTED;
 			break;
 		}
 
@@ -4012,7 +4007,7 @@ static int build_sit_entries(struct f2fs
 			"SIT is corrupted node# %u vs %u",
 			total_node_blocks, valid_node_count(sbi));
 		set_sbi_flag(sbi, SBI_NEED_FSCK);
-		err = -EINVAL;
+		err = -EFSCORRUPTED;
 	}
 
 	return err;
@@ -4103,6 +4098,41 @@ static int build_dirty_segmap(struct f2f
 	return init_victim_secmap(sbi);
 }
 
+static int sanity_check_curseg(struct f2fs_sb_info *sbi)
+{
+	int i;
+
+	/*
+	 * In LFS/SSR curseg, .next_blkoff should point to an unused blkaddr;
+	 * In LFS curseg, all blkaddr after .next_blkoff should be unused.
+	 */
+	for (i = 0; i < NO_CHECK_TYPE; i++) {
+		struct curseg_info *curseg = CURSEG_I(sbi, i);
+		struct seg_entry *se = get_seg_entry(sbi, curseg->segno);
+		unsigned int blkofs = curseg->next_blkoff;
+
+		if (f2fs_test_bit(blkofs, se->cur_valid_map))
+			goto out;
+
+		if (curseg->alloc_type == SSR)
+			continue;
+
+		for (blkofs += 1; blkofs < sbi->blocks_per_seg; blkofs++) {
+			if (!f2fs_test_bit(blkofs, se->cur_valid_map))
+				continue;
+out:
+			f2fs_msg(sbi->sb, KERN_ERR,
+				"Current segment's next free block offset is "
+				"inconsistent with bitmap, logtype:%u, "
+				"segno:%u, type:%u, next_blkoff:%u, blkofs:%u",
+				i, curseg->segno, curseg->alloc_type,
+				curseg->next_blkoff, blkofs);
+			return -EFSCORRUPTED;
+		}
+	}
+	return 0;
+}
+
 /*
  * Update min, max modified time for cost-benefit GC algorithm
  */
@@ -4198,6 +4228,10 @@ int f2fs_build_segment_manager(struct f2
 	if (err)
 		return err;
 
+	err = sanity_check_curseg(sbi);
+	if (err)
+		return err;
+
 	init_min_max_mtime(sbi);
 	return 0;
 }
diff -druNp --no-dereference linux-libre-4.19.75-gnu/fs/f2fs/segment.h linux-libre-4.19.76-gnu/fs/f2fs/segment.h
--- linux-libre-4.19.75-gnu/fs/f2fs/segment.h	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/fs/f2fs/segment.h	2019-10-01 02:26:13.000000000 -0400
@@ -684,7 +684,7 @@ static inline int check_block_count(stru
 				"Mismatch valid blocks %d vs. %d",
 					GET_SIT_VBLOCKS(raw_sit), valid_blocks);
 		set_sbi_flag(sbi, SBI_NEED_FSCK);
-		return -EINVAL;
+		return -EFSCORRUPTED;
 	}
 
 	/* check segment usage, and check boundary of a given segment number */
@@ -694,7 +694,7 @@ static inline int check_block_count(stru
 				"Wrong valid blocks %d or segno %u",
 					GET_SIT_VBLOCKS(raw_sit), segno);
 		set_sbi_flag(sbi, SBI_NEED_FSCK);
-		return -EINVAL;
+		return -EFSCORRUPTED;
 	}
 	return 0;
 }
diff -druNp --no-dereference linux-libre-4.19.75-gnu/fs/f2fs/super.c linux-libre-4.19.76-gnu/fs/f2fs/super.c
--- linux-libre-4.19.75-gnu/fs/f2fs/super.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/fs/f2fs/super.c	2019-10-01 02:26:13.000000000 -0400
@@ -2413,11 +2413,11 @@ int f2fs_sanity_check_ckpt(struct f2fs_s
 		}
 	}
 	for (i = 0; i < NR_CURSEG_NODE_TYPE; i++) {
-		for (j = i; j < NR_CURSEG_DATA_TYPE; j++) {
+		for (j = 0; j < NR_CURSEG_DATA_TYPE; j++) {
 			if (le32_to_cpu(ckpt->cur_node_segno[i]) ==
 				le32_to_cpu(ckpt->cur_data_segno[j])) {
 				f2fs_msg(sbi->sb, KERN_ERR,
-					"Data segment (%u) and Data segment (%u)"
+					"Node segment (%u) and Data segment (%u)"
 					" has the same segno: %u", i, j,
 					le32_to_cpu(ckpt->cur_node_segno[i]));
 				return 1;
@@ -2616,7 +2616,7 @@ static int read_raw_super_block(struct f
 			f2fs_msg(sb, KERN_ERR,
 				"Can't find valid F2FS filesystem in %dth superblock",
 				block + 1);
-			err = -EINVAL;
+			err = -EFSCORRUPTED;
 			brelse(bh);
 			continue;
 		}
diff -druNp --no-dereference linux-libre-4.19.75-gnu/fs/f2fs/xattr.c linux-libre-4.19.76-gnu/fs/f2fs/xattr.c
--- linux-libre-4.19.75-gnu/fs/f2fs/xattr.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/fs/f2fs/xattr.c	2019-10-01 02:26:13.000000000 -0400
@@ -349,7 +349,7 @@ static int lookup_all_xattrs(struct inod
 
 	*xe = __find_xattr(cur_addr, last_txattr_addr, index, len, name);
 	if (!*xe) {
-		err = -EFAULT;
+		err = -EFSCORRUPTED;
 		goto out;
 	}
 check:
@@ -625,7 +625,7 @@ static int __f2fs_setxattr(struct inode
 	/* find entry with wanted name. */
 	here = __find_xattr(base_addr, last_base_addr, index, len, name);
 	if (!here) {
-		error = -EFAULT;
+		error = -EFSCORRUPTED;
 		goto exit;
 	}
 
diff -druNp --no-dereference linux-libre-4.19.75-gnu/fs/xfs/libxfs/xfs_bmap.c linux-libre-4.19.76-gnu/fs/xfs/libxfs/xfs_bmap.c
--- linux-libre-4.19.75-gnu/fs/xfs/libxfs/xfs_bmap.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/fs/xfs/libxfs/xfs_bmap.c	2019-10-01 02:26:13.000000000 -0400
@@ -3841,15 +3841,28 @@ xfs_bmapi_read(
 	XFS_STATS_INC(mp, xs_blk_mapr);
 
 	ifp = XFS_IFORK_PTR(ip, whichfork);
+	if (!ifp) {
+		/* No CoW fork?  Return a hole. */
+		if (whichfork == XFS_COW_FORK) {
+			mval->br_startoff = bno;
+			mval->br_startblock = HOLESTARTBLOCK;
+			mval->br_blockcount = len;
+			mval->br_state = XFS_EXT_NORM;
+			*nmap = 1;
+			return 0;
+		}
 
-	/* No CoW fork?  Return a hole. */
-	if (whichfork == XFS_COW_FORK && !ifp) {
-		mval->br_startoff = bno;
-		mval->br_startblock = HOLESTARTBLOCK;
-		mval->br_blockcount = len;
-		mval->br_state = XFS_EXT_NORM;
-		*nmap = 1;
-		return 0;
+		/*
+		 * A missing attr ifork implies that the inode says we're in
+		 * extents or btree format but failed to pass the inode fork
+		 * verifier while trying to load it.  Treat that as a file
+		 * corruption too.
+		 */
+#ifdef DEBUG
+		xfs_alert(mp, "%s: inode %llu missing fork %d",
+				__func__, ip->i_ino, whichfork);
+#endif /* DEBUG */
+		return -EFSCORRUPTED;
 	}
 
 	if (!(ifp->if_flags & XFS_IFEXTENTS)) {
diff -druNp --no-dereference linux-libre-4.19.75-gnu/include/rdma/ib_verbs.h linux-libre-4.19.76-gnu/include/rdma/ib_verbs.h
--- linux-libre-4.19.75-gnu/include/rdma/ib_verbs.h	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/include/rdma/ib_verbs.h	2019-10-01 02:26:13.000000000 -0400
@@ -71,6 +71,7 @@
 
 extern struct workqueue_struct *ib_wq;
 extern struct workqueue_struct *ib_comp_wq;
+extern struct workqueue_struct *ib_comp_unbound_wq;
 
 union ib_gid {
 	u8	raw[16];
@@ -1576,9 +1577,10 @@ struct ib_ah {
 typedef void (*ib_comp_handler)(struct ib_cq *cq, void *cq_context);
 
 enum ib_poll_context {
-	IB_POLL_DIRECT,		/* caller context, no hw completions */
-	IB_POLL_SOFTIRQ,	/* poll from softirq context */
-	IB_POLL_WORKQUEUE,	/* poll from workqueue */
+	IB_POLL_DIRECT,		   /* caller context, no hw completions */
+	IB_POLL_SOFTIRQ,	   /* poll from softirq context */
+	IB_POLL_WORKQUEUE,	   /* poll from workqueue */
+	IB_POLL_UNBOUND_WORKQUEUE, /* poll from unbound workqueue */
 };
 
 struct ib_cq {
@@ -1595,6 +1597,7 @@ struct ib_cq {
 		struct irq_poll		iop;
 		struct work_struct	work;
 	};
+	struct workqueue_struct *comp_wq;
 	/*
 	 * Implementation details of the RDMA core, don't use in drivers:
 	 */
diff -druNp --no-dereference linux-libre-4.19.75-gnu/init/initramfs.c linux-libre-4.19.76-gnu/init/initramfs.c
--- linux-libre-4.19.75-gnu/init/initramfs.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/init/initramfs.c	2019-10-01 02:26:13.000000000 -0400
@@ -524,7 +524,7 @@ static void __init free_initrd(void)
 	unsigned long crashk_start = (unsigned long)__va(crashk_res.start);
 	unsigned long crashk_end   = (unsigned long)__va(crashk_res.end);
 #endif
-	if (do_retain_initrd)
+	if (do_retain_initrd || !initrd_start)
 		goto skip;
 
 #ifdef CONFIG_KEXEC_CORE
diff -druNp --no-dereference linux-libre-4.19.75-gnu/kernel/locking/lockdep.c linux-libre-4.19.76-gnu/kernel/locking/lockdep.c
--- linux-libre-4.19.75-gnu/kernel/locking/lockdep.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/kernel/locking/lockdep.c	2019-10-01 02:26:13.000000000 -0400
@@ -3605,6 +3605,9 @@ static int __lock_downgrade(struct lockd
 	unsigned int depth;
 	int i;
 
+	if (unlikely(!debug_locks))
+		return 0;
+
 	depth = curr->lockdep_depth;
 	/*
 	 * This function is about (re)setting the class of a held lock,
diff -druNp --no-dereference linux-libre-4.19.75-gnu/Makefile linux-libre-4.19.76-gnu/Makefile
--- linux-libre-4.19.75-gnu/Makefile	2019-09-21 04:47:33.000000000 -0400
+++ linux-libre-4.19.76-gnu/Makefile	2019-10-01 06:21:18.000000000 -0400
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 4
 PATCHLEVEL = 19
-SUBLEVEL = 75
+SUBLEVEL = 76
 EXTRAVERSION = -gnu
 NAME = "People's Front"
 
diff -druNp --no-dereference linux-libre-4.19.75-gnu/net/bluetooth/hci_event.c linux-libre-4.19.76-gnu/net/bluetooth/hci_event.c
--- linux-libre-4.19.75-gnu/net/bluetooth/hci_event.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/net/bluetooth/hci_event.c	2019-10-01 02:26:13.000000000 -0400
@@ -5545,11 +5545,6 @@ static void hci_le_remote_conn_param_req
 		return send_conn_param_neg_reply(hdev, handle,
 						 HCI_ERROR_UNKNOWN_CONN_ID);
 
-	if (min < hcon->le_conn_min_interval ||
-	    max > hcon->le_conn_max_interval)
-		return send_conn_param_neg_reply(hdev, handle,
-						 HCI_ERROR_INVALID_LL_PARAMS);
-
 	if (hci_check_conn_params(min, max, latency, timeout))
 		return send_conn_param_neg_reply(hdev, handle,
 						 HCI_ERROR_INVALID_LL_PARAMS);
diff -druNp --no-dereference linux-libre-4.19.75-gnu/net/bluetooth/l2cap_core.c linux-libre-4.19.76-gnu/net/bluetooth/l2cap_core.c
--- linux-libre-4.19.75-gnu/net/bluetooth/l2cap_core.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/net/bluetooth/l2cap_core.c	2019-10-01 02:26:13.000000000 -0400
@@ -5287,14 +5287,7 @@ static inline int l2cap_conn_param_updat
 
 	memset(&rsp, 0, sizeof(rsp));
 
-	if (min < hcon->le_conn_min_interval ||
-	    max > hcon->le_conn_max_interval) {
-		BT_DBG("requested connection interval exceeds current bounds.");
-		err = -EINVAL;
-	} else {
-		err = hci_check_conn_params(min, max, latency, to_multiplier);
-	}
-
+	err = hci_check_conn_params(min, max, latency, to_multiplier);
 	if (err)
 		rsp.result = cpu_to_le16(L2CAP_CONN_PARAM_REJECTED);
 	else
diff -druNp --no-dereference linux-libre-4.19.75-gnu/net/ipv4/raw_diag.c linux-libre-4.19.76-gnu/net/ipv4/raw_diag.c
--- linux-libre-4.19.75-gnu/net/ipv4/raw_diag.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/net/ipv4/raw_diag.c	2019-10-01 02:26:13.000000000 -0400
@@ -23,9 +23,6 @@ raw_get_hashinfo(const struct inet_diag_
 		return &raw_v6_hashinfo;
 #endif
 	} else {
-		pr_warn_once("Unexpected inet family %d\n",
-			     r->sdiag_family);
-		WARN_ON_ONCE(1);
 		return ERR_PTR(-EINVAL);
 	}
 }
diff -druNp --no-dereference linux-libre-4.19.75-gnu/net/netfilter/nft_socket.c linux-libre-4.19.76-gnu/net/netfilter/nft_socket.c
--- linux-libre-4.19.75-gnu/net/netfilter/nft_socket.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/net/netfilter/nft_socket.c	2019-10-01 02:26:13.000000000 -0400
@@ -47,9 +47,6 @@ static void nft_socket_eval(const struct
 		return;
 	}
 
-	/* So that subsequent socket matching not to require other lookups. */
-	skb->sk = sk;
-
 	switch(priv->key) {
 	case NFT_SOCKET_TRANSPARENT:
 		nft_reg_store8(dest, inet_sk_transparent(sk));
@@ -66,6 +63,9 @@ static void nft_socket_eval(const struct
 		WARN_ON(1);
 		regs->verdict.code = NFT_BREAK;
 	}
+
+	if (sk != skb->sk)
+		sock_gen_put(sk);
 }
 
 static const struct nla_policy nft_socket_policy[NFTA_SOCKET_MAX + 1] = {
diff -druNp --no-dereference linux-libre-4.19.75-gnu/net/rds/bind.c linux-libre-4.19.76-gnu/net/rds/bind.c
--- linux-libre-4.19.75-gnu/net/rds/bind.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/net/rds/bind.c	2019-10-01 02:26:13.000000000 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2019 Oracle and/or its affiliates. All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -239,34 +239,33 @@ int rds_bind(struct socket *sock, struct
 		goto out;
 	}
 
-	sock_set_flag(sk, SOCK_RCU_FREE);
-	ret = rds_add_bound(rs, binding_addr, &port, scope_id);
-	if (ret)
-		goto out;
-
-	if (rs->rs_transport) { /* previously bound */
+	/* The transport can be set using SO_RDS_TRANSPORT option before the
+	 * socket is bound.
+	 */
+	if (rs->rs_transport) {
 		trans = rs->rs_transport;
-		if (trans->laddr_check(sock_net(sock->sk),
+		if (!trans->laddr_check ||
+		    trans->laddr_check(sock_net(sock->sk),
 				       binding_addr, scope_id) != 0) {
 			ret = -ENOPROTOOPT;
-			rds_remove_bound(rs);
-		} else {
-			ret = 0;
+			goto out;
 		}
-		goto out;
-	}
-	trans = rds_trans_get_preferred(sock_net(sock->sk), binding_addr,
-					scope_id);
-	if (!trans) {
-		ret = -EADDRNOTAVAIL;
-		rds_remove_bound(rs);
-		pr_info_ratelimited("RDS: %s could not find a transport for %pI6c, load rds_tcp or rds_rdma?\n",
-				    __func__, binding_addr);
-		goto out;
+	} else {
+		trans = rds_trans_get_preferred(sock_net(sock->sk),
+						binding_addr, scope_id);
+		if (!trans) {
+			ret = -EADDRNOTAVAIL;
+			pr_info_ratelimited("RDS: %s could not find a transport for %pI6c, load rds_tcp or rds_rdma?\n",
+					    __func__, binding_addr);
+			goto out;
+		}
+		rs->rs_transport = trans;
 	}
 
-	rs->rs_transport = trans;
-	ret = 0;
+	sock_set_flag(sk, SOCK_RCU_FREE);
+	ret = rds_add_bound(rs, binding_addr, &port, scope_id);
+	if (ret)
+		rs->rs_transport = NULL;
 
 out:
 	release_sock(sk);
diff -druNp --no-dereference linux-libre-4.19.75-gnu/net/sched/sch_api.c linux-libre-4.19.76-gnu/net/sched/sch_api.c
--- linux-libre-4.19.75-gnu/net/sched/sch_api.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/net/sched/sch_api.c	2019-10-01 02:26:13.000000000 -0400
@@ -1831,6 +1831,8 @@ static void tc_bind_tclass(struct Qdisc
 	cl = cops->find(q, portid);
 	if (!cl)
 		return;
+	if (!cops->tcf_block)
+		return;
 	block = cops->tcf_block(q, cl, NULL);
 	if (!block)
 		return;
diff -druNp --no-dereference linux-libre-4.19.75-gnu/sound/firewire/dice/dice-alesis.c linux-libre-4.19.76-gnu/sound/firewire/dice/dice-alesis.c
--- linux-libre-4.19.75-gnu/sound/firewire/dice/dice-alesis.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/sound/firewire/dice/dice-alesis.c	2019-10-01 02:26:13.000000000 -0400
@@ -15,7 +15,7 @@ alesis_io14_tx_pcm_chs[MAX_STREAMS][SND_
 
 static const unsigned int
 alesis_io26_tx_pcm_chs[MAX_STREAMS][SND_DICE_RATE_MODE_COUNT] = {
-	{10, 10, 8},	/* Tx0 = Analog + S/PDIF. */
+	{10, 10, 4},	/* Tx0 = Analog + S/PDIF. */
 	{16, 8, 0},	/* Tx1 = ADAT1 + ADAT2. */
 };
 
diff -druNp --no-dereference linux-libre-4.19.75-gnu/sound/pci/hda/hda_intel.c linux-libre-4.19.76-gnu/sound/pci/hda/hda_intel.c
--- linux-libre-4.19.75-gnu/sound/pci/hda/hda_intel.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/sound/pci/hda/hda_intel.c	2019-10-01 02:26:13.000000000 -0400
@@ -2662,8 +2662,7 @@ static const struct pci_device_id azx_id
 			 AZX_DCAPS_PM_RUNTIME },
 	/* AMD Raven */
 	{ PCI_DEVICE(0x1022, 0x15e3),
-	  .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB |
-			 AZX_DCAPS_PM_RUNTIME },
+	  .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_AMD_SB },
 	/* ATI HDMI */
 	{ PCI_DEVICE(0x1002, 0x0002),
 	  .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
diff -druNp --no-dereference linux-libre-4.19.75-gnu/sound/pci/hda/patch_analog.c linux-libre-4.19.76-gnu/sound/pci/hda/patch_analog.c
--- linux-libre-4.19.75-gnu/sound/pci/hda/patch_analog.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/sound/pci/hda/patch_analog.c	2019-10-01 02:26:13.000000000 -0400
@@ -370,6 +370,7 @@ static const struct hda_fixup ad1986a_fi
 
 static const struct snd_pci_quirk ad1986a_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x103c, 0x30af, "HP B2800", AD1986A_FIXUP_LAPTOP_IMIC),
+	SND_PCI_QUIRK(0x1043, 0x1153, "ASUS M9V", AD1986A_FIXUP_LAPTOP_IMIC),
 	SND_PCI_QUIRK(0x1043, 0x1443, "ASUS Z99He", AD1986A_FIXUP_EAPD),
 	SND_PCI_QUIRK(0x1043, 0x1447, "ASUS A8JN", AD1986A_FIXUP_EAPD),
 	SND_PCI_QUIRK_MASK(0x1043, 0xff00, 0x8100, "ASUS P5", AD1986A_FIXUP_3STACK),
diff -druNp --no-dereference linux-libre-4.19.75-gnu/sound/soc/fsl/fsl_ssi.c linux-libre-4.19.76-gnu/sound/soc/fsl/fsl_ssi.c
--- linux-libre-4.19.75-gnu/sound/soc/fsl/fsl_ssi.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/sound/soc/fsl/fsl_ssi.c	2019-10-01 02:26:13.000000000 -0400
@@ -1439,8 +1439,10 @@ static int fsl_ssi_probe_from_dt(struct
 	 * different name to register the device.
 	 */
 	if (!ssi->card_name[0] && of_get_property(np, "codec-handle", NULL)) {
-		sprop = of_get_property(of_find_node_by_path("/"),
-					"compatible", NULL);
+		struct device_node *root = of_find_node_by_path("/");
+
+		sprop = of_get_property(root, "compatible", NULL);
+		of_node_put(root);
 		/* Strip "fsl," in the compatible name if applicable */
 		p = strrchr(sprop, ',');
 		if (p)
diff -druNp --no-dereference linux-libre-4.19.75-gnu/sound/soc/intel/boards/cht_bsw_max98090_ti.c linux-libre-4.19.76-gnu/sound/soc/intel/boards/cht_bsw_max98090_ti.c
--- linux-libre-4.19.75-gnu/sound/soc/intel/boards/cht_bsw_max98090_ti.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/sound/soc/intel/boards/cht_bsw_max98090_ti.c	2019-10-01 02:26:13.000000000 -0400
@@ -42,6 +42,7 @@ struct cht_mc_private {
 	struct clk *mclk;
 	struct snd_soc_jack jack;
 	bool ts3a227e_present;
+	int quirks;
 };
 
 static int platform_clock_control(struct snd_soc_dapm_widget *w,
@@ -53,6 +54,10 @@ static int platform_clock_control(struct
 	struct cht_mc_private *ctx = snd_soc_card_get_drvdata(card);
 	int ret;
 
+	/* See the comment in snd_cht_mc_probe() */
+	if (ctx->quirks & QUIRK_PMC_PLT_CLK_0)
+		return 0;
+
 	codec_dai = snd_soc_card_get_codec_dai(card, CHT_CODEC_DAI);
 	if (!codec_dai) {
 		dev_err(card->dev, "Codec dai not found; Unable to set platform clock\n");
@@ -222,6 +227,10 @@ static int cht_codec_init(struct snd_soc
 			"jack detection gpios not added, error %d\n", ret);
 	}
 
+	/* See the comment in snd_cht_mc_probe() */
+	if (ctx->quirks & QUIRK_PMC_PLT_CLK_0)
+		return 0;
+
 	/*
 	 * The firmware might enable the clock at
 	 * boot (this information may or may not
@@ -420,16 +429,15 @@ static int snd_cht_mc_probe(struct platf
 	int ret_val = 0;
 	struct cht_mc_private *drv;
 	const char *mclk_name;
-	int quirks = 0;
-
-	dmi_id = dmi_first_match(cht_max98090_quirk_table);
-	if (dmi_id)
-		quirks = (unsigned long)dmi_id->driver_data;
 
 	drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_KERNEL);
 	if (!drv)
 		return -ENOMEM;
 
+	dmi_id = dmi_first_match(cht_max98090_quirk_table);
+	if (dmi_id)
+		drv->quirks = (unsigned long)dmi_id->driver_data;
+
 	drv->ts3a227e_present = acpi_dev_found("104C227E");
 	if (!drv->ts3a227e_present) {
 		/* no need probe TI jack detection chip */
@@ -446,7 +454,7 @@ static int snd_cht_mc_probe(struct platf
 	snd_soc_card_cht.dev = &pdev->dev;
 	snd_soc_card_set_drvdata(&snd_soc_card_cht, drv);
 
-	if (quirks & QUIRK_PMC_PLT_CLK_0)
+	if (drv->quirks & QUIRK_PMC_PLT_CLK_0)
 		mclk_name = "pmc_plt_clk_0";
 	else
 		mclk_name = "pmc_plt_clk_3";
@@ -459,6 +467,21 @@ static int snd_cht_mc_probe(struct platf
 		return PTR_ERR(drv->mclk);
 	}
 
+	/*
+	 * Boards which have the MAX98090's clk connected to clk_0 do not seem
+	 * to like it if we muck with the clock. If we disable the clock when
+	 * it is unused we get "max98090 i2c-193C9890:00: PLL unlocked" errors
+	 * and the PLL never seems to lock again.
+	 * So for these boards we enable it here once and leave it at that.
+	 */
+	if (drv->quirks & QUIRK_PMC_PLT_CLK_0) {
+		ret_val = clk_prepare_enable(drv->mclk);
+		if (ret_val < 0) {
+			dev_err(&pdev->dev, "MCLK enable error: %d\n", ret_val);
+			return ret_val;
+		}
+	}
+
 	ret_val = devm_snd_soc_register_card(&pdev->dev, &snd_soc_card_cht);
 	if (ret_val) {
 		dev_err(&pdev->dev,
@@ -469,11 +492,23 @@ static int snd_cht_mc_probe(struct platf
 	return ret_val;
 }
 
+static int snd_cht_mc_remove(struct platform_device *pdev)
+{
+	struct snd_soc_card *card = platform_get_drvdata(pdev);
+	struct cht_mc_private *ctx = snd_soc_card_get_drvdata(card);
+
+	if (ctx->quirks & QUIRK_PMC_PLT_CLK_0)
+		clk_disable_unprepare(ctx->mclk);
+
+	return 0;
+}
+
 static struct platform_driver snd_cht_mc_driver = {
 	.driver = {
 		.name = "cht-bsw-max98090",
 	},
 	.probe = snd_cht_mc_probe,
+	.remove = snd_cht_mc_remove,
 };
 
 module_platform_driver(snd_cht_mc_driver)
diff -druNp --no-dereference linux-libre-4.19.75-gnu/sound/usb/quirks.c linux-libre-4.19.76-gnu/sound/usb/quirks.c
--- linux-libre-4.19.75-gnu/sound/usb/quirks.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/sound/usb/quirks.c	2019-10-01 02:26:13.000000000 -0400
@@ -1449,6 +1449,8 @@ u64 snd_usb_interface_dsd_format_quirks(
 	case 0x152a:  /* Thesycon devices */
 	case 0x25ce:  /* Mytek devices */
 	case 0x2ab6:  /* T+A devices */
+	case 0x3842:  /* EVGA */
+	case 0xc502:  /* HiBy devices */
 		if (fp->dsd_raw)
 			return SNDRV_PCM_FMTBIT_DSD_U32_BE;
 		break;
diff -druNp --no-dereference linux-libre-4.19.75-gnu/tools/lib/bpf/bpf.c linux-libre-4.19.76-gnu/tools/lib/bpf/bpf.c
--- linux-libre-4.19.75-gnu/tools/lib/bpf/bpf.c	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/tools/lib/bpf/bpf.c	2019-10-01 02:26:13.000000000 -0400
@@ -75,6 +75,17 @@ static inline int sys_bpf(enum bpf_cmd c
 	return syscall(__NR_bpf, cmd, attr, size);
 }
 
+static inline int sys_bpf_prog_load(union bpf_attr *attr, unsigned int size)
+{
+	int fd;
+
+	do {
+		fd = sys_bpf(BPF_PROG_LOAD, attr, size);
+	} while (fd < 0 && errno == EAGAIN);
+
+	return fd;
+}
+
 int bpf_create_map_xattr(const struct bpf_create_map_attr *create_attr)
 {
 	__u32 name_len = create_attr->name ? strlen(create_attr->name) : 0;
@@ -218,7 +229,7 @@ int bpf_load_program_xattr(const struct
 	memcpy(attr.prog_name, load_attr->name,
 	       min(name_len, BPF_OBJ_NAME_LEN - 1));
 
-	fd = sys_bpf(BPF_PROG_LOAD, &attr, sizeof(attr));
+	fd = sys_bpf_prog_load(&attr, sizeof(attr));
 	if (fd >= 0 || !log_buf || !log_buf_sz)
 		return fd;
 
@@ -227,7 +238,7 @@ int bpf_load_program_xattr(const struct
 	attr.log_size = log_buf_sz;
 	attr.log_level = 1;
 	log_buf[0] = 0;
-	return sys_bpf(BPF_PROG_LOAD, &attr, sizeof(attr));
+	return sys_bpf_prog_load(&attr, sizeof(attr));
 }
 
 int bpf_load_program(enum bpf_prog_type type, const struct bpf_insn *insns,
@@ -268,7 +279,7 @@ int bpf_verify_program(enum bpf_prog_typ
 	attr.kern_version = kern_version;
 	attr.prog_flags = strict_alignment ? BPF_F_STRICT_ALIGNMENT : 0;
 
-	return sys_bpf(BPF_PROG_LOAD, &attr, sizeof(attr));
+	return sys_bpf_prog_load(&attr, sizeof(attr));
 }
 
 int bpf_map_update_elem(int fd, const void *key, const void *value,
diff -druNp --no-dereference linux-libre-4.19.75-gnu/tools/objtool/Makefile linux-libre-4.19.76-gnu/tools/objtool/Makefile
--- linux-libre-4.19.75-gnu/tools/objtool/Makefile	2019-09-21 01:17:15.000000000 -0400
+++ linux-libre-4.19.76-gnu/tools/objtool/Makefile	2019-10-01 02:26:13.000000000 -0400
@@ -35,7 +35,7 @@ INCLUDES := -I$(srctree)/tools/include \
 	    -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
 	    -I$(srctree)/tools/objtool/arch/$(ARCH)/include
 WARNINGS := $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -Wno-packed
-CFLAGS   += -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES) $(LIBELF_FLAGS)
+CFLAGS   := -Werror $(WARNINGS) $(KBUILD_HOSTCFLAGS) -g $(INCLUDES) $(LIBELF_FLAGS)
 LDFLAGS  += $(LIBELF_LIBS) $(LIBSUBCMD) $(KBUILD_HOSTLDFLAGS)
 
 # Allow old libelf to be used:
