projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff0000b
)
mtd: spi-nor-core: Check for ctrlc() in spi_nor_erase()
author
Marek Behún
<marek.behun@nic.cz>
Tue, 5 Oct 2021 13:56:04 +0000
(15:56 +0200)
committer
Jagan Teki
<jagan@amarulasolutions.com>
Sat, 23 Oct 2021 10:17:33 +0000
(15:47 +0530)
May it possible to interrupt the spi_nor_erase() function.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
drivers/mtd/spi/spi-nor-core.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/spi/spi-nor-core.c
b/drivers/mtd/spi/spi-nor-core.c
index
2c71866
..
a857599
100644
(file)
--- a/
drivers/mtd/spi/spi-nor-core.c
+++ b/
drivers/mtd/spi/spi-nor-core.c
@@
-929,6
+929,11
@@
static int spi_nor_erase(struct mtd_info *mtd, struct erase_info *instr)
while (len) {
WATCHDOG_RESET();
+ if (ctrlc()) {
+ addr_known = false;
+ ret = -EINTR;
+ goto erase_err;
+ }
#ifdef CONFIG_SPI_FLASH_BAR
ret = write_bar(nor, addr);
if (ret < 0)