]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Dec 2019 17:35:44 +0000 (12:35 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Dec 2019 17:35:44 +0000 (12:35 -0500)
added patches:
can-kvaser_usb-kvaser_usb_leaf-fix-some-info-leaks-to-usb-devices.patch
mmc-mediatek-fix-cmd_ta-to-2-for-mt8173-hs200-hs400-mode.patch
revert-mmc-sdhci-fix-incorrect-switch-to-hs-mode.patch

queue-4.19/can-kvaser_usb-kvaser_usb_leaf-fix-some-info-leaks-to-usb-devices.patch [new file with mode: 0644]
queue-4.19/mmc-mediatek-fix-cmd_ta-to-2-for-mt8173-hs200-hs400-mode.patch [new file with mode: 0644]
queue-4.19/revert-mmc-sdhci-fix-incorrect-switch-to-hs-mode.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/can-kvaser_usb-kvaser_usb_leaf-fix-some-info-leaks-to-usb-devices.patch b/queue-4.19/can-kvaser_usb-kvaser_usb_leaf-fix-some-info-leaks-to-usb-devices.patch
new file mode 100644 (file)
index 0000000..c416ad4
--- /dev/null
@@ -0,0 +1,52 @@
+From da2311a6385c3b499da2ed5d9be59ce331fa93e9 Mon Sep 17 00:00:00 2001
+From: Xiaolong Huang <butterflyhuangxx@gmail.com>
+Date: Sat, 7 Dec 2019 22:40:24 +0800
+Subject: can: kvaser_usb: kvaser_usb_leaf: Fix some info-leaks to USB devices
+
+From: Xiaolong Huang <butterflyhuangxx@gmail.com>
+
+commit da2311a6385c3b499da2ed5d9be59ce331fa93e9 upstream.
+
+Uninitialized Kernel memory can leak to USB devices.
+
+Fix this by using kzalloc() instead of kmalloc().
+
+Signed-off-by: Xiaolong Huang <butterflyhuangxx@gmail.com>
+Fixes: 7259124eac7d ("can: kvaser_usb: Split driver into kvaser_usb_core.c and kvaser_usb_leaf.c")
+Cc: linux-stable <stable@vger.kernel.org> # >= v4.19
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c
++++ b/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c
+@@ -608,7 +608,7 @@ static int kvaser_usb_leaf_simple_cmd_as
+       struct kvaser_cmd *cmd;
+       int err;
+-      cmd = kmalloc(sizeof(*cmd), GFP_ATOMIC);
++      cmd = kzalloc(sizeof(*cmd), GFP_ATOMIC);
+       if (!cmd)
+               return -ENOMEM;
+@@ -1140,7 +1140,7 @@ static int kvaser_usb_leaf_set_opt_mode(
+       struct kvaser_cmd *cmd;
+       int rc;
+-      cmd = kmalloc(sizeof(*cmd), GFP_KERNEL);
++      cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
+       if (!cmd)
+               return -ENOMEM;
+@@ -1206,7 +1206,7 @@ static int kvaser_usb_leaf_flush_queue(s
+       struct kvaser_cmd *cmd;
+       int rc;
+-      cmd = kmalloc(sizeof(*cmd), GFP_KERNEL);
++      cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
+       if (!cmd)
+               return -ENOMEM;
diff --git a/queue-4.19/mmc-mediatek-fix-cmd_ta-to-2-for-mt8173-hs200-hs400-mode.patch b/queue-4.19/mmc-mediatek-fix-cmd_ta-to-2-for-mt8173-hs200-hs400-mode.patch
new file mode 100644 (file)
index 0000000..8045dc7
--- /dev/null
@@ -0,0 +1,43 @@
+From 8f34e5bd7024d1ffebddd82d7318b1be17be9e9a Mon Sep 17 00:00:00 2001
+From: Chaotian Jing <chaotian.jing@mediatek.com>
+Date: Wed, 4 Dec 2019 15:19:58 +0800
+Subject: mmc: mediatek: fix CMD_TA to 2 for MT8173 HS200/HS400 mode
+
+From: Chaotian Jing <chaotian.jing@mediatek.com>
+
+commit 8f34e5bd7024d1ffebddd82d7318b1be17be9e9a upstream.
+
+there is a chance that always get response CRC error after HS200 tuning,
+the reason is that need set CMD_TA to 2. this modification is only for
+MT8173.
+
+Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com>
+Tested-by: Hsin-Yi Wang <hsinyi@chromium.org>
+Cc: stable@vger.kernel.org
+Fixes: 1ede5cb88a29 ("mmc: mediatek: Use data tune for CMD line tune")
+Link: https://lore.kernel.org/r/20191204071958.18553-1-chaotian.jing@mediatek.com
+Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mmc/host/mtk-sd.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/mmc/host/mtk-sd.c
++++ b/drivers/mmc/host/mtk-sd.c
+@@ -228,6 +228,7 @@
+ #define MSDC_PATCH_BIT_SPCPUSH    (0x1 << 29) /* RW */
+ #define MSDC_PATCH_BIT_DECRCTMO   (0x1 << 30) /* RW */
++#define MSDC_PATCH_BIT1_CMDTA     (0x7 << 3)    /* RW */
+ #define MSDC_PATCH_BIT1_STOP_DLY  (0xf << 8)    /* RW */
+ #define MSDC_PATCH_BIT2_CFGRESP   (0x1 << 15)   /* RW */
+@@ -1673,6 +1674,7 @@ static int hs400_tune_response(struct mm
+       /* select EMMC50 PAD CMD tune */
+       sdr_set_bits(host->base + PAD_CMD_TUNE, BIT(0));
++      sdr_set_field(host->base + MSDC_PATCH_BIT1, MSDC_PATCH_BIT1_CMDTA, 2);
+       if (mmc->ios.timing == MMC_TIMING_MMC_HS200 ||
+           mmc->ios.timing == MMC_TIMING_UHS_SDR104)
diff --git a/queue-4.19/revert-mmc-sdhci-fix-incorrect-switch-to-hs-mode.patch b/queue-4.19/revert-mmc-sdhci-fix-incorrect-switch-to-hs-mode.patch
new file mode 100644 (file)
index 0000000..229e99e
--- /dev/null
@@ -0,0 +1,42 @@
+From 07bcc411567cb96f9d1fc84fff8d387118a2920d Mon Sep 17 00:00:00 2001
+From: Faiz Abbas <faiz_abbas@ti.com>
+Date: Thu, 28 Nov 2019 16:34:22 +0530
+Subject: Revert "mmc: sdhci: Fix incorrect switch to HS mode"
+
+From: Faiz Abbas <faiz_abbas@ti.com>
+
+commit 07bcc411567cb96f9d1fc84fff8d387118a2920d upstream.
+
+This reverts commit c894e33ddc1910e14d6f2a2016f60ab613fd8b37.
+
+This commit aims to treat SD High speed and SDR25 as the same while
+setting UHS Timings in HOST_CONTROL2 which leads to failures with some
+SD cards in AM65x. Revert this commit.
+
+The issue this commit was trying to fix can be implemented in a platform
+specific callback instead of common sdhci code.
+
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
+Acked-by: Adrian Hunter <adrian.hunter@intel.com>
+Link: https://lore.kernel.org/r/20191128110422.25917-1-faiz_abbas@ti.com
+Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mmc/host/sdhci.c |    4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/drivers/mmc/host/sdhci.c
++++ b/drivers/mmc/host/sdhci.c
+@@ -1713,9 +1713,7 @@ void sdhci_set_uhs_signaling(struct sdhc
+               ctrl_2 |= SDHCI_CTRL_UHS_SDR104;
+       else if (timing == MMC_TIMING_UHS_SDR12)
+               ctrl_2 |= SDHCI_CTRL_UHS_SDR12;
+-      else if (timing == MMC_TIMING_SD_HS ||
+-               timing == MMC_TIMING_MMC_HS ||
+-               timing == MMC_TIMING_UHS_SDR25)
++      else if (timing == MMC_TIMING_UHS_SDR25)
+               ctrl_2 |= SDHCI_CTRL_UHS_SDR25;
+       else if (timing == MMC_TIMING_UHS_SDR50)
+               ctrl_2 |= SDHCI_CTRL_UHS_SDR50;
index 0ed1060f8ea04e8f8f52bcf4cac41bd5d7912f2e..7a393908faec18e418db36fa4a04f972c4217592 100644 (file)
@@ -177,3 +177,6 @@ perf-intel-bts-does-not-support-aux-area-sampling.patch
 net-phy-initialise-phydev-speed-and-duplex-sanely.patch
 btrfs-don-t-prematurely-free-work-in-reada_start_mac.patch
 btrfs-don-t-prematurely-free-work-in-scrub_missing_r.patch
+revert-mmc-sdhci-fix-incorrect-switch-to-hs-mode.patch
+mmc-mediatek-fix-cmd_ta-to-2-for-mt8173-hs200-hs400-mode.patch
+can-kvaser_usb-kvaser_usb_leaf-fix-some-info-leaks-to-usb-devices.patch