From: Greg Kroah-Hartman Date: Fri, 6 Aug 2021 04:34:53 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v4.4.279~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a02663fbdeed17ed3e2d3cd7aad7753fc637893a;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: drm-i915-ensure-intel_engine_init_execlist-builds-with-clang.patch revert-bluetooth-shutdown-controller-after-workqueues-are-flushed-or-cancelled.patch revert-spi-mediatek-fix-fifo-rx-mode.patch --- diff --git a/queue-4.19/drm-i915-ensure-intel_engine_init_execlist-builds-with-clang.patch b/queue-4.19/drm-i915-ensure-intel_engine_init_execlist-builds-with-clang.patch new file mode 100644 index 00000000000..b7b8e25776f --- /dev/null +++ b/queue-4.19/drm-i915-ensure-intel_engine_init_execlist-builds-with-clang.patch @@ -0,0 +1,48 @@ +From 410ed5731a6566498a3aa904420aa2e49ba0ba90 Mon Sep 17 00:00:00 2001 +From: Jani Nikula +Date: Tue, 16 Oct 2018 15:29:38 +0300 +Subject: drm/i915: Ensure intel_engine_init_execlist() builds with Clang + +From: Jani Nikula + +commit 410ed5731a6566498a3aa904420aa2e49ba0ba90 upstream. + +Clang build with UBSAN enabled leads to the following build error: + +drivers/gpu/drm/i915/intel_engine_cs.o: In function `intel_engine_init_execlist': +drivers/gpu/drm/i915/intel_engine_cs.c:411: undefined reference to `__compiletime_assert_411' + +Again, for this to work the code would first need to be inlined and then +constant folded, which doesn't work for Clang because semantic analysis +happens before optimization/inlining. + +Use GEM_BUG_ON() instead of BUILD_BUG_ON(). + +v2: Use is_power_of_2() from log2.h (Chris) + +References: http://mid.mail-archive.com/20181015203410.155997-1-swboyd@chromium.org +Reported-by: Stephen Boyd +Cc: Stephen Boyd +Cc: Chris Wilson +Tested-by: Nathan Chancellor +Tested-by: Stephen Boyd +Reviewed-by: Chris Wilson +Reviewed-by: Nick Desaulniers +Signed-off-by: Jani Nikula +Link: https://patchwork.freedesktop.org/patch/msgid/20181016122938.18757-2-jani.nikula@intel.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/i915/intel_engine_cs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/i915/intel_engine_cs.c ++++ b/drivers/gpu/drm/i915/intel_engine_cs.c +@@ -463,7 +463,7 @@ static void intel_engine_init_execlist(s + struct intel_engine_execlists * const execlists = &engine->execlists; + + execlists->port_mask = 1; +- BUILD_BUG_ON_NOT_POWER_OF_2(execlists_num_ports(execlists)); ++ GEM_BUG_ON(!is_power_of_2(execlists_num_ports(execlists))); + GEM_BUG_ON(execlists_num_ports(execlists) > EXECLIST_MAX_PORTS); + + execlists->queue_priority = INT_MIN; diff --git a/queue-4.19/revert-bluetooth-shutdown-controller-after-workqueues-are-flushed-or-cancelled.patch b/queue-4.19/revert-bluetooth-shutdown-controller-after-workqueues-are-flushed-or-cancelled.patch new file mode 100644 index 00000000000..d9403d050e5 --- /dev/null +++ b/queue-4.19/revert-bluetooth-shutdown-controller-after-workqueues-are-flushed-or-cancelled.patch @@ -0,0 +1,55 @@ +From 78eb5695f0139bf453dd43885238994aeb9c09b1 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Thu, 5 Aug 2021 20:58:57 +0200 +Subject: Revert "Bluetooth: Shutdown controller after workqueues are flushed or cancelled" + +From: Greg Kroah-Hartman + +This reverts commit 78b03389d2773255ceaf051f2dca134b816d96f2 which is +commit 0ea9fd001a14ebc294f112b0361a4e601551d508 upstream. + +It has been reported to have problems: + https://lore.kernel.org/linux-bluetooth/8735ryk0o7.fsf@baylibre.com/ + +Reported-by: Guenter Roeck +Cc: Kai-Heng Feng +Cc: Marcel Holtmann +Cc: Sasha Levin +Link: https://lore.kernel.org/r/efee3a58-a4d2-af22-0931-e81b877ab539@roeck-us.net +Signed-off-by: Greg Kroah-Hartman +--- + net/bluetooth/hci_core.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +--- a/net/bluetooth/hci_core.c ++++ b/net/bluetooth/hci_core.c +@@ -1609,6 +1609,14 @@ int hci_dev_do_close(struct hci_dev *hde + + BT_DBG("%s %p", hdev->name, hdev); + ++ if (!hci_dev_test_flag(hdev, HCI_UNREGISTER) && ++ !hci_dev_test_flag(hdev, HCI_USER_CHANNEL) && ++ test_bit(HCI_UP, &hdev->flags)) { ++ /* Execute vendor specific shutdown routine */ ++ if (hdev->shutdown) ++ hdev->shutdown(hdev); ++ } ++ + cancel_delayed_work(&hdev->power_off); + + hci_request_cancel_all(hdev); +@@ -1682,14 +1690,6 @@ int hci_dev_do_close(struct hci_dev *hde + clear_bit(HCI_INIT, &hdev->flags); + } + +- if (!hci_dev_test_flag(hdev, HCI_UNREGISTER) && +- !hci_dev_test_flag(hdev, HCI_USER_CHANNEL) && +- test_bit(HCI_UP, &hdev->flags)) { +- /* Execute vendor specific shutdown routine */ +- if (hdev->shutdown) +- hdev->shutdown(hdev); +- } +- + /* flush cmd work */ + flush_work(&hdev->cmd_work); + diff --git a/queue-4.19/revert-spi-mediatek-fix-fifo-rx-mode.patch b/queue-4.19/revert-spi-mediatek-fix-fifo-rx-mode.patch new file mode 100644 index 00000000000..41acc07307d --- /dev/null +++ b/queue-4.19/revert-spi-mediatek-fix-fifo-rx-mode.patch @@ -0,0 +1,52 @@ +From 568f12594bc88a1b8f9e697c9bf6a3a5b6b6d134 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Thu, 5 Aug 2021 20:53:50 +0200 +Subject: Revert "spi: mediatek: fix fifo rx mode" + +From: Greg Kroah-Hartman + +This reverts commit bd0447f72de0963129612bf18202204d5b25e133 which is +commit 3a70dd2d050331ee4cf5ad9d5c0a32d83ead9a43 upstream. + +It has been found to have problems. + +Reported-by: Guenter Roeck +Cc: Peter Hess +Cc: Frank Wunderlich +Cc: Mark Brown +Cc: Sasha Levin +Link: https://lore.kernel.org/r/efee3a58-a4d2-af22-0931-e81b877ab539@roeck-us.net +Signed-off-by: Greg Kroah-Hartman +--- + drivers/spi/spi-mt65xx.c | 16 +++------------- + 1 file changed, 3 insertions(+), 13 deletions(-) + +--- a/drivers/spi/spi-mt65xx.c ++++ b/drivers/spi/spi-mt65xx.c +@@ -392,23 +392,13 @@ static int mtk_spi_fifo_transfer(struct + mtk_spi_setup_packet(master); + + cnt = xfer->len / 4; +- if (xfer->tx_buf) +- iowrite32_rep(mdata->base + SPI_TX_DATA_REG, xfer->tx_buf, cnt); +- +- if (xfer->rx_buf) +- ioread32_rep(mdata->base + SPI_RX_DATA_REG, xfer->rx_buf, cnt); ++ iowrite32_rep(mdata->base + SPI_TX_DATA_REG, xfer->tx_buf, cnt); + + remainder = xfer->len % 4; + if (remainder > 0) { + reg_val = 0; +- if (xfer->tx_buf) { +- memcpy(®_val, xfer->tx_buf + (cnt * 4), remainder); +- writel(reg_val, mdata->base + SPI_TX_DATA_REG); +- } +- if (xfer->rx_buf) { +- reg_val = readl(mdata->base + SPI_RX_DATA_REG); +- memcpy(xfer->rx_buf + (cnt * 4), ®_val, remainder); +- } ++ memcpy(®_val, xfer->tx_buf + (cnt * 4), remainder); ++ writel(reg_val, mdata->base + SPI_TX_DATA_REG); + } + + mtk_spi_enable_transfer(master); diff --git a/queue-4.19/series b/queue-4.19/series index f9414c26734..b49bc918c90 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -7,3 +7,6 @@ net-fix-zero-copy-head-len-calculation.patch bdi-move-bdi_dev_name-out-of-line.patch bdi-use-bdi_dev_name-to-get-device-name.patch bdi-add-a-dev_name-field-to-struct-backing_dev_info.patch +revert-spi-mediatek-fix-fifo-rx-mode.patch +revert-bluetooth-shutdown-controller-after-workqueues-are-flushed-or-cancelled.patch +drm-i915-ensure-intel_engine_init_execlist-builds-with-clang.patch