From 0a8fae2b39f28d5f4aaf23652788f4d3e81a5a8f Mon Sep 17 00:00:00 2001 From: Michal Kubecek Date: May 04 2021 10:05:02 +0000 Subject: Merge branches 'users/msuchanek/SLE15-SP2/for-next' and 'users/tiwai/SLE15-SP2/for-next' into SLE15-SP2 Pull blacklist update from Michal Suchánek. Pull driver fixes (git-fixes) from Takashi Iwai. --- diff --git a/patches.suse/mmc-sdhci-of-dwcmshc-fix-rpmb-access.patch b/patches.suse/mmc-sdhci-of-dwcmshc-fix-rpmb-access.patch new file mode 100644 index 0000000..2ac86cf --- /dev/null +++ b/patches.suse/mmc-sdhci-of-dwcmshc-fix-rpmb-access.patch @@ -0,0 +1,89 @@ +From ca1219c0a7432272324660fc9f61a9940f90c50b Mon Sep 17 00:00:00 2001 +From: Jisheng Zhang +Date: Tue, 29 Dec 2020 16:16:25 +0800 +Subject: [PATCH] mmc: sdhci-of-dwcmshc: fix rpmb access +Git-commit: ca1219c0a7432272324660fc9f61a9940f90c50b +Patch-mainline: v5.11-rc5 +References: git-fixes + +Commit a44f7cb93732 ("mmc: core: use mrq->sbc when sending CMD23 for +RPMB") began to use ACMD23 for RPMB if the host supports ACMD23. In +RPMB ACM23 case, we need to set bit 31 to CMD23 argument, otherwise +RPMB write operation will return general fail. + +However, no matter V4 is enabled or not, the dwcmshc's ARGUMENT2 +register is 32-bit block count register which doesn't support stuff +bits of CMD23 argument. So let's handle this specific ACMD23 case. + +From another side, this patch also prepare for future v4 enabling +for dwcmshc, because from the 4.10 spec, the ARGUMENT2 register is +redefined as 32bit block count which doesn't support stuff bits of +CMD23 argument. + +Fixes: a44f7cb93732 ("mmc: core: use mrq->sbc when sending CMD23 for RPMB") +Signed-off-by: Jisheng Zhang +Acked-by: Adrian Hunter +Link: https://lore.kernel.org/r/20201229161625.38255233@xhacker.debian +Cc: stable@vger.kernel.org +Signed-off-by: Ulf Hansson +Acked-by: Takashi Iwai + +--- + drivers/mmc/host/sdhci-of-dwcmshc.c | 27 +++++++++++++++++++++++++++ + 1 file changed, 27 insertions(+) + +diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c +index 4b673792b5a4..d90020ed3622 100644 +--- a/drivers/mmc/host/sdhci-of-dwcmshc.c ++++ b/drivers/mmc/host/sdhci-of-dwcmshc.c +@@ -16,6 +16,8 @@ + + #include "sdhci-pltfm.h" + ++#define SDHCI_DWCMSHC_ARG2_STUFF GENMASK(31, 16) ++ + /* DWCMSHC specific Mode Select value */ + #define DWCMSHC_CTRL_HS400 0x7 + +@@ -49,6 +51,29 @@ static void dwcmshc_adma_write_desc(struct sdhci_host *host, void **desc, + sdhci_adma_write_desc(host, desc, addr, len, cmd); + } + ++static void dwcmshc_check_auto_cmd23(struct mmc_host *mmc, ++ struct mmc_request *mrq) ++{ ++ struct sdhci_host *host = mmc_priv(mmc); ++ ++ /* ++ * No matter V4 is enabled or not, ARGUMENT2 register is 32-bit ++ * block count register which doesn't support stuff bits of ++ * CMD23 argument on dwcmsch host controller. ++ */ ++ if (mrq->sbc && (mrq->sbc->arg & SDHCI_DWCMSHC_ARG2_STUFF)) ++ host->flags &= ~SDHCI_AUTO_CMD23; ++ else ++ host->flags |= SDHCI_AUTO_CMD23; ++} ++ ++static void dwcmshc_request(struct mmc_host *mmc, struct mmc_request *mrq) ++{ ++ dwcmshc_check_auto_cmd23(mmc, mrq); ++ ++ sdhci_request(mmc, mrq); ++} ++ + static void dwcmshc_set_uhs_signaling(struct sdhci_host *host, + unsigned int timing) + { +@@ -133,6 +158,8 @@ static int dwcmshc_probe(struct platform_device *pdev) + + sdhci_get_of_property(pdev); + ++ host->mmc_host_ops.request = dwcmshc_request; ++ + err = sdhci_add_host(host); + if (err) + goto err_clk; +-- +2.26.2 + diff --git a/patches.suse/rtc-ds1307-Fix-wday-settings-for-rx8130.patch b/patches.suse/rtc-ds1307-Fix-wday-settings-for-rx8130.patch new file mode 100644 index 0000000..0c101df --- /dev/null +++ b/patches.suse/rtc-ds1307-Fix-wday-settings-for-rx8130.patch @@ -0,0 +1,53 @@ +From 204756f016726a380bafe619438ed979088bd04a Mon Sep 17 00:00:00 2001 +From: Nobuhiro Iwamatsu +Date: Tue, 20 Apr 2021 11:39:17 +0900 +Subject: [PATCH] rtc: ds1307: Fix wday settings for rx8130 +Git-commit: 204756f016726a380bafe619438ed979088bd04a +Patch-mainline: v5.13-rc1 +References: git-fixes + +rx8130 wday specifies the bit position, not BCD. + +Fixes: ee0981be7704 ("rtc: ds1307: Add support for Epson RX8130CE") +Signed-off-by: Nobuhiro Iwamatsu +Signed-off-by: Alexandre Belloni +Link: https://lore.kernel.org/r/20210420023917.1949066-1-nobuhiro1.iwamatsu@toshiba.co.jp +Acked-by: Takashi Iwai + +--- + drivers/rtc/rtc-ds1307.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c +index 089509d0a3a0..336cb9aa5e33 100644 +--- a/drivers/rtc/rtc-ds1307.c ++++ b/drivers/rtc/rtc-ds1307.c +@@ -293,7 +293,11 @@ static int ds1307_get_time(struct device *dev, struct rtc_time *t) + t->tm_min = bcd2bin(regs[DS1307_REG_MIN] & 0x7f); + tmp = regs[DS1307_REG_HOUR] & 0x3f; + t->tm_hour = bcd2bin(tmp); +- t->tm_wday = bcd2bin(regs[DS1307_REG_WDAY] & 0x07) - 1; ++ /* rx8130 is bit position, not BCD */ ++ if (ds1307->type == rx_8130) ++ t->tm_wday = fls(regs[DS1307_REG_WDAY] & 0x7f); ++ else ++ t->tm_wday = bcd2bin(regs[DS1307_REG_WDAY] & 0x07) - 1; + t->tm_mday = bcd2bin(regs[DS1307_REG_MDAY] & 0x3f); + tmp = regs[DS1307_REG_MONTH] & 0x1f; + t->tm_mon = bcd2bin(tmp) - 1; +@@ -340,7 +344,11 @@ static int ds1307_set_time(struct device *dev, struct rtc_time *t) + regs[DS1307_REG_SECS] = bin2bcd(t->tm_sec); + regs[DS1307_REG_MIN] = bin2bcd(t->tm_min); + regs[DS1307_REG_HOUR] = bin2bcd(t->tm_hour); +- regs[DS1307_REG_WDAY] = bin2bcd(t->tm_wday + 1); ++ /* rx8130 is bit position, not BCD */ ++ if (ds1307->type == rx_8130) ++ regs[DS1307_REG_WDAY] = 1 << t->tm_wday; ++ else ++ regs[DS1307_REG_WDAY] = bin2bcd(t->tm_wday + 1); + regs[DS1307_REG_MDAY] = bin2bcd(t->tm_mday); + regs[DS1307_REG_MONTH] = bin2bcd(t->tm_mon + 1); + +-- +2.26.2 + diff --git a/series.conf b/series.conf index 3b9cf4f..1396c81 100644 --- a/series.conf +++ b/series.conf @@ -18019,6 +18019,7 @@ patches.suse/platform-x86-intel-vbtn-Support-for-tablet-mode-on-D.patch patches.suse/platform-x86-ideapad-laptop-Disable-touchpad_switch-.patch patches.suse/platform-x86-intel-vbtn-Drop-HP-Stream-x360-Converti.patch + patches.suse/mmc-sdhci-of-dwcmshc-fix-rpmb-access.patch patches.suse/mmc-sdhci-xenon-fix-1.8v-regulator-stabilization.patch patches.suse/mmc-core-don-t-initialize-block-size-from-ext_csd-if.patch patches.suse/scsi-scsi_transport_srp-Don-t-block-target-in-failfa.patch @@ -19193,6 +19194,7 @@ patches.suse/i2c-sh7760-fix-IRQ-error-path.patch patches.suse/pinctrl-Ingenic-Add-missing-pins-to-the-JZ4770-MAC-M.patch patches.suse/pinctrl-core-Fix-kernel-doc-string-for-pin_get_name.patch + patches.suse/rtc-ds1307-Fix-wday-settings-for-rx8130.patch # mkp/scsi fixes patches.suse/scsi-lpfc-Fix-illegal-memory-access-on-Abort-IOCBs.patch