From 30f57f1d89360af6ccbda6cbf8bf0949a0bf0a07 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 1 Jul 2018 12:24:33 +0200 Subject: [PATCH] drop mtd patch from 4.14, 4.17, and 4.9 due to breakage. --- ...oid-walking-all-chips-when-unlocking.patch | 2 +- ...e-erase-functions-to-retry-for-error.patch | 91 ------------------- ...02-fix-segv-unlocking-multiple-chips.patch | 6 +- ...ing-requests-crossing-a-chip-boudary.patch | 2 +- ...0002-use-right-chip-in-do_ppb_xxlock.patch | 6 +- queue-4.14/series | 1 - ...oid-walking-all-chips-when-unlocking.patch | 2 +- ...e-erase-functions-to-retry-for-error.patch | 91 ------------------- ...02-fix-segv-unlocking-multiple-chips.patch | 6 +- ...ing-requests-crossing-a-chip-boudary.patch | 2 +- ...0002-use-right-chip-in-do_ppb_xxlock.patch | 6 +- queue-4.17/series | 1 - ...oid-walking-all-chips-when-unlocking.patch | 2 +- ...e-erase-functions-to-retry-for-error.patch | 91 ------------------- ...02-fix-segv-unlocking-multiple-chips.patch | 6 +- ...ing-requests-crossing-a-chip-boudary.patch | 2 +- ...0002-use-right-chip-in-do_ppb_xxlock.patch | 6 +- queue-4.9/series | 1 - 18 files changed, 24 insertions(+), 300 deletions(-) delete mode 100644 queue-4.14/mtd-cfi_cmdset_0002-change-erase-functions-to-retry-for-error.patch delete mode 100644 queue-4.17/mtd-cfi_cmdset_0002-change-erase-functions-to-retry-for-error.patch delete mode 100644 queue-4.9/mtd-cfi_cmdset_0002-change-erase-functions-to-retry-for-error.patch diff --git a/queue-4.14/mtd-cfi_cmdset_0002-avoid-walking-all-chips-when-unlocking.patch b/queue-4.14/mtd-cfi_cmdset_0002-avoid-walking-all-chips-when-unlocking.patch index f1daf67699f..ceb0e787b02 100644 --- a/queue-4.14/mtd-cfi_cmdset_0002-avoid-walking-all-chips-when-unlocking.patch +++ b/queue-4.14/mtd-cfi_cmdset_0002-avoid-walking-all-chips-when-unlocking.patch @@ -22,7 +22,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -2695,6 +2695,8 @@ static int __maybe_unused cfi_ppb_unlock +@@ -2685,6 +2685,8 @@ static int __maybe_unused cfi_ppb_unlock i++; if (adr >> cfi->chipshift) { diff --git a/queue-4.14/mtd-cfi_cmdset_0002-change-erase-functions-to-retry-for-error.patch b/queue-4.14/mtd-cfi_cmdset_0002-change-erase-functions-to-retry-for-error.patch deleted file mode 100644 index c935b2aa220..00000000000 --- a/queue-4.14/mtd-cfi_cmdset_0002-change-erase-functions-to-retry-for-error.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 45f75b8a919a4255f52df454f1ffdee0e42443b2 Mon Sep 17 00:00:00 2001 -From: Tokunori Ikegami -Date: Wed, 30 May 2018 18:32:28 +0900 -Subject: mtd: cfi_cmdset_0002: Change erase functions to retry for error - -From: Tokunori Ikegami - -commit 45f75b8a919a4255f52df454f1ffdee0e42443b2 upstream. - -For the word write functions it is retried for error. -But it is not implemented to retry for the erase functions. -To make sure for the erase functions change to retry as same. - -This is needed to prevent the flash erase error caused only once. -It was caused by the error case of chip_good() in the do_erase_oneblock(). -Also it was confirmed on the MACRONIX flash device MX29GL512FHT2I-11G. -But the error issue behavior is not able to reproduce at this moment. -The flash controller is parallel Flash interface integrated on BCM53003. - -Signed-off-by: Tokunori Ikegami -Reviewed-by: Joakim Tjernlund -Cc: Chris Packham -Cc: Brian Norris -Cc: David Woodhouse -Cc: Boris Brezillon -Cc: Marek Vasut -Cc: Richard Weinberger -Cc: Cyrille Pitchen -Cc: linux-mtd@lists.infradead.org -Cc: stable@vger.kernel.org -Signed-off-by: Boris Brezillon -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/mtd/chips/cfi_cmdset_0002.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - ---- a/drivers/mtd/chips/cfi_cmdset_0002.c -+++ b/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -2241,6 +2241,7 @@ static int __xipram do_erase_chip(struct - unsigned long int adr; - DECLARE_WAITQUEUE(wait, current); - int ret = 0; -+ int retry_cnt = 0; - - adr = cfi->addr_unlock1; - -@@ -2258,6 +2259,7 @@ static int __xipram do_erase_chip(struct - ENABLE_VPP(map); - xip_disable(map, chip, adr); - -+ retry: - cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); - cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, cfi->device_type, NULL); - cfi_send_gen_cmd(0x80, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); -@@ -2312,6 +2314,9 @@ static int __xipram do_erase_chip(struct - map_write( map, CMD(0xF0), chip->start ); - /* FIXME - should have reset delay before continuing */ - -+ if (++retry_cnt <= MAX_RETRIES) -+ goto retry; -+ - ret = -EIO; - } - -@@ -2331,6 +2336,7 @@ static int __xipram do_erase_oneblock(st - unsigned long timeo = jiffies + HZ; - DECLARE_WAITQUEUE(wait, current); - int ret = 0; -+ int retry_cnt = 0; - - adr += chip->start; - -@@ -2348,6 +2354,7 @@ static int __xipram do_erase_oneblock(st - ENABLE_VPP(map); - xip_disable(map, chip, adr); - -+ retry: - cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); - cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, cfi->device_type, NULL); - cfi_send_gen_cmd(0x80, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); -@@ -2405,6 +2412,9 @@ static int __xipram do_erase_oneblock(st - map_write( map, CMD(0xF0), chip->start ); - /* FIXME - should have reset delay before continuing */ - -+ if (++retry_cnt <= MAX_RETRIES) -+ goto retry; -+ - ret = -EIO; - } - diff --git a/queue-4.14/mtd-cfi_cmdset_0002-fix-segv-unlocking-multiple-chips.patch b/queue-4.14/mtd-cfi_cmdset_0002-fix-segv-unlocking-multiple-chips.patch index 20a9e3c3179..eca9ad7b1b4 100644 --- a/queue-4.14/mtd-cfi_cmdset_0002-fix-segv-unlocking-multiple-chips.patch +++ b/queue-4.14/mtd-cfi_cmdset_0002-fix-segv-unlocking-multiple-chips.patch @@ -25,7 +25,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -2545,7 +2545,7 @@ static int cfi_atmel_unlock(struct mtd_i +@@ -2535,7 +2535,7 @@ static int cfi_atmel_unlock(struct mtd_i struct ppb_lock { struct flchip *chip; @@ -34,7 +34,7 @@ Signed-off-by: Greg Kroah-Hartman int locked; }; -@@ -2681,7 +2681,7 @@ static int __maybe_unused cfi_ppb_unlock +@@ -2671,7 +2671,7 @@ static int __maybe_unused cfi_ppb_unlock */ if ((adr < ofs) || (adr >= (ofs + len))) { sect[sectors].chip = &cfi->chips[chipnum]; @@ -43,7 +43,7 @@ Signed-off-by: Greg Kroah-Hartman sect[sectors].locked = do_ppb_xxlock( map, &cfi->chips[chipnum], adr, 0, DO_XXLOCK_ONEBLOCK_GETLOCK); -@@ -2725,7 +2725,7 @@ static int __maybe_unused cfi_ppb_unlock +@@ -2715,7 +2715,7 @@ static int __maybe_unused cfi_ppb_unlock */ for (i = 0; i < sectors; i++) { if (sect[i].locked) diff --git a/queue-4.14/mtd-cfi_cmdset_0002-fix-unlocking-requests-crossing-a-chip-boudary.patch b/queue-4.14/mtd-cfi_cmdset_0002-fix-unlocking-requests-crossing-a-chip-boudary.patch index 4388b0d0878..18dd785188f 100644 --- a/queue-4.14/mtd-cfi_cmdset_0002-fix-unlocking-requests-crossing-a-chip-boudary.patch +++ b/queue-4.14/mtd-cfi_cmdset_0002-fix-unlocking-requests-crossing-a-chip-boudary.patch @@ -25,7 +25,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -2679,7 +2679,7 @@ static int __maybe_unused cfi_ppb_unlock +@@ -2669,7 +2669,7 @@ static int __maybe_unused cfi_ppb_unlock * sectors shall be unlocked, so lets keep their locking * status at "unlocked" (locked=0) for the final re-locking. */ diff --git a/queue-4.14/mtd-cfi_cmdset_0002-use-right-chip-in-do_ppb_xxlock.patch b/queue-4.14/mtd-cfi_cmdset_0002-use-right-chip-in-do_ppb_xxlock.patch index b47eb1dc4d5..a21dff4300e 100644 --- a/queue-4.14/mtd-cfi_cmdset_0002-use-right-chip-in-do_ppb_xxlock.patch +++ b/queue-4.14/mtd-cfi_cmdset_0002-use-right-chip-in-do_ppb_xxlock.patch @@ -24,7 +24,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -2563,8 +2563,9 @@ static int __maybe_unused do_ppb_xxlock( +@@ -2553,8 +2553,9 @@ static int __maybe_unused do_ppb_xxlock( unsigned long timeo; int ret; @@ -35,7 +35,7 @@ Signed-off-by: Greg Kroah-Hartman if (ret) { mutex_unlock(&chip->mutex); return ret; -@@ -2582,8 +2583,8 @@ static int __maybe_unused do_ppb_xxlock( +@@ -2572,8 +2573,8 @@ static int __maybe_unused do_ppb_xxlock( if (thunk == DO_XXLOCK_ONEBLOCK_LOCK) { chip->state = FL_LOCKING; @@ -46,7 +46,7 @@ Signed-off-by: Greg Kroah-Hartman } else if (thunk == DO_XXLOCK_ONEBLOCK_UNLOCK) { /* * Unlocking of one specific sector is not supported, so we -@@ -2621,7 +2622,7 @@ static int __maybe_unused do_ppb_xxlock( +@@ -2611,7 +2612,7 @@ static int __maybe_unused do_ppb_xxlock( map_write(map, CMD(0x00), chip->start); chip->state = FL_READY; diff --git a/queue-4.14/series b/queue-4.14/series index b55c65cb3f9..a6b70466646 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -70,7 +70,6 @@ ib-hfi1-fix-user-context-tail-allocation-for-dma_rtail.patch rdma-mlx4-discard-unknown-sqp-work-requests.patch xprtrdma-return-enobufs-when-no-pages-are-available.patch mtd-cfi_cmdset_0002-change-write-buffer-to-check-correct-value.patch -mtd-cfi_cmdset_0002-change-erase-functions-to-retry-for-error.patch mtd-cfi_cmdset_0002-use-right-chip-in-do_ppb_xxlock.patch mtd-cfi_cmdset_0002-fix-segv-unlocking-multiple-chips.patch mtd-cfi_cmdset_0002-fix-unlocking-requests-crossing-a-chip-boudary.patch diff --git a/queue-4.17/mtd-cfi_cmdset_0002-avoid-walking-all-chips-when-unlocking.patch b/queue-4.17/mtd-cfi_cmdset_0002-avoid-walking-all-chips-when-unlocking.patch index 582b0ba6412..4b4f411a39a 100644 --- a/queue-4.17/mtd-cfi_cmdset_0002-avoid-walking-all-chips-when-unlocking.patch +++ b/queue-4.17/mtd-cfi_cmdset_0002-avoid-walking-all-chips-when-unlocking.patch @@ -22,7 +22,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -2675,6 +2675,8 @@ static int __maybe_unused cfi_ppb_unlock +@@ -2665,6 +2665,8 @@ static int __maybe_unused cfi_ppb_unlock i++; if (adr >> cfi->chipshift) { diff --git a/queue-4.17/mtd-cfi_cmdset_0002-change-erase-functions-to-retry-for-error.patch b/queue-4.17/mtd-cfi_cmdset_0002-change-erase-functions-to-retry-for-error.patch deleted file mode 100644 index c935b2aa220..00000000000 --- a/queue-4.17/mtd-cfi_cmdset_0002-change-erase-functions-to-retry-for-error.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 45f75b8a919a4255f52df454f1ffdee0e42443b2 Mon Sep 17 00:00:00 2001 -From: Tokunori Ikegami -Date: Wed, 30 May 2018 18:32:28 +0900 -Subject: mtd: cfi_cmdset_0002: Change erase functions to retry for error - -From: Tokunori Ikegami - -commit 45f75b8a919a4255f52df454f1ffdee0e42443b2 upstream. - -For the word write functions it is retried for error. -But it is not implemented to retry for the erase functions. -To make sure for the erase functions change to retry as same. - -This is needed to prevent the flash erase error caused only once. -It was caused by the error case of chip_good() in the do_erase_oneblock(). -Also it was confirmed on the MACRONIX flash device MX29GL512FHT2I-11G. -But the error issue behavior is not able to reproduce at this moment. -The flash controller is parallel Flash interface integrated on BCM53003. - -Signed-off-by: Tokunori Ikegami -Reviewed-by: Joakim Tjernlund -Cc: Chris Packham -Cc: Brian Norris -Cc: David Woodhouse -Cc: Boris Brezillon -Cc: Marek Vasut -Cc: Richard Weinberger -Cc: Cyrille Pitchen -Cc: linux-mtd@lists.infradead.org -Cc: stable@vger.kernel.org -Signed-off-by: Boris Brezillon -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/mtd/chips/cfi_cmdset_0002.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - ---- a/drivers/mtd/chips/cfi_cmdset_0002.c -+++ b/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -2241,6 +2241,7 @@ static int __xipram do_erase_chip(struct - unsigned long int adr; - DECLARE_WAITQUEUE(wait, current); - int ret = 0; -+ int retry_cnt = 0; - - adr = cfi->addr_unlock1; - -@@ -2258,6 +2259,7 @@ static int __xipram do_erase_chip(struct - ENABLE_VPP(map); - xip_disable(map, chip, adr); - -+ retry: - cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); - cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, cfi->device_type, NULL); - cfi_send_gen_cmd(0x80, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); -@@ -2312,6 +2314,9 @@ static int __xipram do_erase_chip(struct - map_write( map, CMD(0xF0), chip->start ); - /* FIXME - should have reset delay before continuing */ - -+ if (++retry_cnt <= MAX_RETRIES) -+ goto retry; -+ - ret = -EIO; - } - -@@ -2331,6 +2336,7 @@ static int __xipram do_erase_oneblock(st - unsigned long timeo = jiffies + HZ; - DECLARE_WAITQUEUE(wait, current); - int ret = 0; -+ int retry_cnt = 0; - - adr += chip->start; - -@@ -2348,6 +2354,7 @@ static int __xipram do_erase_oneblock(st - ENABLE_VPP(map); - xip_disable(map, chip, adr); - -+ retry: - cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); - cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, cfi->device_type, NULL); - cfi_send_gen_cmd(0x80, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); -@@ -2405,6 +2412,9 @@ static int __xipram do_erase_oneblock(st - map_write( map, CMD(0xF0), chip->start ); - /* FIXME - should have reset delay before continuing */ - -+ if (++retry_cnt <= MAX_RETRIES) -+ goto retry; -+ - ret = -EIO; - } - diff --git a/queue-4.17/mtd-cfi_cmdset_0002-fix-segv-unlocking-multiple-chips.patch b/queue-4.17/mtd-cfi_cmdset_0002-fix-segv-unlocking-multiple-chips.patch index b97568eca75..b6a1dad5d46 100644 --- a/queue-4.17/mtd-cfi_cmdset_0002-fix-segv-unlocking-multiple-chips.patch +++ b/queue-4.17/mtd-cfi_cmdset_0002-fix-segv-unlocking-multiple-chips.patch @@ -25,7 +25,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -2525,7 +2525,7 @@ static int cfi_atmel_unlock(struct mtd_i +@@ -2515,7 +2515,7 @@ static int cfi_atmel_unlock(struct mtd_i struct ppb_lock { struct flchip *chip; @@ -34,7 +34,7 @@ Signed-off-by: Greg Kroah-Hartman int locked; }; -@@ -2661,7 +2661,7 @@ static int __maybe_unused cfi_ppb_unlock +@@ -2651,7 +2651,7 @@ static int __maybe_unused cfi_ppb_unlock */ if ((adr < ofs) || (adr >= (ofs + len))) { sect[sectors].chip = &cfi->chips[chipnum]; @@ -43,7 +43,7 @@ Signed-off-by: Greg Kroah-Hartman sect[sectors].locked = do_ppb_xxlock( map, &cfi->chips[chipnum], adr, 0, DO_XXLOCK_ONEBLOCK_GETLOCK); -@@ -2705,7 +2705,7 @@ static int __maybe_unused cfi_ppb_unlock +@@ -2695,7 +2695,7 @@ static int __maybe_unused cfi_ppb_unlock */ for (i = 0; i < sectors; i++) { if (sect[i].locked) diff --git a/queue-4.17/mtd-cfi_cmdset_0002-fix-unlocking-requests-crossing-a-chip-boudary.patch b/queue-4.17/mtd-cfi_cmdset_0002-fix-unlocking-requests-crossing-a-chip-boudary.patch index 34cffe1d1a3..d5e98ea5f68 100644 --- a/queue-4.17/mtd-cfi_cmdset_0002-fix-unlocking-requests-crossing-a-chip-boudary.patch +++ b/queue-4.17/mtd-cfi_cmdset_0002-fix-unlocking-requests-crossing-a-chip-boudary.patch @@ -25,7 +25,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -2659,7 +2659,7 @@ static int __maybe_unused cfi_ppb_unlock +@@ -2649,7 +2649,7 @@ static int __maybe_unused cfi_ppb_unlock * sectors shall be unlocked, so lets keep their locking * status at "unlocked" (locked=0) for the final re-locking. */ diff --git a/queue-4.17/mtd-cfi_cmdset_0002-use-right-chip-in-do_ppb_xxlock.patch b/queue-4.17/mtd-cfi_cmdset_0002-use-right-chip-in-do_ppb_xxlock.patch index 7a0a9778ccf..3d6e2d266a1 100644 --- a/queue-4.17/mtd-cfi_cmdset_0002-use-right-chip-in-do_ppb_xxlock.patch +++ b/queue-4.17/mtd-cfi_cmdset_0002-use-right-chip-in-do_ppb_xxlock.patch @@ -24,7 +24,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -2543,8 +2543,9 @@ static int __maybe_unused do_ppb_xxlock( +@@ -2533,8 +2533,9 @@ static int __maybe_unused do_ppb_xxlock( unsigned long timeo; int ret; @@ -35,7 +35,7 @@ Signed-off-by: Greg Kroah-Hartman if (ret) { mutex_unlock(&chip->mutex); return ret; -@@ -2562,8 +2563,8 @@ static int __maybe_unused do_ppb_xxlock( +@@ -2552,8 +2553,8 @@ static int __maybe_unused do_ppb_xxlock( if (thunk == DO_XXLOCK_ONEBLOCK_LOCK) { chip->state = FL_LOCKING; @@ -46,7 +46,7 @@ Signed-off-by: Greg Kroah-Hartman } else if (thunk == DO_XXLOCK_ONEBLOCK_UNLOCK) { /* * Unlocking of one specific sector is not supported, so we -@@ -2601,7 +2602,7 @@ static int __maybe_unused do_ppb_xxlock( +@@ -2591,7 +2592,7 @@ static int __maybe_unused do_ppb_xxlock( map_write(map, CMD(0x00), chip->start); chip->state = FL_READY; diff --git a/queue-4.17/series b/queue-4.17/series index 13cb43de382..2a084671bb3 100644 --- a/queue-4.17/series +++ b/queue-4.17/series @@ -98,7 +98,6 @@ xprtrdma-return-enobufs-when-no-pages-are-available.patch rdma-core-save-kernel-caller-name-when-creating-cq-using-ib_create_cq.patch mtd-rawnand-do-not-check-fail-bit-when-executing-a-set_features-op.patch mtd-cfi_cmdset_0002-change-write-buffer-to-check-correct-value.patch -mtd-cfi_cmdset_0002-change-erase-functions-to-retry-for-error.patch mtd-rawnand-denali_dt-set-clk_x_rate-to-200-mhz-unconditionally.patch mtd-rawnand-fix-return-value-check-for-bad-block-status.patch mtd-rawnand-mxc-set-spare-area-size-register-explicitly.patch diff --git a/queue-4.9/mtd-cfi_cmdset_0002-avoid-walking-all-chips-when-unlocking.patch b/queue-4.9/mtd-cfi_cmdset_0002-avoid-walking-all-chips-when-unlocking.patch index 04ec813af0c..cc5b1022520 100644 --- a/queue-4.9/mtd-cfi_cmdset_0002-avoid-walking-all-chips-when-unlocking.patch +++ b/queue-4.9/mtd-cfi_cmdset_0002-avoid-walking-all-chips-when-unlocking.patch @@ -22,7 +22,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -2691,6 +2691,8 @@ static int __maybe_unused cfi_ppb_unlock +@@ -2681,6 +2681,8 @@ static int __maybe_unused cfi_ppb_unlock i++; if (adr >> cfi->chipshift) { diff --git a/queue-4.9/mtd-cfi_cmdset_0002-change-erase-functions-to-retry-for-error.patch b/queue-4.9/mtd-cfi_cmdset_0002-change-erase-functions-to-retry-for-error.patch deleted file mode 100644 index b99d28d3623..00000000000 --- a/queue-4.9/mtd-cfi_cmdset_0002-change-erase-functions-to-retry-for-error.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 45f75b8a919a4255f52df454f1ffdee0e42443b2 Mon Sep 17 00:00:00 2001 -From: Tokunori Ikegami -Date: Wed, 30 May 2018 18:32:28 +0900 -Subject: mtd: cfi_cmdset_0002: Change erase functions to retry for error - -From: Tokunori Ikegami - -commit 45f75b8a919a4255f52df454f1ffdee0e42443b2 upstream. - -For the word write functions it is retried for error. -But it is not implemented to retry for the erase functions. -To make sure for the erase functions change to retry as same. - -This is needed to prevent the flash erase error caused only once. -It was caused by the error case of chip_good() in the do_erase_oneblock(). -Also it was confirmed on the MACRONIX flash device MX29GL512FHT2I-11G. -But the error issue behavior is not able to reproduce at this moment. -The flash controller is parallel Flash interface integrated on BCM53003. - -Signed-off-by: Tokunori Ikegami -Reviewed-by: Joakim Tjernlund -Cc: Chris Packham -Cc: Brian Norris -Cc: David Woodhouse -Cc: Boris Brezillon -Cc: Marek Vasut -Cc: Richard Weinberger -Cc: Cyrille Pitchen -Cc: linux-mtd@lists.infradead.org -Cc: stable@vger.kernel.org -Signed-off-by: Boris Brezillon -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/mtd/chips/cfi_cmdset_0002.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - ---- a/drivers/mtd/chips/cfi_cmdset_0002.c -+++ b/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -2237,6 +2237,7 @@ static int __xipram do_erase_chip(struct - unsigned long int adr; - DECLARE_WAITQUEUE(wait, current); - int ret = 0; -+ int retry_cnt = 0; - - adr = cfi->addr_unlock1; - -@@ -2254,6 +2255,7 @@ static int __xipram do_erase_chip(struct - ENABLE_VPP(map); - xip_disable(map, chip, adr); - -+ retry: - cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); - cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, cfi->device_type, NULL); - cfi_send_gen_cmd(0x80, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); -@@ -2308,6 +2310,9 @@ static int __xipram do_erase_chip(struct - map_write( map, CMD(0xF0), chip->start ); - /* FIXME - should have reset delay before continuing */ - -+ if (++retry_cnt <= MAX_RETRIES) -+ goto retry; -+ - ret = -EIO; - } - -@@ -2327,6 +2332,7 @@ static int __xipram do_erase_oneblock(st - unsigned long timeo = jiffies + HZ; - DECLARE_WAITQUEUE(wait, current); - int ret = 0; -+ int retry_cnt = 0; - - adr += chip->start; - -@@ -2344,6 +2350,7 @@ static int __xipram do_erase_oneblock(st - ENABLE_VPP(map); - xip_disable(map, chip, adr); - -+ retry: - cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); - cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, cfi->device_type, NULL); - cfi_send_gen_cmd(0x80, cfi->addr_unlock1, chip->start, map, cfi, cfi->device_type, NULL); -@@ -2401,6 +2408,9 @@ static int __xipram do_erase_oneblock(st - map_write( map, CMD(0xF0), chip->start ); - /* FIXME - should have reset delay before continuing */ - -+ if (++retry_cnt <= MAX_RETRIES) -+ goto retry; -+ - ret = -EIO; - } - diff --git a/queue-4.9/mtd-cfi_cmdset_0002-fix-segv-unlocking-multiple-chips.patch b/queue-4.9/mtd-cfi_cmdset_0002-fix-segv-unlocking-multiple-chips.patch index af3969bd130..53cc12f968e 100644 --- a/queue-4.9/mtd-cfi_cmdset_0002-fix-segv-unlocking-multiple-chips.patch +++ b/queue-4.9/mtd-cfi_cmdset_0002-fix-segv-unlocking-multiple-chips.patch @@ -25,7 +25,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -2541,7 +2541,7 @@ static int cfi_atmel_unlock(struct mtd_i +@@ -2531,7 +2531,7 @@ static int cfi_atmel_unlock(struct mtd_i struct ppb_lock { struct flchip *chip; @@ -34,7 +34,7 @@ Signed-off-by: Greg Kroah-Hartman int locked; }; -@@ -2677,7 +2677,7 @@ static int __maybe_unused cfi_ppb_unlock +@@ -2667,7 +2667,7 @@ static int __maybe_unused cfi_ppb_unlock */ if ((adr < ofs) || (adr >= (ofs + len))) { sect[sectors].chip = &cfi->chips[chipnum]; @@ -43,7 +43,7 @@ Signed-off-by: Greg Kroah-Hartman sect[sectors].locked = do_ppb_xxlock( map, &cfi->chips[chipnum], adr, 0, DO_XXLOCK_ONEBLOCK_GETLOCK); -@@ -2721,7 +2721,7 @@ static int __maybe_unused cfi_ppb_unlock +@@ -2711,7 +2711,7 @@ static int __maybe_unused cfi_ppb_unlock */ for (i = 0; i < sectors; i++) { if (sect[i].locked) diff --git a/queue-4.9/mtd-cfi_cmdset_0002-fix-unlocking-requests-crossing-a-chip-boudary.patch b/queue-4.9/mtd-cfi_cmdset_0002-fix-unlocking-requests-crossing-a-chip-boudary.patch index f8f7602cf85..756813cef36 100644 --- a/queue-4.9/mtd-cfi_cmdset_0002-fix-unlocking-requests-crossing-a-chip-boudary.patch +++ b/queue-4.9/mtd-cfi_cmdset_0002-fix-unlocking-requests-crossing-a-chip-boudary.patch @@ -25,7 +25,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -2675,7 +2675,7 @@ static int __maybe_unused cfi_ppb_unlock +@@ -2665,7 +2665,7 @@ static int __maybe_unused cfi_ppb_unlock * sectors shall be unlocked, so lets keep their locking * status at "unlocked" (locked=0) for the final re-locking. */ diff --git a/queue-4.9/mtd-cfi_cmdset_0002-use-right-chip-in-do_ppb_xxlock.patch b/queue-4.9/mtd-cfi_cmdset_0002-use-right-chip-in-do_ppb_xxlock.patch index 5999d4b82c1..7d6a3971f14 100644 --- a/queue-4.9/mtd-cfi_cmdset_0002-use-right-chip-in-do_ppb_xxlock.patch +++ b/queue-4.9/mtd-cfi_cmdset_0002-use-right-chip-in-do_ppb_xxlock.patch @@ -24,7 +24,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c -@@ -2559,8 +2559,9 @@ static int __maybe_unused do_ppb_xxlock( +@@ -2549,8 +2549,9 @@ static int __maybe_unused do_ppb_xxlock( unsigned long timeo; int ret; @@ -35,7 +35,7 @@ Signed-off-by: Greg Kroah-Hartman if (ret) { mutex_unlock(&chip->mutex); return ret; -@@ -2578,8 +2579,8 @@ static int __maybe_unused do_ppb_xxlock( +@@ -2568,8 +2569,8 @@ static int __maybe_unused do_ppb_xxlock( if (thunk == DO_XXLOCK_ONEBLOCK_LOCK) { chip->state = FL_LOCKING; @@ -46,7 +46,7 @@ Signed-off-by: Greg Kroah-Hartman } else if (thunk == DO_XXLOCK_ONEBLOCK_UNLOCK) { /* * Unlocking of one specific sector is not supported, so we -@@ -2617,7 +2618,7 @@ static int __maybe_unused do_ppb_xxlock( +@@ -2607,7 +2608,7 @@ static int __maybe_unused do_ppb_xxlock( map_write(map, CMD(0x00), chip->start); chip->state = FL_READY; diff --git a/queue-4.9/series b/queue-4.9/series index bc748624d29..7078d01d4cf 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -39,7 +39,6 @@ ib-isert-fix-for-lib-dma_debug-check_sync-warning.patch ib-isert-fix-t10-pi-check-mask-setting.patch rdma-mlx4-discard-unknown-sqp-work-requests.patch mtd-cfi_cmdset_0002-change-write-buffer-to-check-correct-value.patch -mtd-cfi_cmdset_0002-change-erase-functions-to-retry-for-error.patch mtd-cfi_cmdset_0002-use-right-chip-in-do_ppb_xxlock.patch mtd-cfi_cmdset_0002-fix-segv-unlocking-multiple-chips.patch mtd-cfi_cmdset_0002-fix-unlocking-requests-crossing-a-chip-boudary.patch -- 2.47.3