From 08455c477509107339030204dadaa0c37c03c302 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 15 Jul 2022 09:57:24 +0200 Subject: [PATCH] 5.18-stable patches added patches: revert-mtd-rawnand-gpmi-fix-setting-busy-timeout-setting.patch --- ...pmi-fix-setting-busy-timeout-setting.patch | 36 +++++++++++++++++++ queue-5.18/series | 1 + 2 files changed, 37 insertions(+) create mode 100644 queue-5.18/revert-mtd-rawnand-gpmi-fix-setting-busy-timeout-setting.patch create mode 100644 queue-5.18/series diff --git a/queue-5.18/revert-mtd-rawnand-gpmi-fix-setting-busy-timeout-setting.patch b/queue-5.18/revert-mtd-rawnand-gpmi-fix-setting-busy-timeout-setting.patch new file mode 100644 index 00000000000..0e877c5fb72 --- /dev/null +++ b/queue-5.18/revert-mtd-rawnand-gpmi-fix-setting-busy-timeout-setting.patch @@ -0,0 +1,36 @@ +From 6de3fb93297cf5e6159acff59558f785576ef96f Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Fri, 15 Jul 2022 09:21:15 +0200 +Subject: Revert "mtd: rawnand: gpmi: Fix setting busy timeout setting" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Greg Kroah-Hartman + +This reverts commit 8d45b05f7eafc92dd69c006c5c31e0b4933a1a07 which is +commit 06781a5026350cde699d2d10c9914a25c1524f45 upstream. + +It is reported to cause data loss, so revert it to prevent that from +happening for users of this driver. + +Reported-by: Tomasz Moń +Reported-by: Sascha Hauer +Cc: Miquel Raynal +Link: https://lore.kernel.org/all/20220701110341.3094023-1-s.hauer@pengutronix.de/ +Signed-off-by: Greg Kroah-Hartman +--- + drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c ++++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +@@ -695,7 +695,7 @@ static int gpmi_nfc_compute_timings(stru + hw->timing0 = BF_GPMI_TIMING0_ADDRESS_SETUP(addr_setup_cycles) | + BF_GPMI_TIMING0_DATA_HOLD(data_hold_cycles) | + BF_GPMI_TIMING0_DATA_SETUP(data_setup_cycles); +- hw->timing1 = BF_GPMI_TIMING1_BUSY_TIMEOUT(DIV_ROUND_UP(busy_timeout_cycles, 4096)); ++ hw->timing1 = BF_GPMI_TIMING1_BUSY_TIMEOUT(busy_timeout_cycles * 4096); + + /* + * Derive NFC ideal delay from {3}: diff --git a/queue-5.18/series b/queue-5.18/series new file mode 100644 index 00000000000..395f16c5d1a --- /dev/null +++ b/queue-5.18/series @@ -0,0 +1 @@ +revert-mtd-rawnand-gpmi-fix-setting-busy-timeout-setting.patch -- 2.47.3