All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/5] altera_qspi: call callback even if the erase failed
@ 2015-12-24  0:51 Thomas Chou
  2015-12-24  0:51 ` [U-Boot] [PATCH 2/5] altera_qspi: set fail_addr for erase ops Thomas Chou
                   ` (4 more replies)
  0 siblings, 5 replies; 30+ messages in thread
From: Thomas Chou @ 2015-12-24  0:51 UTC (permalink / raw)
  To: u-boot

Erase is an asynchronous operation.  Device drivers are supposed
to call instr->callback() whenever the operation completes, even
if it completes with a failure.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
---
 drivers/mtd/altera_qspi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/altera_qspi.c b/drivers/mtd/altera_qspi.c
index c7e37ad..627a8cc 100644
--- a/drivers/mtd/altera_qspi.c
+++ b/drivers/mtd/altera_qspi.c
@@ -146,6 +146,7 @@ static int altera_qspi_erase(struct mtd_info *mtd, struct erase_info *instr)
 			debug("erase %08x fail %x\n", sect, stat);
 			writel(stat, &regs->isr); /* clear isr */
 			instr->state = MTD_ERASE_FAILED;
+			mtd_erase_callback(instr);
 			return -EIO;
 		}
 		addr += mtd->erasesize;
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2015-12-28 12:40 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-24  0:51 [U-Boot] [PATCH 1/5] altera_qspi: call callback even if the erase failed Thomas Chou
2015-12-24  0:51 ` [U-Boot] [PATCH 2/5] altera_qspi: set fail_addr for erase ops Thomas Chou
2015-12-28  1:34   ` Thomas Chou
2015-12-24  0:51 ` [U-Boot] [PATCH 3/5] altera_qspi: skip erase if the sector is blank Thomas Chou
2015-12-24  1:28   ` Marek Vasut
2015-12-24  2:23     ` Thomas Chou
2015-12-24  3:01       ` Marek Vasut
2015-12-24  3:08         ` Thomas Chou
2015-12-24  3:43           ` Marek Vasut
2015-12-28  1:34   ` Thomas Chou
2015-12-24  0:51 ` [U-Boot] [PATCH 4/5] altera_qspi: show erase progress Thomas Chou
2015-12-24  1:29   ` Marek Vasut
2015-12-24  2:50     ` Thomas Chou
2015-12-24  3:02       ` Marek Vasut
2015-12-24  3:26         ` Thomas Chou
2015-12-24  3:42           ` Marek Vasut
2015-12-24  5:24             ` Thomas Chou
2015-12-24  5:37               ` Marek Vasut
2015-12-25  0:12                 ` Thomas Chou
2015-12-25  4:08                   ` Marek Vasut
2015-12-25  8:33                     ` Thomas Chou
2015-12-25  9:58                       ` Marek Vasut
2015-12-28  1:17                         ` Thomas Chou
2015-12-28  5:35                           ` Marek Vasut
2015-12-28  8:04                             ` Thomas Chou
2015-12-28 12:40                               ` Marek Vasut
2015-12-28  1:35   ` Thomas Chou
2015-12-24  0:51 ` [U-Boot] [PATCH 5/5] altera_qspi: allow ctrl-c to abort the erase ops Thomas Chou
2015-12-28  1:35   ` Thomas Chou
2015-12-28  1:34 ` [U-Boot] [PATCH 1/5] altera_qspi: call callback even if the erase failed Thomas Chou

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.