From: Sasha Levin Date: Thu, 12 Dec 2019 03:11:21 +0000 (-0500) Subject: fixes for 4.14 X-Git-Tag: v5.4.3~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3078c5a3d08b8597601951c1e03d27520b4b3b1c;p=thirdparty%2Fkernel%2Fstable-queue.git fixes for 4.14 Signed-off-by: Sasha Levin --- diff --git a/queue-4.14/alsa-hda-fix-pending-unsol-events-at-shutdown.patch b/queue-4.14/alsa-hda-fix-pending-unsol-events-at-shutdown.patch new file mode 100644 index 00000000000..c03a9b940a5 --- /dev/null +++ b/queue-4.14/alsa-hda-fix-pending-unsol-events-at-shutdown.patch @@ -0,0 +1,61 @@ +From e5e562a1191fddbd8af883d5b1efcc24cd04a6df Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 28 Oct 2019 11:58:03 +0100 +Subject: ALSA: hda - Fix pending unsol events at shutdown + +From: Takashi Iwai + +[ Upstream commit ca58f55108fee41d87c9123f85ad4863e5de7f45 ] + +This is an alternative fix attemp for the issue reported in the commit +caa8422d01e9 ("ALSA: hda: Flush interrupts on disabling") that was +reverted later due to regressions. Instead of tweaking the hardware +disablement order and the enforced irq flushing, do calling +cancel_work_sync() of the unsol work early enough, and explicitly +ignore the unsol events during the shutdown by checking the +bus->shutdown flag. + +Fixes: caa8422d01e9 ("ALSA: hda: Flush interrupts on disabling") +Cc: Chris Wilson +Link: https://lore.kernel.org/r/s5h1ruxt9cz.wl-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +--- + sound/pci/hda/hda_bind.c | 4 ++++ + sound/pci/hda/hda_intel.c | 3 +++ + 2 files changed, 7 insertions(+) + +diff --git a/sound/pci/hda/hda_bind.c b/sound/pci/hda/hda_bind.c +index 8db1890605f60..c175b2cf63f77 100644 +--- a/sound/pci/hda/hda_bind.c ++++ b/sound/pci/hda/hda_bind.c +@@ -42,6 +42,10 @@ static void hda_codec_unsol_event(struct hdac_device *dev, unsigned int ev) + { + struct hda_codec *codec = container_of(dev, struct hda_codec, core); + ++ /* ignore unsol events during shutdown */ ++ if (codec->bus->shutdown) ++ return; ++ + if (codec->patch_ops.unsol_event) + codec->patch_ops.unsol_event(codec, ev); + } +diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c +index 96e9b3944b925..890793ad85ca1 100644 +--- a/sound/pci/hda/hda_intel.c ++++ b/sound/pci/hda/hda_intel.c +@@ -1450,8 +1450,11 @@ static int azx_free(struct azx *chip) + static int azx_dev_disconnect(struct snd_device *device) + { + struct azx *chip = device->device_data; ++ struct hdac_bus *bus = azx_bus(chip); + + chip->bus.shutdown = 1; ++ cancel_work_sync(&bus->unsol_work); ++ + return 0; + } + +-- +2.20.1 + diff --git a/queue-4.14/md-raid0-fix-an-error-message-in-raid0_make_request.patch b/queue-4.14/md-raid0-fix-an-error-message-in-raid0_make_request.patch new file mode 100644 index 00000000000..dc7273daea1 --- /dev/null +++ b/queue-4.14/md-raid0-fix-an-error-message-in-raid0_make_request.patch @@ -0,0 +1,37 @@ +From d3e18bb6f60a283779b7e3a60121fca200adedd8 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 21 Sep 2019 09:00:31 +0300 +Subject: md/raid0: Fix an error message in raid0_make_request() + +From: Dan Carpenter + +[ Upstream commit e3fc3f3d0943b126f76b8533960e4168412d9e5a ] + +The first argument to WARN() is supposed to be a condition. The +original code will just print the mdname() instead of the full warning +message. + +Fixes: c84a1372df92 ("md/raid0: avoid RAID0 data corruption due to layout confusion.") +Signed-off-by: Dan Carpenter +Signed-off-by: Song Liu +Signed-off-by: Sasha Levin +--- + drivers/md/raid0.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c +index 449c4dd060fcd..204adde004a3c 100644 +--- a/drivers/md/raid0.c ++++ b/drivers/md/raid0.c +@@ -616,7 +616,7 @@ static bool raid0_make_request(struct mddev *mddev, struct bio *bio) + tmp_dev = map_sector(mddev, zone, sector, §or); + break; + default: +- WARN("md/raid0:%s: Invalid layout\n", mdname(mddev)); ++ WARN(1, "md/raid0:%s: Invalid layout\n", mdname(mddev)); + bio_io_error(bio); + return true; + } +-- +2.20.1 + diff --git a/queue-4.14/series b/queue-4.14/series index 6f9c539652a..e875f0de29c 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -150,3 +150,6 @@ rdma-qib-validate-show-store-callbacks-before-calling-them.patch iomap-fix-pipe-page-leakage-during-splicing.patch thermal-fix-deadlock-in-thermal-thermal_zone_device_check.patch binder-handle-start-null-in-binder_update_page_range.patch +alsa-hda-fix-pending-unsol-events-at-shutdown.patch +md-raid0-fix-an-error-message-in-raid0_make_request.patch +watchdog-aspeed-fix-clock-behaviour-for-ast2600.patch diff --git a/queue-4.14/watchdog-aspeed-fix-clock-behaviour-for-ast2600.patch b/queue-4.14/watchdog-aspeed-fix-clock-behaviour-for-ast2600.patch new file mode 100644 index 00000000000..f8d0f2b5dac --- /dev/null +++ b/queue-4.14/watchdog-aspeed-fix-clock-behaviour-for-ast2600.patch @@ -0,0 +1,69 @@ +From 23802dab74391c60819a673dee65ec0fadce8740 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 8 Nov 2019 13:59:05 +1030 +Subject: watchdog: aspeed: Fix clock behaviour for ast2600 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Joel Stanley + +[ Upstream commit c04571251b3d842096f1597f5d4badb508be016d ] + +The ast2600 no longer uses bit 4 in the control register to indicate a +1MHz clock (It now controls whether this watchdog is reset by a SOC +reset). This means we do not want to set it. It also does not need to be +set for the ast2500, as it is read-only on that SoC. + +The comment next to the clock rate selection wandered away from where it +was set, so put it back next to the register setting it's describing. + +Fixes: b3528b487448 ("watchdog: aspeed: Add support for AST2600") +Signed-off-by: Joel Stanley +Reviewed-by: Cédric Le Goater +Reviewed-by: Guenter Roeck +Link: https://lore.kernel.org/r/20191108032905.22463-1-joel@jms.id.au +Signed-off-by: Guenter Roeck +Signed-off-by: Wim Van Sebroeck +Signed-off-by: Sasha Levin +--- + drivers/watchdog/aspeed_wdt.c | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c +index cee7334b2a000..f5835cbd5d415 100644 +--- a/drivers/watchdog/aspeed_wdt.c ++++ b/drivers/watchdog/aspeed_wdt.c +@@ -204,11 +204,6 @@ static int aspeed_wdt_probe(struct platform_device *pdev) + if (IS_ERR(wdt->base)) + return PTR_ERR(wdt->base); + +- /* +- * The ast2400 wdt can run at PCLK, or 1MHz. The ast2500 only +- * runs at 1MHz. We chose to always run at 1MHz, as there's no +- * good reason to have a faster watchdog counter. +- */ + wdt->wdd.info = &aspeed_wdt_info; + wdt->wdd.ops = &aspeed_wdt_ops; + wdt->wdd.max_hw_heartbeat_ms = WDT_MAX_TIMEOUT_MS; +@@ -224,7 +219,16 @@ static int aspeed_wdt_probe(struct platform_device *pdev) + return -EINVAL; + config = ofdid->data; + +- wdt->ctrl = WDT_CTRL_1MHZ_CLK; ++ /* ++ * On clock rates: ++ * - ast2400 wdt can run at PCLK, or 1MHz ++ * - ast2500 only runs at 1MHz, hard coding bit 4 to 1 ++ * - ast2600 always runs at 1MHz ++ * ++ * Set the ast2400 to run at 1MHz as it simplifies the driver. ++ */ ++ if (of_device_is_compatible(np, "aspeed,ast2400-wdt")) ++ wdt->ctrl = WDT_CTRL_1MHZ_CLK; + + /* + * Control reset on a per-device basis to ensure the +-- +2.20.1 +