From: Greg Kroah-Hartman Date: Wed, 16 Oct 2019 16:57:49 +0000 (-0700) Subject: drop mmc patch from 4.4 and 4.9 as it broke builds X-Git-Tag: v4.4.197~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bd0ae673bc55013b5bea144b703a52254a4cc868;p=thirdparty%2Fkernel%2Fstable-queue.git drop mmc patch from 4.4 and 4.9 as it broke builds --- diff --git a/queue-4.4/mmc-sdhci-of-esdhc-set-dma-snooping-based-on-dma-coherence.patch b/queue-4.4/mmc-sdhci-of-esdhc-set-dma-snooping-based-on-dma-coherence.patch deleted file mode 100644 index 2673b3def0f..00000000000 --- a/queue-4.4/mmc-sdhci-of-esdhc-set-dma-snooping-based-on-dma-coherence.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 121bd08b029e03404c451bb237729cdff76eafed Mon Sep 17 00:00:00 2001 -From: Russell King -Date: Sun, 22 Sep 2019 11:26:58 +0100 -Subject: mmc: sdhci-of-esdhc: set DMA snooping based on DMA coherence - -From: Russell King - -commit 121bd08b029e03404c451bb237729cdff76eafed upstream. - -We must not unconditionally set the DMA snoop bit; if the DMA API is -assuming that the device is not DMA coherent, and the device snoops the -CPU caches, the device can see stale cache lines brought in by -speculative prefetch. - -This leads to the device seeing stale data, potentially resulting in -corrupted data transfers. Commonly, this results in a descriptor fetch -error such as: - -mmc0: ADMA error -mmc0: sdhci: ============ SDHCI REGISTER DUMP =========== -mmc0: sdhci: Sys addr: 0x00000000 | Version: 0x00002202 -mmc0: sdhci: Blk size: 0x00000008 | Blk cnt: 0x00000001 -mmc0: sdhci: Argument: 0x00000000 | Trn mode: 0x00000013 -mmc0: sdhci: Present: 0x01f50008 | Host ctl: 0x00000038 -mmc0: sdhci: Power: 0x00000003 | Blk gap: 0x00000000 -mmc0: sdhci: Wake-up: 0x00000000 | Clock: 0x000040d8 -mmc0: sdhci: Timeout: 0x00000003 | Int stat: 0x00000001 -mmc0: sdhci: Int enab: 0x037f108f | Sig enab: 0x037f108b -mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00002202 -mmc0: sdhci: Caps: 0x35fa0000 | Caps_1: 0x0000af00 -mmc0: sdhci: Cmd: 0x0000333a | Max curr: 0x00000000 -mmc0: sdhci: Resp[0]: 0x00000920 | Resp[1]: 0x001d8a33 -mmc0: sdhci: Resp[2]: 0x325b5900 | Resp[3]: 0x3f400e00 -mmc0: sdhci: Host ctl2: 0x00000000 -mmc0: sdhci: ADMA Err: 0x00000009 | ADMA Ptr: 0x000000236d43820c -mmc0: sdhci: ============================================ -mmc0: error -5 whilst initialising SD card - -but can lead to other errors, and potentially direct the SDHCI -controller to read/write data to other memory locations (e.g. if a valid -descriptor is visible to the device in a stale cache line.) - -Fix this by ensuring that the DMA snoop bit corresponds with the -behaviour of the DMA API. Since the driver currently only supports DT, -use of_dma_is_coherent(). Note that device_get_dma_attr() can not be -used as that risks re-introducing this bug if/when the driver is -converted to ACPI. - -Signed-off-by: Russell King -Acked-by: Adrian Hunter -Cc: stable@vger.kernel.org -Signed-off-by: Ulf Hansson -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/mmc/host/sdhci-of-esdhc.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - ---- a/drivers/mmc/host/sdhci-of-esdhc.c -+++ b/drivers/mmc/host/sdhci-of-esdhc.c -@@ -382,7 +382,12 @@ static int esdhc_of_enable_dma(struct sd - u32 value; - - value = sdhci_readl(host, ESDHC_DMA_SYSCTL); -- value |= ESDHC_DMA_SNOOP; -+ -+ if (of_dma_is_coherent(dev->of_node)) -+ value |= ESDHC_DMA_SNOOP; -+ else -+ value &= ~ESDHC_DMA_SNOOP; -+ - sdhci_writel(host, value, ESDHC_DMA_SYSCTL); - return 0; - } diff --git a/queue-4.4/series b/queue-4.4/series index b2b4332278a..0ce7da0c974 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -7,7 +7,6 @@ asoc-define-a-set-of-dapm-pre-post-up-events.patch powerpc-powernv-restrict-opal-symbol-map-to-only-be-readable-by-root.patch can-mcp251x-mcp251x_hw_reset-allow-more-time-after-a-reset.patch crypto-qat-silence-smp_processor_id-warning.patch -mmc-sdhci-of-esdhc-set-dma-snooping-based-on-dma-coherence.patch ieee802154-atusb-fix-use-after-free-at-disconnect.patch cfg80211-initialize-on-stack-chandefs.patch ima-always-return-negative-code-for-error.patch diff --git a/queue-4.9/mmc-sdhci-of-esdhc-set-dma-snooping-based-on-dma-coherence.patch b/queue-4.9/mmc-sdhci-of-esdhc-set-dma-snooping-based-on-dma-coherence.patch deleted file mode 100644 index 68fe7d86229..00000000000 --- a/queue-4.9/mmc-sdhci-of-esdhc-set-dma-snooping-based-on-dma-coherence.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 121bd08b029e03404c451bb237729cdff76eafed Mon Sep 17 00:00:00 2001 -From: Russell King -Date: Sun, 22 Sep 2019 11:26:58 +0100 -Subject: mmc: sdhci-of-esdhc: set DMA snooping based on DMA coherence - -From: Russell King - -commit 121bd08b029e03404c451bb237729cdff76eafed upstream. - -We must not unconditionally set the DMA snoop bit; if the DMA API is -assuming that the device is not DMA coherent, and the device snoops the -CPU caches, the device can see stale cache lines brought in by -speculative prefetch. - -This leads to the device seeing stale data, potentially resulting in -corrupted data transfers. Commonly, this results in a descriptor fetch -error such as: - -mmc0: ADMA error -mmc0: sdhci: ============ SDHCI REGISTER DUMP =========== -mmc0: sdhci: Sys addr: 0x00000000 | Version: 0x00002202 -mmc0: sdhci: Blk size: 0x00000008 | Blk cnt: 0x00000001 -mmc0: sdhci: Argument: 0x00000000 | Trn mode: 0x00000013 -mmc0: sdhci: Present: 0x01f50008 | Host ctl: 0x00000038 -mmc0: sdhci: Power: 0x00000003 | Blk gap: 0x00000000 -mmc0: sdhci: Wake-up: 0x00000000 | Clock: 0x000040d8 -mmc0: sdhci: Timeout: 0x00000003 | Int stat: 0x00000001 -mmc0: sdhci: Int enab: 0x037f108f | Sig enab: 0x037f108b -mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00002202 -mmc0: sdhci: Caps: 0x35fa0000 | Caps_1: 0x0000af00 -mmc0: sdhci: Cmd: 0x0000333a | Max curr: 0x00000000 -mmc0: sdhci: Resp[0]: 0x00000920 | Resp[1]: 0x001d8a33 -mmc0: sdhci: Resp[2]: 0x325b5900 | Resp[3]: 0x3f400e00 -mmc0: sdhci: Host ctl2: 0x00000000 -mmc0: sdhci: ADMA Err: 0x00000009 | ADMA Ptr: 0x000000236d43820c -mmc0: sdhci: ============================================ -mmc0: error -5 whilst initialising SD card - -but can lead to other errors, and potentially direct the SDHCI -controller to read/write data to other memory locations (e.g. if a valid -descriptor is visible to the device in a stale cache line.) - -Fix this by ensuring that the DMA snoop bit corresponds with the -behaviour of the DMA API. Since the driver currently only supports DT, -use of_dma_is_coherent(). Note that device_get_dma_attr() can not be -used as that risks re-introducing this bug if/when the driver is -converted to ACPI. - -Signed-off-by: Russell King -Acked-by: Adrian Hunter -Cc: stable@vger.kernel.org -Signed-off-by: Ulf Hansson -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/mmc/host/sdhci-of-esdhc.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - ---- a/drivers/mmc/host/sdhci-of-esdhc.c -+++ b/drivers/mmc/host/sdhci-of-esdhc.c -@@ -396,7 +396,12 @@ static int esdhc_of_enable_dma(struct sd - u32 value; - - value = sdhci_readl(host, ESDHC_DMA_SYSCTL); -- value |= ESDHC_DMA_SNOOP; -+ -+ if (of_dma_is_coherent(dev->of_node)) -+ value |= ESDHC_DMA_SNOOP; -+ else -+ value &= ~ESDHC_DMA_SNOOP; -+ - sdhci_writel(host, value, ESDHC_DMA_SYSCTL); - return 0; - } diff --git a/queue-4.9/series b/queue-4.9/series index 326a2de4b3e..09de33b2a52 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -10,7 +10,6 @@ crypto-qat-silence-smp_processor_id-warning.patch usercopy-avoid-highmem-pfn-warning.patch timer-read-jiffies-once-when-forwarding-base-clk.patch watchdog-imx2_wdt-fix-min-calculation-in-imx2_wdt_set_timeout.patch -mmc-sdhci-of-esdhc-set-dma-snooping-based-on-dma-coherence.patch ieee802154-atusb-fix-use-after-free-at-disconnect.patch cfg80211-initialize-on-stack-chandefs.patch ima-always-return-negative-code-for-error.patch